Gutenberg Blocks and Template Library by Otter - Version 1.5.0

Version Description

Download this release

Release Info

Developer themeisle
Plugin Icon wp plugin Gutenberg Blocks and Template Library by Otter
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.1 to 1.5.0

Files changed (48) hide show
  1. CHANGELOG.md +5 -0
  2. build/build.css +2 -2
  3. build/build.js +3 -3
  4. docker-compose.yml +0 -31
  5. otter-blocks.php +2 -2
  6. readme.md +8 -0
  7. readme.txt +8 -0
  8. src/Components/Footer.js +0 -24
  9. src/Components/Header.js +0 -46
  10. src/Components/Main.js +0 -260
  11. src/Components/Onboarding.js +0 -154
  12. src/index.js +0 -42
  13. src/style.scss +0 -340
  14. vendor/autoload.php +1 -1
  15. vendor/codeinwp/gutenberg-animation/src/data.js +0 -400
  16. vendor/codeinwp/gutenberg-animation/src/editor.js +0 -206
  17. vendor/codeinwp/gutenberg-animation/src/frontend.js +0 -210
  18. vendor/codeinwp/gutenberg-animation/src/index.js +0 -50
  19. vendor/codeinwp/gutenberg-animation/webpack.config.js +0 -56
  20. vendor/codeinwp/gutenberg-blocks/src/frontend/google-map/index.js +0 -71
  21. vendor/codeinwp/gutenberg-blocks/src/frontend/google-map/styles.js +0 -960
  22. vendor/codeinwp/gutenberg-blocks/src/frontend/slider/index.js +0 -28
  23. vendor/codeinwp/gutenberg-blocks/webpack.config.js +0 -108
  24. vendor/codeinwp/gutenberg-css/webpack.config.js +0 -70
  25. vendor/codeinwp/themeisle-sdk/CHANGELOG.md +13 -0
  26. vendor/codeinwp/themeisle-sdk/load.php +1 -1
  27. vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php +0 -66
  28. vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php +0 -108
  29. vendor/codeinwp/themeisle-sdk/src/Loader.php +0 -126
  30. vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php +0 -466
  31. vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php +0 -358
  32. vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +0 -798
  33. vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php +0 -177
  34. vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php +0 -459
  35. vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php +0 -374
  36. vendor/codeinwp/themeisle-sdk/src/Modules/Review.php +0 -117
  37. vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php +0 -376
  38. vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php +0 -918
  39. vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php +0 -850
  40. vendor/codeinwp/themeisle-sdk/src/Product.php +0 -418
  41. vendor/composer/autoload_real.php +10 -7
  42. vendor/composer/autoload_static.php +4 -4
  43. vendor/composer/installed.json +6 -6
  44. vendor/tubalmartin/cssmin/src/Colors.php +0 -155
  45. vendor/tubalmartin/cssmin/src/Command.php +0 -223
  46. vendor/tubalmartin/cssmin/src/Minifier.php +0 -895
  47. vendor/tubalmartin/cssmin/src/Utils.php +0 -149
  48. webpack.config.js +0 -74
CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  ##### [Version 1.4.1](https://github.com/Codeinwp/otter-blocks/compare/v1.4.0...v1.4.1) (2020-02-29)
2
 
3
  - Fix issue with Button Group & Global Defaults
1
+ #### [Version 1.5.0](https://github.com/Codeinwp/otter-blocks/compare/v1.4.1...v1.5.0) (2020-03-20)
2
+
3
+ - Adds compatibility with WordPress 5.4
4
+ - Adds compatibility with WordPress 5.4
5
+
6
  ##### [Version 1.4.1](https://github.com/Codeinwp/otter-blocks/compare/v1.4.0...v1.4.1) (2020-02-29)
7
 
8
  - Fix issue with Button Group & Global Defaults
build/build.css CHANGED
@@ -1,4 +1,4 @@
1
- *{box-sizing:inherit}.settings_page_otter{background:#f6f6f6;font-size:14px;position:relative;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}#wpcontent{padding-left:0}.auto-fold #wpcontent{padding-left:0}#otter .otter-header{padding:20px 10px;background-color:#ffffff;box-shadow:0 1px 0 rgba(213,213,213,0.5),0 1px 2px #eee}#otter .otter-header.onboarding .otter-container .otter-logo{justify-content:center}#otter .otter-header .otter-container{margin:0 auto;max-width:100%;max-width:750px}#otter .otter-header .otter-container .otter-logo{display:flex;align-items:center}#otter .otter-header .otter-container .otter-logo img{max-width:200px}#otter .otter-header .otter-container .otter-logo .version{background-color:#e5e5e5;border-radius:3px;font-size:0.8em;font-weight:400;margin-left:10px;padding:2px 7px}#otter .otter-main{margin-left:auto;margin-right:auto;max-width:750px}#otter .otter-main .components-panel__body{margin:25px 0;background:#fff;border:1px solid #e2e4e7}#otter .otter-main .components-panel__body .components-panel__body-toggle{border-bottom:1px solid #d6e2ed}#otter .otter-main .components-panel__body .components-panel__row{padding:20px 10px 10px;margin:0}#otter .otter-main .components-panel__body .components-panel__row .components-base-control .components-base-control__field{display:flex;align-items:center;margin-bottom:10px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field{width:100%}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field{display:block}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field label{font-weight:600;margin-bottom:10px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field input{border:1px solid #b7c9d9;border-radius:3px;font-size:14px;padding:9px 15px;width:100%;box-shadow:none;height:40px;margin:0 0 10px 0;color:#444}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field input:disabled{background:#f6f6f6;border-color:#eeeeee;color:#bbbbbb}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field input:focus{border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2;outline:2px solid transparent;outline-offset:-2px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field .otter-text-field-button-group{display:flex;align-items:center;margin:2px 0 15px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field .otter-text-field-button-group .is-primary{padding:2px 20px;height:auto;font-size:14px;margin-right:10px}#otter .otter-main .components-panel__body .otter-info{padding:0 10px 10px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU4AAAFeCAYAAADqhfbyAAAgAElEQVR4nO2deXgU553nf31Iat1CCCEDAnFjxGmDYkNshK84kzAm9kwSJtkJfjwzfibJZMhsZtYzu/sY7x+7efZ5ZofM7G6eZCcTPBMPdg4HjHEcB3PZHBY2IIw4xCUhJITQ1TpbUqt7n1+pClr9VldXdVV1v2/V7/M8/QBvNVJVH9/63S8QBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBOF6CIIgCIIgCMJ+PLy+xtFolFkjnE1HQ10JAKwCAOVPpEp+gLy+0uSLcDjm72cAoFd+4N+hvLrmEPM/iIzh8fApUSScRNrpaKirjRHEWosE0UqCspA2yQ8U06by6pom+rSkFxJOg5BwOgNZJGtlC7KKM4E0iiKoh5Q/y6tresW6BLEg4TQICad4dDTUVcWIZK3gIqmXZllID8lCSlaphZBwGoSEk3/kmKRiUW4GgDluf00AoF4W0d0ULzUPCadBSDj5RLYqN8uPDW5/PZKArv3uGCElt94gJJwGIeHkh46GOnS9t5JVaZo9ALCzvLpmt+DXkTZIOA1CwplZZMtyG4mlLSiW6I7y6pozDrw+yyDhNAgJZ/qRY5Zb5YcbEjs8gMmlHbIlSq58HCScBiHhTB9yyRCK5Tfccs0colih2ykzfw8SToOQcNpLjHW5jVxx7thTXl2z2e0vAnAsnH5mhXA0cuxyuxy7LKZ3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8foCS4yIPsF/8AAAAASUVORK5CYII=);background-size:100px;background-repeat:no-repeat;background-position:bottom right}#otter .otter-main .components-panel__body .otter-info h2{font-weight:300;margin-bottom:10px}#otter .otter-main .components-panel__body .otter-info p{margin:0 0 1.5em 0}#otter .otter-main .components-panel__body .otter-info .otter-info-button-group{display:flex}#otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-default{padding:2px 20px;height:auto;font-size:14px}#otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-default:first-child{margin-right:15px}#otter .otter-footer{text-align:center;color:#72777c;font-style:italic;border-top:1px #e1e1e1 solid;border-bottom:1px #e1e1e1 solid;padding:20px;margin:2rem 0 1.5rem}#otter .otter-footer .otter-container{margin:0 auto}#otter .components-placeholder{background:#f6f6f6;margin-top:25vh;margin-bottom:25vh}.otter-onboarding-modal{max-width:350px}.otter-onboarding-modal .components-modal__header{text-align:center}.otter-onboarding-modal .components-modal__header h1{width:100%}.otter-onboarding-modal .otter-onboarding-modal-content{text-align:center;margin:10px 0 15px}.otter-onboarding-modal .otter-onboarding-modal-action{text-align:center;margin:10px 0}.otter-onboarding-modal .otter-onboarding-modal-action .components-button{padding:2px 20px;height:auto;font-size:14px;margin-right:10px}.components-modal__screen-overlay{background-color:rgba(0,0,0,0.5)}.react-joyride__tooltip{font-size:13px !important}.react-joyride__tooltip>div{text-align:left !important}.react-joyride__tooltip div:nth-of-type(2){margin-top:5px !important}.react-joyride__tooltip button{text-decoration:underline}.react-joyride__beacon span:first-child{background-color:#00739c !important}.react-joyride__beacon span:last-child{background-color:rgba(26,129,165,0.4) !important;border:2px solid #00739c !important}.react-joyride__tooltip button[data-action="primary"]{background:#0085ba !important;border-color:#006a95 #00648c #00648c !important;box-shadow:inset 0 -1px 0 #00648c !important;color:#fff !important;text-decoration:none !important;text-shadow:0 -1px 1px #005d82,1px 0 1px #005d82,0 1px 1px #005d82,-1px 0 1px #005d82 !important;padding:2px 20px !important;height:auto !important;line-height:28px !important;font-size:14px !important}.react-joyride__tooltip button[data-action="back"]{color:#23282d !important;font-size:14px !important}.react-notification-root .notification-container-bottom-left{bottom:40px}.react-notification-root .notification-container-mobile-bottom{bottom:60px}@media (min-width: 782px){.react-joyride__spotlight,.__floater,.__floater__open,.react-joyride__beacon{margin-top:-32px}}@media (max-width: 782px){#otter .otter-header .otter-container .otter-logo{justify-content:center}#otter .otter-info{background-image:none !important}.react-joyride__spotlight,.__floater,.__floater__open,.react-joyride__beacon{margin-top:-44px}}@media (max-width: 600px){.react-joyride__spotlight,.__floater,.__floater__open,.react-joyride__beacon{margin-top:0}}
2
 
3
- .notification-container-bottom-center,.notification-container-bottom-left,.notification-container-bottom-right,.notification-container-top-center,.notification-container-top-left,.notification-container-top-right{width:325px;position:absolute;pointer-events:all}.notification-container-top-center{transform:translateX(-50%);top:20px;left:50%}.notification-container-bottom-center{transform:translateX(-50%);bottom:20px;left:50%}.notification-container-top-left{left:20px;top:20px}.notification-container-top-right{right:20px;top:20px}.notification-container-bottom-left{left:20px;bottom:20px}.notification-container-bottom-right{bottom:20px;right:20px}.notification-container-mobile-bottom,.notification-container-mobile-top{pointer-events:all;position:absolute}.notification-container-mobile-top{right:20px;left:20px;top:20px}.notification-container-mobile-bottom{right:20px;left:20px;bottom:20px;margin-bottom:-15px}.notification-default{border-left:8px solid #0562c7}.notification-default,.notification-default .timer{background-color:#007bff}.notification-default .timer-filler{background-color:#fff}.notification-default .notification-close{background-color:#007bff}.notification-success{border-left:8px solid #1f8838}.notification-success,.notification-success .timer{background-color:#28a745}.notification-success .timer-filler{background-color:#fff}.notification-success .notification-close{background-color:#28a745}.notification-danger{border-left:8px solid #bd1120}.notification-danger,.notification-danger .timer{background-color:#dc3545}.notification-danger .timer-filler{background-color:#fff}.notification-danger .notification-close{background-color:#dc3545}.notification-info{border-left:8px solid #138b9e}.notification-info,.notification-info .timer{background-color:#17a2b8}.notification-info .timer-filler{background-color:#fff}.notification-info .notification-close{background-color:#17a2b8}.notification-warning{border-left:8px solid #ce9c09}.notification-warning,.notification-warning .timer{background-color:#eab000}.notification-warning .timer-filler{background-color:#fff}.notification-warning .notification-close{background-color:#eab000}.notification-awesome{border-left:8px solid #4c3fb1}.notification-awesome,.notification-awesome .timer{background-color:#685dc3}.notification-awesome .timer-filler{background-color:#fff}.notification-awesome .notification-close{background-color:#685dc3}@-webkit-keyframes timer{0%{width:100%}to{width:0}}@keyframes timer{0%{width:100%}to{width:0}}.react-notification-root{position:fixed;z-index:9000;pointer-events:none;width:100%;height:100%}.notification-item{display:flex;position:relative;border-radius:3px;margin-bottom:15px;box-shadow:1px 3px 4px rgba(0,0,0,0.2);cursor:pointer}.notification-item .timer{width:100%;margin-top:10px}.notification-item .timer,.notification-item .timer .timer-filler{height:3px;border-radius:5px}.notification-item .notification-title{color:#fff;font-weight:700;font-size:14px;margin-top:5px;margin-bottom:5px}.notification-item .notification-message{color:#fff;max-width:calc(100% - 15px);font-size:14px;line-height:150%;word-wrap:break-word;margin-bottom:0;margin-top:0}.notification-item .notification-content{padding:8px 15px;display:inline-block;width:100%}.notification-item .notification-close{width:18px;height:18px;border-radius:50%;display:inline-block;position:absolute;right:10px;top:10px}.notification-item .notification-close:after{content:"\D7";position:absolute;transform:translate(-50%, -50%);color:#fff;font-size:12px;left:50%;top:50%}.n-parent{width:275px}.notification-container-mobile-bottom .n-parent,.notification-container-mobile-bottom .notification-item,.notification-container-mobile-top .n-parent,.notification-container-mobile-top .notification-item{max-width:100%;width:100%}.notification-container-bottom-right .n-parent,.notification-container-top-right .n-parent{margin-left:auto}.notification-container-bottom-left .n-parent,.notification-container-top-left .n-parent{margin-right:auto}.notification-container-mobile-bottom .n-parent,.notification-container-mobile-top .n-parent{margin-left:auto;margin-right:auto}
4
 
1
+ *{box-sizing:inherit}.settings_page_otter{background:#f6f6f6;font-size:14px;position:relative;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}#wpcontent{padding-left:0}.auto-fold #wpcontent{padding-left:0}#otter .otter-header{padding:20px 10px;background-color:#ffffff;box-shadow:0 1px 0 rgba(213,213,213,0.5),0 1px 2px #eee}#otter .otter-header.onboarding .otter-container .otter-logo{justify-content:center}#otter .otter-header .otter-container{margin:0 auto;max-width:100%;max-width:750px}#otter .otter-header .otter-container .otter-logo{display:flex;align-items:center}#otter .otter-header .otter-container .otter-logo img{max-width:200px}#otter .otter-header .otter-container .otter-logo .version{background-color:#e5e5e5;border-radius:3px;font-size:0.8em;font-weight:400;margin-left:10px;padding:2px 7px}#otter .otter-main{margin-left:auto;margin-right:auto;max-width:750px}#otter .otter-main .components-panel__body{margin:25px 0;background:#fff;border:1px solid #e2e4e7}#otter .otter-main .components-panel__body .components-panel__body-toggle{border-bottom:1px solid #d6e2ed}#otter .otter-main .components-panel__body .components-panel__row{padding:20px 10px 10px;margin:0}#otter .otter-main .components-panel__body .components-panel__row .components-base-control .components-base-control__field{display:flex;align-items:center;margin-bottom:10px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field{width:100%}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field{display:block}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field label{font-weight:600;margin-bottom:10px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field input{border:1px solid #b7c9d9;border-radius:3px;font-size:14px;padding:9px 15px;width:100%;box-shadow:none;height:40px;margin:0 0 10px 0;color:#444}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field input:disabled{background:#f6f6f6;border-color:#eeeeee;color:#bbbbbb}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field input:focus{border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2;outline:2px solid transparent;outline-offset:-2px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field .otter-text-field-button-group{display:flex;align-items:center;margin:2px 0 15px}#otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field .otter-text-field-button-group .is-primary{padding:2px 20px;font-size:14px;margin-right:10px}#otter .otter-main .components-panel__body .otter-info{padding:0 10px 10px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU4AAAFeCAYAAADqhfbyAAAgAElEQVR4nO2deXgU553nf31Iat1CCCEDAnFjxGmDYkNshK84kzAm9kwSJtkJfjwzfibJZMhsZtYzu/sY7x+7efZ5ZofM7G6eZCcTPBMPdg4HjHEcB3PZHBY2IIw4xCUhJITQ1TpbUqt7n1+pClr9VldXdVV1v2/V7/M8/QBvNVJVH9/63S8QBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBOF6CIIgCIIgCMJ+PLy+xtFolFkjnE1HQ10JAKwCAOVPpEp+gLy+0uSLcDjm72cAoFd+4N+hvLrmEPM/iIzh8fApUSScRNrpaKirjRHEWosE0UqCspA2yQ8U06by6pom+rSkFxJOg5BwOgNZJGtlC7KKM4E0iiKoh5Q/y6tresW6BLEg4TQICad4dDTUVcWIZK3gIqmXZllID8lCSlaphZBwGoSEk3/kmKRiUW4GgDluf00AoF4W0d0ULzUPCadBSDj5RLYqN8uPDW5/PZKArv3uGCElt94gJJwGIeHkh46GOnS9t5JVaZo9ALCzvLpmt+DXkTZIOA1CwplZZMtyG4mlLSiW6I7y6pozDrw+yyDhNAgJZ/qRY5Zb5YcbEjs8gMmlHbIlSq58HCScBiHhTB9yyRCK5Tfccs0colih2ykzfw8SToOQcNpLjHW5jVxx7thTXl2z2e0vAnAsnH5mhXA0cuxyuxy7LKZ3m0uojIlzyOJ0CbI7jt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VORK5CYII=);background-size:100px;background-repeat:no-repeat;background-position:bottom right}#otter .otter-main .components-panel__body .otter-info h2{font-weight:300;margin-bottom:10px}#otter .otter-main .components-panel__body .otter-info p{margin:0 0 1.5em 0}#otter .otter-main .components-panel__body .otter-info .otter-info-button-group{display:flex}#otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-default,#otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-secondary{padding:2px 20px;font-size:14px}#otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-default:first-child,#otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-secondary:first-child{margin-right:15px}#otter .otter-footer{text-align:center;color:#72777c;font-style:italic;border-top:1px #e1e1e1 solid;border-bottom:1px #e1e1e1 solid;padding:20px;margin:2rem 0 1.5rem}#otter .otter-footer .otter-container{margin:0 auto}#otter .components-placeholder{background:#f6f6f6;margin-top:25vh;margin-bottom:25vh}#otter .components-placeholder .components-placeholder__fieldset{justify-content:center}.otter-onboarding-modal{max-width:350px}.otter-onboarding-modal .components-modal__header{text-align:center}.otter-onboarding-modal .components-modal__header h1{width:100%}.otter-onboarding-modal .otter-onboarding-modal-content{text-align:center;margin:10px 0 15px}.otter-onboarding-modal .otter-onboarding-modal-action{text-align:center;margin:10px 0}.otter-onboarding-modal .otter-onboarding-modal-action .components-button{padding:2px 20px;font-size:14px;margin-right:10px}.components-modal__screen-overlay{background-color:rgba(0,0,0,0.5)}.react-joyride__tooltip{font-size:13px !important}.react-joyride__tooltip>div{text-align:left !important}.react-joyride__tooltip div:nth-of-type(2){margin-top:5px !important}.react-joyride__tooltip button{text-decoration:underline}.react-joyride__beacon span:first-child{background-color:#00739c !important}.react-joyride__beacon span:last-child{background-color:rgba(26,129,165,0.4) !important;border:2px solid #00739c !important}.react-joyride__tooltip button[data-action="primary"]{background:#0085ba !important;border-color:#006a95 #00648c #00648c !important;box-shadow:inset 0 -1px 0 #00648c !important;color:#fff !important;text-decoration:none !important;text-shadow:0 -1px 1px #005d82,1px 0 1px #005d82,0 1px 1px #005d82,-1px 0 1px #005d82 !important;padding:2px 20px !important;height:auto !important;line-height:28px !important;font-size:14px !important}.react-joyride__tooltip button[data-action="back"]{color:#23282d !important;font-size:14px !important}.react-notification-root .notification-container-bottom-left{bottom:40px}.react-notification-root .notification-container-mobile-bottom{bottom:60px}@media (min-width: 782px){.react-joyride__spotlight,.__floater,.__floater__open,.react-joyride__beacon{margin-top:-32px}}@media (max-width: 782px){#otter .otter-header .otter-container .otter-logo{justify-content:center}#otter .otter-info{background-image:none !important}.react-joyride__spotlight,.__floater,.__floater__open,.react-joyride__beacon{margin-top:-44px}}@media (max-width: 600px){.react-joyride__spotlight,.__floater,.__floater__open,.react-joyride__beacon{margin-top:0}}.branch-5-2 #otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field .otter-text-field-button-group .is-primary,.branch-5-3 #otter .otter-main .components-panel__body .components-panel__row .components-base-control.otter-text-field .components-base-control__field .otter-text-field-button-group .is-primary{height:auto}.branch-5-2 #otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-default,.branch-5-2 #otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-secondary,.branch-5-3 #otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-default,.branch-5-3 #otter .otter-main .components-panel__body .otter-info .otter-info-button-group .is-secondary{height:auto}.branch-5-2 .otter-onboarding-modal .otter-onboarding-modal-action .components-button,.branch-5-3 .otter-onboarding-modal .otter-onboarding-modal-action .components-button{height:auto}
2
 
3
+ .notification-container-bottom-center,.notification-container-bottom-left,.notification-container-bottom-right,.notification-container-center,.notification-container-top-center,.notification-container-top-left,.notification-container-top-right{width:325px;position:absolute;pointer-events:all}.notification-container-bottom-center,.notification-container-center,.notification-container-top-center{display:flex;justify-content:center;align-items:center;flex-direction:column;left:calc(50% - 162.5px)}.notification-container-center{top:20px;height:100%;pointer-events:none}.notification-container-center .center-inner{width:325px;display:flex;justify-content:center;align-items:center;flex-direction:column;pointer-events:all}.notification-container-top-center{top:20px}.notification-container-bottom-center{bottom:20px}.notification-container-top-left{left:20px;top:20px}.notification-container-top-right{right:20px;top:20px}.notification-container-bottom-left{left:20px;bottom:20px}.notification-container-bottom-right{bottom:20px;right:20px}.notification-container-mobile-bottom,.notification-container-mobile-top{pointer-events:all;position:absolute}.notification-container-mobile-top{right:20px;left:20px;top:20px}.notification-container-mobile-bottom{right:20px;left:20px;bottom:20px;margin-bottom:-15px}.notification-default{border-left:8px solid #0562c7}.notification-default,.notification-default .timer{background-color:#007bff}.notification-default .timer-filler{background-color:#fff}.notification-default .notification-close{background-color:#007bff}.notification-success{border-left:8px solid #1f8838}.notification-success,.notification-success .timer{background-color:#28a745}.notification-success .timer-filler{background-color:#fff}.notification-success .notification-close{background-color:#28a745}.notification-danger{border-left:8px solid #bd1120}.notification-danger,.notification-danger .timer{background-color:#dc3545}.notification-danger .timer-filler{background-color:#fff}.notification-danger .notification-close{background-color:#dc3545}.notification-info{border-left:8px solid #138b9e}.notification-info,.notification-info .timer{background-color:#17a2b8}.notification-info .timer-filler{background-color:#fff}.notification-info .notification-close{background-color:#17a2b8}.notification-warning{border-left:8px solid #ce9c09}.notification-warning,.notification-warning .timer{background-color:#eab000}.notification-warning .timer-filler{background-color:#fff}.notification-warning .notification-close{background-color:#eab000}.notification-awesome{border-left:8px solid #4c3fb1}.notification-awesome,.notification-awesome .timer{background-color:#685dc3}.notification-awesome .timer-filler{background-color:#fff}.notification-awesome .notification-close{background-color:#685dc3}@-webkit-keyframes timer{0%{width:100%}to{width:0}}@keyframes timer{0%{width:100%}to{width:0}}.react-notification-root{position:fixed;z-index:9000;pointer-events:none;width:100%;height:100%}.notification-item{display:flex;position:relative;border-radius:3px;margin-bottom:15px;box-shadow:1px 3px 4px rgba(0,0,0,0.2);cursor:pointer}.notification-item .timer{width:100%;margin-top:10px}.notification-item .timer,.notification-item .timer .timer-filler{height:3px;border-radius:5px}.notification-item .notification-title{color:#fff;font-weight:700;font-size:14px;margin-top:5px;margin-bottom:5px}.notification-item .notification-message{color:#fff;max-width:calc(100% - 15px);font-size:14px;line-height:150%;word-wrap:break-word;margin-bottom:0;margin-top:0}.notification-item .notification-content{padding:8px 15px;display:inline-block;width:100%}.notification-item .notification-close{width:18px;height:18px;border-radius:50%;display:inline-block;position:absolute;right:10px;top:10px}.notification-item .notification-close:after{content:"\D7";position:absolute;transform:translate(-50%, -50%);color:#fff;font-size:12px;left:50%;top:50%}.notification-container-mobile-bottom .notification-item,.notification-container-mobile-bottom .notification-parent,.notification-container-mobile-top .notification-item,.notification-container-mobile-top .notification-parent{max-width:100%;width:100%}.notification-container-bottom-right .notification-parent,.notification-container-top-right .notification-parent{margin-left:auto}.notification-container-bottom-left .notification-parent,.notification-container-top-left .notification-parent{margin-right:auto}.notification-container-mobile-bottom .notification-parent,.notification-container-mobile-top .notification-parent{margin-left:auto;margin-right:auto}
4
 
build/build.js CHANGED
@@ -28,12 +28,12 @@
28
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
  * SOFTWARE.
30
  */
31
- var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,o=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var r=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),o))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+o)?e:l(s(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?u:10===e?p:u||p}function d(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function h(e){return null!==e.parentNode?h(e.parentNode):e}function m(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||o.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&d(a.firstElementChild)!==a?d(l):l;var c=h(e);return c.host?m(c.host,t):m(e,h(t).host)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var r=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||r;return i[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=y(t,"top"),r=y(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function g(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+o+"Width"],10)}function b(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(o["margin"+("Height"===e?"Top":"Left")])+parseInt(o["margin"+("Height"===e?"Bottom":"Right")]):0)}function w(e){var t=e.body,n=e.documentElement,o=f(10)&&getComputedStyle(n);return{height:b("Height",t,n,o),width:b("Width",t,n,o)}}var E=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},O=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};function x(e){return k({},e,{right:e.left+e.width,bottom:e.top+e.height})}function P(e){var t={};try{if(f(10)){t=e.getBoundingClientRect();var n=y(e,"top"),o=y(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?w(e.ownerDocument):{},s=i.width||e.clientWidth||r.width,l=i.height||e.clientHeight||r.height,c=e.offsetWidth-s,u=e.offsetHeight-l;if(c||u){var p=a(e);c-=g(p,"x"),u-=g(p,"y"),r.width-=c,r.height-=u}return x(r)}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=f(10),r="HTML"===t.nodeName,i=P(e),s=P(t),c=l(e),u=a(t),p=parseFloat(u.borderTopWidth,10),d=parseFloat(u.borderLeftWidth,10);n&&r&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=x({top:i.top-s.top-p,left:i.left-s.left-d,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!o&&r){var m=parseFloat(u.marginTop,10),y=parseFloat(u.marginLeft,10);h.top-=p-m,h.bottom-=p-m,h.left-=d-y,h.right-=d-y,h.marginTop=m,h.marginLeft=y}return(o&&!n?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(h=v(h,t)),h}function N(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,o=C(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:y(n),s=t?0:y(n,"left"),l={top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:r,height:i};return x(l)}function T(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&T(n)}function j(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function I(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=r?j(e):m(e,c(t));if("viewport"===o)i=N(a,r);else{var u=void 0;"scrollParent"===o?"BODY"===(u=l(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===o?e.ownerDocument.documentElement:o;var p=C(u,a,r);if("HTML"!==u.nodeName||T(a))i=p;else{var f=w(e.ownerDocument),d=f.height,h=f.width;i.top+=p.top-p.marginTop,i.bottom=d+p.top,i.left+=p.left-p.marginLeft,i.right=h+p.left}}var y="number"==typeof(n=n||0);return i.left+=y?n:n.left||0,i.top+=y?n:n.top||0,i.right-=y?n:n.right||0,i.bottom-=y?n:n.bottom||0,i}function R(e){return e.width*e.height}function M(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=I(n,o,i,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return k({key:e},s[e],{area:R(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,p=e.split("-")[1];return u+(p?"-"+p:"")}function L(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=o?j(t):m(t,c(n));return C(n,r,o)}function _(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),o=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function A(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function D(e,t,n){n=n.split("-")[0];var o=_(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return r[a]=t[a]+t[l]/2-o[l]/2,r[s]=n===s?t[s]-o[c]:t[A(s)],r}function F(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function W(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var o=F(e,(function(e){return e[t]===n}));return e.indexOf(o)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=x(t.offsets.popper),t.offsets.reference=x(t.offsets.reference),t=n(t,e))})),t}function B(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=D(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=W(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function z(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function H(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==document.body.style[i])return i}return null}function U(){return this.state.isDestroyed=!0,z(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function G(e,t,n,o){n.updateBound=o,q(e).addEventListener("resize",n.updateBound,{passive:!0});var r=l(e);return function e(t,n,o,r){var i="BODY"===t.nodeName,a=i?t.ownerDocument.defaultView:t;a.addEventListener(n,o,{passive:!0}),i||e(l(a.parentNode),n,o,r),r.push(a)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function V(){this.state.eventsEnabled||(this.state=G(this.reference,this.options,this.state,this.scheduleUpdate))}function Y(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function $(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function K(e,t){Object.keys(t).forEach((function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&$(t[n])&&(o="px"),e.style[n]=t[n]+o}))}var X=n&&/Firefox/i.test(navigator.userAgent);function J(e,t,n){var o=F(e,(function(e){return e.name===t})),r=!!o&&e.some((function(e){return e.name===n&&e.enabled&&e.order<o.order}));if(!r){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}var Z=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Q=Z.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Q.indexOf(e),o=Q.slice(n+1).concat(Q.slice(0,n));return t?o.reverse():o}var te="flip",ne="clockwise",oe="counterclockwise";function re(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(F(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return x(s)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}(e,r,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,o){$(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))}))})),r}var ie={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:S({},l,i[l]),end:S({},l,i[l]+i[c]-a[c])};e.offsets.popper=k({},a,u[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,o=e.placement,r=e.offsets,i=r.popper,a=r.reference,s=o.split("-")[0],l=void 0;return l=$(+n)?[+n,0]:re(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var o=H("transform"),r=e.instance.popper.style,i=r.top,a=r.left,s=r[o];r.top="",r.left="",r[o]="";var l=I(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);r.top=i,r.left=a,r[o]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,p={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),S({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(o=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),S({},n,o)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=k({},u,p[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(o[l])&&(e.offsets.popper[l]=i(o[l])-n[c]),n[l]>i(o[s])&&(e.offsets.popper[l]=i(o[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!J(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,s=i.popper,l=i.reference,c=-1!==["left","right"].indexOf(r),u=c?"height":"width",p=c?"Top":"Left",f=p.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",m=_(o)[u];l[h]-m<s[f]&&(e.offsets.popper[f]-=s[f]-(l[h]-m)),l[f]+m>s[h]&&(e.offsets.popper[f]+=l[f]+m-s[h]),e.offsets.popper=x(e.offsets.popper);var y=l[f]+l[u]/2-m/2,v=a(e.instance.popper),g=parseFloat(v["margin"+p],10),b=parseFloat(v["border"+p+"Width"],10),w=y-e.offsets.popper[f]-g-b;return w=Math.max(Math.min(s[u]-m,w),0),e.arrowElement=o,e.offsets.arrow=(S(n={},f,Math.round(w)),S(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(z(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=I(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),o=e.placement.split("-")[0],r=A(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case te:a=[o,r];break;case ne:a=ee(o);break;case oe:a=ee(o,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(o!==s||a.length===l+1)return e;o=e.placement.split("-")[0],r=A(o);var c=e.offsets.popper,u=e.offsets.reference,p=Math.floor,f="left"===o&&p(c.right)>p(u.left)||"right"===o&&p(c.left)<p(u.right)||"top"===o&&p(c.bottom)>p(u.top)||"bottom"===o&&p(c.top)<p(u.bottom),d=p(c.left)<p(n.left),h=p(c.right)>p(n.right),m=p(c.top)<p(n.top),y=p(c.bottom)>p(n.bottom),v="left"===o&&d||"right"===o&&h||"top"===o&&m||"bottom"===o&&y,g=-1!==["top","bottom"].indexOf(o),b=!!t.flipVariations&&(g&&"start"===i&&d||g&&"end"===i&&h||!g&&"start"===i&&m||!g&&"end"===i&&y),w=!!t.flipVariationsByContent&&(g&&"start"===i&&h||g&&"end"===i&&d||!g&&"start"===i&&y||!g&&"end"===i&&m),E=b||w;(f||v||E)&&(e.flipped=!0,(f||v)&&(o=a[l+1]),E&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=k({},e.offsets.popper,D(e.instance.popper,e.offsets.reference,e.placement)),e=W(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(s?r[a?"width":"height"]:0),e.placement=A(t),e.offsets.popper=x(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!J(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=F(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,o=t.y,r=e.offsets.popper,i=F(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=d(e.instance.popper),l=P(s),c={position:r.position},u=function(e,t){var n=e.offsets,o=n.popper,r=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(r.width),c=i(o.width),u=-1!==["left","right"].indexOf(e.placement),p=-1!==e.placement.indexOf("-"),f=t?u||p||l%2==c%2?i:a:s,d=t?i:s;return{left:f(l%2==1&&c%2==1&&!p&&t?o.left-1:o.left),top:d(o.top),bottom:d(o.bottom),right:f(o.right)}}(e,window.devicePixelRatio<2||!X),p="bottom"===n?"top":"bottom",f="right"===o?"left":"right",h=H("transform"),m=void 0,y=void 0;if(y="bottom"===p?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,m="right"===f?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&h)c[h]="translate3d("+m+"px, "+y+"px, 0)",c[p]=0,c[f]=0,c.willChange="transform";else{var v="bottom"===p?-1:1,g="right"===f?-1:1;c[p]=y*v,c[f]=m*g,c.willChange=p+", "+f}var b={"x-placement":e.placement};return e.attributes=k({},b,e.attributes),e.styles=k({},c,e.styles),e.arrowStyles=k({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return K(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&K(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,o,r){var i=L(r,t,e,n.positionFixed),a=M(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),K(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ae=function(){function e(t,n){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};E(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=r(this.update.bind(this)),this.options=k({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){o.options.modifiers[t]=k({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return k({name:e},o.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return O(e,[{key:"update",value:function(){return B.call(this)}},{key:"destroy",value:function(){return U.call(this)}},{key:"enableEventListeners",value:function(){return V.call(this)}},{key:"disableEventListeners",value:function(){return Y.call(this)}}]),e}();ae.Utils=("undefined"!=typeof window?window:e).PopperUtils,ae.placements=Z,ae.Defaults=ie,t.a=ae}).call(this,n(12))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=new Error("Element already at target scroll position"),o=new Error("Scroll cancelled"),r=Math.min,i=Date.now;function a(e){return function(t,a,c,u){"function"==typeof(c=c||{})&&(u=c,c={}),"function"!=typeof u&&(u=l);var p=i(),f=t[e],d=c.ease||s,h=isNaN(c.duration)?350:+c.duration,m=!1;return f===a?u(n,t[e]):requestAnimationFrame((function n(s){if(m)return u(o,t[e]);var l=i(),c=r(1,(l-p)/h),y=d(c);t[e]=y*(a-f)+f,c<1?requestAnimationFrame(n):requestAnimationFrame((function(){u(null,t[e])}))})),function(){m=!0}}}function s(e){return.5*(1-Math.cos(Math.PI*e))}function l(){}e.exports={left:a("scrollLeft"),top:a("scrollTop")}},function(e,t,n){"use strict";(function(e){var o=n(1),r=n.n(o),i=n(0),a=n.n(i),s=n(10),l=n.n(s),c=n(11),u=n(3),p=n.n(u),f=n(2),d=n.n(f),h=n(5),m=n.n(h),y=n(4),v=n.n(y),g=n(8);function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function E(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?T(e):t}var I={flip:{padding:20},preventOverflow:{padding:10}},R={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},M=n.n(g).a.canUseDOM,L=void 0!==v.a.createPortal;function _(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function A(e){var t=e.title,n=e.data,o=e.warn,r=void 0!==o&&o,i=e.debug,a=void 0!==i&&i,s=r?console.warn||console.error:console.log;a&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach((function(e){d.a.plainObject(e)&&e.key?s.apply(console,[e.key,e.value]):s.apply(console,[e])})):s.apply(console,[n]),console.groupEnd())}function D(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.addEventListener(t,n,o)}function F(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,o)}function W(){}var B=function(e){function t(e){var n;return b(this,t),n=j(this,P(t).call(this,e)),M?(n.node=document.createElement("div"),e.id&&(n.node.id=e.id),e.zIndex&&(n.node.style.zIndex=e.zIndex),document.body.appendChild(n.node),n):j(n)}return x(t,e),E(t,[{key:"componentDidMount",value:function(){M&&(L||this.renderPortal())}},{key:"componentDidUpdate",value:function(){M&&(L||this.renderPortal())}},{key:"componentWillUnmount",value:function(){M&&this.node&&(L||v.a.unmountComponentAtNode(this.node),document.body.removeChild(this.node))}},{key:"renderPortal",value:function(){if(!M)return null;var e=this.props,t=e.children,n=e.setRef;return L?v.a.createPortal(t,this.node):(n(v.a.unstable_renderSubtreeIntoContainer(this,t.length>1?r.a.createElement("div",null,t):t[0],this.node)),null)}},{key:"renderReact16",value:function(){var e=this.props,t=e.hasChildren,n=e.placement,o=e.target;return t?this.renderPortal():o||"center"===n?this.renderPortal():null}},{key:"render",value:function(){return L?this.renderReact16():null}}]),t}(r.a.Component);O(B,"propTypes",{children:a.a.oneOfType([a.a.element,a.a.array]),hasChildren:a.a.bool,id:a.a.oneOfType([a.a.string,a.a.number]),placement:a.a.string,setRef:a.a.func.isRequired,target:a.a.oneOfType([a.a.object,a.a.string]),zIndex:a.a.number});var z=function(e){function t(){return b(this,t),j(this,P(t).apply(this,arguments))}return x(t,e),E(t,[{key:"render",value:function(){var e,t=this.props,n=t.placement,o=t.setArrowRef,i=t.styles.arrow,a=i.color,s=i.display,l=i.length,c=i.margin,u=i.position,p=i.spread,f={display:s,position:u},d=p,h=l;return n.startsWith("top")?(e="0,0 ".concat(d/2,",").concat(h," ").concat(d,",0"),f.bottom=0,f.marginLeft=c,f.marginRight=c):n.startsWith("bottom")?(e="".concat(d,",").concat(h," ").concat(d/2,",0 0,").concat(h),f.top=0,f.marginLeft=c,f.marginRight=c):n.startsWith("left")?(h=p,e="0,0 ".concat(d=l,",").concat(h/2," 0,").concat(h),f.right=0,f.marginTop=c,f.marginBottom=c):n.startsWith("right")&&(h=p,e="".concat(d=l,",").concat(h," ").concat(d,",0 0,").concat(h/2),f.left=0,f.marginTop=c,f.marginBottom=c),r.a.createElement("div",{className:"__floater__arrow",style:this.parentStyle},r.a.createElement("span",{ref:o,style:f},r.a.createElement("svg",{width:d,height:h,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("polygon",{points:e,fill:a}))))}},{key:"parentStyle",get:function(){var e=this.props,t=e.placement,n=e.styles.arrow.length,o={pointerEvents:"none",position:"absolute",width:"100%"};return t.startsWith("top")?(o.bottom=0,o.left=0,o.right=0,o.height=n):t.startsWith("bottom")?(o.left=0,o.right=0,o.top=0,o.height=n):t.startsWith("left")?(o.right=0,o.top=0,o.bottom=0):t.startsWith("right")&&(o.left=0,o.top=0),o}}]),t}(r.a.Component);O(z,"propTypes",{placement:a.a.string.isRequired,setArrowRef:a.a.func.isRequired,styles:a.a.object.isRequired});var H=function(e){var t=e.handleClick,n=e.styles,o=n.color,i=n.height,a=n.width,s=N(n,["color","height","width"]);return r.a.createElement("button",{"aria-label":"close",onClick:t,style:s,type:"button"},r.a.createElement("svg",{width:"".concat(a,"px"),height:"".concat(i,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},r.a.createElement("g",null,r.a.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:o}))))};H.propTypes={handleClick:a.a.func.isRequired,styles:a.a.object.isRequired};var U=function(e){var t=e.content,n=e.footer,o=e.handleClick,i=e.open,a=e.positionWrapper,s=e.showCloseButton,l=e.title,c=e.styles,u={content:r.a.isValidElement(t)?t:r.a.createElement("div",{className:"__floater__content",style:c.content},t)};return l&&(u.title=r.a.isValidElement(l)?l:r.a.createElement("div",{className:"__floater__title",style:c.title},l)),n&&(u.footer=r.a.isValidElement(n)?n:r.a.createElement("div",{className:"__floater__footer",style:c.footer},n)),!s&&!a||d.a.boolean(i)||(u.close=r.a.createElement(H,{styles:c.close,handleClick:o})),r.a.createElement("div",{className:"__floater__container",style:c.container},u.close,u.title,u.content,u.footer)};U.propTypes={content:a.a.node.isRequired,footer:a.a.node,handleClick:a.a.func.isRequired,open:a.a.bool,positionWrapper:a.a.bool.isRequired,showCloseButton:a.a.bool.isRequired,styles:a.a.object.isRequired,title:a.a.node};var q=function(e){function t(){return b(this,t),j(this,P(t).apply(this,arguments))}return x(t,e),E(t,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.handleClick,o=e.hideArrow,i=e.setFloaterRef,a=e.status,s={},l=["__floater"];return t?r.a.isValidElement(t)?s.content=r.a.cloneElement(t,{closeFn:n}):s.content=t({closeFn:n}):s.content=r.a.createElement(U,this.props),a===R.OPEN&&l.push("__floater__open"),o||(s.arrow=r.a.createElement(z,this.props)),r.a.createElement("div",{ref:i,className:l.join(" "),style:this.style},r.a.createElement("div",{className:"__floater__body"},s.content,s.arrow))}},{key:"style",get:function(){var e=this.props,t=e.disableAnimation,n=e.component,o=e.placement,r=e.hideArrow,i=e.status,a=e.styles,s=a.arrow.length,l=a.floater,c=a.floaterCentered,u=a.floaterClosing,p=a.floaterOpening,f=a.floaterWithAnimation,d=a.floaterWithComponent,h={};return r||(o.startsWith("top")?h.padding="0 0 ".concat(s,"px"):o.startsWith("bottom")?h.padding="".concat(s,"px 0 0"):o.startsWith("left")?h.padding="0 ".concat(s,"px 0 0"):o.startsWith("right")&&(h.padding="0 0 0 ".concat(s,"px"))),-1!==[R.OPENING,R.OPEN].indexOf(i)&&(h=k({},h,{},p)),i===R.CLOSING&&(h=k({},h,{},u)),i!==R.OPEN||t||(h=k({},h,{},f)),"center"===o&&(h=k({},h,{},c)),n&&(h=k({},h,{},d)),k({},l,{},h)}}]),t}(r.a.Component);O(q,"propTypes",{component:a.a.oneOfType([a.a.func,a.a.element]),content:a.a.node,disableAnimation:a.a.bool.isRequired,footer:a.a.node,handleClick:a.a.func.isRequired,hideArrow:a.a.bool.isRequired,open:a.a.bool,placement:a.a.string.isRequired,positionWrapper:a.a.bool.isRequired,setArrowRef:a.a.func.isRequired,setFloaterRef:a.a.func.isRequired,showCloseButton:a.a.bool,status:a.a.string.isRequired,styles:a.a.object.isRequired,title:a.a.node});var G=function(e){function t(){return b(this,t),j(this,P(t).apply(this,arguments))}return x(t,e),E(t,[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.handleClick,i=t.handleMouseEnter,a=t.handleMouseLeave,s=t.setChildRef,l=t.setWrapperRef,c=t.style,u=t.styles;if(n)if(1===r.a.Children.count(n))if(r.a.isValidElement(n)){var p=d.a.function(n.type)?"innerRef":"ref";e=r.a.cloneElement(r.a.Children.only(n),O({},p,s))}else e=r.a.createElement("span",null,n);else e=n;return e?r.a.createElement("span",{ref:l,style:k({},u,{},c),onClick:o,onMouseEnter:i,onMouseLeave:a},e):null}}]),t}(r.a.Component);O(G,"propTypes",{children:a.a.node,handleClick:a.a.func.isRequired,handleMouseEnter:a.a.func.isRequired,handleMouseLeave:a.a.func.isRequired,setChildRef:a.a.func.isRequired,setWrapperRef:a.a.func.isRequired,style:a.a.object,styles:a.a.object.isRequired});var V={zIndex:100};var Y=["position","top","right","bottom","left"],$=function(t){function n(e){var t;return b(this,n),O(T(t=j(this,P(n).call(this,e))),"setArrowRef",(function(e){t.arrowRef=e})),O(T(t),"setChildRef",(function(e){t.childRef=e})),O(T(t),"setFloaterRef",(function(e){t.floaterRef||(t.floaterRef=e)})),O(T(t),"setWrapperRef",(function(e){t.wrapperRef=e})),O(T(t),"handleTransitionEnd",(function(){var e=t.state.status,n=t.props.callback;t.wrapperPopper&&t.wrapperPopper.instance.update(),t.setState({status:e===R.OPENING?R.OPEN:R.IDLE},(function(){var e=t.state.status;n(e===R.OPEN?"open":"close",t.props)}))})),O(T(t),"handleClick",(function(){var e=t.props,n=e.event,o=e.open;if(!d.a.boolean(o)){var r=t.state,i=r.positionWrapper,a=r.status;("click"===t.event||"hover"===t.event&&i)&&(A({title:"click",data:[{event:n,status:a===R.OPEN?"closing":"opening"}],debug:t.debug}),t.toggle())}})),O(T(t),"handleMouseEnter",(function(){var e=t.props,n=e.event,o=e.open;if(!d.a.boolean(o)&&!_()){var r=t.state.status;"hover"===t.event&&r===R.IDLE&&(A({title:"mouseEnter",data:[{key:"originalEvent",value:n}],debug:t.debug}),clearTimeout(t.eventDelayTimeout),t.toggle())}})),O(T(t),"handleMouseLeave",(function(){var e=t.props,n=e.event,o=e.eventDelay,r=e.open;if(!d.a.boolean(r)&&!_()){var i=t.state,a=i.status,s=i.positionWrapper;"hover"===t.event&&(A({title:"mouseLeave",data:[{key:"originalEvent",value:n}],debug:t.debug}),o?-1===[R.OPENING,R.OPEN].indexOf(a)||s||t.eventDelayTimeout||(t.eventDelayTimeout=setTimeout((function(){delete t.eventDelayTimeout,t.toggle()}),1e3*o)):t.toggle(R.IDLE))}})),t.state={currentPlacement:e.placement,positionWrapper:e.wrapperOptions.position&&!!e.target,status:R.INIT,statusWrapper:R.INIT},t._isMounted=!1,M&&window.addEventListener("load",(function(){t.popper&&t.popper.instance.update(),t.wrapperPopper&&t.wrapperPopper.instance.update()})),t}return x(n,t),E(n,[{key:"componentDidMount",value:function(){if(M){var e=this.state.positionWrapper,t=this.props,n=t.children,o=t.open,r=t.target;this._isMounted=!0,A({title:"init",data:{hasChildren:!!n,hasTarget:!!r,isControlled:d.a.boolean(o),positionWrapper:e,target:this.target,floater:this.floaterRef},debug:this.debug}),this.initPopper(),!n&&r&&d.a.boolean(o)}}},{key:"componentDidUpdate",value:function(e,t){if(M){var n,o=this.props,r=o.autoOpen,i=o.open,a=o.target,s=o.wrapperOptions,l=m()(t,this.state),c=l.changedFrom,u=l.changedTo;if(e.open!==i)d.a.boolean(i)&&(n=i?R.OPENING:R.CLOSING),this.toggle(n);e.wrapperOptions.position===s.position&&e.target===a||this.changeWrapperPosition(this.props),u("status",R.IDLE)&&i?this.toggle(R.OPEN):c("status",R.INIT,R.IDLE)&&r&&this.toggle(R.OPEN),this.popper&&u("status",R.OPENING)&&this.popper.instance.update(),this.floaterRef&&(u("status",R.OPENING)||u("status",R.CLOSING))&&function(e,t,n){var o,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];D(e,t,o=function(r){n(r),F(e,t,o)},r)}(this.floaterRef,"transitionend",this.handleTransitionEnd)}}},{key:"componentWillUnmount",value:function(){M&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target,n=this.state.positionWrapper,o=this.props,r=o.disableFlip,i=o.getPopper,a=o.hideArrow,s=o.offset,l=o.placement,u=o.wrapperOptions,p="top"===l||"bottom"===l?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if("center"===l)this.setState({status:R.IDLE});else if(t&&this.floaterRef){var f=this.options,h=f.arrow,m=f.flip,y=f.offset,v=N(f,["arrow","flip","offset"]);new c.a(t,this.floaterRef,{placement:l,modifiers:k({arrow:k({enabled:!a,element:this.arrowRef},h),flip:k({enabled:!r,behavior:p},m),offset:k({offset:"0, ".concat(s,"px")},y)},v),onCreate:function(t){e.popper=t,i(t,"floater"),e._isMounted&&e.setState({currentPlacement:t.placement,status:R.IDLE}),l!==t.placement&&setTimeout((function(){t.instance.update()}),1)},onUpdate:function(t){e.popper=t;var n=e.state.currentPlacement;e._isMounted&&t.placement!==n&&e.setState({currentPlacement:t.placement})}})}if(n){var g=d.a.undefined(u.offset)?0:u.offset;new c.a(this.target,this.wrapperRef,{placement:u.placement||l,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(g,"px")},flip:{enabled:!1}},onCreate:function(t){e.wrapperPopper=t,e._isMounted&&e.setState({statusWrapper:R.IDLE}),i(t,"wrapper"),l!==t.placement&&setTimeout((function(){t.instance.update()}),1)}})}}},{key:"changeWrapperPosition",value:function(e){var t=e.target,n=e.wrapperOptions;this.setState({positionWrapper:n.position&&!!t})}},{key:"toggle",value:function(e){var t=this.state.status===R.OPEN?R.CLOSING:R.OPENING;d.a.undefined(e)||(t=e),this.setState({status:t})}},{key:"render",value:function(){var e=this.state,t=e.currentPlacement,n=e.positionWrapper,o=e.status,i=this.props,a=i.children,s=i.component,l=i.content,c=i.disableAnimation,u=i.footer,p=i.hideArrow,f=i.id,d=i.open,h=i.showCloseButton,m=i.style,y=i.target,v=i.title,g=r.a.createElement(G,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:m,styles:this.styles.wrapper},a),b={};return n?b.wrapperInPortal=g:b.wrapperAsChildren=g,r.a.createElement("span",null,r.a.createElement(B,{hasChildren:!!a,id:f,placement:t,setRef:this.setFloaterRef,target:y,zIndex:this.styles.options.zIndex},r.a.createElement(q,{component:s,content:l,disableAnimation:c,footer:u,handleClick:this.handleClick,hideArrow:p||"center"===t,open:d,placement:t,positionWrapper:n,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:h,status:o,styles:this.styles,title:v}),b.wrapperInPortal),b.wrapperAsChildren)}},{key:"debug",get:function(){return this.props.debug||!!e.ReactFloaterDebug}},{key:"event",get:function(){var e=this.props,t=e.disableHoverToClick,n=e.event;return"hover"===n&&_()&&!t?"click":n}},{key:"options",get:function(){var e=this.props.options;return p()(I,e||{})}},{key:"styles",get:function(){var e,t=this,n=this.state,o=n.status,r=n.positionWrapper,i=n.statusWrapper,a=this.props.styles,s=p()(function(e){var t=p()(V,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}(a),a);r&&(e=-1===[R.IDLE].indexOf(o)||-1===[R.IDLE].indexOf(i)?s.wrapperPosition:this.wrapperPopper.styles,s.wrapper=k({},s.wrapper,{},e));if(this.target){var l=window.getComputedStyle(this.target);this.wrapperStyles?s.wrapper=k({},s.wrapper,{},this.wrapperStyles):-1===["relative","static"].indexOf(l.position)&&(this.wrapperStyles={},r||(Y.forEach((function(e){t.wrapperStyles[e]=l[e]})),s.wrapper=k({},s.wrapper,{},this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return s}},{key:"target",get:function(){if(!M)return null;var e=this.props.target;return e?d.a.domElement(e)?e:document.querySelector(e):this.childRef||this.wrapperRef}}]),n}(r.a.Component);O($,"propTypes",{autoOpen:a.a.bool,callback:a.a.func,children:a.a.node,component:l()(a.a.oneOfType([a.a.func,a.a.element]),(function(e){return!e.content})),content:l()(a.a.node,(function(e){return!e.component})),debug:a.a.bool,disableAnimation:a.a.bool,disableFlip:a.a.bool,disableHoverToClick:a.a.bool,event:a.a.oneOf(["hover","click"]),eventDelay:a.a.number,footer:a.a.node,getPopper:a.a.func,hideArrow:a.a.bool,id:a.a.oneOfType([a.a.string,a.a.number]),offset:a.a.number,open:a.a.bool,options:a.a.object,placement:a.a.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:a.a.bool,style:a.a.object,styles:a.a.object,target:a.a.oneOfType([a.a.object,a.a.string]),title:a.a.node,wrapperOptions:a.a.shape({offset:a.a.number,placement:a.a.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:a.a.bool})}),O($,"defaultProps",{autoOpen:!1,callback:W,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:W,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}}),t.a=$}).call(this,n(12))},function(e,t,n){var o;
32
  /*!
33
  Copyright (c) 2017 Jed Watson.
34
  Licensed under the MIT License (MIT), see
35
  http://jedwatson.github.io/classnames
36
- */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var a=r.apply(null,o);a&&e.push(a)}else if("object"===i)for(var s in o)n.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t,n){e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){e.exports=n(1)},function(e,t,n){e.exports=n(2)()},function(e,t,n){"use strict";var o=n(3);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),i=n(1),a=n.n(i),s="notification-item",l="bottom-left",c="bottom-right",u="bottom-center",p="top-left",f="top-right",d="top-center",h="success",m="danger",y="info",v="default",g="warning",b="timeout",w=function(e){return null==e};function E(e){return e===l||e===c||e===u}function O(e){return e===p||e===f||e===d}function S(e){var t=e.type,n=e.content,o=e.userDefinedTypes,r=[s];if(n)return r;if(w(o))return function(e){switch(e){case v:return[s,"notification-default"];case h:return[s,"notification-success"];case m:return[s,"notification-danger"];case g:return[s,"notification-warning"];case y:return[s,"notification-info"];default:return[s]}}(t);var i=o.find((function(e){return e.name===t}));return r.concat(i.htmlClasses)}function k(e,t){var n=e.duration,o=e.timingFunction,r=e.delay;return"".concat(n,"ms ").concat(t," ").concat(o," ").concat(r,"ms")}function x(e,t){var n=t.duration,o=t.timingFunction,r=t.delay,i=e||{};return w(i.duration)&&(i.duration=n),w(i.timingFunction)&&(i.timingFunction=o),w(i.delay)&&(i.delay=r),i}function P(e,t){var n,o,r=e,i=r.id,a=r.type,s=r.insert,l=r.content,c=r.container,u=r.animationIn,p=r.animationOut,f=r.slidingEnter,d=r.slidingExit,b=r.touchRevert,E=r.touchSlidingExit,O=r.dismiss,S=r.width,k=r.onRemoval;function P(e,t,n){return{duration:e,timingFunction:t,delay:n}}r.id=i||Math.random().toString(36).substr(2,9),r.type=l?null:a.toLowerCase(),t&&!l&&(r.userDefinedTypes=function(e,t){var n=e.content,o=e.type;if(!n&&o!==h&&o!==m&&o!==y&&o!==v&&o!==g&&t)return t}(r,t)),w(S)||(r.width=S),r.container=c.toLowerCase(),r.insert=(s||"top").toLowerCase(),r.dismiss=(o={duration:0,click:!0,touch:!0,onScreen:!1,waitForAnimation:!1,showIcon:!1},(n=O)?(Object.keys(o).forEach((function(e){w(n[e])&&(n[e]=o[e])})),n):o),r.animationIn=u||[],r.animationOut=p||[],r.onRemoval=k||function(){},r.slidingEnter=x(f,P(600,"linear",0)),r.slidingExit=x(d,P(600,"linear",0)),r.touchRevert=x(b,P(600,"linear",0));var C=E||{},N=C.swipe,T=C.fade;return r.touchSlidingExit=C,r.touchSlidingExit.swipe=x(N||{},P(600,"linear",0)),r.touchSlidingExit.fade=x(T||{},P(300,"linear",0)),r}function C(e,t){var n,o,r=t;this.pause=function(){clearTimeout(n),r-=Date.now()-o},this.resume=function(){o=Date.now(),clearTimeout(n),n=setTimeout(e,r)},this.clear=function(){clearTimeout(n)},this.resume()}var N=new function(){var e=this;return this.types=null,this.add=function(){},this.addNotification=function(t){var n=e.types;return e.add(P(t,n))},this.removeNotification=function(){},this.register=function(t){var n=t.addNotification,o=t.removeNotification,r=t.types;e.add=n,e.removeNotification=o,e.types=r},this};function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var W=function(){function e(t){var n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(n=!(o=A(e).call(this,t))||"object"!==T(o)&&"function"!=typeof o?D(this):o).rootElementRef=r.a.createRef(),n.onClick=n.onClick.bind(D(n)),n.onTouchStart=n.onTouchStart.bind(D(n)),n.onTouchMove=n.onTouchMove.bind(D(n)),n.onTouchEnd=n.onTouchEnd.bind(D(n)),n.onMouseEnter=n.onMouseEnter.bind(D(n)),n.onMouseLeave=n.onMouseLeave.bind(D(n));var i=t.notification.width;return n.state={parentStyle:{height:0,overflow:"hidden",width:i?"".concat(i,"px"):"auto"},htmlClassList:S(t.notification),animationPlayState:"running",touchEnabled:!0},n}var t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(e,r.a.Component),t=e,(n=[{key:"componentWillUnmount",value:function(){this.timer&&this.timer.clear()}},{key:"componentDidMount",value:function(){function e(){l&&!c&&(o.timer=new C((function(){return o.removeNotification(b)}),l))}var t,n,o=this,r=this.props,i=r.notification,a=r.count,s=i.dismiss,l=s.duration,c=s.onScreen,u=this.rootElementRef.current.scrollHeight,p=(t=i,!((n=a)<=1)&&1<n&&("top"===t.insert&&O(t.container)||"bottom"===t.insert&&E(t.container)));this.setState((function(t){return{parentStyle:{width:t.parentStyle.width,height:"".concat(u,"px"),transition:p?k(i.slidingEnter,"height"):"10ms height"},onTransitionEnd:e}}),(function(){requestAnimationFrame((function(){o.setState((function(e){return{htmlClassList:[].concat(L(i.animationIn),L(e.htmlClassList))}}))}))}))}},{key:"componentDidUpdate",value:function(e){var t=e.removed;this.props.removed&&!t&&this.removeNotification("manual")}},{key:"removeNotification",value:function(e){function t(){return i(a,(function(){return s(a,e)}))}var n=this,o=this.props,r=o.notification,i=o.toggleRemoval,a=r.id,s=r.onRemoval,l=r.dismiss.waitForAnimation,c=[].concat(L(r.animationOut),L(S(r))),u={height:0,transition:k(r.slidingExit,"height")};return l?this.setState((function(e){var o=e.parentStyle.width;return{htmlClassList:c,onAnimationEnd:function(){n.setState({parentStyle:R({width:o},u),onTransitionEnd:t})}}})):this.setState((function(e){return{parentStyle:R({width:e.parentStyle.width},u),onTransitionEnd:t,htmlClassList:c}}))}},{key:"onClick",value:function(){var e=this.props.notification.dismiss;(e.click||e.showIcon)&&this.removeNotification("click")}},{key:"onTouchStart",value:function(e){var t=j(e.touches,1)[0].pageX;this.setState((function(e){var n=e.parentStyle;return{startX:t,currentX:t,parentStyle:R({},n,{position:"relative"})}}))}},{key:"onTouchMove",value:function(e){var t,n,o=this,r=e.touches,i=this.state.startX,a=this.props,s=a.toggleRemoval,l=a.notification,c=l.id,u=l.onRemoval,p=l.slidingExit,f=l.touchSlidingExit,d=f.swipe,h=f.fade,m=j(r,1)[0].pageX,y=m-i,v=2*window.innerWidth,g="".concat(0<=m-i?v:-v,"px");if(t=y,n=Math.abs(t),.4*window.innerWidth<=n){var b=k(d,"left"),w=k(h,"opacity"),E=function(){s(c,(function(){return u(c,"touch")}))};return this.setState((function(e){return{touchEnabled:!1,parentStyle:R({},e.parentStyle,{left:g,opacity:0,transition:"".concat(b,", ").concat(w)}),onTransitionEnd:function(){o.setState((function(e){return{parentStyle:R({},e.parentStyle,{height:0,transition:k(p,"height")}),onTransitionEnd:E}}))}}}))}return this.setState((function(e){var t=e.parentStyle;return{currentX:m,parentStyle:R({},t,{left:"".concat(0+y,"px")})}}))}},{key:"onTouchEnd",value:function(){var e=this.props.notification.touchRevert;this.setState((function(t){return{parentStyle:R({},t.parentStyle,{left:0,transition:k(e,"left")})}}))}},{key:"onMouseEnter",value:function(){this.timer?this.timer.pause():this.setState({animationPlayState:"paused"})}},{key:"onMouseLeave",value:function(){this.timer?this.timer.resume():this.setState({animationPlayState:"running"})}},{key:"renderTimer",value:function(){var e=this,t=this.props.notification.dismiss,n=t.duration,o=t.onScreen,i=this.state.animationPlayState;if(n&&o){var a={animationName:"timer",animationDuration:"".concat(n,"ms"),animationTimingFunction:"linear",animationFillMode:"forwards",animationDelay:0,animationPlayState:i};return r.a.createElement("div",{className:"timer"},r.a.createElement("div",{className:"timer-filler",onAnimationEnd:function(){return e.removeNotification(b)},style:a}))}}},{key:"renderCustomContent",value:function(){var e=this.state.htmlClassList,t=this.props.notification,n=t.id,o=t.content,i=t.dismiss,a=i.duration,s=i.pauseOnHover,l=0<a&&s;return r.a.createElement("div",{className:"".concat([].concat(L(e),["n-child"]).join(" ")),onMouseEnter:l?this.onMouseEnter:null,onMouseLeave:l?this.onMouseLeave:null},r.a.isValidElement(o)?o:r.a.createElement(o,{id:n}))}},{key:"renderNotification",value:function(){var e=this.props.notification,t=e.title,n=e.message,o=e.dismiss,i=o.showIcon,a=o.duration,s=o.pauseOnHover,l=this.state.htmlClassList,c=0<a&&s;return r.a.createElement("div",{className:"".concat([].concat(L(l),["n-child"]).join(" ")),onMouseEnter:c?this.onMouseEnter:null,onMouseLeave:c?this.onMouseLeave:null},r.a.createElement("div",{className:"notification-content"},i&&r.a.createElement("div",{className:"notification-close",onClick:this.onClick}),t&&r.a.createElement("div",{className:"notification-title"},t),r.a.createElement("div",{className:"notification-message"},n),this.renderTimer()))}},{key:"render",value:function(){var e=this.props.notification,t=e.content,n=e.dismiss.click,o=this.state,i=o.parentStyle,a=o.onAnimationEnd,s=o.onTransitionEnd,l=o.touchEnabled;return r.a.createElement("div",{ref:this.rootElementRef,onClick:n?this.onClick:null,className:"n-parent",style:i,onAnimationEnd:a,onTransitionEnd:s,onTouchStart:l?this.onTouchStart:null,onTouchMove:l?this.onTouchMove:null,onTouchEnd:l?this.onTouchEnd:null},t?this.renderCustomContent():this.renderNotification())}}])&&_(t.prototype,n),e}();function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}W.propTypes={toggleRemoval:a.a.func.isRequired,count:a.a.number.isRequired,removed:a.a.bool},n(4),n.d(t,"default",(function(){return V})),n.d(t,"store",(function(){return N}));var V=function(){function e(t){var n,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this,(n=!(o=U(e).call(this,t))||"object"!==B(o)&&"function"!=typeof o?q(this):o).state={isMobile:t.isMobile,breakpoint:t.breakpoint,notifications:[]},n.add=n.add.bind(q(n)),n.remove=n.remove.bind(q(n)),n.toggleRemoval=n.toggleRemoval.bind(q(n)),n.handleResize=n.handleResize.bind(q(n)),n}var t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(e,r.a.Component),t=e,(n=[{key:"componentDidMount",value:function(){var e=this.props.types;N.register({addNotification:this.add,removeNotification:this.remove,types:e}),this.setState({width:window.innerWidth}),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"handleResize",value:function(){this.setState({width:window.innerWidth})}},{key:"add",value:function(e){return this.setState((function(t){var n=t.notifications;return{notifications:"top"===e.insert?[e].concat(z(n)):[].concat(z(n),[e])}})),e.id}},{key:"remove",value:function(e){this.setState((function(t){return{notifications:t.notifications.map((function(t){return t.id===e&&(t.removed=!0),t}))}}))}},{key:"toggleRemoval",value:function(e,t){this.setState((function(t){return{notifications:t.notifications.filter((function(t){return t.id!==e}))}}),t)}},{key:"renderNotifications",value:function(e){var t=this;return e.map((function(n){return r.a.createElement(W,{id:n.id,key:n.id,notification:n,toggleRemoval:t.toggleRemoval,count:e.length,removed:n.removed})}))}},{key:"renderMobileNotifications",value:function(e){var t,n,o=e.className,i=e.id,a=this.state.notifications,s=(t=[],n=[],a.forEach((function(e){var o=e.container;O(o)?t.push(e):E(o)&&n.push(e)})),{top:t,bottom:n}),l=this.renderNotifications(s.top),c=this.renderNotifications(s.bottom);return r.a.createElement("div",{id:i,key:"mobile",className:"react-notification-root ".concat(o||"")},r.a.createElement("div",{className:"notification-container-mobile-top"},l),r.a.createElement("div",{className:"notification-container-mobile-bottom"},c))}},{key:"renderScreenNotifications",value:function(e){var t,n,o,i,a,s,h=e.className,m=e.id,y=this.state.notifications,v=(t=[],n=[],o=[],i=[],a=[],s=[],y.forEach((function(e){var r=e.container;r===p?t.push(e):r===f?n.push(e):r===d?o.push(e):r===l?i.push(e):r===c?a.push(e):r===u&&s.push(e)})),{topLeft:t,topRight:n,topCenter:o,bottomLeft:i,bottomRight:a,bottomCenter:s}),g=this.renderNotifications(v.topLeft),b=this.renderNotifications(v.topRight),w=this.renderNotifications(v.topCenter),E=this.renderNotifications(v.bottomLeft),O=this.renderNotifications(v.bottomRight),S=this.renderNotifications(v.bottomCenter);return r.a.createElement("div",{id:m,key:"screen",className:"react-notification-root ".concat(h||"")},r.a.createElement("div",{className:"notification-container-top-left"},g),r.a.createElement("div",{className:"notification-container-top-right"},b),r.a.createElement("div",{className:"notification-container-bottom-left"},E),r.a.createElement("div",{className:"notification-container-bottom-right"},O),r.a.createElement("div",{className:"notification-container-top-center"},w),r.a.createElement("div",{className:"notification-container-bottom-center"},S))}},{key:"render",value:function(){var e=this.props.isMobile,t=this.state,n=t.width,o=t.breakpoint;return e&&n<=o?this.renderMobileNotifications(this.props):this.renderScreenNotifications(this.props)}}])&&H(t.prototype,n),e}();V.propTypes={isMobile:a.a.bool,breakpoint:a.a.number,types:a.a.array},V.defaultProps={isMobile:!0,breakpoint:768}}])},function(e,t,n){},function(e,t,n){"use strict";var o=n(19);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var o,r;r=function(e){var t=["N","E","A","D"];function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function o(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function r(e,t,n){r.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function l(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,o),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function u(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}function p(e){var t=0,n=c(e);if("array"===n)return e.forEach((function(e){t+=p(e)})),t+u("[type: array, hash: "+t+"]");if("object"===n){for(var o in e)if(e.hasOwnProperty(o)){var r="[ type: object, key: "+o+", value hash: "+p(e[o])+"]";t+=u(r)}return t}return t+u("[ type: "+n+" ; value: "+e+"]")}function f(e,t,n,o,l,u,d,h){n=n||[],d=d||[];var m=(l=l||[]).slice(0);if(null!=u){if(o){if("function"==typeof o&&o(m,u))return;if("object"==typeof o){if(o.prefilter&&o.prefilter(m,u))return;if(o.normalize){var y=o.normalize(m,u,e,t);y&&(e=y[0],t=y[1])}}}m.push(u)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var v,g,b,w,E=typeof e,O=typeof t,S="undefined"!==E||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,u),k="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,u);if(!S&&k)n.push(new i(m,t));else if(!k&&S)n.push(new a(m,e));else if(c(e)!==c(t))n.push(new r(m,e,t));else if("date"===c(e)&&e-t!=0)n.push(new r(m,e,t));else if("object"===E&&null!==e&&null!==t){for(v=d.length-1;v>-1;--v)if(d[v].lhs===e){w=!0;break}if(w)e!==t&&n.push(new r(m,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return p(e)-p(t)})),t.sort((function(e,t){return p(e)-p(t)}))),v=t.length-1,g=e.length-1;v>g;)n.push(new s(m,v,new i(void 0,t[v--])));for(;g>v;)n.push(new s(m,g,new a(void 0,e[g--])));for(;v>=0;--v)f(e[v],t[v],n,o,m,v,d,h)}else{var x=Object.keys(e),P=Object.keys(t);for(v=0;v<x.length;++v)b=x[v],(w=P.indexOf(b))>=0?(f(e[b],t[b],n,o,m,b,d,h),P[w]=null):f(e[b],void 0,n,o,m,b,d,h);for(v=0;v<P.length;++v)(b=P[v])&&f(void 0,t[b],n,o,m,b,d,h)}d.length=d.length-1}}else e!==t&&("number"===E&&isNaN(e)&&isNaN(t)||n.push(new r(m,e,t)))}function d(e,t,n,o,r){var i=[];if(f(e,t,i,o,null,null,null,r),n)for(var a=0;a<i.length;++a)n(i[a]);return i}function h(e,t,n,o){var r=d(e,t,o?function(e){e&&o.push(e)}:void 0,n);return o||(r.length?r:void 0)}function m(e,n,o){if(void 0===o&&n&&~t.indexOf(n.kind)&&(o=n),e&&o&&o.kind){for(var r=e,i=-1,a=o.path?o.path.length-1:0;++i<a;)void 0===r[o.path[i]]&&(r[o.path[i]]=void 0!==o.path[i+1]&&"number"==typeof o.path[i+1]?[]:{}),r=r[o.path[i]];switch(o.kind){case"A":o.path&&void 0===r[o.path[i]]&&(r[o.path[i]]=[]),function e(t,n,o){if(o.path&&o.path.length){var r,i=t[n],a=o.path.length-1;for(r=0;r<a;r++)i=i[o.path[r]];switch(o.kind){case"A":e(i[o.path[r]],o.index,o.item);break;case"D":delete i[o.path[r]];break;case"E":case"N":i[o.path[r]]=o.rhs}}else switch(o.kind){case"A":e(t[n],o.index,o.item);break;case"D":t=l(t,n);break;case"E":case"N":t[n]=o.rhs}return t}(o.path?r[o.path[i]]:r,o.index,o.item);break;case"D":delete r[o.path[i]];break;case"E":case"N":r[o.path[i]]=o.rhs}}}return n(r,o),n(i,o),n(a,o),n(s,o),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,n,o){var r=o?function(e){e&&o.push(e)}:void 0,i=d(e,t,r,n,!0);return o||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,n,o,r,i,a){return f(e,t,n,o,r,i,a,!0)},enumerable:!0},orderIndepHash:{value:p,enumerable:!0},applyDiff:{value:function(e,t,n){e&&t&&d(e,t,(function(o){n&&!n(e,t,o)||m(e,t,o)}))},enumerable:!0},applyChange:{value:m,enumerable:!0},revertChange:{value:function(e,t,n){if(e&&t&&n&&n.kind){var o,r,i=e;for(r=n.path.length-1,o=0;o<r;o++)void 0===i[n.path[o]]&&(i[n.path[o]]={}),i=i[n.path[o]];switch(n.kind){case"A":!function e(t,n,o){if(o.path&&o.path.length){var r,i=t[n],a=o.path.length-1;for(r=0;r<a;r++)i=i[o.path[r]];switch(o.kind){case"A":e(i[o.path[r]],o.index,o.item);break;case"D":case"E":i[o.path[r]]=o.lhs;break;case"N":delete i[o.path[r]]}}else switch(o.kind){case"A":e(t[n],o.index,o.item);break;case"D":case"E":t[n]=o.lhs;break;case"N":t=l(t,n)}return t}(i[n.path[o]],n.index,n.item);break;case"D":case"E":i[n.path[o]]=n.lhs;break;case"N":delete i[n.path[o]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(o=function(){return r}.call(t,n,t,e))||(e.exports=o)},function(e,t,n){"use strict";
37
  /**
38
  * @license nested-property https://github.com/cosmosio/nested-property
39
  *
@@ -48,4 +48,4 @@ var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typ
48
  *
49
  * This source code is licensed under the MIT license found in the
50
  * LICENSE file in the root directory of this source tree.
51
- */Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,f=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.suspense_list"):60120,y=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,g=o?Symbol.for("react.fundamental"):60117,b=o?Symbol.for("react.responder"):60118,w=o?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case p:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case u:case d:case v:case y:case c:return e;default:return t}}case i:return t}}}function O(e){return E(e)===f}t.typeOf=E,t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=v,t.Memo=y,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===c||e.$$typeof===u||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===w)},t.isAsyncMode=function(e){return O(e)||E(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===y},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o),i=(n(17),n(1)),a=n.n(i),s=(n(0),n(5)),l=n.n(s),c=n(2),u=n.n(c),p=n(4),f=n.n(p),d=n(8),h=n.n(d),m=n(13),y=n.n(m),v=n(9),g=n.n(v),b=n(7),w=n(3),E=n.n(w),O=n(14);function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function x(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?L(e):t}var A={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},D="tour:start",F="step:before",W="beacon",B="tooltip",z="step:after",H="tour:end",U="tour:status",q="error:target_not_found",G={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},V={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"},Y=h.a.canUseDOM,$=void 0!==p.createPortal;function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=e;return"undefined"==typeof window?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.indexOf(" OPR/")>=0?t="opera":void 0!==window.InstallTrigger?t="firefox":window.chrome?t="chrome":/(Version\/([0-9._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function X(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function J(e){var t=[];return function e(n){if("string"==typeof n||"number"==typeof n)t.push(n);else if(Array.isArray(n))n.forEach((function(t){return e(t)}));else if(n&&n.props){var o=n.props.children;Array.isArray(o)?o.forEach((function(t){return e(t)})):e(o)}}(e),t.join(" ").trim()}function Z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Q(e,t){return!(!u.a.plainObject(e)||!u.a.array(t))&&Object.keys(e).every((function(e){return-1!==t.indexOf(e)}))}function ee(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function te(e){return e.disableBeacon||"center"===e.placement}function ne(){return!(-1!==["chrome","safari","firefox","opera"].indexOf(K()))}function oe(e){var t=e.title,n=e.data,o=e.warn,r=void 0!==o&&o,i=e.debug,a=void 0!==i&&i,s=r?console.warn||console.error:console.log;a&&(t&&n?(console.groupCollapsed("%creact-joyride: ".concat(t),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach((function(e){u.a.plainObject(e)&&e.key?s.apply(console,[e.key,e.value]):s.apply(console,[e])})):s.apply(console,[n]),console.groupEnd()):console.error("Missing title or data props"))}var re={action:"",controlled:!1,index:0,lifecycle:G.INIT,size:0,status:V.IDLE},ie=["action","index","lifecycle","status"];function ae(e){var t=new Map,n=new Map;return new(function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o.continuous,i=void 0!==r&&r,a=o.stepIndex,s=o.steps,l=void 0===s?[]:s;S(this,e),P(this,"listener",void 0),P(this,"setSteps",(function(e){var o=t.getState(),r=o.size,i=o.status,a={size:e.length,status:i};n.set("steps",e),i===V.WAITING&&!r&&e.length&&(a.status=V.RUNNING),t.setState(a)})),P(this,"addListener",(function(e){t.listener=e})),P(this,"update",(function(e){if(!Q(e,ie))throw new Error("State is not valid. Valid keys: ".concat(ie.join(", ")));t.setState(T({},t.getNextState(T({},t.getState(),{},e,{action:e.action||A.UPDATE}),!0)))})),P(this,"start",(function(e){var n=t.getState(),o=n.index,r=n.size;t.setState(T({},t.getNextState({action:A.START,index:u.a.number(e)?e:o},!0),{status:r?V.RUNNING:V.WAITING}))})),P(this,"stop",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.getState(),o=n.index,r=n.status;-1===[V.FINISHED,V.SKIPPED].indexOf(r)&&t.setState(T({},t.getNextState({action:A.STOP,index:o+(e?1:0)}),{status:V.PAUSED}))})),P(this,"close",(function(){var e=t.getState(),n=e.index;e.status===V.RUNNING&&t.setState(T({},t.getNextState({action:A.CLOSE,index:n+1})))})),P(this,"go",(function(e){var n=t.getState(),o=n.controlled,r=n.status;if(!o&&r===V.RUNNING){var i=t.getSteps()[e];t.setState(T({},t.getNextState({action:A.GO,index:e}),{status:i?r:V.FINISHED}))}})),P(this,"info",(function(){return t.getState()})),P(this,"next",(function(){var e=t.getState(),n=e.index;e.status===V.RUNNING&&t.setState(t.getNextState({action:A.NEXT,index:n+1}))})),P(this,"open",(function(){t.getState().status===V.RUNNING&&t.setState(T({},t.getNextState({action:A.UPDATE,lifecycle:G.TOOLTIP})))})),P(this,"prev",(function(){var e=t.getState(),n=e.index;e.status===V.RUNNING&&t.setState(T({},t.getNextState({action:A.PREV,index:n-1})))})),P(this,"reset",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.getState(),o=n.controlled;o||t.setState(T({},t.getNextState({action:A.RESET,index:0}),{status:e?V.RUNNING:V.READY}))})),P(this,"skip",(function(){t.getState().status===V.RUNNING&&t.setState({action:A.SKIP,lifecycle:G.INIT,status:V.SKIPPED})})),this.setState({action:A.INIT,controlled:u.a.number(a),continuous:i,index:u.a.number(a)?a:0,lifecycle:G.INIT,status:l.length?V.READY:V.IDLE},!0),this.setSteps(l)}return x(e,[{key:"setState",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.getState(),r=T({},o,{},e),i=r.action,a=r.index,s=r.lifecycle,l=r.size,c=r.status;t.set("action",i),t.set("index",a),t.set("lifecycle",s),t.set("size",l),t.set("status",c),n&&(t.set("controlled",e.controlled),t.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(o)&&this.listener(this.getState())}},{key:"getState",value:function(){return t.size?{action:t.get("action")||"",controlled:t.get("controlled")||!1,index:parseInt(t.get("index"),10),lifecycle:t.get("lifecycle")||"",size:t.get("size")||0,status:t.get("status")||""}:T({},re)}},{key:"getNextState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getState(),o=n.action,r=n.controlled,i=n.index,a=n.size,s=n.status,l=u.a.number(e.index)?e.index:i,c=r&&!t?i:Math.min(Math.max(l,0),a);return{action:e.action||o,controlled:r,index:c,lifecycle:e.lifecycle||G.INIT,size:e.size||a,status:c===a?V.FINISHED:e.status||s}}},{key:"hasUpdatedState",value:function(e){return JSON.stringify(e)!==JSON.stringify(this.getState())}},{key:"getSteps",value:function(){var e=n.get("steps");return Array.isArray(e)?e:[]}},{key:"getHelpers",value:function(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}}]),e}())(e)}function se(){return document.scrollingElement||document.createElement("body")}function le(e){return e?e.getBoundingClientRect():{}}function ce(e){return"string"==typeof e?document.querySelector(e):e}function ue(e){return e&&1===e.nodeType?getComputedStyle(e):{}}function pe(e,t,n){var o=g()(e);return o.isSameNode(se())?n?document:se():o.scrollHeight>o.offsetHeight||t?o:(o.style.overflow="initial",se())}function fe(e,t){return!!e&&!pe(e,t).isSameNode(se())}function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fixed";if(!(e&&e instanceof HTMLElement))return!1;var n=e.nodeName;return"BODY"!==n&&"HTML"!==n&&(ue(e).position===t||de(e.parentNode,t))}function he(e,t,n){if(!e)return 0;var o=g()(e),r=e.offsetTop;return fe(e,n)&&!function(e){return e.offsetParent!==document.body}(e)&&(r-=o.offsetTop),Math.floor(r-t)}!function(e){function t(t,n,o,r,i,a){var s=r||"<<anonymous>>",l=a||o;if(null==n[o])return t?new Error("Required ".concat(i," `").concat(l,"` was not specified in `").concat(s,"`.")):null;for(var c=arguments.length,u=new Array(c>6?c-6:0),p=6;p<c;p++)u[p-6]=arguments[p];return e.apply(void 0,[n,o,s,i,l].concat(u))}var n=t.bind(null,!1);n.isRequired=t.bind(null,!0)}((function(e,t,n,o,r){var i=e[t],s=i;if(!a.a.isValidElement(i)&&Object(b.isValidElementType)(i)){s=a.a.createElement(s,{ref:function(){},step:{}})}if(u.a.string(i)||u.a.number(i)||!Object(b.isValidElementType)(i)||-1===[b.Element,b.ForwardRef].indexOf(Object(b.typeOf)(s)))return new Error("Invalid ".concat(o," `").concat(r,"` supplied to `").concat(n,"`. Expected a React class or forwardRef."))}));var me={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",zIndex:100},ye={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},ve={borderRadius:4,position:"absolute"};var ge={floaterProps:{options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},locale:{back:"Back",close:"Close",last:"Last",next:"Next",open:"Open the dialog",skip:"Skip"},step:{event:"click",placement:"bottom",offset:10}};function be(e){var t=["beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent"];return Object.keys(e).filter((function(e){return-1!==t.indexOf(e)})).reduce((function(t,n){return t[n]=e[n],t}),{})}function we(e,t){if(!e)return null;var n=E.a.all([be(t),ge.step,e],{isMergeableObject:u.a.plainObject}),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=E()(me,e.options||{}),n=290;window.innerWidth>480&&(n=380),t.width&&(n=window.innerWidth<t.width?window.innerWidth-30:t.width);var o={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:t.zIndex},r={beacon:T({},ye,{display:"inline-block",height:t.beaconSize,position:"relative",width:t.beaconSize,zIndex:t.zIndex}),beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:t.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:"rgba(".concat(ee(t.primaryColor).join(","),", 0.2)"),border:"2px solid ".concat(t.primaryColor),borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:t.backgroundColor,borderRadius:5,boxSizing:"border-box",color:t.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:n},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:T({},ye,{backgroundColor:t.primaryColor,borderRadius:4,color:"#fff"}),buttonBack:T({},ye,{color:t.primaryColor,marginLeft:"auto",marginRight:5}),buttonClose:T({},ye,{color:t.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14}),buttonSkip:T({},ye,{color:t.textColor,fontSize:14}),overlay:T({},o,{backgroundColor:t.overlayColor,mixBlendMode:"hard-light"}),overlayLegacy:T({},o),overlayLegacyCenter:T({},o,{backgroundColor:t.overlayColor}),spotlight:T({},ve,{backgroundColor:"gray"}),spotlightLegacy:T({},ve,{boxShadow:"0 0 0 9999px ".concat(t.overlayColor,", ").concat(t.spotlightShadow)}),floaterStyles:{arrow:{color:t.arrowColor},options:{zIndex:t.zIndex}},options:t};return E()(r,e)}(E()(t.styles||{},e.styles||{})),r=fe(ce(e.target),n.disableScrollParentFix),i=E.a.all([t.floaterProps||{},ge.floaterProps,n.floaterProps||{}]);return i.offset=n.offset,i.styles=E()(i.styles||{},o.floaterStyles||{}),delete o.floaterStyles,i.offset+=t.spotlightPadding||e.spotlightPadding,e.placementBeacon&&(i.wrapperOptions.placement=e.placementBeacon),r&&(i.options.preventOverflow.boundariesElement="window"),T({},n,{locale:E.a.all([ge.locale,t.locale||{},n.locale||{}]),floaterProps:i,styles:o})}function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u.a.plainObject(e)?!!e.target||(oe({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(oe({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u.a.array(e)?e.every((function(e){return Ee(e,t)})):(oe({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Se=function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(S(this,e),P(this,"element",void 0),P(this,"options",void 0),P(this,"canBeTabbed",(function(e){var t=e.tabIndex;return(null===t||t<0)&&(t=void 0),!isNaN(t)&&n.canHaveFocus(e,!0)})),P(this,"canHaveFocus",(function(e,t){var o=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(o)&&!e.getAttribute("disabled")||"a"===o&&e.getAttribute("href")||t)&&n.isVisible(e)})),P(this,"findValidTabElements",(function(){return[].slice.call(n.element.querySelectorAll("*"),0).filter(n.canBeTabbed)})),P(this,"handleKeyDown",(function(e){var t=n.options.keyCode,o=void 0===t?9:t;e.keyCode===o&&n.interceptTab(e)})),P(this,"interceptTab",(function(e){e.preventDefault();var t=n.findValidTabElements(),o=e.shiftKey;if(t.length){var r=t.indexOf(document.activeElement);-1===r||!o&&r+1===t.length?r=0:o&&0===r?r=t.length-1:r+=o?-1:1,t[r].focus()}})),P(this,"isHidden",(function(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0,n=window.getComputedStyle(e);return!(!t||e.innerHTML)||(t&&"visible"!==n.getPropertyValue("overflow")||"none"===n.getPropertyValue("display"))})),P(this,"isVisible",(function(e){for(var t=e;t;)if(t instanceof HTMLElement){if(t===document.body)break;if(n.isHidden(t))return!1;t=t.parentNode}return!0})),P(this,"removeScope",(function(){window.removeEventListener("keydown",n.handleKeyDown)})),P(this,"checkFocus",(function(e){document.activeElement!==e&&(e.focus(),window.requestAnimationFrame((function(){return n.checkFocus(e)})))})),P(this,"setFocus",(function(){var e=n.options.selector;if(e){var t=n.element.querySelector(e);t&&window.requestAnimationFrame((function(){return n.checkFocus(t)}))}})),!(t instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=t,this.options=o,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()},ke=function(e){function t(e){var n;if(S(this,t),P(L(n=_(this,I(t).call(this,e))),"setBeaconRef",(function(e){n.beacon=e})),!e.beaconComponent){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.id="joyride-beacon-animation",r.appendChild(document.createTextNode("\n @keyframes joyride-beacon-inner {\n 20% {\n opacity: 0.9;\n }\n \n 90% {\n opacity: 0.7;\n }\n }\n \n @keyframes joyride-beacon-outer {\n 0% {\n transform: scale(1);\n }\n \n 45% {\n opacity: 0.7;\n transform: scale(0.75);\n }\n \n 100% {\n opacity: 0.9;\n transform: scale(1);\n }\n }\n ")),o.appendChild(r)}return n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.shouldFocus;setTimeout((function(){u.a.domElement(e.beacon)&&t&&e.beacon.focus()}),0)}},{key:"componentWillUnmount",value:function(){var e=document.getElementById("joyride-beacon-animation");e&&e.parentNode.removeChild(e)}},{key:"render",value:function(){var e,t=this.props,n=t.beaconComponent,o=t.locale,r=t.onClickOrHover,i=t.styles,s={"aria-label":o.open,onClick:r,onMouseEnter:r,ref:this.setBeaconRef,title:o.open};if(n){var l=n;e=a.a.createElement(l,s)}else e=a.a.createElement("button",C({key:"JoyrideBeacon",className:"react-joyride__beacon",style:i.beacon,type:"button"},s),a.a.createElement("span",{style:i.beaconInner}),a.a.createElement("span",{style:i.beaconOuter}));return e}}]),t}(a.a.Component),xe=function(e){var t=e.styles;return a.a.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight",style:t})},Pe=function(e){function t(){var e,n;S(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return P(L(n=_(this,(e=I(t)).call.apply(e,[this].concat(r)))),"_isMounted",!1),P(L(n),"state",{mouseOverSpotlight:!1,isScrolling:!1,showSpotlight:!0}),P(L(n),"handleMouseMove",(function(e){var t=n.state.mouseOverSpotlight,o=n.spotlightStyles,r=o.height,i=o.left,a=o.position,s=o.top,l=o.width,c="fixed"===a?e.clientY:e.pageY,u="fixed"===a?e.clientX:e.pageX,p=u>=i&&u<=i+l&&(c>=s&&c<=s+r);p!==t&&n.updateState({mouseOverSpotlight:p})})),P(L(n),"handleScroll",(function(){var e=ce(n.props.target);n.scrollParent!==document?(n.state.isScrolling||n.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(n.scrollTimeout),n.scrollTimeout=setTimeout((function(){n.updateState({isScrolling:!1,showSpotlight:!0})}),50)):de(e,"sticky")&&n.updateState({})})),P(L(n),"handleResize",(function(){clearTimeout(n.resizeTimeout),n.resizeTimeout=setTimeout((function(){n._isMounted&&n.forceUpdate()}),100)})),n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.debug,e.disableScrolling,e.disableScrollParentFix),n=ce(e.target);this.scrollParent=pe(n,t,!0),this._isMounted=!0,window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,o=n.lifecycle,r=n.spotlightClicks,i=l()(e,this.props),a=i.changed;(0,i.changedTo)("lifecycle",G.TOOLTIP)&&(this.scrollParent.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout((function(){t.state.isScrolling||t.updateState({showSpotlight:!0})}),100)),(a("spotlightClicks")||a("disableOverlay")||a("lifecycle"))&&(r&&o===G.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):o!==G.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),this.scrollParent.removeEventListener("scroll",this.handleScroll)}},{key:"updateState",value:function(e){this._isMounted&&this.setState(e)}},{key:"render",value:function(){var e=this.state,t=e.mouseOverSpotlight,n=e.showSpotlight,o=this.props,r=o.disableOverlay,i=o.lifecycle,s=o.onClickOverlay,l=o.placement,c=o.styles;if(r||i!==G.TOOLTIP)return null;var u=c.overlay;ne()&&(u="center"===l?c.overlayLegacyCenter:c.overlayLegacy);var p,f,d,h=T({cursor:"pointer",height:(p=document,f=p.body,d=p.documentElement,f&&d?Math.max(f.scrollHeight,f.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight):0),pointerEvents:t?"none":"auto"},u),m="center"!==l&&n&&a.a.createElement(xe,{styles:this.spotlightStyles});if("safari"===K()){h.mixBlendMode,h.zIndex;var y=M(h,["mixBlendMode","zIndex"]);m=a.a.createElement("div",{style:T({},y)},m),delete h.backgroundColor}return a.a.createElement("div",{className:"react-joyride__overlay",style:h,onClick:s},m)}},{key:"spotlightStyles",get:function(){var e=this.state.showSpotlight,t=this.props,n=t.disableScrollParentFix,o=t.spotlightClicks,r=t.spotlightPadding,i=t.styles,a=ce(t.target),s=le(a),l=de(a),c=function(e,t,n){var o=le(e),r=pe(e,n),i=fe(e,n),a=0;r instanceof HTMLElement&&(a=r.scrollTop);var s=o.top+(i||de(e)?0:a);return Math.floor(s-t)}(a,r,n);return T({},ne()?i.spotlightLegacy:i.spotlight,{height:Math.round(s.height+2*r),left:Math.round(s.left-r),opacity:e?1:0,pointerEvents:o?"none":"auto",position:l?"fixed":"absolute",top:c,transition:"opacity 0.2s",width:Math.round(s.width+2*r)})}}]),t}(a.a.Component),Ce=function(e){var t=e.styles,n=M(e,["styles"]),o=t.color,r=t.height,i=t.width,s=M(t,["color","height","width"]);return a.a.createElement("button",C({style:s,type:"button"},n),a.a.createElement("svg",{width:"number"==typeof i?"".concat(i,"px"):i,height:"number"==typeof r?"".concat(r,"px"):r,viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},a.a.createElement("g",null,a.a.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:o}))))},Ne=function(e){function t(){return S(this,t),_(this,I(t).apply(this,arguments))}return j(t,e),x(t,[{key:"render",value:function(){var e=this.props,t=e.backProps,n=e.closeProps,o=e.continuous,r=e.index,i=e.isLastStep,s=e.primaryProps,l=e.size,c=e.skipProps,u=e.step,p=e.tooltipProps,f=u.content,d=u.hideBackButton,h=u.hideCloseButton,m=u.hideFooter,y=u.showProgress,v=u.showSkipButton,g=u.title,b=u.styles,w=u.locale,E=w.back,O=w.close,S=w.last,k=w.next,x=w.skip,P={primary:O};return o&&(P.primary=i?S:k,y&&(P.primary=a.a.createElement("span",null,P.primary," (",r+1,"/",l,")"))),v&&!i&&(P.skip=a.a.createElement("button",C({style:b.buttonSkip,type:"button","aria-live":"off"},c),x)),!d&&r>0&&(P.back=a.a.createElement("button",C({style:b.buttonBack,type:"button"},t),E)),P.close=!h&&a.a.createElement(Ce,C({styles:b.buttonClose},n)),a.a.createElement("div",C({key:"JoyrideTooltip",className:"react-joyride__tooltip",style:b.tooltip},p),a.a.createElement("div",{style:b.tooltipContainer},g&&a.a.createElement("h4",{style:b.tooltipTitle,"aria-label":g},g),a.a.createElement("div",{style:b.tooltipContent},f)),!m&&a.a.createElement("div",{style:b.tooltipFooter},a.a.createElement("div",{style:b.tooltipFooterSpacer},P.skip),P.back,a.a.createElement("button",C({style:b.buttonNext,type:"button"},s),P.primary)),P.close)}}]),t}(a.a.Component),Te=function(e){function t(){var e,n;S(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return P(L(n=_(this,(e=I(t)).call.apply(e,[this].concat(r)))),"handleClickBack",(function(e){e.preventDefault(),n.props.helpers.prev()})),P(L(n),"handleClickClose",(function(e){e.preventDefault(),n.props.helpers.close()})),P(L(n),"handleClickPrimary",(function(e){e.preventDefault();var t=n.props,o=t.continuous,r=t.helpers;o?r.next():r.close()})),P(L(n),"handleClickSkip",(function(e){e.preventDefault(),n.props.helpers.skip()})),P(L(n),"getElementsProps",(function(){var e=n.props,t=e.continuous,o=e.isLastStep,r=e.setTooltipRef,i=e.step,a=J(i.locale.back),s=J(i.locale.close),l=J(i.locale.last),c=J(i.locale.next),u=J(i.locale.skip),p=t?c:s;return o&&(p=l),{backProps:{"aria-label":a,"data-action":"back",onClick:n.handleClickBack,role:"button",title:a},closeProps:{"aria-label":s,"data-action":"close",onClick:n.handleClickClose,role:"button",title:s},primaryProps:{"aria-label":p,"data-action":"primary",onClick:n.handleClickPrimary,role:"button",title:p},skipProps:{"aria-label":u,"data-action":"skip",onClick:n.handleClickSkip,role:"button",title:u},tooltipProps:{"aria-modal":!0,ref:r,role:"alertdialog"}}})),n}return j(t,e),x(t,[{key:"render",value:function(){var e,t=this.props,n=t.continuous,o=t.index,r=t.isLastStep,i=t.size,s=t.step,l=(s.beaconComponent,s.tooltipComponent),c=M(s,["beaconComponent","tooltipComponent"]);if(l){var u=T({},this.getElementsProps(),{continuous:n,index:o,isLastStep:r,size:i,step:c}),p=l;e=a.a.createElement(p,u)}else e=a.a.createElement(Ne,C({},this.getElementsProps(),{continuous:n,index:o,isLastStep:r,size:i,step:s}));return e}}]),t}(a.a.Component),je=function(e){function t(e){var n;return S(this,t),n=_(this,I(t).call(this,e)),Y?(n.node=document.createElement("div"),e.id&&(n.node.id=e.id),document.body.appendChild(n.node),n):_(n)}return j(t,e),x(t,[{key:"componentDidMount",value:function(){Y&&($||this.renderReact15())}},{key:"componentDidUpdate",value:function(){Y&&($||this.renderReact15())}},{key:"componentWillUnmount",value:function(){Y&&this.node&&($||f.a.unmountComponentAtNode(this.node),document.body.removeChild(this.node))}},{key:"renderReact15",value:function(){if(!Y)return null;var e=this.props.children;return f.a.unstable_renderSubtreeIntoContainer(this,e,this.node),null}},{key:"renderReact16",value:function(){if(!Y||!$)return null;var e=this.props.children;return f.a.createPortal(e,this.node)}},{key:"render",value:function(){return $?this.renderReact16():null}}]),t}(a.a.Component),Ie=function(e){function t(){var e,n;S(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return P(L(n=_(this,(e=I(t)).call.apply(e,[this].concat(r)))),"scope",{removeScope:function(){}}),P(L(n),"handleClickHoverBeacon",(function(e){var t=n.props,o=t.step,r=t.update;"mouseenter"===e.type&&"hover"!==o.event||r({lifecycle:G.TOOLTIP})})),P(L(n),"handleClickOverlay",(function(){var e=n.props,t=e.helpers;e.step.disableOverlayClose||t.close()})),P(L(n),"setTooltipRef",(function(e){n.tooltip=e})),P(L(n),"setPopper",(function(e,t){var o=n.props,r=o.action,i=o.setPopper,a=o.update;"wrapper"===t?n.beaconPopper=e:n.tooltipPopper=e,i(e,t),n.beaconPopper&&n.tooltipPopper&&a({action:r===A.CLOSE?A.CLOSE:r,lifecycle:G.READY})})),n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.debug,n=e.index;oe({title:"step:".concat(n),data:[{key:"props",value:this.props}],debug:t})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.action,o=t.callback,r=t.continuous,i=t.controlled,a=t.debug,s=t.index,c=t.lifecycle,u=t.size,p=t.status,f=t.step,d=t.update,h=l()(e,this.props),m=h.changed,y=h.changedTo,v=h.changedFrom,g={action:n,controlled:i,index:s,lifecycle:c,size:u,status:p},b=r&&n!==A.CLOSE&&(s>0||n===A.PREV),w=m("action")||m("index")||m("lifecycle")||m("status"),E=v("lifecycle",[G.TOOLTIP,G.INIT],G.INIT);if(y("action",[A.NEXT,A.PREV,A.SKIP,A.CLOSE])&&(E||i)&&o(T({},g,{index:e.index,lifecycle:G.COMPLETE,step:e.step,type:z})),w&&f){var O=ce(f.target),S=!!O;S&&function(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if(t instanceof HTMLElement){var n=getComputedStyle(t),o=n.display,r=n.visibility;if("none"===o||"hidden"===r)return!1}t=t.parentNode}return!0}(O)?(v("status",V.READY,V.RUNNING)||v("lifecycle",G.INIT,G.READY))&&o(T({},g,{step:f,type:F})):(console.warn(S?"Target not visible":"Target not mounted",f),o(T({},g,{type:q,step:f})),i||d({index:s+(-1!==[A.PREV].indexOf(n)?-1:1)}))}v("lifecycle",G.INIT,G.READY)&&d({lifecycle:te(f)||b?G.TOOLTIP:G.BEACON}),m("index")&&oe({title:"step:".concat(c),data:[{key:"props",value:this.props}],debug:a}),y("lifecycle",G.BEACON)&&o(T({},g,{step:f,type:W})),y("lifecycle",G.TOOLTIP)&&(o(T({},g,{step:f,type:B})),this.scope=new Se(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus()),v("lifecycle",[G.TOOLTIP,G.INIT],G.INIT)&&(this.scope.removeScope(),delete this.beaconPopper,delete this.tooltipPopper)}},{key:"componentWillUnmount",value:function(){this.scope.removeScope()}},{key:"render",value:function(){var e=this.props,t=e.continuous,n=e.debug,o=e.helpers,r=e.index,i=e.lifecycle,s=e.shouldScroll,l=e.size,c=e.step,p=ce(c.target);return Ee(c)&&u.a.domElement(p)?a.a.createElement("div",{key:"JoyrideStep-".concat(r),className:"react-joyride__step"},a.a.createElement(je,{id:"react-joyride-portal"},a.a.createElement(Pe,C({},c,{debug:n,lifecycle:i,onClickOverlay:this.handleClickOverlay}))),a.a.createElement(O.a,C({component:a.a.createElement(Te,{continuous:t,helpers:o,index:r,isLastStep:r+1===l,setTooltipRef:this.setTooltipRef,size:l,step:c}),debug:n,getPopper:this.setPopper,id:"react-joyride-step-".concat(r),isPositioned:c.isFixed||de(p),open:this.open,placement:c.placement,target:c.target},c.floaterProps),a.a.createElement(ke,{beaconComponent:c.beaconComponent,locale:c.locale,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:s,styles:c.styles}))):null}},{key:"open",get:function(){var e=this.props,t=e.step,n=e.lifecycle;return!(!te(t)&&n!==G.TOOLTIP)}}]),t}(a.a.Component),Re=function(e){function t(e){var n;return S(this,t),P(L(n=_(this,I(t).call(this,e))),"initStore",(function(){var e=n.props,t=e.debug,o=e.getHelpers,r=e.run,i=e.stepIndex;n.store=new ae(T({},n.props,{controlled:r&&u.a.number(i)})),n.helpers=n.store.getHelpers();var a=n.store.addListener;return oe({title:"init",data:[{key:"props",value:n.props},{key:"state",value:n.state}],debug:t}),a(n.syncState),o(n.helpers),n.store.getState()})),P(L(n),"callback",(function(e){var t=n.props.callback;u.a.function(t)&&t(e)})),P(L(n),"handleKeyboard",(function(e){var t=n.state,o=t.index,r=t.lifecycle,i=n.props.steps[o],a=window.Event?e.which:e.keyCode;r===G.TOOLTIP&&27===a&&i&&!i.disableCloseOnEsc&&n.store.close()})),P(L(n),"syncState",(function(e){n.setState(e)})),P(L(n),"setPopper",(function(e,t){"wrapper"===t?n.beaconPopper=e:n.tooltipPopper=e})),P(L(n),"shouldScroll",(function(e,t,n,o,r,i,a){return!e&&(0!==t||n||o===G.TOOLTIP)&&"center"!==r.placement&&(!r.isFixed||!de(i))&&a.lifecycle!==o&&-1!==[G.BEACON,G.TOOLTIP].indexOf(o)})),n.state=n.initStore(),n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){if(Y){var e=this.props,t=e.disableCloseOnEsc,n=e.debug,o=e.run,r=e.steps,i=this.store.start;Oe(r,n)&&o&&i(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}}},{key:"componentDidUpdate",value:function(e,t){if(Y){var n=this.state,o=n.action,r=n.controlled,a=n.index,s=n.lifecycle,c=n.status,p=this.props,f=p.debug,d=p.run,h=p.stepIndex,m=p.steps,y=e.steps,v=e.stepIndex,g=this.store,b=g.setSteps,w=g.reset,E=g.start,O=g.stop,S=g.update,k=l()(e,this.props).changed,x=l()(t,this.state),P=x.changed,C=x.changedFrom,N=x.changedTo,j=we(m[a],this.props),I=!function e(t,n){var o,r=Object(i.isValidElement)(t)||Object(i.isValidElement)(n),a=u.a.undefined(t)||u.a.undefined(n);if(X(t)!==X(n)||r||a)return!1;if(u.a.domElement(t))return t.isSameNode(n);if(u.a.number(t))return t===n;if(u.a.function(t))return t.toString()===n.toString();for(var s in t)if(Z(t,s)){if(void 0===t[s]||void 0===n[s])return!1;if(o=X(t[s]),-1!==["object","array"].indexOf(o)&&e(t[s],n[s]))continue;if("function"===o&&e(t[s],n[s]))continue;if(t[s]!==n[s])return!1}for(var l in n)if(Z(n,l)&&void 0===t[l])return!1;return!0}(y,m),R=u.a.number(h)&&k("stepIndex");if(I&&(Oe(m,f)?b(m):console.warn("Steps are not valid",m)),k("run")&&(d?E(h):O()),R){var M=v<h?A.NEXT:A.PREV;o===A.STOP&&(M=A.START),-1===[V.FINISHED,V.SKIPPED].indexOf(c)&&S({action:o===A.CLOSE?A.CLOSE:M,index:h,lifecycle:G.INIT})}var L=T({},this.state,{index:a,step:j});if(N("action",[A.NEXT,A.PREV,A.SKIP,A.CLOSE])&&N("status",V.PAUSED)){var _=we(m[t.index],this.props);this.callback(T({},L,{index:t.index,lifecycle:G.COMPLETE,step:_,type:z}))}if(N("status",[V.FINISHED,V.SKIPPED])){var F=we(m[t.index],this.props);r||this.callback(T({},L,{index:t.index,lifecycle:G.COMPLETE,step:F,type:z})),this.callback(T({},L,{type:H,step:F,index:t.index})),w()}else C("status",[V.IDLE,V.READY],V.RUNNING)?this.callback(T({},L,{type:D})):P("status")?this.callback(T({},L,{type:U})):N("action",A.RESET)&&this.callback(T({},L,{type:U}));j&&(this.scrollToStep(t),"center"===j.placement&&c===V.RUNNING&&s===G.INIT&&this.store.update({lifecycle:G.READY}))}}},{key:"componentWillUnmount",value:function(){this.props.disableCloseOnEsc||document.body.removeEventListener("keydown",this.handleKeyboard)}},{key:"scrollToStep",value:function(e){var t=this.state,n=t.index,o=t.lifecycle,r=t.status,i=this.props,a=i.debug,s=i.disableScrolling,l=i.disableScrollParentFix,c=i.scrollToFirstStep,u=i.scrollOffset,p=i.scrollDuration,f=we(i.steps[n],this.props);if(f){var d=ce(f.target),h=this.shouldScroll(s,n,c,o,f,d,e);if(r===V.RUNNING&&h){var m=fe(d,l),v=pe(d,l),g=Math.floor(he(d,u,l))||0;if(oe({title:"scrollToStep",data:[{key:"index",value:n},{key:"lifecycle",value:o},{key:"status",value:r}],debug:a}),o===G.BEACON&&this.beaconPopper){var b=this.beaconPopper,w=b.placement,E=b.popper;-1!==["bottom"].indexOf(w)||m||(g=Math.floor(E.top-u))}else if(o===G.TOOLTIP&&this.tooltipPopper){var O=this.tooltipPopper,S=O.flipped,k=O.placement,x=O.popper;-1===["top","right","left"].indexOf(k)||S||m?g-=f.spotlightPadding:g=Math.floor(x.top-u)}g=g>=0?g:0,r===V.RUNNING&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se(),n=arguments.length>2?arguments[2]:void 0;new Promise((function(o,r){var i=t.scrollTop,a=e>i?e-i:i-e;y.a.top(t,e,{duration:a<100?50:n},(function(e){return e&&"Element already at target scroll position"!==e.message?r(e):o()}))}))}(g,v,p)}}}},{key:"render",value:function(){if(!Y)return null;var e,t=this.state,n=t.index,o=t.status,r=this.props,i=r.continuous,s=r.debug,l=r.disableScrolling,c=r.scrollToFirstStep,u=we(r.steps[n],this.props);return o===V.RUNNING&&u&&(e=a.a.createElement(Ie,C({},this.state,{callback:this.callback,continuous:i,debug:s,setPopper:this.setPopper,helpers:this.helpers,shouldScroll:!l&&(0!==n||c),step:u,update:this.store.update}))),a.a.createElement("div",{className:"react-joyride"},e)}}]),t}(a.a.Component);P(Re,"defaultProps",{continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:function(){},hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]});var Me=Re;function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var _e=lodash.debounce,Ae=wp.i18n.__,De=wp.components,Fe=De.Button,We=De.Modal,Be=wp.element,ze=Be.Fragment,He=Be.useEffect,Ue=Be.useRef,qe=Be.useState,Ge=function(){var e=Le(qe(!0),2),t=e[0],n=e[1],o=Le(qe(!1),2),r=o[0],i=o[1],a=Ue(null);He((function(){wp.api.loadPromise.then((function(){a.current=new wp.api.models.Settings}))}),[]);var s=[{target:".otter-step-one",content:Ae("Howdy, I'm Ollie The Otter! I will help you configure your Otter experience. So let's start the magic!"),disableBeacon:!0},{target:".otter-step-two",content:Ae("Jazz up your blocks with some sparkly custom CSS or Blocks Animation right inside the block. Here you can enable modules to enhance your experience with Block Editor.")},{target:".otter-step-three",content:Ae("Section Block is the signature feature of Otter. It allows you to build beautiful layouts right inside the Block Editor. You can set Section Block as the default block for your new Pages.")},{target:".otter-step-four",content:Ae("We love maps! Here you can set your Google Maps API key for Otter's Map Block.")},{target:".otter-step-five",content:Ae("If you don't have an API key, you can register one by clicking here.")},{target:".otter-step-six",content:Ae("Help us in making our plugin better with anonymous data tracking.")},{target:".otter-step-seven",content:Ae("If you ever need any help, we are a team of real Otter-lovers who would love to help you out.")},{target:".otter-step-eight",content:Ae("And if you love what we do, please leave us a review at WordPress.org. Your review keeps us motivated to make awesome things.")},{target:".otter-step-one",content:Ae("That's it for now! Hope you enjoy Otter and love it as much as we do.")}],l=_e((function(e){if(t&&n(!1),"ready"===e||"finished"===e||"skipped"===e){var o=new wp.api.models.Settings({themeisle_blocks_settings_tour:!1}).save();o.success((function(e,t){a.current.fetch()})),o.error((function(e,t){console.warning(e.responseJSON.message)}))}}),1e3);return wp.element.createElement(ze,null,t&&wp.element.createElement(We,{title:Ae("Welcome to Otter!"),isDismissable:!1,className:"otter-onboarding-modal"},wp.element.createElement("div",{className:"otter-onboarding-modal-content"},Ae("Would you like to start the onboarding wizard which will help you personalize the plugin for yourself?")),wp.element.createElement("div",{className:"otter-onboarding-modal-action"},wp.element.createElement(Fe,{isPrimary:!0,isLarge:!0,onClick:function(){n(!1),i(!0)}},Ae("Start")),wp.element.createElement(Fe,{isDefault:!0,isLarge:!0,onClick:function(){return l("skipped")}},Ae("Skip")))),wp.element.createElement(Me,{continuous:!0,run:r,steps:s,scrollToFirstStep:!0,showSkipButton:!0,locale:{back:Ae("Back"),close:Ae("Close"),last:Ae("Finish"),next:Ae("Next"),skip:Ae("Skip")},callback:function(e){return l(e.status)}}))},Ve=n(15),Ye=n.n(Ve),$e=wp.i18n.__,Ke=function(){return wp.element.createElement("header",{className:"otter-header"},wp.element.createElement("div",{className:Ye()("otter-container","otter-step-one")},wp.element.createElement("div",{className:"otter-logo"},wp.element.createElement("img",{src:otterObj.assetsPath+"images/logo.png",title:$e("Gutenberg Blocks and Template Library by Otter")}),wp.element.createElement("abbr",{title:"Version: ".concat(otterObj.version),className:"version"},otterObj.version))))};n(23);function Xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Je=wp.i18n.__,Ze=wp.components,Qe=Ze.BaseControl,et=Ze.Button,tt=Ze.ExternalLink,nt=Ze.PanelBody,ot=Ze.PanelRow,rt=Ze.Placeholder,it=Ze.Spinner,at=Ze.ToggleControl,st=wp.element,lt=st.Fragment,ct=st.useEffect,ut=st.useRef,pt=st.useState,ft=function(){ct((function(){wp.api.loadPromise.then((function(){x.current=new wp.api.models.Settings,!1===t&&x.current.fetch().then((function(e){f(Boolean(e.themeisle_blocks_settings_css_module)),m(Boolean(e.themeisle_blocks_settings_blocks_animation)),g(Boolean(e.themeisle_blocks_settings_default_block)),E(e.themeisle_google_map_block_api_key),k(e.otter_blocks_logger_flag),n(!0)}))}))}),[]);var e=Xe(pt(!1),2),t=e[0],n=e[1],r=Xe(pt(!1),2),i=r[0],a=r[1],s=Xe(pt(null),2),l=s[0],c=s[1],u=Xe(pt(!1),2),p=u[0],f=u[1],d=Xe(pt(!1),2),h=d[0],m=d[1],y=Xe(pt(!0),2),v=y[0],g=y[1],b=Xe(pt(""),2),w=b[0],E=b[1],O=Xe(pt("no"),2),S=O[0],k=O[1],x=ut(null),P=(ut(null),function(e,t,n){a(!0),N(Je("Updating settings…"),"info");var r=new wp.api.models.Settings(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,n)).save();r.success((function(n,r){o.store.removeNotification(l),"success"===r&&(C(t,n[e]),setTimeout((function(){N(Je("Settings saved."),"success"),a(!1)}),800)),"error"===r&&setTimeout((function(){N(Je("An unknown error occurred."),"danger"),a(!1)}),800),x.current.fetch()})),r.error((function(e,t){o.store.removeNotification(l),setTimeout((function(){N(e.responseJSON.message?e.responseJSON.message:Je("An unknown error occurred."),"danger"),a(!1)}),800)}))}),C=function(e,t){switch(e){case"cssModule":f(t);break;case"blocksAnimation":m(t);break;case"isDefaultSection":g(t);break;case"googleMapsAPI":E(t);break;case"isLoggingData":k(t)}},N=function(e,t){var n=o.store.addNotification({message:e,type:t,insert:"top",container:"bottom-left",isMobile:!0,dismiss:{duration:2e3,showIcon:!0},dismissable:{click:!0,touch:!0}});c(n)};return t?wp.element.createElement(lt,null,wp.element.createElement("div",{className:"otter-main"},wp.element.createElement("div",{className:"otter-step-two"},wp.element.createElement(nt,{title:Je("Modules")},wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Enable Custom CSS Module"),help:"Custom CSS module allows to add custom CSS to each block in Block Editor.",checked:p,onChange:function(){return P("themeisle_blocks_settings_css_module","cssModule",!p)}})),wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Enable Blocks Animation Module"),help:"Blocks Animation module allows to add CSS animations to each block in Block Editor.",checked:h,onChange:function(){return P("themeisle_blocks_settings_blocks_animation","blocksAnimation",!h)}})))),wp.element.createElement("div",{className:"otter-step-three"},wp.element.createElement(nt,{title:Je("Section")},wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Make Section your default block for Pages"),help:"Everytime you create a new page, Section block will be appended there by default.",checked:v,onChange:function(){return P("themeisle_blocks_settings_default_block","isDefaultSection",!v)}})))),wp.element.createElement("div",{className:"otter-step-four"},wp.element.createElement(nt,{title:Je("Maps")},wp.element.createElement(ot,null,wp.element.createElement(Qe,{label:Je("Google Maps API"),help:"In order to use Google Maps block, you need to use Google Maps and Places API.",id:"otter-options-google-map-api",className:"otter-text-field"},wp.element.createElement("input",{type:"text",id:"otter-options-google-map-api",value:w,placeholder:Je("Google Maps API Key"),disabled:i,onChange:function(e){return E(e.target.value)}}),wp.element.createElement("div",{className:"otter-text-field-button-group"},wp.element.createElement(et,{isPrimary:!0,isLarge:!0,disabled:i,onClick:function(){return P("themeisle_google_map_block_api_key","googleMapsAPI",w)}},Je("Save")),wp.element.createElement(tt,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key",className:"otter-step-five"},Je("Get API Key"))))))),wp.element.createElement("div",{className:"otter-step-six"},wp.element.createElement(nt,{title:Je("Other")},wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Anonymous Data Tracking."),help:"Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.",checked:"yes"===S,onChange:function(){return P("otter_blocks_logger_flag","isLoggingData","yes"===S?"no":"yes")}})))),wp.element.createElement(nt,null,wp.element.createElement("div",{className:"otter-info"},wp.element.createElement("h2",null,Je("Got a question for us?")),wp.element.createElement("p",null,Je("We would love to help you out if you need any help with Otter.")),wp.element.createElement("div",{className:"otter-info-button-group"},wp.element.createElement(et,{isDefault:!0,isLarge:!0,target:"_blank",href:"https://wordpress.org/support/plugin/otter-blocks",className:"otter-step-seven"},Je("Ask a question")),wp.element.createElement(et,{isDefault:!0,isLarge:!0,target:"_blank",href:"https://wordpress.org/support/plugin/otter-blocks/reviews/#new-post",className:"otter-step-eight"},Je("Leave a review"))))))):wp.element.createElement(rt,null,wp.element.createElement(it,null))},dt=wp.i18n.__,ht=function(){return wp.element.createElement("footer",{className:"otter-footer"},wp.element.createElement("div",{className:"otter-container"},dt("No otters were harmed during the making of this plugin.")))},mt=wp.element,yt=mt.render,vt=mt.Fragment;yt(wp.element.createElement((function(){return wp.element.createElement(vt,null,Boolean(otterObj.showTour)&&wp.element.createElement(Ge,null),wp.element.createElement(r.a,null),wp.element.createElement(Ke,null),wp.element.createElement(ft,null),wp.element.createElement(ht,null))}),null),document.getElementById("otter"))}]);
28
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
  * SOFTWARE.
30
  */
31
+ var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,o=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var r=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),o))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+o)?e:l(s(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?u:10===e?p:u||p}function d(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function h(e){return null!==e.parentNode?h(e.parentNode):e}function m(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||o.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&d(a.firstElementChild)!==a?d(l):l;var c=h(e);return c.host?m(c.host,t):m(e,h(t).host)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var r=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||r;return i[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=y(t,"top"),r=y(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function b(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+o+"Width"],10)}function g(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(o["margin"+("Height"===e?"Top":"Left")])+parseInt(o["margin"+("Height"===e?"Bottom":"Right")]):0)}function w(e){var t=e.body,n=e.documentElement,o=f(10)&&getComputedStyle(n);return{height:g("Height",t,n,o),width:g("Width",t,n,o)}}var E=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},O=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};function x(e){return k({},e,{right:e.left+e.width,bottom:e.top+e.height})}function P(e){var t={};try{if(f(10)){t=e.getBoundingClientRect();var n=y(e,"top"),o=y(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?w(e.ownerDocument):{},s=i.width||e.clientWidth||r.width,l=i.height||e.clientHeight||r.height,c=e.offsetWidth-s,u=e.offsetHeight-l;if(c||u){var p=a(e);c-=b(p,"x"),u-=b(p,"y"),r.width-=c,r.height-=u}return x(r)}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=f(10),r="HTML"===t.nodeName,i=P(e),s=P(t),c=l(e),u=a(t),p=parseFloat(u.borderTopWidth,10),d=parseFloat(u.borderLeftWidth,10);n&&r&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=x({top:i.top-s.top-p,left:i.left-s.left-d,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!o&&r){var m=parseFloat(u.marginTop,10),y=parseFloat(u.marginLeft,10);h.top-=p-m,h.bottom-=p-m,h.left-=d-y,h.right-=d-y,h.marginTop=m,h.marginLeft=y}return(o&&!n?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(h=v(h,t)),h}function N(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,o=C(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:y(n),s=t?0:y(n,"left"),l={top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:r,height:i};return x(l)}function T(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&T(n)}function j(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function I(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=r?j(e):m(e,c(t));if("viewport"===o)i=N(a,r);else{var u=void 0;"scrollParent"===o?"BODY"===(u=l(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===o?e.ownerDocument.documentElement:o;var p=C(u,a,r);if("HTML"!==u.nodeName||T(a))i=p;else{var f=w(e.ownerDocument),d=f.height,h=f.width;i.top+=p.top-p.marginTop,i.bottom=d+p.top,i.left+=p.left-p.marginLeft,i.right=h+p.left}}var y="number"==typeof(n=n||0);return i.left+=y?n:n.left||0,i.top+=y?n:n.top||0,i.right-=y?n:n.right||0,i.bottom-=y?n:n.bottom||0,i}function R(e){return e.width*e.height}function M(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=I(n,o,i,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return k({key:e},s[e],{area:R(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,p=e.split("-")[1];return u+(p?"-"+p:"")}function L(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=o?j(t):m(t,c(n));return C(n,r,o)}function _(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),o=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function A(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function D(e,t,n){n=n.split("-")[0];var o=_(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return r[a]=t[a]+t[l]/2-o[l]/2,r[s]=n===s?t[s]-o[c]:t[A(s)],r}function F(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function W(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var o=F(e,(function(e){return e[t]===n}));return e.indexOf(o)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=x(t.offsets.popper),t.offsets.reference=x(t.offsets.reference),t=n(t,e))})),t}function B(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=D(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=W(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function z(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function H(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==document.body.style[i])return i}return null}function U(){return this.state.isDestroyed=!0,z(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function G(e,t,n,o){n.updateBound=o,q(e).addEventListener("resize",n.updateBound,{passive:!0});var r=l(e);return function e(t,n,o,r){var i="BODY"===t.nodeName,a=i?t.ownerDocument.defaultView:t;a.addEventListener(n,o,{passive:!0}),i||e(l(a.parentNode),n,o,r),r.push(a)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function V(){this.state.eventsEnabled||(this.state=G(this.reference,this.options,this.state,this.scheduleUpdate))}function Y(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function $(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function K(e,t){Object.keys(t).forEach((function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&$(t[n])&&(o="px"),e.style[n]=t[n]+o}))}var X=n&&/Firefox/i.test(navigator.userAgent);function J(e,t,n){var o=F(e,(function(e){return e.name===t})),r=!!o&&e.some((function(e){return e.name===n&&e.enabled&&e.order<o.order}));if(!r){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}var Z=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Q=Z.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Q.indexOf(e),o=Q.slice(n+1).concat(Q.slice(0,n));return t?o.reverse():o}var te="flip",ne="clockwise",oe="counterclockwise";function re(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(F(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return x(s)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}(e,r,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,o){$(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))}))})),r}var ie={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:S({},l,i[l]),end:S({},l,i[l]+i[c]-a[c])};e.offsets.popper=k({},a,u[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,o=e.placement,r=e.offsets,i=r.popper,a=r.reference,s=o.split("-")[0],l=void 0;return l=$(+n)?[+n,0]:re(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var o=H("transform"),r=e.instance.popper.style,i=r.top,a=r.left,s=r[o];r.top="",r.left="",r[o]="";var l=I(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);r.top=i,r.left=a,r[o]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,p={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),S({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(o=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),S({},n,o)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=k({},u,p[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(o[l])&&(e.offsets.popper[l]=i(o[l])-n[c]),n[l]>i(o[s])&&(e.offsets.popper[l]=i(o[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!J(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,s=i.popper,l=i.reference,c=-1!==["left","right"].indexOf(r),u=c?"height":"width",p=c?"Top":"Left",f=p.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",m=_(o)[u];l[h]-m<s[f]&&(e.offsets.popper[f]-=s[f]-(l[h]-m)),l[f]+m>s[h]&&(e.offsets.popper[f]+=l[f]+m-s[h]),e.offsets.popper=x(e.offsets.popper);var y=l[f]+l[u]/2-m/2,v=a(e.instance.popper),b=parseFloat(v["margin"+p],10),g=parseFloat(v["border"+p+"Width"],10),w=y-e.offsets.popper[f]-b-g;return w=Math.max(Math.min(s[u]-m,w),0),e.arrowElement=o,e.offsets.arrow=(S(n={},f,Math.round(w)),S(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(z(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=I(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),o=e.placement.split("-")[0],r=A(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case te:a=[o,r];break;case ne:a=ee(o);break;case oe:a=ee(o,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(o!==s||a.length===l+1)return e;o=e.placement.split("-")[0],r=A(o);var c=e.offsets.popper,u=e.offsets.reference,p=Math.floor,f="left"===o&&p(c.right)>p(u.left)||"right"===o&&p(c.left)<p(u.right)||"top"===o&&p(c.bottom)>p(u.top)||"bottom"===o&&p(c.top)<p(u.bottom),d=p(c.left)<p(n.left),h=p(c.right)>p(n.right),m=p(c.top)<p(n.top),y=p(c.bottom)>p(n.bottom),v="left"===o&&d||"right"===o&&h||"top"===o&&m||"bottom"===o&&y,b=-1!==["top","bottom"].indexOf(o),g=!!t.flipVariations&&(b&&"start"===i&&d||b&&"end"===i&&h||!b&&"start"===i&&m||!b&&"end"===i&&y),w=!!t.flipVariationsByContent&&(b&&"start"===i&&h||b&&"end"===i&&d||!b&&"start"===i&&y||!b&&"end"===i&&m),E=g||w;(f||v||E)&&(e.flipped=!0,(f||v)&&(o=a[l+1]),E&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=k({},e.offsets.popper,D(e.instance.popper,e.offsets.reference,e.placement)),e=W(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(s?r[a?"width":"height"]:0),e.placement=A(t),e.offsets.popper=x(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!J(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=F(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,o=t.y,r=e.offsets.popper,i=F(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=d(e.instance.popper),l=P(s),c={position:r.position},u=function(e,t){var n=e.offsets,o=n.popper,r=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(r.width),c=i(o.width),u=-1!==["left","right"].indexOf(e.placement),p=-1!==e.placement.indexOf("-"),f=t?u||p||l%2==c%2?i:a:s,d=t?i:s;return{left:f(l%2==1&&c%2==1&&!p&&t?o.left-1:o.left),top:d(o.top),bottom:d(o.bottom),right:f(o.right)}}(e,window.devicePixelRatio<2||!X),p="bottom"===n?"top":"bottom",f="right"===o?"left":"right",h=H("transform"),m=void 0,y=void 0;if(y="bottom"===p?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,m="right"===f?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&h)c[h]="translate3d("+m+"px, "+y+"px, 0)",c[p]=0,c[f]=0,c.willChange="transform";else{var v="bottom"===p?-1:1,b="right"===f?-1:1;c[p]=y*v,c[f]=m*b,c.willChange=p+", "+f}var g={"x-placement":e.placement};return e.attributes=k({},g,e.attributes),e.styles=k({},c,e.styles),e.arrowStyles=k({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return K(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&K(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,o,r){var i=L(r,t,e,n.positionFixed),a=M(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),K(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ae=function(){function e(t,n){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};E(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=r(this.update.bind(this)),this.options=k({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){o.options.modifiers[t]=k({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return k({name:e},o.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return O(e,[{key:"update",value:function(){return B.call(this)}},{key:"destroy",value:function(){return U.call(this)}},{key:"enableEventListeners",value:function(){return V.call(this)}},{key:"disableEventListeners",value:function(){return Y.call(this)}}]),e}();ae.Utils=("undefined"!=typeof window?window:e).PopperUtils,ae.placements=Z,ae.Defaults=ie,t.a=ae}).call(this,n(12))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=new Error("Element already at target scroll position"),o=new Error("Scroll cancelled"),r=Math.min,i=Date.now;function a(e){return function(t,a,c,u){"function"==typeof(c=c||{})&&(u=c,c={}),"function"!=typeof u&&(u=l);var p=i(),f=t[e],d=c.ease||s,h=isNaN(c.duration)?350:+c.duration,m=!1;return f===a?u(n,t[e]):requestAnimationFrame((function n(s){if(m)return u(o,t[e]);var l=i(),c=r(1,(l-p)/h),y=d(c);t[e]=y*(a-f)+f,c<1?requestAnimationFrame(n):requestAnimationFrame((function(){u(null,t[e])}))})),function(){m=!0}}}function s(e){return.5*(1-Math.cos(Math.PI*e))}function l(){}e.exports={left:a("scrollLeft"),top:a("scrollTop")}},function(e,t,n){"use strict";(function(e){var o=n(1),r=n.n(o),i=n(0),a=n.n(i),s=n(10),l=n.n(s),c=n(11),u=n(3),p=n.n(u),f=n(2),d=n.n(f),h=n(5),m=n.n(h),y=n(4),v=n.n(y),b=n(8);function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function E(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?T(e):t}var I={flip:{padding:20},preventOverflow:{padding:10}},R={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},M=n.n(b).a.canUseDOM,L=void 0!==v.a.createPortal;function _(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function A(e){var t=e.title,n=e.data,o=e.warn,r=void 0!==o&&o,i=e.debug,a=void 0!==i&&i,s=r?console.warn||console.error:console.log;a&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach((function(e){d.a.plainObject(e)&&e.key?s.apply(console,[e.key,e.value]):s.apply(console,[e])})):s.apply(console,[n]),console.groupEnd())}function D(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.addEventListener(t,n,o)}function F(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,o)}function W(){}var B=function(e){function t(e){var n;return g(this,t),n=j(this,P(t).call(this,e)),M?(n.node=document.createElement("div"),e.id&&(n.node.id=e.id),e.zIndex&&(n.node.style.zIndex=e.zIndex),document.body.appendChild(n.node),n):j(n)}return x(t,e),E(t,[{key:"componentDidMount",value:function(){M&&(L||this.renderPortal())}},{key:"componentDidUpdate",value:function(){M&&(L||this.renderPortal())}},{key:"componentWillUnmount",value:function(){M&&this.node&&(L||v.a.unmountComponentAtNode(this.node),document.body.removeChild(this.node))}},{key:"renderPortal",value:function(){if(!M)return null;var e=this.props,t=e.children,n=e.setRef;return L?v.a.createPortal(t,this.node):(n(v.a.unstable_renderSubtreeIntoContainer(this,t.length>1?r.a.createElement("div",null,t):t[0],this.node)),null)}},{key:"renderReact16",value:function(){var e=this.props,t=e.hasChildren,n=e.placement,o=e.target;return t||o||"center"===n?this.renderPortal():null}},{key:"render",value:function(){return L?this.renderReact16():null}}]),t}(r.a.Component);O(B,"propTypes",{children:a.a.oneOfType([a.a.element,a.a.array]),hasChildren:a.a.bool,id:a.a.oneOfType([a.a.string,a.a.number]),placement:a.a.string,setRef:a.a.func.isRequired,target:a.a.oneOfType([a.a.object,a.a.string]),zIndex:a.a.number});var z=function(e){function t(){return g(this,t),j(this,P(t).apply(this,arguments))}return x(t,e),E(t,[{key:"render",value:function(){var e,t=this.props,n=t.placement,o=t.setArrowRef,i=t.styles.arrow,a=i.color,s=i.display,l=i.length,c=i.margin,u=i.position,p=i.spread,f={display:s,position:u},d=p,h=l;return n.startsWith("top")?(e="0,0 ".concat(d/2,",").concat(h," ").concat(d,",0"),f.bottom=0,f.marginLeft=c,f.marginRight=c):n.startsWith("bottom")?(e="".concat(d,",").concat(h," ").concat(d/2,",0 0,").concat(h),f.top=0,f.marginLeft=c,f.marginRight=c):n.startsWith("left")?(h=p,e="0,0 ".concat(d=l,",").concat(h/2," 0,").concat(h),f.right=0,f.marginTop=c,f.marginBottom=c):n.startsWith("right")&&(h=p,e="".concat(d=l,",").concat(h," ").concat(d,",0 0,").concat(h/2),f.left=0,f.marginTop=c,f.marginBottom=c),r.a.createElement("div",{className:"__floater__arrow",style:this.parentStyle},r.a.createElement("span",{ref:o,style:f},r.a.createElement("svg",{width:d,height:h,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("polygon",{points:e,fill:a}))))}},{key:"parentStyle",get:function(){var e=this.props,t=e.placement,n=e.styles.arrow.length,o={pointerEvents:"none",position:"absolute",width:"100%"};return t.startsWith("top")?(o.bottom=0,o.left=0,o.right=0,o.height=n):t.startsWith("bottom")?(o.left=0,o.right=0,o.top=0,o.height=n):t.startsWith("left")?(o.right=0,o.top=0,o.bottom=0):t.startsWith("right")&&(o.left=0,o.top=0),o}}]),t}(r.a.Component);O(z,"propTypes",{placement:a.a.string.isRequired,setArrowRef:a.a.func.isRequired,styles:a.a.object.isRequired});var H=function(e){var t=e.handleClick,n=e.styles,o=n.color,i=n.height,a=n.width,s=N(n,["color","height","width"]);return r.a.createElement("button",{"aria-label":"close",onClick:t,style:s,type:"button"},r.a.createElement("svg",{width:"".concat(a,"px"),height:"".concat(i,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},r.a.createElement("g",null,r.a.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:o}))))};H.propTypes={handleClick:a.a.func.isRequired,styles:a.a.object.isRequired};var U=function(e){var t=e.content,n=e.footer,o=e.handleClick,i=e.open,a=e.positionWrapper,s=e.showCloseButton,l=e.title,c=e.styles,u={content:r.a.isValidElement(t)?t:r.a.createElement("div",{className:"__floater__content",style:c.content},t)};return l&&(u.title=r.a.isValidElement(l)?l:r.a.createElement("div",{className:"__floater__title",style:c.title},l)),n&&(u.footer=r.a.isValidElement(n)?n:r.a.createElement("div",{className:"__floater__footer",style:c.footer},n)),!s&&!a||d.a.boolean(i)||(u.close=r.a.createElement(H,{styles:c.close,handleClick:o})),r.a.createElement("div",{className:"__floater__container",style:c.container},u.close,u.title,u.content,u.footer)};U.propTypes={content:a.a.node.isRequired,footer:a.a.node,handleClick:a.a.func.isRequired,open:a.a.bool,positionWrapper:a.a.bool.isRequired,showCloseButton:a.a.bool.isRequired,styles:a.a.object.isRequired,title:a.a.node};var q=function(e){function t(){return g(this,t),j(this,P(t).apply(this,arguments))}return x(t,e),E(t,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.handleClick,o=e.hideArrow,i=e.setFloaterRef,a=e.status,s={},l=["__floater"];return t?r.a.isValidElement(t)?s.content=r.a.cloneElement(t,{closeFn:n}):s.content=t({closeFn:n}):s.content=r.a.createElement(U,this.props),a===R.OPEN&&l.push("__floater__open"),o||(s.arrow=r.a.createElement(z,this.props)),r.a.createElement("div",{ref:i,className:l.join(" "),style:this.style},r.a.createElement("div",{className:"__floater__body"},s.content,s.arrow))}},{key:"style",get:function(){var e=this.props,t=e.disableAnimation,n=e.component,o=e.placement,r=e.hideArrow,i=e.status,a=e.styles,s=a.arrow.length,l=a.floater,c=a.floaterCentered,u=a.floaterClosing,p=a.floaterOpening,f=a.floaterWithAnimation,d=a.floaterWithComponent,h={};return r||(o.startsWith("top")?h.padding="0 0 ".concat(s,"px"):o.startsWith("bottom")?h.padding="".concat(s,"px 0 0"):o.startsWith("left")?h.padding="0 ".concat(s,"px 0 0"):o.startsWith("right")&&(h.padding="0 0 0 ".concat(s,"px"))),-1!==[R.OPENING,R.OPEN].indexOf(i)&&(h=k({},h,{},p)),i===R.CLOSING&&(h=k({},h,{},u)),i!==R.OPEN||t||(h=k({},h,{},f)),"center"===o&&(h=k({},h,{},c)),n&&(h=k({},h,{},d)),k({},l,{},h)}}]),t}(r.a.Component);O(q,"propTypes",{component:a.a.oneOfType([a.a.func,a.a.element]),content:a.a.node,disableAnimation:a.a.bool.isRequired,footer:a.a.node,handleClick:a.a.func.isRequired,hideArrow:a.a.bool.isRequired,open:a.a.bool,placement:a.a.string.isRequired,positionWrapper:a.a.bool.isRequired,setArrowRef:a.a.func.isRequired,setFloaterRef:a.a.func.isRequired,showCloseButton:a.a.bool,status:a.a.string.isRequired,styles:a.a.object.isRequired,title:a.a.node});var G=function(e){function t(){return g(this,t),j(this,P(t).apply(this,arguments))}return x(t,e),E(t,[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.handleClick,i=t.handleMouseEnter,a=t.handleMouseLeave,s=t.setChildRef,l=t.setWrapperRef,c=t.style,u=t.styles;if(n)if(1===r.a.Children.count(n))if(r.a.isValidElement(n)){var p=d.a.function(n.type)?"innerRef":"ref";e=r.a.cloneElement(r.a.Children.only(n),O({},p,s))}else e=r.a.createElement("span",null,n);else e=n;return e?r.a.createElement("span",{ref:l,style:k({},u,{},c),onClick:o,onMouseEnter:i,onMouseLeave:a},e):null}}]),t}(r.a.Component);O(G,"propTypes",{children:a.a.node,handleClick:a.a.func.isRequired,handleMouseEnter:a.a.func.isRequired,handleMouseLeave:a.a.func.isRequired,setChildRef:a.a.func.isRequired,setWrapperRef:a.a.func.isRequired,style:a.a.object,styles:a.a.object.isRequired});var V={zIndex:100};var Y=["position","top","right","bottom","left"],$=function(t){function n(e){var t;return g(this,n),O(T(t=j(this,P(n).call(this,e))),"setArrowRef",(function(e){t.arrowRef=e})),O(T(t),"setChildRef",(function(e){t.childRef=e})),O(T(t),"setFloaterRef",(function(e){t.floaterRef||(t.floaterRef=e)})),O(T(t),"setWrapperRef",(function(e){t.wrapperRef=e})),O(T(t),"handleTransitionEnd",(function(){var e=t.state.status,n=t.props.callback;t.wrapperPopper&&t.wrapperPopper.instance.update(),t.setState({status:e===R.OPENING?R.OPEN:R.IDLE},(function(){var e=t.state.status;n(e===R.OPEN?"open":"close",t.props)}))})),O(T(t),"handleClick",(function(){var e=t.props,n=e.event,o=e.open;if(!d.a.boolean(o)){var r=t.state,i=r.positionWrapper,a=r.status;("click"===t.event||"hover"===t.event&&i)&&(A({title:"click",data:[{event:n,status:a===R.OPEN?"closing":"opening"}],debug:t.debug}),t.toggle())}})),O(T(t),"handleMouseEnter",(function(){var e=t.props,n=e.event,o=e.open;if(!d.a.boolean(o)&&!_()){var r=t.state.status;"hover"===t.event&&r===R.IDLE&&(A({title:"mouseEnter",data:[{key:"originalEvent",value:n}],debug:t.debug}),clearTimeout(t.eventDelayTimeout),t.toggle())}})),O(T(t),"handleMouseLeave",(function(){var e=t.props,n=e.event,o=e.eventDelay,r=e.open;if(!d.a.boolean(r)&&!_()){var i=t.state,a=i.status,s=i.positionWrapper;"hover"===t.event&&(A({title:"mouseLeave",data:[{key:"originalEvent",value:n}],debug:t.debug}),o?-1===[R.OPENING,R.OPEN].indexOf(a)||s||t.eventDelayTimeout||(t.eventDelayTimeout=setTimeout((function(){delete t.eventDelayTimeout,t.toggle()}),1e3*o)):t.toggle(R.IDLE))}})),t.state={currentPlacement:e.placement,positionWrapper:e.wrapperOptions.position&&!!e.target,status:R.INIT,statusWrapper:R.INIT},t._isMounted=!1,M&&window.addEventListener("load",(function(){t.popper&&t.popper.instance.update(),t.wrapperPopper&&t.wrapperPopper.instance.update()})),t}return x(n,t),E(n,[{key:"componentDidMount",value:function(){if(M){var e=this.state.positionWrapper,t=this.props,n=t.children,o=t.open,r=t.target;this._isMounted=!0,A({title:"init",data:{hasChildren:!!n,hasTarget:!!r,isControlled:d.a.boolean(o),positionWrapper:e,target:this.target,floater:this.floaterRef},debug:this.debug}),this.initPopper(),!n&&r&&d.a.boolean(o)}}},{key:"componentDidUpdate",value:function(e,t){if(M){var n,o=this.props,r=o.autoOpen,i=o.open,a=o.target,s=o.wrapperOptions,l=m()(t,this.state),c=l.changedFrom,u=l.changedTo;if(e.open!==i)d.a.boolean(i)&&(n=i?R.OPENING:R.CLOSING),this.toggle(n);e.wrapperOptions.position===s.position&&e.target===a||this.changeWrapperPosition(this.props),(u("status",R.IDLE)&&i||c("status",R.INIT,R.IDLE)&&r)&&this.toggle(R.OPEN),this.popper&&u("status",R.OPENING)&&this.popper.instance.update(),this.floaterRef&&(u("status",R.OPENING)||u("status",R.CLOSING))&&function(e,t,n){var o,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];D(e,t,o=function(r){n(r),F(e,t,o)},r)}(this.floaterRef,"transitionend",this.handleTransitionEnd)}}},{key:"componentWillUnmount",value:function(){M&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target,n=this.state.positionWrapper,o=this.props,r=o.disableFlip,i=o.getPopper,a=o.hideArrow,s=o.offset,l=o.placement,u=o.wrapperOptions,p="top"===l||"bottom"===l?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if("center"===l)this.setState({status:R.IDLE});else if(t&&this.floaterRef){var f=this.options,h=f.arrow,m=f.flip,y=f.offset,v=N(f,["arrow","flip","offset"]);new c.a(t,this.floaterRef,{placement:l,modifiers:k({arrow:k({enabled:!a,element:this.arrowRef},h),flip:k({enabled:!r,behavior:p},m),offset:k({offset:"0, ".concat(s,"px")},y)},v),onCreate:function(t){e.popper=t,i(t,"floater"),e._isMounted&&e.setState({currentPlacement:t.placement,status:R.IDLE}),l!==t.placement&&setTimeout((function(){t.instance.update()}),1)},onUpdate:function(t){e.popper=t;var n=e.state.currentPlacement;e._isMounted&&t.placement!==n&&e.setState({currentPlacement:t.placement})}})}if(n){var b=d.a.undefined(u.offset)?0:u.offset;new c.a(this.target,this.wrapperRef,{placement:u.placement||l,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(b,"px")},flip:{enabled:!1}},onCreate:function(t){e.wrapperPopper=t,e._isMounted&&e.setState({statusWrapper:R.IDLE}),i(t,"wrapper"),l!==t.placement&&setTimeout((function(){t.instance.update()}),1)}})}}},{key:"changeWrapperPosition",value:function(e){var t=e.target,n=e.wrapperOptions;this.setState({positionWrapper:n.position&&!!t})}},{key:"toggle",value:function(e){var t=this.state.status===R.OPEN?R.CLOSING:R.OPENING;d.a.undefined(e)||(t=e),this.setState({status:t})}},{key:"render",value:function(){var e=this.state,t=e.currentPlacement,n=e.positionWrapper,o=e.status,i=this.props,a=i.children,s=i.component,l=i.content,c=i.disableAnimation,u=i.footer,p=i.hideArrow,f=i.id,d=i.open,h=i.showCloseButton,m=i.style,y=i.target,v=i.title,b=r.a.createElement(G,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:m,styles:this.styles.wrapper},a),g={};return n?g.wrapperInPortal=b:g.wrapperAsChildren=b,r.a.createElement("span",null,r.a.createElement(B,{hasChildren:!!a,id:f,placement:t,setRef:this.setFloaterRef,target:y,zIndex:this.styles.options.zIndex},r.a.createElement(q,{component:s,content:l,disableAnimation:c,footer:u,handleClick:this.handleClick,hideArrow:p||"center"===t,open:d,placement:t,positionWrapper:n,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:h,status:o,styles:this.styles,title:v}),g.wrapperInPortal),g.wrapperAsChildren)}},{key:"debug",get:function(){return this.props.debug||!!e.ReactFloaterDebug}},{key:"event",get:function(){var e=this.props,t=e.disableHoverToClick,n=e.event;return"hover"===n&&_()&&!t?"click":n}},{key:"options",get:function(){var e=this.props.options;return p()(I,e||{})}},{key:"styles",get:function(){var e,t=this,n=this.state,o=n.status,r=n.positionWrapper,i=n.statusWrapper,a=this.props.styles,s=p()(function(e){var t=p()(V,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}(a),a);r&&(e=-1===[R.IDLE].indexOf(o)||-1===[R.IDLE].indexOf(i)?s.wrapperPosition:this.wrapperPopper.styles,s.wrapper=k({},s.wrapper,{},e));if(this.target){var l=window.getComputedStyle(this.target);this.wrapperStyles?s.wrapper=k({},s.wrapper,{},this.wrapperStyles):-1===["relative","static"].indexOf(l.position)&&(this.wrapperStyles={},r||(Y.forEach((function(e){t.wrapperStyles[e]=l[e]})),s.wrapper=k({},s.wrapper,{},this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return s}},{key:"target",get:function(){if(!M)return null;var e=this.props.target;return e?d.a.domElement(e)?e:document.querySelector(e):this.childRef||this.wrapperRef}}]),n}(r.a.Component);O($,"propTypes",{autoOpen:a.a.bool,callback:a.a.func,children:a.a.node,component:l()(a.a.oneOfType([a.a.func,a.a.element]),(function(e){return!e.content})),content:l()(a.a.node,(function(e){return!e.component})),debug:a.a.bool,disableAnimation:a.a.bool,disableFlip:a.a.bool,disableHoverToClick:a.a.bool,event:a.a.oneOf(["hover","click"]),eventDelay:a.a.number,footer:a.a.node,getPopper:a.a.func,hideArrow:a.a.bool,id:a.a.oneOfType([a.a.string,a.a.number]),offset:a.a.number,open:a.a.bool,options:a.a.object,placement:a.a.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:a.a.bool,style:a.a.object,styles:a.a.object,target:a.a.oneOfType([a.a.object,a.a.string]),title:a.a.node,wrapperOptions:a.a.shape({offset:a.a.number,placement:a.a.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:a.a.bool})}),O($,"defaultProps",{autoOpen:!1,callback:W,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:W,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}}),t.a=$}).call(this,n(12))},function(e,t,n){var o;
32
  /*!
33
  Copyright (c) 2017 Jed Watson.
34
  Licensed under the MIT License (MIT), see
35
  http://jedwatson.github.io/classnames
36
+ */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var a=r.apply(null,o);a&&e.push(a)}else if("object"===i)for(var s in o)n.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t,n){e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){e.exports=n(1)},function(e,t,n){e.exports=n(2)()},function(e,t,n){"use strict";var o=n(3);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o="bottom-left",r="bottom-right",i="bottom-center",a="top-left",s="top-right",l="top-center",c="center",u="success",p="danger",f="info",d="default",h="warning",m="timeout",y=function(e){return null==e};function v(e){return e===o||e===r||e===i}function b(e){return e===a||e===s||e===l}function g(e){var t=e.type,n=e.content,o=e.userDefinedTypes,r=["notification-item"];if(n)return r;if(y(o))return function(e){switch(e){case d:return["notification-item","notification-default"];case u:return["notification-item","notification-success"];case p:return["notification-item","notification-danger"];case h:return["notification-item","notification-warning"];case f:return["notification-item","notification-info"];default:return["notification-item"]}}(t);var i=o.find((function(e){return e.name===t}));return r.concat(i.htmlClasses)}function w(e,t){var n=e.duration,o=e.timingFunction,r=e.delay;return"".concat(n,"ms ").concat(t," ").concat(o," ").concat(r,"ms")}function E(e,t){var n=t.duration,o=t.timingFunction,r=t.delay,i=e||{};return y(i.duration)&&(i.duration=n),y(i.timingFunction)&&(i.timingFunction=o),y(i.delay)&&(i.delay=r),i}var O=n(0),S=n.n(O),k=new function(){var e=this;return this.types=null,this.counter=0,this.add=function(){},this.addNotification=function(t){var n=e.types;return e.counter+=1,e.add(function(e,t){var n=e,o=n.id,r=n.type,i=n.insert,a=n.content,s=n.container,l=n.animationIn,c=n.animationOut,m=n.slidingEnter,v=n.slidingExit,b=n.touchRevert,g=n.touchSlidingExit,w=n.dismiss,O=n.width,S=n.onRemoval;n.id=o||k.counter,n.type=a?null:r.toLowerCase(),t&&!a&&(n.userDefinedTypes=function(e,t){var n=e.content,o=e.type;if(!n&&o!==u&&o!==p&&o!==f&&o!==d&&o!==h&&t)return t}(n,t)),y(O)||(n.width=O),n.container=s.toLowerCase(),n.insert=(i||"top").toLowerCase(),n.dismiss=function(e){var t=e,n={duration:0,click:!0,touch:!0,onScreen:!1,waitForAnimation:!1,showIcon:!1};return t?(Object.keys(n).forEach((function(e){y(t[e])&&(t[e]=n[e])})),t):n}(w),n.animationIn=l||[],n.animationOut=c||[],n.onRemoval=S||function(){};var x=function(e,t,n){return{duration:e,timingFunction:t,delay:n}};n.slidingEnter=E(m,x(600,"linear",0)),n.slidingExit=E(v,x(600,"linear",0)),n.touchRevert=E(b,x(600,"linear",0));var P=g||{},C=P.swipe,N=P.fade;return n.touchSlidingExit=P,n.touchSlidingExit.swipe=E(C||{},x(600,"linear",0)),n.touchSlidingExit.fade=E(N||{},x(300,"linear",0)),n}(t,n))},this.removeNotification=function(){},this.register=function(t){var n=t.addNotification,o=t.removeNotification,r=t.types;e.add=n,e.removeNotification=o,e.types=r},this},x=n(1),P=n.n(x),C=function(e,t){var n,o,r=t;this.pause=function(){clearTimeout(n),r-=Date.now()-o},this.resume=function(){o=Date.now(),clearTimeout(n),n=setTimeout(e,r)},this.clear=function(){clearTimeout(n)},this.resume()};function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var F=function(e){function t(e){var n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=!(o=_(t).call(this,e))||"object"!==N(o)&&"function"!=typeof o?A(this):o).rootElementRef=S.a.createRef(),n.onClick=n.onClick.bind(A(n)),n.onTouchStart=n.onTouchStart.bind(A(n)),n.onTouchMove=n.onTouchMove.bind(A(n)),n.onTouchEnd=n.onTouchEnd.bind(A(n)),n.onMouseEnter=n.onMouseEnter.bind(A(n)),n.onMouseLeave=n.onMouseLeave.bind(A(n));var r=e.notification.width;return n.state={parentStyle:{height:0,overflow:"hidden",width:r?"".concat(r,"px"):"100%"},htmlClassList:g(e.notification),animationPlayState:"running",touchEnabled:!0},n}var n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(t,e),n=t,(o=[{key:"componentWillUnmount",value:function(){this.timer&&this.timer.clear()}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.notification,o=t.count,r=n.dismiss,i=r.duration,a=r.onScreen,s=this.rootElementRef.current.scrollHeight,l=function(e,t){return!(t<=1)&&t>1&&("top"===e.insert&&b(e.container)||"bottom"===e.insert&&v(e.container)||e.container===c)}(n,o),u=function(){i&&!a&&(e.timer=new C((function(){return e.removeNotification(m)}),i))};this.setState((function(e){return{parentStyle:{width:e.parentStyle.width,height:"".concat(s,"px"),transition:l?w(n.slidingEnter,"height"):"10ms height"},onTransitionEnd:u}}),(function(){requestAnimationFrame((function(){e.setState((function(e){return{htmlClassList:[].concat(M(n.animationIn),M(e.htmlClassList))}}))}))}))}},{key:"componentDidUpdate",value:function(e){var t=e.removed;this.props.removed&&!t&&this.removeNotification("manual")}},{key:"removeNotification",value:function(e){var t=this,n=this.props,o=n.notification,r=n.toggleRemoval,i=o.id,a=o.onRemoval,s=o.dismiss.waitForAnimation,l=[].concat(M(o.animationOut),M(g(o))),c=function(){return r(i,(function(){return a(i,e)}))},u={height:0,transition:w(o.slidingExit,"height")};return s?this.setState((function(e){var n=e.parentStyle.width;return{htmlClassList:l,onAnimationEnd:function(){t.setState({parentStyle:I({width:n},u),onTransitionEnd:c})}}})):this.setState((function(e){return{parentStyle:I({width:e.parentStyle.width},u),onTransitionEnd:c,htmlClassList:l}}))}},{key:"onClick",value:function(){var e=this.props.notification.dismiss;(e.click||e.showIcon)&&this.removeNotification("click")}},{key:"onTouchStart",value:function(e){var t=T(e.touches,1)[0].pageX;this.setState((function(e){var n=e.parentStyle;return{startX:t,currentX:t,parentStyle:I({},n,{position:"relative"})}}))}},{key:"onTouchMove",value:function(e){var t=this,n=e.touches,o=this.state.startX,r=this.props,i=r.toggleRemoval,a=r.notification,s=a.id,l=a.onRemoval,c=a.slidingExit,u=a.touchSlidingExit,p=u.swipe,f=u.fade,d=T(n,1)[0].pageX,h=d-o,m=this.rootElementRef.current.offsetWidth,y=window.innerWidth+m,v="".concat(d-o>=0?y:-y,"px");if(function(e,t){return Math.abs(e)>=.4*t}(h,m)){var b=w(p,"left"),g=w(f,"opacity"),E=function(){i(s,(function(){return l(s,"touch")}))};return this.setState((function(e){return{touchEnabled:!1,parentStyle:I({},e.parentStyle,{left:v,opacity:0,transition:"".concat(b,", ").concat(g)}),onTransitionEnd:function(){t.setState((function(e){return{parentStyle:I({},e.parentStyle,{height:0,transition:w(c,"height")}),onTransitionEnd:E}}))}}}))}return this.setState((function(e){var t=e.parentStyle;return{currentX:d,parentStyle:I({},t,{left:"".concat(0+h,"px")})}}))}},{key:"onTouchEnd",value:function(){var e=this.props.notification.touchRevert;this.setState((function(t){return{parentStyle:I({},t.parentStyle,{left:0,transition:w(e,"left")})}}))}},{key:"onMouseEnter",value:function(){this.timer?this.timer.pause():this.setState({animationPlayState:"paused"})}},{key:"onMouseLeave",value:function(){this.timer?this.timer.resume():this.setState({animationPlayState:"running"})}},{key:"renderTimer",value:function(){var e=this,t=this.props.notification.dismiss,n=t.duration,o=t.onScreen,r=this.state.animationPlayState;if(n&&o){var i={animationName:"timer",animationDuration:"".concat(n,"ms"),animationTimingFunction:"linear",animationFillMode:"forwards",animationDelay:0,animationPlayState:r};return S.a.createElement("div",{className:"timer"},S.a.createElement("div",{className:"timer-filler",onAnimationEnd:function(){return e.removeNotification(m)},style:i}))}}},{key:"renderCustomContent",value:function(){var e=this.state.htmlClassList,t=this.props.notification,n=t.id,o=t.content,r=t.dismiss,i=r.duration,a=r.pauseOnHover,s=i>0&&a;return S.a.createElement("div",{className:"".concat([].concat(M(e),["n-child"]).join(" ")),onMouseEnter:s?this.onMouseEnter:null,onMouseLeave:s?this.onMouseLeave:null},S.a.isValidElement(o)?o:S.a.createElement(o,{id:n}))}},{key:"renderNotification",value:function(){var e=this.props.notification,t=e.title,n=e.message,o=e.dismiss,r=o.showIcon,i=o.duration,a=o.pauseOnHover,s=this.state.htmlClassList,l=i>0&&a;return S.a.createElement("div",{className:"".concat([].concat(M(s),["n-child"]).join(" ")),onMouseEnter:l?this.onMouseEnter:null,onMouseLeave:l?this.onMouseLeave:null},S.a.createElement("div",{className:"notification-content"},r&&S.a.createElement("div",{className:"notification-close",onClick:this.onClick}),t&&S.a.createElement("div",{className:"notification-title"},t),S.a.createElement("div",{className:"notification-message"},n),this.renderTimer()))}},{key:"render",value:function(){var e=this.props.notification,t=e.content,n=e.dismiss.click,o=this.state,r=o.parentStyle,i=o.onAnimationEnd,a=o.onTransitionEnd,s=o.touchEnabled;return S.a.createElement("div",{ref:this.rootElementRef,onClick:n?this.onClick:null,className:"notification-parent",style:r,onAnimationEnd:i,onTransitionEnd:a,onTouchStart:s?this.onTouchStart:null,onTouchMove:s?this.onTouchMove:null,onTouchEnd:s?this.onTouchEnd:null},t?this.renderCustomContent():this.renderNotification())}}])&&L(n.prototype,o),t}(S.a.Component);F.propTypes={toggleRemoval:P.a.func.isRequired,count:P.a.number.isRequired,removed:P.a.bool};var W=F;function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(4);var V=function(e){function t(e){var n,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this,(n=!(o=U(t).call(this,e))||"object"!==B(o)&&"function"!=typeof o?q(this):o).state={isMobile:e.isMobile,breakpoint:e.breakpoint,notifications:[]},n.add=n.add.bind(q(n)),n.remove=n.remove.bind(q(n)),n.toggleRemoval=n.toggleRemoval.bind(q(n)),n.handleResize=n.handleResize.bind(q(n)),n}var n,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(t,e),n=t,(u=[{key:"componentDidMount",value:function(){var e=this.props.types;k.register({addNotification:this.add,removeNotification:this.remove,types:e}),this.setState({width:window.innerWidth}),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"handleResize",value:function(){this.setState({width:window.innerWidth})}},{key:"add",value:function(e){return this.setState((function(t){var n=t.notifications;return{notifications:"top"===e.insert?[e].concat(z(n)):[].concat(z(n),[e])}})),e.id}},{key:"remove",value:function(e){this.setState((function(t){return{notifications:t.notifications.map((function(t){return t.id===e&&(t.removed=!0),t}))}}))}},{key:"toggleRemoval",value:function(e,t){this.setState((function(t){return{notifications:t.notifications.filter((function(t){return t.id!==e}))}}),t)}},{key:"renderNotifications",value:function(e){var t=this;return e.map((function(n){return S.a.createElement(W,{id:n.id,key:n.id,notification:n,toggleRemoval:t.toggleRemoval,count:e.length,removed:n.removed})}))}},{key:"renderMobileNotifications",value:function(e){var t=e.className,n=e.id,o=function(e){var t=[],n=[];return e.forEach((function(e){var o=e.container;b(o)||"center"===o?t.push(e):v(o)&&n.push(e)})),{top:t,bottom:n}}(this.state.notifications),r=this.renderNotifications(o.top),i=this.renderNotifications(o.bottom);return S.a.createElement("div",{id:n,key:"mobile",className:"react-notification-root ".concat(t||"")},S.a.createElement("div",{className:"notification-container-mobile-top"},r),S.a.createElement("div",{className:"notification-container-mobile-bottom"},i))}},{key:"renderScreenNotifications",value:function(e){var t=e.className,n=e.id,u=function(e){var t=[],n=[],u=[],p=[],f=[],d=[],h=[];return e.forEach((function(e){var m=e.container;m===a?t.push(e):m===s?n.push(e):m===l?u.push(e):m===o?p.push(e):m===r?f.push(e):m===i?d.push(e):m===c&&h.push(e)})),{topLeft:t,topRight:n,topCenter:u,bottomLeft:p,bottomRight:f,bottomCenter:d,center:h}}(this.state.notifications),p=this.renderNotifications(u.topLeft),f=this.renderNotifications(u.topRight),d=this.renderNotifications(u.topCenter),h=this.renderNotifications(u.bottomLeft),m=this.renderNotifications(u.bottomRight),y=this.renderNotifications(u.bottomCenter),v=this.renderNotifications(u.center);return S.a.createElement("div",{id:n,key:"screen",className:"react-notification-root ".concat(t||"")},S.a.createElement("div",{className:"notification-container-top-left"},p),S.a.createElement("div",{className:"notification-container-top-right"},f),S.a.createElement("div",{className:"notification-container-bottom-left"},h),S.a.createElement("div",{className:"notification-container-bottom-right"},m),S.a.createElement("div",{className:"notification-container-top-center"},d),S.a.createElement("div",{className:"notification-container-center"},S.a.createElement("div",{className:"center-inner"},v)),S.a.createElement("div",{className:"notification-container-bottom-center"},y))}},{key:"render",value:function(){var e=this.props.isMobile,t=this.state,n=t.width,o=t.breakpoint;return e&&n<=o?this.renderMobileNotifications(this.props):this.renderScreenNotifications(this.props)}}])&&H(n.prototype,u),t}(S.a.Component);V.propTypes={isMobile:P.a.bool,breakpoint:P.a.number,types:P.a.array},V.defaultProps={isMobile:!0,breakpoint:768};var Y=V;n.d(t,"store",(function(){return k})),t.default=Y}])},function(e,t,n){},function(e,t,n){"use strict";var o=n(19);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var o,r;r=function(e){var t=["N","E","A","D"];function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function o(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function r(e,t,n){r.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function l(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,o),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function u(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}function p(e){var t=0,n=c(e);if("array"===n)return e.forEach((function(e){t+=p(e)})),t+u("[type: array, hash: "+t+"]");if("object"===n){for(var o in e)if(e.hasOwnProperty(o)){var r="[ type: object, key: "+o+", value hash: "+p(e[o])+"]";t+=u(r)}return t}return t+u("[ type: "+n+" ; value: "+e+"]")}function f(e,t,n,o,l,u,d,h){n=n||[],d=d||[];var m=(l=l||[]).slice(0);if(null!=u){if(o){if("function"==typeof o&&o(m,u))return;if("object"==typeof o){if(o.prefilter&&o.prefilter(m,u))return;if(o.normalize){var y=o.normalize(m,u,e,t);y&&(e=y[0],t=y[1])}}}m.push(u)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var v,b,g,w,E=typeof e,O=typeof t,S="undefined"!==E||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,u),k="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,u);if(!S&&k)n.push(new i(m,t));else if(!k&&S)n.push(new a(m,e));else if(c(e)!==c(t))n.push(new r(m,e,t));else if("date"===c(e)&&e-t!=0)n.push(new r(m,e,t));else if("object"===E&&null!==e&&null!==t){for(v=d.length-1;v>-1;--v)if(d[v].lhs===e){w=!0;break}if(w)e!==t&&n.push(new r(m,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return p(e)-p(t)})),t.sort((function(e,t){return p(e)-p(t)}))),v=t.length-1,b=e.length-1;v>b;)n.push(new s(m,v,new i(void 0,t[v--])));for(;b>v;)n.push(new s(m,b,new a(void 0,e[b--])));for(;v>=0;--v)f(e[v],t[v],n,o,m,v,d,h)}else{var x=Object.keys(e),P=Object.keys(t);for(v=0;v<x.length;++v)g=x[v],(w=P.indexOf(g))>=0?(f(e[g],t[g],n,o,m,g,d,h),P[w]=null):f(e[g],void 0,n,o,m,g,d,h);for(v=0;v<P.length;++v)(g=P[v])&&f(void 0,t[g],n,o,m,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===E&&isNaN(e)&&isNaN(t)||n.push(new r(m,e,t)))}function d(e,t,n,o,r){var i=[];if(f(e,t,i,o,null,null,null,r),n)for(var a=0;a<i.length;++a)n(i[a]);return i}function h(e,t,n,o){var r=d(e,t,o?function(e){e&&o.push(e)}:void 0,n);return o||(r.length?r:void 0)}function m(e,n,o){if(void 0===o&&n&&~t.indexOf(n.kind)&&(o=n),e&&o&&o.kind){for(var r=e,i=-1,a=o.path?o.path.length-1:0;++i<a;)void 0===r[o.path[i]]&&(r[o.path[i]]=void 0!==o.path[i+1]&&"number"==typeof o.path[i+1]?[]:{}),r=r[o.path[i]];switch(o.kind){case"A":o.path&&void 0===r[o.path[i]]&&(r[o.path[i]]=[]),function e(t,n,o){if(o.path&&o.path.length){var r,i=t[n],a=o.path.length-1;for(r=0;r<a;r++)i=i[o.path[r]];switch(o.kind){case"A":e(i[o.path[r]],o.index,o.item);break;case"D":delete i[o.path[r]];break;case"E":case"N":i[o.path[r]]=o.rhs}}else switch(o.kind){case"A":e(t[n],o.index,o.item);break;case"D":t=l(t,n);break;case"E":case"N":t[n]=o.rhs}return t}(o.path?r[o.path[i]]:r,o.index,o.item);break;case"D":delete r[o.path[i]];break;case"E":case"N":r[o.path[i]]=o.rhs}}}return n(r,o),n(i,o),n(a,o),n(s,o),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,n,o){var r=o?function(e){e&&o.push(e)}:void 0,i=d(e,t,r,n,!0);return o||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,n,o,r,i,a){return f(e,t,n,o,r,i,a,!0)},enumerable:!0},orderIndepHash:{value:p,enumerable:!0},applyDiff:{value:function(e,t,n){e&&t&&d(e,t,(function(o){n&&!n(e,t,o)||m(e,t,o)}))},enumerable:!0},applyChange:{value:m,enumerable:!0},revertChange:{value:function(e,t,n){if(e&&t&&n&&n.kind){var o,r,i=e;for(r=n.path.length-1,o=0;o<r;o++)void 0===i[n.path[o]]&&(i[n.path[o]]={}),i=i[n.path[o]];switch(n.kind){case"A":!function e(t,n,o){if(o.path&&o.path.length){var r,i=t[n],a=o.path.length-1;for(r=0;r<a;r++)i=i[o.path[r]];switch(o.kind){case"A":e(i[o.path[r]],o.index,o.item);break;case"D":case"E":i[o.path[r]]=o.lhs;break;case"N":delete i[o.path[r]]}}else switch(o.kind){case"A":e(t[n],o.index,o.item);break;case"D":case"E":t[n]=o.lhs;break;case"N":t=l(t,n)}return t}(i[n.path[o]],n.index,n.item);break;case"D":case"E":i[n.path[o]]=n.lhs;break;case"N":delete i[n.path[o]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(o=function(){return r}.call(t,n,t,e))||(e.exports=o)},function(e,t,n){"use strict";
37
  /**
38
  * @license nested-property https://github.com/cosmosio/nested-property
39
  *
48
  *
49
  * This source code is licensed under the MIT license found in the
50
  * LICENSE file in the root directory of this source tree.
51
+ */Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,f=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.suspense_list"):60120,y=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,b=o?Symbol.for("react.fundamental"):60117,g=o?Symbol.for("react.responder"):60118,w=o?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case p:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case u:case d:case v:case y:case c:return e;default:return t}}case i:return t}}}function O(e){return E(e)===f}t.typeOf=E,t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=v,t.Memo=y,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===c||e.$$typeof===u||e.$$typeof===d||e.$$typeof===b||e.$$typeof===g||e.$$typeof===w)},t.isAsyncMode=function(e){return O(e)||E(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===y},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o),i=(n(17),n(1)),a=n.n(i),s=(n(0),n(5)),l=n.n(s),c=n(2),u=n.n(c),p=n(4),f=n.n(p),d=n(8),h=n.n(d),m=n(13),y=n.n(m),v=n(9),b=n.n(v),g=n(7),w=n(3),E=n.n(w),O=n(14);function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function x(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?L(e):t}var A={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},D="tour:start",F="step:before",W="beacon",B="tooltip",z="step:after",H="tour:end",U="tour:status",q="error:target_not_found",G={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},V={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"},Y=h.a.canUseDOM,$=void 0!==p.createPortal;function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=e;return"undefined"==typeof window?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.indexOf(" OPR/")>=0?t="opera":void 0!==window.InstallTrigger?t="firefox":window.chrome?t="chrome":/(Version\/([0-9._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function X(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function J(e){var t=[];return function e(n){if("string"==typeof n||"number"==typeof n)t.push(n);else if(Array.isArray(n))n.forEach((function(t){return e(t)}));else if(n&&n.props){var o=n.props.children;Array.isArray(o)?o.forEach((function(t){return e(t)})):e(o)}}(e),t.join(" ").trim()}function Z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Q(e,t){return!(!u.a.plainObject(e)||!u.a.array(t))&&Object.keys(e).every((function(e){return-1!==t.indexOf(e)}))}function ee(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function te(e){return e.disableBeacon||"center"===e.placement}function ne(){return!(-1!==["chrome","safari","firefox","opera"].indexOf(K()))}function oe(e){var t=e.title,n=e.data,o=e.warn,r=void 0!==o&&o,i=e.debug,a=void 0!==i&&i,s=r?console.warn||console.error:console.log;a&&(t&&n?(console.groupCollapsed("%creact-joyride: ".concat(t),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach((function(e){u.a.plainObject(e)&&e.key?s.apply(console,[e.key,e.value]):s.apply(console,[e])})):s.apply(console,[n]),console.groupEnd()):console.error("Missing title or data props"))}var re={action:"",controlled:!1,index:0,lifecycle:G.INIT,size:0,status:V.IDLE},ie=["action","index","lifecycle","status"];function ae(e){var t=new Map,n=new Map;return new(function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o.continuous,i=void 0!==r&&r,a=o.stepIndex,s=o.steps,l=void 0===s?[]:s;S(this,e),P(this,"listener",void 0),P(this,"setSteps",(function(e){var o=t.getState(),r=o.size,i=o.status,a={size:e.length,status:i};n.set("steps",e),i===V.WAITING&&!r&&e.length&&(a.status=V.RUNNING),t.setState(a)})),P(this,"addListener",(function(e){t.listener=e})),P(this,"update",(function(e){if(!Q(e,ie))throw new Error("State is not valid. Valid keys: ".concat(ie.join(", ")));t.setState(T({},t.getNextState(T({},t.getState(),{},e,{action:e.action||A.UPDATE}),!0)))})),P(this,"start",(function(e){var n=t.getState(),o=n.index,r=n.size;t.setState(T({},t.getNextState({action:A.START,index:u.a.number(e)?e:o},!0),{status:r?V.RUNNING:V.WAITING}))})),P(this,"stop",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.getState(),o=n.index,r=n.status;-1===[V.FINISHED,V.SKIPPED].indexOf(r)&&t.setState(T({},t.getNextState({action:A.STOP,index:o+(e?1:0)}),{status:V.PAUSED}))})),P(this,"close",(function(){var e=t.getState(),n=e.index;e.status===V.RUNNING&&t.setState(T({},t.getNextState({action:A.CLOSE,index:n+1})))})),P(this,"go",(function(e){var n=t.getState(),o=n.controlled,r=n.status;if(!o&&r===V.RUNNING){var i=t.getSteps()[e];t.setState(T({},t.getNextState({action:A.GO,index:e}),{status:i?r:V.FINISHED}))}})),P(this,"info",(function(){return t.getState()})),P(this,"next",(function(){var e=t.getState(),n=e.index;e.status===V.RUNNING&&t.setState(t.getNextState({action:A.NEXT,index:n+1}))})),P(this,"open",(function(){t.getState().status===V.RUNNING&&t.setState(T({},t.getNextState({action:A.UPDATE,lifecycle:G.TOOLTIP})))})),P(this,"prev",(function(){var e=t.getState(),n=e.index;e.status===V.RUNNING&&t.setState(T({},t.getNextState({action:A.PREV,index:n-1})))})),P(this,"reset",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.getState(),o=n.controlled;o||t.setState(T({},t.getNextState({action:A.RESET,index:0}),{status:e?V.RUNNING:V.READY}))})),P(this,"skip",(function(){t.getState().status===V.RUNNING&&t.setState({action:A.SKIP,lifecycle:G.INIT,status:V.SKIPPED})})),this.setState({action:A.INIT,controlled:u.a.number(a),continuous:i,index:u.a.number(a)?a:0,lifecycle:G.INIT,status:l.length?V.READY:V.IDLE},!0),this.setSteps(l)}return x(e,[{key:"setState",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.getState(),r=T({},o,{},e),i=r.action,a=r.index,s=r.lifecycle,l=r.size,c=r.status;t.set("action",i),t.set("index",a),t.set("lifecycle",s),t.set("size",l),t.set("status",c),n&&(t.set("controlled",e.controlled),t.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(o)&&this.listener(this.getState())}},{key:"getState",value:function(){return t.size?{action:t.get("action")||"",controlled:t.get("controlled")||!1,index:parseInt(t.get("index"),10),lifecycle:t.get("lifecycle")||"",size:t.get("size")||0,status:t.get("status")||""}:T({},re)}},{key:"getNextState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getState(),o=n.action,r=n.controlled,i=n.index,a=n.size,s=n.status,l=u.a.number(e.index)?e.index:i,c=r&&!t?i:Math.min(Math.max(l,0),a);return{action:e.action||o,controlled:r,index:c,lifecycle:e.lifecycle||G.INIT,size:e.size||a,status:c===a?V.FINISHED:e.status||s}}},{key:"hasUpdatedState",value:function(e){return JSON.stringify(e)!==JSON.stringify(this.getState())}},{key:"getSteps",value:function(){var e=n.get("steps");return Array.isArray(e)?e:[]}},{key:"getHelpers",value:function(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}}]),e}())(e)}function se(){return document.scrollingElement||document.createElement("body")}function le(e){return e?e.getBoundingClientRect():{}}function ce(e){return"string"==typeof e?document.querySelector(e):e}function ue(e){return e&&1===e.nodeType?getComputedStyle(e):{}}function pe(e,t,n){var o=b()(e);return o.isSameNode(se())?n?document:se():o.scrollHeight>o.offsetHeight||t?o:(o.style.overflow="initial",se())}function fe(e,t){return!!e&&!pe(e,t).isSameNode(se())}function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fixed";if(!(e&&e instanceof HTMLElement))return!1;var n=e.nodeName;return"BODY"!==n&&"HTML"!==n&&(ue(e).position===t||de(e.parentNode,t))}function he(e,t,n){if(!e)return 0;var o=b()(e),r=e.offsetTop;return fe(e,n)&&!function(e){return e.offsetParent!==document.body}(e)&&(r-=o.offsetTop),Math.floor(r-t)}!function(e){function t(t,n,o,r,i,a){var s=r||"<<anonymous>>",l=a||o;if(null==n[o])return t?new Error("Required ".concat(i," `").concat(l,"` was not specified in `").concat(s,"`.")):null;for(var c=arguments.length,u=new Array(c>6?c-6:0),p=6;p<c;p++)u[p-6]=arguments[p];return e.apply(void 0,[n,o,s,i,l].concat(u))}var n=t.bind(null,!1);n.isRequired=t.bind(null,!0)}((function(e,t,n,o,r){var i=e[t],s=i;if(!a.a.isValidElement(i)&&Object(g.isValidElementType)(i)){s=a.a.createElement(s,{ref:function(){},step:{}})}if(u.a.string(i)||u.a.number(i)||!Object(g.isValidElementType)(i)||-1===[g.Element,g.ForwardRef].indexOf(Object(g.typeOf)(s)))return new Error("Invalid ".concat(o," `").concat(r,"` supplied to `").concat(n,"`. Expected a React class or forwardRef."))}));var me={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",zIndex:100},ye={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},ve={borderRadius:4,position:"absolute"};var be={floaterProps:{options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},locale:{back:"Back",close:"Close",last:"Last",next:"Next",open:"Open the dialog",skip:"Skip"},step:{event:"click",placement:"bottom",offset:10}};function ge(e){var t=["beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent"];return Object.keys(e).filter((function(e){return-1!==t.indexOf(e)})).reduce((function(t,n){return t[n]=e[n],t}),{})}function we(e,t){if(!e)return null;var n=E.a.all([ge(t),be.step,e],{isMergeableObject:u.a.plainObject}),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=E()(me,e.options||{}),n=290;window.innerWidth>480&&(n=380),t.width&&(n=window.innerWidth<t.width?window.innerWidth-30:t.width);var o={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:t.zIndex},r={beacon:T({},ye,{display:"inline-block",height:t.beaconSize,position:"relative",width:t.beaconSize,zIndex:t.zIndex}),beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:t.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:"rgba(".concat(ee(t.primaryColor).join(","),", 0.2)"),border:"2px solid ".concat(t.primaryColor),borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:t.backgroundColor,borderRadius:5,boxSizing:"border-box",color:t.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:n},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:T({},ye,{backgroundColor:t.primaryColor,borderRadius:4,color:"#fff"}),buttonBack:T({},ye,{color:t.primaryColor,marginLeft:"auto",marginRight:5}),buttonClose:T({},ye,{color:t.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14}),buttonSkip:T({},ye,{color:t.textColor,fontSize:14}),overlay:T({},o,{backgroundColor:t.overlayColor,mixBlendMode:"hard-light"}),overlayLegacy:T({},o),overlayLegacyCenter:T({},o,{backgroundColor:t.overlayColor}),spotlight:T({},ve,{backgroundColor:"gray"}),spotlightLegacy:T({},ve,{boxShadow:"0 0 0 9999px ".concat(t.overlayColor,", ").concat(t.spotlightShadow)}),floaterStyles:{arrow:{color:t.arrowColor},options:{zIndex:t.zIndex}},options:t};return E()(r,e)}(E()(t.styles||{},e.styles||{})),r=fe(ce(e.target),n.disableScrollParentFix),i=E.a.all([t.floaterProps||{},be.floaterProps,n.floaterProps||{}]);return i.offset=n.offset,i.styles=E()(i.styles||{},o.floaterStyles||{}),delete o.floaterStyles,i.offset+=t.spotlightPadding||e.spotlightPadding,e.placementBeacon&&(i.wrapperOptions.placement=e.placementBeacon),r&&(i.options.preventOverflow.boundariesElement="window"),T({},n,{locale:E.a.all([be.locale,t.locale||{},n.locale||{}]),floaterProps:i,styles:o})}function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u.a.plainObject(e)?!!e.target||(oe({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(oe({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u.a.array(e)?e.every((function(e){return Ee(e,t)})):(oe({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Se=function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(S(this,e),P(this,"element",void 0),P(this,"options",void 0),P(this,"canBeTabbed",(function(e){var t=e.tabIndex;return(null===t||t<0)&&(t=void 0),!isNaN(t)&&n.canHaveFocus(e,!0)})),P(this,"canHaveFocus",(function(e,t){var o=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(o)&&!e.getAttribute("disabled")||"a"===o&&e.getAttribute("href")||t)&&n.isVisible(e)})),P(this,"findValidTabElements",(function(){return[].slice.call(n.element.querySelectorAll("*"),0).filter(n.canBeTabbed)})),P(this,"handleKeyDown",(function(e){var t=n.options.keyCode,o=void 0===t?9:t;e.keyCode===o&&n.interceptTab(e)})),P(this,"interceptTab",(function(e){e.preventDefault();var t=n.findValidTabElements(),o=e.shiftKey;if(t.length){var r=t.indexOf(document.activeElement);-1===r||!o&&r+1===t.length?r=0:o&&0===r?r=t.length-1:r+=o?-1:1,t[r].focus()}})),P(this,"isHidden",(function(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0,n=window.getComputedStyle(e);return!(!t||e.innerHTML)||(t&&"visible"!==n.getPropertyValue("overflow")||"none"===n.getPropertyValue("display"))})),P(this,"isVisible",(function(e){for(var t=e;t;)if(t instanceof HTMLElement){if(t===document.body)break;if(n.isHidden(t))return!1;t=t.parentNode}return!0})),P(this,"removeScope",(function(){window.removeEventListener("keydown",n.handleKeyDown)})),P(this,"checkFocus",(function(e){document.activeElement!==e&&(e.focus(),window.requestAnimationFrame((function(){return n.checkFocus(e)})))})),P(this,"setFocus",(function(){var e=n.options.selector;if(e){var t=n.element.querySelector(e);t&&window.requestAnimationFrame((function(){return n.checkFocus(t)}))}})),!(t instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=t,this.options=o,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()},ke=function(e){function t(e){var n;if(S(this,t),P(L(n=_(this,I(t).call(this,e))),"setBeaconRef",(function(e){n.beacon=e})),!e.beaconComponent){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.id="joyride-beacon-animation",r.appendChild(document.createTextNode("\n @keyframes joyride-beacon-inner {\n 20% {\n opacity: 0.9;\n }\n \n 90% {\n opacity: 0.7;\n }\n }\n \n @keyframes joyride-beacon-outer {\n 0% {\n transform: scale(1);\n }\n \n 45% {\n opacity: 0.7;\n transform: scale(0.75);\n }\n \n 100% {\n opacity: 0.9;\n transform: scale(1);\n }\n }\n ")),o.appendChild(r)}return n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.shouldFocus;setTimeout((function(){u.a.domElement(e.beacon)&&t&&e.beacon.focus()}),0)}},{key:"componentWillUnmount",value:function(){var e=document.getElementById("joyride-beacon-animation");e&&e.parentNode.removeChild(e)}},{key:"render",value:function(){var e,t=this.props,n=t.beaconComponent,o=t.locale,r=t.onClickOrHover,i=t.styles,s={"aria-label":o.open,onClick:r,onMouseEnter:r,ref:this.setBeaconRef,title:o.open};if(n){var l=n;e=a.a.createElement(l,s)}else e=a.a.createElement("button",C({key:"JoyrideBeacon",className:"react-joyride__beacon",style:i.beacon,type:"button"},s),a.a.createElement("span",{style:i.beaconInner}),a.a.createElement("span",{style:i.beaconOuter}));return e}}]),t}(a.a.Component),xe=function(e){var t=e.styles;return a.a.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight",style:t})},Pe=function(e){function t(){var e,n;S(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return P(L(n=_(this,(e=I(t)).call.apply(e,[this].concat(r)))),"_isMounted",!1),P(L(n),"state",{mouseOverSpotlight:!1,isScrolling:!1,showSpotlight:!0}),P(L(n),"handleMouseMove",(function(e){var t=n.state.mouseOverSpotlight,o=n.spotlightStyles,r=o.height,i=o.left,a=o.position,s=o.top,l=o.width,c="fixed"===a?e.clientY:e.pageY,u="fixed"===a?e.clientX:e.pageX,p=u>=i&&u<=i+l&&(c>=s&&c<=s+r);p!==t&&n.updateState({mouseOverSpotlight:p})})),P(L(n),"handleScroll",(function(){var e=ce(n.props.target);n.scrollParent!==document?(n.state.isScrolling||n.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(n.scrollTimeout),n.scrollTimeout=setTimeout((function(){n.updateState({isScrolling:!1,showSpotlight:!0})}),50)):de(e,"sticky")&&n.updateState({})})),P(L(n),"handleResize",(function(){clearTimeout(n.resizeTimeout),n.resizeTimeout=setTimeout((function(){n._isMounted&&n.forceUpdate()}),100)})),n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.debug,e.disableScrolling,e.disableScrollParentFix),n=ce(e.target);this.scrollParent=pe(n,t,!0),this._isMounted=!0,window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,o=n.lifecycle,r=n.spotlightClicks,i=l()(e,this.props),a=i.changed;(0,i.changedTo)("lifecycle",G.TOOLTIP)&&(this.scrollParent.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout((function(){t.state.isScrolling||t.updateState({showSpotlight:!0})}),100)),(a("spotlightClicks")||a("disableOverlay")||a("lifecycle"))&&(r&&o===G.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):o!==G.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),this.scrollParent.removeEventListener("scroll",this.handleScroll)}},{key:"updateState",value:function(e){this._isMounted&&this.setState(e)}},{key:"render",value:function(){var e=this.state,t=e.mouseOverSpotlight,n=e.showSpotlight,o=this.props,r=o.disableOverlay,i=o.lifecycle,s=o.onClickOverlay,l=o.placement,c=o.styles;if(r||i!==G.TOOLTIP)return null;var u=c.overlay;ne()&&(u="center"===l?c.overlayLegacyCenter:c.overlayLegacy);var p,f,d,h=T({cursor:"pointer",height:(p=document,f=p.body,d=p.documentElement,f&&d?Math.max(f.scrollHeight,f.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight):0),pointerEvents:t?"none":"auto"},u),m="center"!==l&&n&&a.a.createElement(xe,{styles:this.spotlightStyles});if("safari"===K()){h.mixBlendMode,h.zIndex;var y=M(h,["mixBlendMode","zIndex"]);m=a.a.createElement("div",{style:T({},y)},m),delete h.backgroundColor}return a.a.createElement("div",{className:"react-joyride__overlay",style:h,onClick:s},m)}},{key:"spotlightStyles",get:function(){var e=this.state.showSpotlight,t=this.props,n=t.disableScrollParentFix,o=t.spotlightClicks,r=t.spotlightPadding,i=t.styles,a=ce(t.target),s=le(a),l=de(a),c=function(e,t,n){var o=le(e),r=pe(e,n),i=fe(e,n),a=0;r instanceof HTMLElement&&(a=r.scrollTop);var s=o.top+(i||de(e)?0:a);return Math.floor(s-t)}(a,r,n);return T({},ne()?i.spotlightLegacy:i.spotlight,{height:Math.round(s.height+2*r),left:Math.round(s.left-r),opacity:e?1:0,pointerEvents:o?"none":"auto",position:l?"fixed":"absolute",top:c,transition:"opacity 0.2s",width:Math.round(s.width+2*r)})}}]),t}(a.a.Component),Ce=function(e){var t=e.styles,n=M(e,["styles"]),o=t.color,r=t.height,i=t.width,s=M(t,["color","height","width"]);return a.a.createElement("button",C({style:s,type:"button"},n),a.a.createElement("svg",{width:"number"==typeof i?"".concat(i,"px"):i,height:"number"==typeof r?"".concat(r,"px"):r,viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},a.a.createElement("g",null,a.a.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:o}))))},Ne=function(e){function t(){return S(this,t),_(this,I(t).apply(this,arguments))}return j(t,e),x(t,[{key:"render",value:function(){var e=this.props,t=e.backProps,n=e.closeProps,o=e.continuous,r=e.index,i=e.isLastStep,s=e.primaryProps,l=e.size,c=e.skipProps,u=e.step,p=e.tooltipProps,f=u.content,d=u.hideBackButton,h=u.hideCloseButton,m=u.hideFooter,y=u.showProgress,v=u.showSkipButton,b=u.title,g=u.styles,w=u.locale,E=w.back,O=w.close,S=w.last,k=w.next,x=w.skip,P={primary:O};return o&&(P.primary=i?S:k,y&&(P.primary=a.a.createElement("span",null,P.primary," (",r+1,"/",l,")"))),v&&!i&&(P.skip=a.a.createElement("button",C({style:g.buttonSkip,type:"button","aria-live":"off"},c),x)),!d&&r>0&&(P.back=a.a.createElement("button",C({style:g.buttonBack,type:"button"},t),E)),P.close=!h&&a.a.createElement(Ce,C({styles:g.buttonClose},n)),a.a.createElement("div",C({key:"JoyrideTooltip",className:"react-joyride__tooltip",style:g.tooltip},p),a.a.createElement("div",{style:g.tooltipContainer},b&&a.a.createElement("h4",{style:g.tooltipTitle,"aria-label":b},b),a.a.createElement("div",{style:g.tooltipContent},f)),!m&&a.a.createElement("div",{style:g.tooltipFooter},a.a.createElement("div",{style:g.tooltipFooterSpacer},P.skip),P.back,a.a.createElement("button",C({style:g.buttonNext,type:"button"},s),P.primary)),P.close)}}]),t}(a.a.Component),Te=function(e){function t(){var e,n;S(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return P(L(n=_(this,(e=I(t)).call.apply(e,[this].concat(r)))),"handleClickBack",(function(e){e.preventDefault(),n.props.helpers.prev()})),P(L(n),"handleClickClose",(function(e){e.preventDefault(),n.props.helpers.close()})),P(L(n),"handleClickPrimary",(function(e){e.preventDefault();var t=n.props,o=t.continuous,r=t.helpers;o?r.next():r.close()})),P(L(n),"handleClickSkip",(function(e){e.preventDefault(),n.props.helpers.skip()})),P(L(n),"getElementsProps",(function(){var e=n.props,t=e.continuous,o=e.isLastStep,r=e.setTooltipRef,i=e.step,a=J(i.locale.back),s=J(i.locale.close),l=J(i.locale.last),c=J(i.locale.next),u=J(i.locale.skip),p=t?c:s;return o&&(p=l),{backProps:{"aria-label":a,"data-action":"back",onClick:n.handleClickBack,role:"button",title:a},closeProps:{"aria-label":s,"data-action":"close",onClick:n.handleClickClose,role:"button",title:s},primaryProps:{"aria-label":p,"data-action":"primary",onClick:n.handleClickPrimary,role:"button",title:p},skipProps:{"aria-label":u,"data-action":"skip",onClick:n.handleClickSkip,role:"button",title:u},tooltipProps:{"aria-modal":!0,ref:r,role:"alertdialog"}}})),n}return j(t,e),x(t,[{key:"render",value:function(){var e,t=this.props,n=t.continuous,o=t.index,r=t.isLastStep,i=t.size,s=t.step,l=(s.beaconComponent,s.tooltipComponent),c=M(s,["beaconComponent","tooltipComponent"]);if(l){var u=T({},this.getElementsProps(),{continuous:n,index:o,isLastStep:r,size:i,step:c}),p=l;e=a.a.createElement(p,u)}else e=a.a.createElement(Ne,C({},this.getElementsProps(),{continuous:n,index:o,isLastStep:r,size:i,step:s}));return e}}]),t}(a.a.Component),je=function(e){function t(e){var n;return S(this,t),n=_(this,I(t).call(this,e)),Y?(n.node=document.createElement("div"),e.id&&(n.node.id=e.id),document.body.appendChild(n.node),n):_(n)}return j(t,e),x(t,[{key:"componentDidMount",value:function(){Y&&($||this.renderReact15())}},{key:"componentDidUpdate",value:function(){Y&&($||this.renderReact15())}},{key:"componentWillUnmount",value:function(){Y&&this.node&&($||f.a.unmountComponentAtNode(this.node),document.body.removeChild(this.node))}},{key:"renderReact15",value:function(){if(!Y)return null;var e=this.props.children;return f.a.unstable_renderSubtreeIntoContainer(this,e,this.node),null}},{key:"renderReact16",value:function(){if(!Y||!$)return null;var e=this.props.children;return f.a.createPortal(e,this.node)}},{key:"render",value:function(){return $?this.renderReact16():null}}]),t}(a.a.Component),Ie=function(e){function t(){var e,n;S(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return P(L(n=_(this,(e=I(t)).call.apply(e,[this].concat(r)))),"scope",{removeScope:function(){}}),P(L(n),"handleClickHoverBeacon",(function(e){var t=n.props,o=t.step,r=t.update;"mouseenter"===e.type&&"hover"!==o.event||r({lifecycle:G.TOOLTIP})})),P(L(n),"handleClickOverlay",(function(){var e=n.props,t=e.helpers;e.step.disableOverlayClose||t.close()})),P(L(n),"setTooltipRef",(function(e){n.tooltip=e})),P(L(n),"setPopper",(function(e,t){var o=n.props,r=o.action,i=o.setPopper,a=o.update;"wrapper"===t?n.beaconPopper=e:n.tooltipPopper=e,i(e,t),n.beaconPopper&&n.tooltipPopper&&a({action:r===A.CLOSE?A.CLOSE:r,lifecycle:G.READY})})),n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.debug,n=e.index;oe({title:"step:".concat(n),data:[{key:"props",value:this.props}],debug:t})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.action,o=t.callback,r=t.continuous,i=t.controlled,a=t.debug,s=t.index,c=t.lifecycle,u=t.size,p=t.status,f=t.step,d=t.update,h=l()(e,this.props),m=h.changed,y=h.changedTo,v=h.changedFrom,b={action:n,controlled:i,index:s,lifecycle:c,size:u,status:p},g=r&&n!==A.CLOSE&&(s>0||n===A.PREV),w=m("action")||m("index")||m("lifecycle")||m("status"),E=v("lifecycle",[G.TOOLTIP,G.INIT],G.INIT);if(y("action",[A.NEXT,A.PREV,A.SKIP,A.CLOSE])&&(E||i)&&o(T({},b,{index:e.index,lifecycle:G.COMPLETE,step:e.step,type:z})),w&&f){var O=ce(f.target),S=!!O;S&&function(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if(t instanceof HTMLElement){var n=getComputedStyle(t),o=n.display,r=n.visibility;if("none"===o||"hidden"===r)return!1}t=t.parentNode}return!0}(O)?(v("status",V.READY,V.RUNNING)||v("lifecycle",G.INIT,G.READY))&&o(T({},b,{step:f,type:F})):(console.warn(S?"Target not visible":"Target not mounted",f),o(T({},b,{type:q,step:f})),i||d({index:s+(-1!==[A.PREV].indexOf(n)?-1:1)}))}v("lifecycle",G.INIT,G.READY)&&d({lifecycle:te(f)||g?G.TOOLTIP:G.BEACON}),m("index")&&oe({title:"step:".concat(c),data:[{key:"props",value:this.props}],debug:a}),y("lifecycle",G.BEACON)&&o(T({},b,{step:f,type:W})),y("lifecycle",G.TOOLTIP)&&(o(T({},b,{step:f,type:B})),this.scope=new Se(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus()),v("lifecycle",[G.TOOLTIP,G.INIT],G.INIT)&&(this.scope.removeScope(),delete this.beaconPopper,delete this.tooltipPopper)}},{key:"componentWillUnmount",value:function(){this.scope.removeScope()}},{key:"render",value:function(){var e=this.props,t=e.continuous,n=e.debug,o=e.helpers,r=e.index,i=e.lifecycle,s=e.shouldScroll,l=e.size,c=e.step,p=ce(c.target);return Ee(c)&&u.a.domElement(p)?a.a.createElement("div",{key:"JoyrideStep-".concat(r),className:"react-joyride__step"},a.a.createElement(je,{id:"react-joyride-portal"},a.a.createElement(Pe,C({},c,{debug:n,lifecycle:i,onClickOverlay:this.handleClickOverlay}))),a.a.createElement(O.a,C({component:a.a.createElement(Te,{continuous:t,helpers:o,index:r,isLastStep:r+1===l,setTooltipRef:this.setTooltipRef,size:l,step:c}),debug:n,getPopper:this.setPopper,id:"react-joyride-step-".concat(r),isPositioned:c.isFixed||de(p),open:this.open,placement:c.placement,target:c.target},c.floaterProps),a.a.createElement(ke,{beaconComponent:c.beaconComponent,locale:c.locale,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:s,styles:c.styles}))):null}},{key:"open",get:function(){var e=this.props,t=e.step,n=e.lifecycle;return!(!te(t)&&n!==G.TOOLTIP)}}]),t}(a.a.Component),Re=function(e){function t(e){var n;return S(this,t),P(L(n=_(this,I(t).call(this,e))),"initStore",(function(){var e=n.props,t=e.debug,o=e.getHelpers,r=e.run,i=e.stepIndex;n.store=new ae(T({},n.props,{controlled:r&&u.a.number(i)})),n.helpers=n.store.getHelpers();var a=n.store.addListener;return oe({title:"init",data:[{key:"props",value:n.props},{key:"state",value:n.state}],debug:t}),a(n.syncState),o(n.helpers),n.store.getState()})),P(L(n),"callback",(function(e){var t=n.props.callback;u.a.function(t)&&t(e)})),P(L(n),"handleKeyboard",(function(e){var t=n.state,o=t.index,r=t.lifecycle,i=n.props.steps[o],a=window.Event?e.which:e.keyCode;r===G.TOOLTIP&&27===a&&i&&!i.disableCloseOnEsc&&n.store.close()})),P(L(n),"syncState",(function(e){n.setState(e)})),P(L(n),"setPopper",(function(e,t){"wrapper"===t?n.beaconPopper=e:n.tooltipPopper=e})),P(L(n),"shouldScroll",(function(e,t,n,o,r,i,a){return!e&&(0!==t||n||o===G.TOOLTIP)&&"center"!==r.placement&&(!r.isFixed||!de(i))&&a.lifecycle!==o&&-1!==[G.BEACON,G.TOOLTIP].indexOf(o)})),n.state=n.initStore(),n}return j(t,e),x(t,[{key:"componentDidMount",value:function(){if(Y){var e=this.props,t=e.disableCloseOnEsc,n=e.debug,o=e.run,r=e.steps,i=this.store.start;Oe(r,n)&&o&&i(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}}},{key:"componentDidUpdate",value:function(e,t){if(Y){var n=this.state,o=n.action,r=n.controlled,a=n.index,s=n.lifecycle,c=n.status,p=this.props,f=p.debug,d=p.run,h=p.stepIndex,m=p.steps,y=e.steps,v=e.stepIndex,b=this.store,g=b.setSteps,w=b.reset,E=b.start,O=b.stop,S=b.update,k=l()(e,this.props).changed,x=l()(t,this.state),P=x.changed,C=x.changedFrom,N=x.changedTo,j=we(m[a],this.props),I=!function e(t,n){var o,r=Object(i.isValidElement)(t)||Object(i.isValidElement)(n),a=u.a.undefined(t)||u.a.undefined(n);if(X(t)!==X(n)||r||a)return!1;if(u.a.domElement(t))return t.isSameNode(n);if(u.a.number(t))return t===n;if(u.a.function(t))return t.toString()===n.toString();for(var s in t)if(Z(t,s)){if(void 0===t[s]||void 0===n[s])return!1;if(o=X(t[s]),-1!==["object","array"].indexOf(o)&&e(t[s],n[s]))continue;if("function"===o&&e(t[s],n[s]))continue;if(t[s]!==n[s])return!1}for(var l in n)if(Z(n,l)&&void 0===t[l])return!1;return!0}(y,m),R=u.a.number(h)&&k("stepIndex");if(I&&(Oe(m,f)?g(m):console.warn("Steps are not valid",m)),k("run")&&(d?E(h):O()),R){var M=v<h?A.NEXT:A.PREV;o===A.STOP&&(M=A.START),-1===[V.FINISHED,V.SKIPPED].indexOf(c)&&S({action:o===A.CLOSE?A.CLOSE:M,index:h,lifecycle:G.INIT})}var L=T({},this.state,{index:a,step:j});if(N("action",[A.NEXT,A.PREV,A.SKIP,A.CLOSE])&&N("status",V.PAUSED)){var _=we(m[t.index],this.props);this.callback(T({},L,{index:t.index,lifecycle:G.COMPLETE,step:_,type:z}))}if(N("status",[V.FINISHED,V.SKIPPED])){var F=we(m[t.index],this.props);r||this.callback(T({},L,{index:t.index,lifecycle:G.COMPLETE,step:F,type:z})),this.callback(T({},L,{type:H,step:F,index:t.index})),w()}else C("status",[V.IDLE,V.READY],V.RUNNING)?this.callback(T({},L,{type:D})):(P("status")||N("action",A.RESET))&&this.callback(T({},L,{type:U}));j&&(this.scrollToStep(t),"center"===j.placement&&c===V.RUNNING&&s===G.INIT&&this.store.update({lifecycle:G.READY}))}}},{key:"componentWillUnmount",value:function(){this.props.disableCloseOnEsc||document.body.removeEventListener("keydown",this.handleKeyboard)}},{key:"scrollToStep",value:function(e){var t=this.state,n=t.index,o=t.lifecycle,r=t.status,i=this.props,a=i.debug,s=i.disableScrolling,l=i.disableScrollParentFix,c=i.scrollToFirstStep,u=i.scrollOffset,p=i.scrollDuration,f=we(i.steps[n],this.props);if(f){var d=ce(f.target),h=this.shouldScroll(s,n,c,o,f,d,e);if(r===V.RUNNING&&h){var m=fe(d,l),v=pe(d,l),b=Math.floor(he(d,u,l))||0;if(oe({title:"scrollToStep",data:[{key:"index",value:n},{key:"lifecycle",value:o},{key:"status",value:r}],debug:a}),o===G.BEACON&&this.beaconPopper){var g=this.beaconPopper,w=g.placement,E=g.popper;-1!==["bottom"].indexOf(w)||m||(b=Math.floor(E.top-u))}else if(o===G.TOOLTIP&&this.tooltipPopper){var O=this.tooltipPopper,S=O.flipped,k=O.placement,x=O.popper;-1===["top","right","left"].indexOf(k)||S||m?b-=f.spotlightPadding:b=Math.floor(x.top-u)}b=b>=0?b:0,r===V.RUNNING&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se(),n=arguments.length>2?arguments[2]:void 0;new Promise((function(o,r){var i=t.scrollTop,a=e>i?e-i:i-e;y.a.top(t,e,{duration:a<100?50:n},(function(e){return e&&"Element already at target scroll position"!==e.message?r(e):o()}))}))}(b,v,p)}}}},{key:"render",value:function(){if(!Y)return null;var e,t=this.state,n=t.index,o=t.status,r=this.props,i=r.continuous,s=r.debug,l=r.disableScrolling,c=r.scrollToFirstStep,u=we(r.steps[n],this.props);return o===V.RUNNING&&u&&(e=a.a.createElement(Ie,C({},this.state,{callback:this.callback,continuous:i,debug:s,setPopper:this.setPopper,helpers:this.helpers,shouldScroll:!l&&(0!==n||c),step:u,update:this.store.update}))),a.a.createElement("div",{className:"react-joyride"},e)}}]),t}(a.a.Component);P(Re,"defaultProps",{continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:function(){},hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]});var Me=Re;function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var _e=lodash.debounce,Ae=wp.i18n.__,De=wp.components,Fe=De.Button,We=De.Modal,Be=wp.element,ze=Be.Fragment,He=Be.useEffect,Ue=Be.useRef,qe=Be.useState,Ge=function(){var e=Le(qe(!0),2),t=e[0],n=e[1],o=Le(qe(!1),2),r=o[0],i=o[1],a=Ue(null);He((function(){wp.api.loadPromise.then((function(){a.current=new wp.api.models.Settings}))}),[]);var s=[{target:".otter-step-one",content:Ae("Howdy, I'm Ollie The Otter! I will help you configure your Otter experience. So let's start the magic!"),disableBeacon:!0},{target:".otter-step-two",content:Ae("Jazz up your blocks with some sparkly custom CSS or Blocks Animation right inside the block. Here you can enable modules to enhance your experience with Block Editor.")},{target:".otter-step-three",content:Ae("Section Block is the signature feature of Otter. It allows you to build beautiful layouts right inside the Block Editor. You can set Section Block as the default block for your new Pages.")},{target:".otter-step-four",content:Ae("We love maps! Here you can set your Google Maps API key for Otter's Map Block.")},{target:".otter-step-five",content:Ae("If you don't have an API key, you can register one by clicking here.")},{target:".otter-step-six",content:Ae("Help us in making our plugin better with anonymous data tracking.")},{target:".otter-step-seven",content:Ae("If you ever need any help, we are a team of real Otter-lovers who would love to help you out.")},{target:".otter-step-eight",content:Ae("And if you love what we do, please leave us a review at WordPress.org. Your review keeps us motivated to make awesome things.")},{target:".otter-step-one",content:Ae("That's it for now! Hope you enjoy Otter and love it as much as we do.")}],l=_e((function(e){if(t&&n(!1),"ready"===e||"finished"===e||"skipped"===e){var o=new wp.api.models.Settings({themeisle_blocks_settings_tour:!1}).save();o.success((function(e,t){a.current.fetch()})),o.error((function(e,t){console.warning(e.responseJSON.message)}))}}),1e3);return wp.element.createElement(ze,null,t&&wp.element.createElement(We,{title:Ae("Welcome to Otter!"),isDismissable:!1,isDismissible:!1,className:"otter-onboarding-modal"},wp.element.createElement("div",{className:"otter-onboarding-modal-content"},Ae("Would you like to start the onboarding wizard which will help you personalize the plugin for yourself?")),wp.element.createElement("div",{className:"otter-onboarding-modal-action"},wp.element.createElement(Fe,{isPrimary:!0,isLarge:!0,onClick:function(){n(!1),i(!0)}},Ae("Start")),wp.element.createElement(Fe,{isDefault:!0,isLarge:!0,onClick:function(){return l("skipped")}},Ae("Skip")))),wp.element.createElement(Me,{continuous:!0,run:r,steps:s,scrollToFirstStep:!0,showSkipButton:!0,locale:{back:Ae("Back"),close:Ae("Close"),last:Ae("Finish"),next:Ae("Next"),skip:Ae("Skip")},callback:function(e){return l(e.status)}}))},Ve=n(15),Ye=n.n(Ve),$e=wp.i18n.__,Ke=function(){return wp.element.createElement("header",{className:"otter-header"},wp.element.createElement("div",{className:Ye()("otter-container","otter-step-one")},wp.element.createElement("div",{className:"otter-logo"},wp.element.createElement("img",{src:otterObj.assetsPath+"images/logo.png",title:$e("Gutenberg Blocks and Template Library by Otter")}),wp.element.createElement("abbr",{title:"Version: ".concat(otterObj.version),className:"version"},otterObj.version))))};n(23);function Xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Je=wp.i18n.__,Ze=wp.components,Qe=Ze.BaseControl,et=Ze.Button,tt=Ze.ExternalLink,nt=Ze.PanelBody,ot=Ze.PanelRow,rt=Ze.Placeholder,it=Ze.Spinner,at=Ze.ToggleControl,st=wp.element,lt=st.Fragment,ct=st.useEffect,ut=st.useRef,pt=st.useState,ft=function(){ct((function(){wp.api.loadPromise.then((function(){x.current=new wp.api.models.Settings,!1===t&&x.current.fetch().then((function(e){f(Boolean(e.themeisle_blocks_settings_css_module)),m(Boolean(e.themeisle_blocks_settings_blocks_animation)),b(Boolean(e.themeisle_blocks_settings_default_block)),E(e.themeisle_google_map_block_api_key),k(e.otter_blocks_logger_flag),n(!0)}))}))}),[]);var e=Xe(pt(!1),2),t=e[0],n=e[1],r=Xe(pt(!1),2),i=r[0],a=r[1],s=Xe(pt(null),2),l=s[0],c=s[1],u=Xe(pt(!1),2),p=u[0],f=u[1],d=Xe(pt(!1),2),h=d[0],m=d[1],y=Xe(pt(!0),2),v=y[0],b=y[1],g=Xe(pt(""),2),w=g[0],E=g[1],O=Xe(pt("no"),2),S=O[0],k=O[1],x=ut(null),P=(ut(null),function(e,t,n){a(!0),N(Je("Updating settings…"),"info");var r=new wp.api.models.Settings(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,n)).save();r.success((function(n,r){o.store.removeNotification(l),"success"===r&&(C(t,n[e]),setTimeout((function(){N(Je("Settings saved."),"success"),a(!1)}),800)),"error"===r&&setTimeout((function(){N(Je("An unknown error occurred."),"danger"),a(!1)}),800),x.current.fetch()})),r.error((function(e,t){o.store.removeNotification(l),setTimeout((function(){N(e.responseJSON.message?e.responseJSON.message:Je("An unknown error occurred."),"danger"),a(!1)}),800)}))}),C=function(e,t){switch(e){case"cssModule":f(t);break;case"blocksAnimation":m(t);break;case"isDefaultSection":b(t);break;case"googleMapsAPI":E(t);break;case"isLoggingData":k(t)}},N=function(e,t){var n=o.store.addNotification({message:e,type:t,insert:"top",container:"bottom-left",isMobile:!0,dismiss:{duration:2e3,showIcon:!0},dismissable:{click:!0,touch:!0}});c(n)};return t?wp.element.createElement(lt,null,wp.element.createElement("div",{className:"otter-main"},wp.element.createElement("div",{className:"otter-step-two"},wp.element.createElement(nt,{title:Je("Modules")},wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Enable Custom CSS Module"),help:"Custom CSS module allows to add custom CSS to each block in Block Editor.",checked:p,onChange:function(){return P("themeisle_blocks_settings_css_module","cssModule",!p)}})),wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Enable Blocks Animation Module"),help:"Blocks Animation module allows to add CSS animations to each block in Block Editor.",checked:h,onChange:function(){return P("themeisle_blocks_settings_blocks_animation","blocksAnimation",!h)}})))),wp.element.createElement("div",{className:"otter-step-three"},wp.element.createElement(nt,{title:Je("Section")},wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Make Section your default block for Pages"),help:"Everytime you create a new page, Section block will be appended there by default.",checked:v,onChange:function(){return P("themeisle_blocks_settings_default_block","isDefaultSection",!v)}})))),wp.element.createElement("div",{className:"otter-step-four"},wp.element.createElement(nt,{title:Je("Maps")},wp.element.createElement(ot,null,wp.element.createElement(Qe,{label:Je("Google Maps API"),help:"In order to use Google Maps block, you need to use Google Maps and Places API.",id:"otter-options-google-map-api",className:"otter-text-field"},wp.element.createElement("input",{type:"text",id:"otter-options-google-map-api",value:w,placeholder:Je("Google Maps API Key"),disabled:i,onChange:function(e){return E(e.target.value)}}),wp.element.createElement("div",{className:"otter-text-field-button-group"},wp.element.createElement(et,{isPrimary:!0,isLarge:!0,disabled:i,onClick:function(){return P("themeisle_google_map_block_api_key","googleMapsAPI",w)}},Je("Save")),wp.element.createElement(tt,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key",className:"otter-step-five"},Je("Get API Key"))))))),wp.element.createElement("div",{className:"otter-step-six"},wp.element.createElement(nt,{title:Je("Other")},wp.element.createElement(ot,null,wp.element.createElement(at,{label:Je("Anonymous Data Tracking."),help:"Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.",checked:"yes"===S,onChange:function(){return P("otter_blocks_logger_flag","isLoggingData","yes"===S?"no":"yes")}})))),wp.element.createElement(nt,null,wp.element.createElement("div",{className:"otter-info"},wp.element.createElement("h2",null,Je("Got a question for us?")),wp.element.createElement("p",null,Je("We would love to help you out if you need any help with Otter.")),wp.element.createElement("div",{className:"otter-info-button-group"},wp.element.createElement(et,{isDefault:!0,isLarge:!0,target:"_blank",href:"https://wordpress.org/support/plugin/otter-blocks",className:"otter-step-seven"},Je("Ask a question")),wp.element.createElement(et,{isDefault:!0,isLarge:!0,target:"_blank",href:"https://wordpress.org/support/plugin/otter-blocks/reviews/#new-post",className:"otter-step-eight"},Je("Leave a review"))))))):wp.element.createElement(rt,null,wp.element.createElement(it,null))},dt=wp.i18n.__,ht=function(){return wp.element.createElement("footer",{className:"otter-footer"},wp.element.createElement("div",{className:"otter-container"},dt("No otters were harmed during the making of this plugin.")))},mt=wp.element,yt=mt.render,vt=mt.Fragment;yt(wp.element.createElement((function(){return wp.element.createElement(vt,null,Boolean(otterObj.showTour)&&wp.element.createElement(Ge,null),wp.element.createElement(r.a,null),wp.element.createElement(Ke,null),wp.element.createElement(ft,null),wp.element.createElement(ht,null))}),null),document.getElementById("otter"))}]);
docker-compose.yml DELETED
@@ -1,31 +0,0 @@
1
- version: '3.7'
2
-
3
- services:
4
- mysql:
5
- image: mysql:5.7
6
- volumes:
7
- - ~/otb/db_data:/var/lib/mysql
8
- restart: always
9
- environment:
10
- MYSQL_ROOT_PASSWORD: wordpress
11
- MYSQL_DATABASE: wordpress
12
- MYSQL_USER: wordpress
13
- MYSQL_PASSWORD: wordpress
14
- wordpress:
15
- depends_on:
16
- - mysql
17
- image: hardeepasrani/pirate-brewery
18
- ports:
19
- - 8889:80
20
- networks:
21
- - default
22
- volumes:
23
- - ~/wpcore:/var/www/html/
24
- - .:/var/www/html/wp-content/plugins/otter-blocks/
25
- restart: always
26
- environment:
27
- WORDPRESS_DB_NAME: wordpress
28
- WORDPRESS_DB_USER: wordpress
29
- WORDPRESS_DB_PASSWORD: wordpress
30
- WORDPRESS_DB_ROOT_PASSWORD: wordpress
31
- WORDPRESS_DEBUG: 'true'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
otter-blocks.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin Name: Gutenberg Blocks and Template Library by Otter
8
  * Plugin URI: https://themeisle.com/plugins/otter-blocks
9
  * Description: Create beautiful and attracting posts, pages, and landing pages with Gutenberg Blocks and Template Library by Otter. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
10
- * Version: 1.4.1
11
  * Author: ThemeIsle
12
  * Author URI: https://themeisle.com
13
  * License: GPL-2.0+
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
26
  define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
27
  define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
28
  define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
29
- define( 'OTTER_BLOCKS_VERSION', '1.4.1' );
30
  define( 'OTTER_BLOCKS_DEV', false );
31
 
32
  $vendor_file = OTTER_BLOCKS_PATH . '/vendor/autoload.php';
7
  * Plugin Name: Gutenberg Blocks and Template Library by Otter
8
  * Plugin URI: https://themeisle.com/plugins/otter-blocks
9
  * Description: Create beautiful and attracting posts, pages, and landing pages with Gutenberg Blocks and Template Library by Otter. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
10
+ * Version: 1.5.0
11
  * Author: ThemeIsle
12
  * Author URI: https://themeisle.com
13
  * License: GPL-2.0+
26
  define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
27
  define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
28
  define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
29
+ define( 'OTTER_BLOCKS_VERSION', '1.5.0' );
30
  define( 'OTTER_BLOCKS_DEV', false );
31
 
32
  $vendor_file = OTTER_BLOCKS_PATH . '/vendor/autoload.php';
readme.md CHANGED
@@ -46,6 +46,14 @@ It has:
46
 
47
  ## Changelog ##
48
 
 
 
 
 
 
 
 
 
49
  ##### [Version 1.4.1](https://github.com/Codeinwp/otter-blocks/compare/v1.4.0...v1.4.1) (2020-02-29)
50
 
51
  - Fix issue with Button Group & Global Defaults
46
 
47
  ## Changelog ##
48
 
49
+ #### [Version 1.5.0](https://github.com/Codeinwp/otter-blocks/compare/v1.4.1...v1.5.0) (2020-03-20)
50
+
51
+ - Adds compatibility with WordPress 5.4
52
+ - Adds compatibility with WordPress 5.4
53
+
54
+
55
+
56
+
57
  ##### [Version 1.4.1](https://github.com/Codeinwp/otter-blocks/compare/v1.4.0...v1.4.1) (2020-02-29)
58
 
59
  - Fix issue with Button Group & Global Defaults
readme.txt CHANGED
@@ -46,6 +46,14 @@ It has:
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
 
49
  ##### [Version 1.4.1](https://github.com/Codeinwp/otter-blocks/compare/v1.4.0...v1.4.1) (2020-02-29)
50
 
51
  - Fix issue with Button Group & Global Defaults
46
 
47
  == Changelog ==
48
 
49
+ #### [Version 1.5.0](https://github.com/Codeinwp/otter-blocks/compare/v1.4.1...v1.5.0) (2020-03-20)
50
+
51
+ - Adds compatibility with WordPress 5.4
52
+ - Adds compatibility with WordPress 5.4
53
+
54
+
55
+
56
+
57
  ##### [Version 1.4.1](https://github.com/Codeinwp/otter-blocks/compare/v1.4.0...v1.4.1) (2020-02-29)
58
 
59
  - Fix issue with Button Group & Global Defaults
src/Components/Footer.js DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * WordPress dependencies.
3
- */
4
- const { __ } = wp.i18n;
5
-
6
- const { Component } = wp.element;
7
-
8
- class Footer extends Component {
9
- constructor() {
10
- super( ...arguments );
11
- }
12
-
13
- render() {
14
- return (
15
- <footer className="otter-footer">
16
- <div className="otter-container">
17
- { __( 'No otters were harmed during the making of this plugin.' ) }
18
- </div>
19
- </footer>
20
- );
21
- }
22
- }
23
-
24
- export default Footer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Components/Header.js DELETED
@@ -1,46 +0,0 @@
1
- /**
2
- * External dependencies.
3
- */
4
- import classnames from 'classnames';
5
-
6
- /**
7
- * WordPress dependencies.
8
- */
9
- const { __ } = wp.i18n;
10
-
11
- const { Component } = wp.element;
12
-
13
- class Headers extends Component {
14
- constructor() {
15
- super( ...arguments );
16
- }
17
-
18
- render() {
19
- return (
20
- <header className="otter-header">
21
- <div
22
- className={ classnames(
23
- 'otter-container',
24
- 'otter-step-one'
25
- ) }
26
- >
27
- <div className="otter-logo">
28
- <img
29
- src={ otterObj.assetsPath + 'images/logo.png' }
30
- title={ __( 'Gutenberg Blocks and Template Library by Otter' ) }
31
- />
32
-
33
- <abbr
34
- title={ `Version: ${ otterObj.version }` }
35
- className="version"
36
- >
37
- { otterObj.version }
38
- </abbr>
39
- </div>
40
- </div>
41
- </header>
42
- );
43
- }
44
- }
45
-
46
- export default Headers;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Components/Main.js DELETED
@@ -1,260 +0,0 @@
1
- /**
2
- * External dependencies.
3
- */
4
- import ReactNotification from 'react-notifications-component';
5
-
6
- import 'react-notifications-component/dist/theme.css';
7
-
8
- /**
9
- * WordPress dependencies.
10
- */
11
- const { __ } = wp.i18n;
12
-
13
- const {
14
- BaseControl,
15
- Button,
16
- ExternalLink,
17
- PanelBody,
18
- PanelRow,
19
- Placeholder,
20
- Spinner,
21
- ToggleControl
22
- } = wp.components;
23
-
24
- const {
25
- Component,
26
- Fragment
27
- } = wp.element;
28
-
29
- class Main extends Component {
30
- constructor() {
31
- super( ...arguments );
32
-
33
- this.changeOptions = this.changeOptions.bind( this );
34
- this.addNotification = this.addNotification.bind( this );
35
- this.notificationDOMRef = React.createRef();
36
-
37
- this.state = {
38
- isAPILoaded: false,
39
- isAPISaving: false,
40
- notification: null,
41
- cssModule: false,
42
- blocksAnimation: false,
43
- isDefaultSection: true,
44
- googleMapsAPI: ''
45
- };
46
- }
47
-
48
- async componentDidMount() {
49
- wp.api.loadPromise.then( () => {
50
- this.settings = new wp.api.models.Settings();
51
-
52
- if ( false === this.state.isAPILoaded ) {
53
- this.settings.fetch().then( response => {
54
- this.setState({
55
- cssModule: Boolean( response.themeisle_blocks_settings_css_module ),
56
- blocksAnimation: Boolean( response.themeisle_blocks_settings_blocks_animation ),
57
- isDefaultSection: Boolean( response.themeisle_blocks_settings_default_block ),
58
- googleMapsAPI: response.themeisle_google_map_block_api_key,
59
- isAPILoaded: true
60
- });
61
- });
62
- }
63
- });
64
- }
65
-
66
- changeOptions( option, state, value ) {
67
- this.setState({ isAPISaving: true });
68
-
69
- this.addNotification( __( 'Updating settings…' ), 'info' );
70
-
71
- const model = new wp.api.models.Settings({
72
- // eslint-disable-next-line camelcase
73
- [option]: value
74
- });
75
-
76
- const save = model.save();
77
-
78
- save.success( ( response, status ) => {
79
- this.notificationDOMRef.current.removeNotification( this.state.notification );
80
-
81
- if ( 'success' === status ) {
82
- this.setState({
83
- [state]: response[option]
84
- });
85
-
86
- setTimeout( () => {
87
- this.addNotification( __( 'Settings saved.' ), 'success' );
88
- this.setState({ isAPISaving: false });
89
- }, 800 );
90
- }
91
-
92
- if ( 'error' === status ) {
93
- setTimeout( () => {
94
- this.addNotification( __( 'An unknown error occurred.' ), 'danger' );
95
- this.setState({ isAPISaving: false });
96
- }, 800 );
97
- }
98
-
99
- this.settings.fetch();
100
- });
101
-
102
- save.error( ( response, status ) => {
103
- this.notificationDOMRef.current.removeNotification( this.state.notification );
104
-
105
- setTimeout( () => {
106
- this.addNotification( response.responseJSON.message ? response.responseJSON.message : __( 'An unknown error occurred.' ), 'danger' );
107
- this.setState({ isAPISaving: false });
108
- }, 800 );
109
- });
110
- }
111
-
112
- addNotification( message, type ) {
113
- const notification = this.notificationDOMRef.current.addNotification({
114
- message,
115
- type,
116
- insert: 'top',
117
- container: 'top-right',
118
- slidingEnter: {
119
- duration: 0,
120
- delay: 0
121
- },
122
- dismiss: { duration: 2000 },
123
- dismissable: { click: true }
124
- });
125
-
126
- this.setState({ notification });
127
- }
128
-
129
- render() {
130
- if ( ! this.state.isAPILoaded ) {
131
- return (
132
- <Placeholder>
133
- <Spinner />
134
- </Placeholder>
135
- );
136
- }
137
-
138
- return (
139
- <Fragment>
140
- <ReactNotification ref={ this.notificationDOMRef } />
141
-
142
- <div className="otter-main">
143
-
144
- <div className="otter-step-two">
145
- <PanelBody
146
- title={ __( 'Modules' ) }
147
- >
148
- <PanelRow>
149
- <ToggleControl
150
- label={ __( 'Enable Custom CSS Module' ) }
151
- help={ 'Custom CSS module allows to add custom CSS to each block in Block Editor.' }
152
- checked={ this.state.cssModule }
153
- onChange={ () => this.changeOptions( 'themeisle_blocks_settings_css_module', 'cssModule', ! this.state.cssModule ) }
154
- />
155
- </PanelRow>
156
-
157
- <PanelRow>
158
- <ToggleControl
159
- label={ __( 'Enable Blocks Animation Module' ) }
160
- help={ 'Blocks Animation module allows to add CSS animations to each block in Block Editor.' }
161
- checked={ this.state.blocksAnimation }
162
- onChange={ () => this.changeOptions( 'themeisle_blocks_settings_blocks_animation', 'blocksAnimation', ! this.state.blocksAnimation ) }
163
- />
164
- </PanelRow>
165
- </PanelBody>
166
- </div>
167
-
168
- <div className="otter-step-three">
169
- <PanelBody
170
- title={ __( 'Section' ) }
171
- >
172
- <PanelRow>
173
- <ToggleControl
174
- label={ __( 'Make Section your default block for Pages' ) }
175
- help={ 'Everytime you create a new page, Section block will be appended there by default.' }
176
- checked={ this.state.isDefaultSection }
177
- onChange={ () => this.changeOptions( 'themeisle_blocks_settings_default_block', 'isDefaultSection', ! this.state.isDefaultSection ) }
178
- />
179
- </PanelRow>
180
- </PanelBody>
181
- </div>
182
-
183
- <div className="otter-step-four">
184
- <PanelBody
185
- title={ __( 'Maps' ) }
186
- >
187
- <PanelRow>
188
- <BaseControl
189
- label={ __( 'Google Maps API' ) }
190
- help={ 'In order to use Google Maps block, you need to use Google Maps and Places API.' }
191
- id="otter-options-google-map-api"
192
- className="otter-text-field"
193
- >
194
- <input
195
- type="text"
196
- id="otter-options-google-map-api"
197
- value={ this.state.googleMapsAPI }
198
- placeholder={ __( 'Google Maps API Key' ) }
199
- disabled={ this.state.isAPISaving }
200
- onChange={ e => this.setState({ googleMapsAPI: e.target.value }) }
201
- />
202
-
203
- <div className="otter-text-field-button-group">
204
- <Button
205
- isPrimary
206
- isLarge
207
- disabled={ this.state.isAPISaving }
208
- onClick={ () => this.changeOptions( 'themeisle_google_map_block_api_key', 'googleMapsAPI', this.state.googleMapsAPI ) }
209
- >
210
- { __( 'Save' ) }
211
- </Button>
212
-
213
- <ExternalLink
214
- href="https://developers.google.com/maps/documentation/javascript/get-api-key"
215
- className="otter-step-five"
216
- >
217
- { __( 'Get API Key' ) }
218
- </ExternalLink>
219
- </div>
220
- </BaseControl>
221
- </PanelRow>
222
- </PanelBody>
223
- </div>
224
-
225
- <PanelBody>
226
- <div className="otter-info">
227
- <h2>{ __( 'Got a question for us?' ) }</h2>
228
-
229
- <p>{ __( 'We would love to help you out if you need any help with Otter.' ) }</p>
230
-
231
- <div className="otter-info-button-group">
232
- <Button
233
- isDefault
234
- isLarge
235
- target="_blank"
236
- href="https://wordpress.org/support/plugin/otter-blocks"
237
- className="otter-step-six"
238
- >
239
- { __( 'Ask a question' ) }
240
- </Button>
241
-
242
- <Button
243
- isDefault
244
- isLarge
245
- target="_blank"
246
- href="https://wordpress.org/support/plugin/otter-blocks/reviews/#new-post"
247
- className="otter-step-seven"
248
- >
249
- { __( 'Leave a review' ) }
250
- </Button>
251
- </div>
252
- </div>
253
- </PanelBody>
254
- </div>
255
- </Fragment>
256
- );
257
- }
258
- }
259
-
260
- export default Main;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Components/Onboarding.js DELETED
@@ -1,154 +0,0 @@
1
- /**
2
- * External dependencies.
3
- */
4
- import Joyride from 'react-joyride';
5
-
6
- /**
7
- * WordPress dependencies.
8
- */
9
- const { __ } = wp.i18n;
10
-
11
- const {
12
- Button,
13
- Modal
14
- } = wp.components;
15
-
16
- const {
17
- Component,
18
- Fragment
19
- } = wp.element;
20
-
21
- class Onboarding extends Component {
22
- constructor() {
23
- super( ...arguments );
24
- this.skipTour = this.skipTour.bind( this );
25
-
26
- this.state = {
27
- isOpen: true,
28
- runTour: false,
29
- steps: [
30
- {
31
- target: '.otter-step-one',
32
- content: __( 'Howdy, I\'m Ollie The Otter! I will help you configure your Otter experience. So let\'s start the magic!' ),
33
- disableBeacon: true
34
- },
35
- {
36
- target: '.otter-step-two',
37
- content: __( 'Jazz up your blocks with some sparkly custom CSS or Blocks Animation right inside the block. Here you can enable modules to enhance your experience with Block Editor.' )
38
- },
39
- {
40
- target: '.otter-step-three',
41
- content: __( 'Section Block is the signature feature of Otter. It allows you to build beautiful layouts right inside the Block Editor. You can set Section Block as the default block for your new Pages.' )
42
- },
43
- {
44
- target: '.otter-step-four',
45
- content: __( 'We love maps! Here you can set your Google Maps API key for Otter\'s Map Block.' )
46
- },
47
- {
48
- target: '.otter-step-five',
49
- content: __( 'If you don\'t have an API key, you can register one by clicking here.' )
50
- },
51
- {
52
- target: '.otter-step-six',
53
- content: __( 'If you ever need any help, we are a team of real Otter-lovers who would love to help you out.' )
54
- },
55
- {
56
- target: '.otter-step-seven',
57
- content: __( 'And if you love what we do, please leave us a review at WordPress.org. Your review keeps us motivated to make awesome things.' )
58
- },
59
- {
60
- target: '.otter-step-one',
61
- content: __( 'That\'s it for now! Hope you enjoy Otter and love it as much as we do.' )
62
- }
63
- ]
64
- };
65
- }
66
-
67
- async componentDidMount() {
68
- wp.api.loadPromise.then( () => {
69
- this.settings = new wp.api.models.Settings();
70
- });
71
- }
72
-
73
- skipTour( status ) {
74
- if ( this.state.isOpen ) {
75
- this.setState({ isOpen: false });
76
- }
77
-
78
- if ( 'finished' !== status && 'skipped' !== status ) {
79
- return;
80
- }
81
-
82
- const model = new wp.api.models.Settings({
83
- // eslint-disable-next-line camelcase
84
- 'themeisle_blocks_settings_tour': false
85
- });
86
-
87
- const save = model.save();
88
-
89
- save.success( ( response, status ) => {
90
- this.settings.fetch();
91
- });
92
-
93
- save.error( ( response, status ) => {
94
- console.warning( response.responseJSON.message );
95
- });
96
- }
97
-
98
- render() {
99
- return (
100
- <Fragment>
101
- { this.state.isOpen && (
102
- <Modal
103
- title={ __( 'Welcome to Otter!' ) }
104
- isDismissable={ false }
105
- className="otter-onboarding-modal"
106
- >
107
- <div className="otter-onboarding-modal-content">
108
- { __( 'Would you like to start the onboarding wizard which will help you personalize the plugin for yourself?' ) }
109
- </div>
110
-
111
- <div className="otter-onboarding-modal-action">
112
- <Button
113
- isPrimary
114
- isLarge
115
- onClick={ () => this.setState({
116
- isOpen: false,
117
- runTour: true
118
- }) }
119
- >
120
- { __( 'Start' ) }
121
- </Button>
122
-
123
- <Button
124
- isDefault
125
- isLarge
126
- onClick={ () => this.skipTour( 'skipped' ) }
127
- >
128
- { __( 'Skip' ) }
129
- </Button>
130
- </div>
131
- </Modal>
132
- ) }
133
-
134
- <Joyride
135
- continuous={ true }
136
- run={ this.state.runTour }
137
- steps={ this.state.steps }
138
- scrollToFirstStep
139
- showSkipButton
140
- locale={ {
141
- back: __( 'Back' ),
142
- close: __( 'Close' ),
143
- last: __( 'Finish' ),
144
- next: __( 'Next' ),
145
- skip: __( 'Skip' )
146
- } }
147
- callback={ data => this.skipTour( data.status )}
148
- />
149
- </Fragment>
150
- );
151
- }
152
- }
153
-
154
- export default Onboarding;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/index.js DELETED
@@ -1,42 +0,0 @@
1
- /**
2
- * Internal dependencies.
3
- */
4
- import './style.scss';
5
-
6
- import Onboarding from './Components/Onboarding.js';
7
-
8
- import Header from './Components/Header.js';
9
-
10
- import Main from './Components/Main.js';
11
-
12
- import Footer from './Components/Footer.js';
13
-
14
- /**
15
- * WordPress dependencies.
16
- */
17
- const {
18
- Component,
19
- Fragment
20
- } = wp.element;
21
-
22
- class App extends Component {
23
- constructor() {
24
- super( ...arguments );
25
- }
26
-
27
- render() {
28
- return (
29
- <Fragment>
30
- { Boolean( otterObj.showTour ) && <Onboarding /> }
31
- <Header />
32
- <Main />
33
- <Footer />
34
- </Fragment>
35
- );
36
- }
37
- }
38
-
39
- ReactDOM.render(
40
- <App />,
41
- document.getElementById( 'otter' )
42
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/style.scss DELETED
@@ -1,340 +0,0 @@
1
- * {
2
- box-sizing: inherit;
3
- }
4
-
5
- .settings_page_otter {
6
- background: #f6f6f6;
7
- font-size: 14px;
8
- position: relative;
9
- box-sizing: border-box;
10
- font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
11
- }
12
-
13
- #wpcontent {
14
- padding-left: 0;
15
- }
16
-
17
- .auto-fold {
18
- #wpcontent {
19
- padding-left: 0;
20
- }
21
- }
22
-
23
- #otter {
24
- .otter-header {
25
- padding: 20px 10px;
26
- background-color: #ffffff;
27
- box-shadow: 0 1px 0 rgba(213,213,213,0.5),0 1px 2px #eee;
28
-
29
- &.onboarding {
30
-
31
- .otter-container {
32
- .otter-logo {
33
- justify-content: center;
34
- }
35
- }
36
- }
37
-
38
- .otter-container {
39
- margin: 0 auto;
40
- max-width: 100%;
41
- max-width: 750px; // 930
42
-
43
- .otter-logo {
44
- display: flex;
45
- align-items: center;
46
-
47
- img {
48
- max-width: 200px;
49
- }
50
-
51
- .version {
52
- background-color: #e5e5e5;
53
- border-radius: 3px;
54
- font-size: 0.8em;
55
- font-weight: 400;
56
- margin-left: 10px;
57
- padding: 2px 7px;
58
- }
59
- }
60
- }
61
- }
62
-
63
- .otter-main {
64
- margin-left: auto;
65
- margin-right: auto;
66
- max-width: 750px;
67
-
68
- .components-panel__body {
69
- margin: 25px 0;
70
- background: #fff;
71
- border: 1px solid #e2e4e7;
72
-
73
- .components-panel__body-toggle {
74
- border-bottom: 1px solid #d6e2ed;
75
- }
76
-
77
- .components-panel__row {
78
- padding: 20px 10px 10px;
79
- margin: 0;
80
-
81
- .components-base-control {
82
-
83
- .components-base-control__field {
84
- display: flex;
85
- align-items: center;
86
- margin-bottom: 10px;
87
- }
88
-
89
- &.otter-text-field {
90
- width: 100%;
91
-
92
- .components-base-control__field {
93
- display: block;
94
-
95
- label {
96
- font-weight: 600;
97
- margin-bottom: 10px;
98
- }
99
-
100
- input {
101
- border: 1px solid #b7c9d9;
102
- border-radius: 3px;
103
- font-size: 14px;
104
- padding: 9px 15px;
105
- width: 100%;
106
- box-shadow: none;
107
- height: 40px;
108
- margin: 0 0 10px 0;
109
- color: #444;
110
-
111
- &:disabled {
112
- background: #f6f6f6;
113
- border-color: #eeeeee;
114
- color: #bbbbbb;
115
- }
116
-
117
- &:focus {
118
- border-color: #00a0d2;
119
- box-shadow: 0 0 0 1px #00a0d2;
120
- outline: 2px solid transparent;
121
- outline-offset: -2px;
122
- }
123
- }
124
-
125
- .otter-text-field-button-group {
126
- display: flex;
127
- align-items: center;
128
- margin: 2px 0 15px;
129
-
130
- .is-primary {
131
- padding: 2px 20px;
132
- height: auto;
133
- font-size: 14px;
134
- margin-right: 10px;
135
- }
136
- }
137
- }
138
- }
139
- }
140
- }
141
-
142
- .otter-info {
143
- padding: 0 10px 10px;
144
- background-image: url( '../assets/images/logo-alt.png' );
145
- background-size: 100px;
146
- background-repeat: no-repeat;
147
- background-position: bottom right;
148
-
149
- h2 {
150
- font-weight: 300;
151
- margin-bottom: 10px;
152
- }
153
-
154
- p {
155
- margin: 0 0 1.5em 0;
156
- }
157
-
158
- .otter-info-button-group {
159
- display: flex;
160
-
161
- .is-default {
162
- padding: 2px 20px;
163
- height: auto;
164
- font-size: 14px;
165
-
166
- &:first-child {
167
- margin-right: 15px;
168
- }
169
- }
170
- }
171
- }
172
- }
173
- }
174
-
175
- .otter-footer {
176
- text-align: center;
177
- color: #72777c;
178
- font-style: italic;
179
- border-top: 1px #e1e1e1 solid;
180
- border-bottom: 1px #e1e1e1 solid;
181
- padding: 20px;
182
- margin: 2rem 0 1.5rem;
183
-
184
- .otter-container {
185
- margin: 0 auto;
186
- }
187
- }
188
-
189
- .components-placeholder {
190
- background: #f6f6f6;
191
- margin-top: 25vh;
192
- margin-bottom: 25vh;
193
- }
194
- }
195
-
196
- .otter-onboarding-modal {
197
- max-width: 350px;
198
-
199
- .components-modal__header {
200
- text-align: center;
201
-
202
- h1 {
203
- width: 100%;
204
- }
205
- }
206
-
207
- .otter-onboarding-modal-content {
208
- text-align: center;
209
- margin: 10px 0 15px;
210
- }
211
-
212
- .otter-onboarding-modal-action {
213
- text-align: center;
214
- margin: 10px 0;
215
-
216
- .components-button {
217
- padding: 2px 20px;
218
- height: auto;
219
- font-size: 14px;
220
- margin-right: 10px;
221
- }
222
- }
223
- }
224
-
225
- .components-modal__screen-overlay {
226
- background-color: rgba(0, 0, 0, 0.5);
227
- }
228
-
229
- .react-joyride__tooltip {
230
- font-size: 13px !important;
231
-
232
- > div {
233
- text-align: left !important;
234
- }
235
-
236
- div {
237
- &:nth-of-type( 2 ) {
238
- margin-top: 5px !important;
239
- }
240
- }
241
-
242
- button {
243
- text-decoration: underline;
244
- }
245
- }
246
-
247
- .react-joyride__beacon {
248
- span {
249
- &:first-child {
250
- background-color: #00739c !important;
251
- }
252
-
253
- &:last-child {
254
- background-color: rgba(26, 129, 165, 0.4) !important;
255
- border: 2px solid #00739c !important;
256
- }
257
- }
258
- }
259
-
260
- .react-joyride__tooltip {
261
- button {
262
- &[data-action="primary"] {
263
- background: #0085ba !important;
264
- border-color: #006a95 #00648c #00648c !important;
265
- box-shadow: inset 0 -1px 0 #00648c !important;
266
- color: #fff !important;
267
- text-decoration: none !important;
268
- text-shadow: 0 -1px 1px #005d82,1px 0 1px #005d82,0 1px 1px #005d82,-1px 0 1px #005d82 !important;
269
- padding: 2px 20px !important;
270
- height: auto !important;
271
- line-height: 28px !important;
272
- font-size: 14px !important;
273
- }
274
-
275
- &[data-action="back"] {
276
- color: #23282d !important;
277
- font-size: 14px !important;
278
- }
279
- }
280
- }
281
-
282
- .react-notification-root {
283
- .notification-container-top-right {
284
- top: 50px;
285
- }
286
- }
287
-
288
- .notification-item-root {
289
-
290
- .notification-content {
291
- padding: 12px 15px;
292
- }
293
- .notification-close {
294
- top: auto;
295
- }
296
- }
297
-
298
- @media ( min-width: 782px ) {
299
-
300
- .react-joyride__spotlight,
301
- .__floater,
302
- .__floater__open,
303
- .react-joyride__beacon {
304
- margin-top: -32px;
305
- }
306
- }
307
-
308
- @media ( max-width: 782px ) {
309
- #otter {
310
- .otter-header {
311
-
312
- .otter-container {
313
-
314
- .otter-logo {
315
- justify-content: center;
316
- }
317
- }
318
- }
319
-
320
- .otter-info {
321
- background-image: none !important;
322
- }
323
- }
324
-
325
- .react-joyride__spotlight,
326
- .__floater,
327
- .__floater__open,
328
- .react-joyride__beacon {
329
- margin-top: -44px;
330
- }
331
- }
332
-
333
- @media ( max-width: 600px ) {
334
- .react-joyride__spotlight,
335
- .__floater,
336
- .__floater__open,
337
- .react-joyride__beacon {
338
- margin-top: 0;
339
- }
340
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInita8c63f4e9c2954bc69536840bf87006d::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite4069214b60b0efef4a17b4633ac2190::getLoader();
vendor/codeinwp/gutenberg-animation/src/data.js DELETED
@@ -1,400 +0,0 @@
1
- /**
2
- * WordPress dependencies.
3
- */
4
- const { __ } = wp.i18n;
5
-
6
- export const animationsList = [
7
- {
8
- label: __( 'None' ),
9
- value: 'none'
10
- },
11
- {
12
- label: __( 'Bounce' ),
13
- value: 'bounce'
14
- },
15
- {
16
- label: __( 'Flash' ),
17
- value: 'flash'
18
- },
19
- {
20
- label: __( 'Pulse' ),
21
- value: 'pulse'
22
- },
23
- {
24
- label: __( 'Rubber Band' ),
25
- value: 'rubberBand'
26
- },
27
- {
28
- label: __( 'Shake' ),
29
- value: 'shake'
30
- },
31
- {
32
- label: __( 'Head Shake' ),
33
- value: 'headShake'
34
- },
35
- {
36
- label: __( 'Swing' ),
37
- value: 'swing'
38
- },
39
- {
40
- label: __( 'TaDa' ),
41
- value: 'tada'
42
- },
43
- {
44
- label: __( 'Wobble' ),
45
- value: 'wobble'
46
- },
47
- {
48
- label: __( 'Jello' ),
49
- value: 'jello'
50
- },
51
- {
52
- label: __( 'Heart Beat' ),
53
- value: 'heartBeat'
54
- },
55
- {
56
- label: __( 'Hinge' ),
57
- value: 'hinge'
58
- },
59
- {
60
- label: __( 'Jack In The Box' ),
61
- value: 'jackInTheBox'
62
- },
63
- {
64
- label: __( 'Bounce In' ),
65
- value: 'bounceIn'
66
- },
67
- {
68
- label: __( 'Bounce In Down' ),
69
- value: 'bounceInDown'
70
- },
71
- {
72
- label: __( 'Bounce In Left' ),
73
- value: 'bounceInLeft'
74
- },
75
- {
76
- label: __( 'Bounce In Right' ),
77
- value: 'bounceInRight'
78
- },
79
- {
80
- label: __( 'Bounce In Up' ),
81
- value: 'bounceInUp'
82
- },
83
- {
84
- label: __( 'Bounce Out' ),
85
- value: 'bounceOut'
86
- },
87
- {
88
- label: __( 'Bounce Out Down' ),
89
- value: 'bounceOutDown'
90
- },
91
- {
92
- label: __( 'Bounce Out Left' ),
93
- value: 'bounceOutLeft'
94
- },
95
- {
96
- label: __( 'Bounce Out Right' ),
97
- value: 'bounceOutRight'
98
- },
99
- {
100
- label: __( 'Bounce Out Up' ),
101
- value: 'bounceOutUp'
102
- },
103
- {
104
- label: __( 'Fade In' ),
105
- value: 'fadeIn'
106
- },
107
- {
108
- label: __( 'Fade In Down' ),
109
- value: 'fadeInDown'
110
- },
111
- {
112
- label: __( 'Fade In Down Big' ),
113
- value: 'fadeInDownBig'
114
- },
115
- {
116
- label: __( 'Fade In Left' ),
117
- value: 'fadeInLeft'
118
- },
119
- {
120
- label: __( 'Fade In Left Big' ),
121
- value: 'fadeInLeftBig'
122
- },
123
- {
124
- label: __( 'Fade In Right' ),
125
- value: 'fadeInRight'
126
- },
127
- {
128
- label: __( 'Fade In Left Big' ),
129
- value: 'fadeInRightBig'
130
- },
131
- {
132
- label: __( 'Fade In Up' ),
133
- value: 'fadeInUp'
134
- },
135
- {
136
- label: __( 'Fade Out' ),
137
- value: 'fadeOut'
138
- },
139
- {
140
- label: __( 'Fade Out Down' ),
141
- value: 'fadeOutDown'
142
- },
143
- {
144
- label: __( 'Fade Out Down Big' ),
145
- value: 'fadeOutDownBig'
146
- },
147
- {
148
- label: __( 'Fade Out Left' ),
149
- value: 'fadeOutLeft'
150
- },
151
- {
152
- label: __( 'Fade Out Left Big' ),
153
- value: 'fadeOutLeftBig'
154
- },
155
- {
156
- label: __( 'Fade Out Right' ),
157
- value: 'fadeOutRight'
158
- },
159
- {
160
- label: __( 'Fade In Left Big' ),
161
- value: 'fadeOutRightBig'
162
- },
163
- {
164
- label: __( 'Fade Out Up' ),
165
- value: 'fadeOutUp'
166
- },
167
- {
168
- label: __( 'Fade Out Up Big' ),
169
- value: 'fadeOutUpBig'
170
- },
171
- {
172
- label: __( 'Flip' ),
173
- value: 'flip'
174
- },
175
- {
176
- label: __( 'Flip In X' ),
177
- value: 'flipInX'
178
- },
179
- {
180
- label: __( 'Flip In Y' ),
181
- value: 'flipInY'
182
- },
183
- {
184
- label: __( 'Flip Out X' ),
185
- value: 'flipOutX'
186
- },
187
- {
188
- label: __( 'Flip Out Y' ),
189
- value: 'flipOutY'
190
- },
191
- {
192
- label: __( 'Light Speed In' ),
193
- value: 'lightSpeedIn'
194
- },
195
- {
196
- label: __( 'Light Speed Out' ),
197
- value: 'lightSpeedOut'
198
- },
199
- {
200
- label: __( 'Rotate In' ),
201
- value: 'rotateIn'
202
- },
203
- {
204
- label: __( 'Rotate In Down Left' ),
205
- value: 'rotateInDownLeft'
206
- },
207
- {
208
- label: __( 'Rotate In Down Right' ),
209
- value: 'rotateInDownRight'
210
- },
211
- {
212
- label: __( 'Rotate In Up Left' ),
213
- value: 'rotateInUpLeft'
214
- },
215
- {
216
- label: __( 'Rotate In Up Right' ),
217
- value: 'rotateInUpRight'
218
- },
219
- {
220
- label: __( 'Rotate Out' ),
221
- value: 'rotateOut'
222
- },
223
- {
224
- label: __( 'Rotate Out Down Left' ),
225
- value: 'rotateOutDownLeft'
226
- },
227
- {
228
- label: __( 'Rotate Out Down Right' ),
229
- value: 'rotateOutDownRight'
230
- },
231
- {
232
- label: __( 'Rotate Out Up Left' ),
233
- value: 'rotateOutUpLeft'
234
- },
235
- {
236
- label: __( 'Rotate Out Up Right' ),
237
- value: 'rotateOutUpRight'
238
- },
239
- {
240
- label: __( 'Slide In Down' ),
241
- value: 'slideInDown'
242
- },
243
- {
244
- label: __( 'Slide In Left' ),
245
- value: 'slideInLeft'
246
- },
247
- {
248
- label: __( 'Slide In Right' ),
249
- value: 'slideInRight'
250
- },
251
- {
252
- label: __( 'Slide In Up' ),
253
- value: 'slideInUp'
254
- },
255
- {
256
- label: __( 'Slide Out Down' ),
257
- value: 'slideOutDown'
258
- },
259
- {
260
- label: __( 'Slide Out Left' ),
261
- value: 'slideOutLeft'
262
- },
263
- {
264
- label: __( 'Slide Out Right' ),
265
- value: 'slideOutRight'
266
- },
267
- {
268
- label: __( 'Slide Out Up' ),
269
- value: 'slideOutUp'
270
- },
271
- {
272
- label: __( 'Zoom In' ),
273
- value: 'zoomIn'
274
- },
275
- {
276
- label: __( 'Zoom In Down' ),
277
- value: 'zoomInDown'
278
- },
279
- {
280
- label: __( 'Zoom In Left' ),
281
- value: 'zoomInLeft'
282
- },
283
- {
284
- label: __( 'Zoom In Right' ),
285
- value: 'zoomInRight'
286
- },
287
- {
288
- label: __( 'Zoom In Up' ),
289
- value: 'zoomInUp'
290
- },
291
- {
292
- label: __( 'Zoom Out' ),
293
- value: 'zoomOut'
294
- },
295
- {
296
- label: __( 'Zoom Out Down' ),
297
- value: 'zoomOutDown'
298
- },
299
- {
300
- label: __( 'Zoom Out Left' ),
301
- value: 'zoomOutLeft'
302
- },
303
- {
304
- label: __( 'Zoom Out Right' ),
305
- value: 'zoomOutRight'
306
- },
307
- {
308
- label: __( 'Zoom Out Up' ),
309
- value: 'zoomOutUp'
310
- },
311
- {
312
- label: __( 'Roll In' ),
313
- value: 'rollIn'
314
- },
315
- {
316
- label: __( 'Roll Out' ),
317
- value: 'rollOut'
318
- }
319
- ];
320
-
321
- export const outAnimation = [
322
- 'bounceOut',
323
- 'bounceOutDown',
324
- 'bounceOutLeft',
325
- 'bounceOutRight',
326
- 'bounceOutUp',
327
- 'fadeOut',
328
- 'fadeOutDown',
329
- 'fadeOutDownBig',
330
- 'fadeOutLeft',
331
- 'fadeOutLeftBig',
332
- 'fadeOutRight',
333
- 'fadeOutRightBig',
334
- 'fadeOutUp',
335
- 'fadeOutUpBig',
336
- 'flipOutX',
337
- 'flipOutY',
338
- 'lightSpeedOut',
339
- 'rotateOut',
340
- 'rotateOutDownLeft',
341
- 'rotateOutDownRight',
342
- 'rotateOutUpLeft',
343
- 'rotateOutUpRight',
344
- 'slideOutDown',
345
- 'slideOutLeft',
346
- 'slideOutRight',
347
- 'slideOutUp',
348
- 'zoomOut',
349
- 'zoomOutDown',
350
- 'zoomOutLeft',
351
- 'zoomOutRight',
352
- 'zoomOutUp',
353
- 'rollOut'
354
- ];
355
-
356
- export const delayList = [
357
- {
358
- label: __( 'Default' ),
359
- value: 'none'
360
- },
361
- {
362
- label: __( 'Two Second' ),
363
- value: 'delay-2s'
364
- },
365
- {
366
- label: __( 'Three Second' ),
367
- value: 'delay-3s'
368
- },
369
- {
370
- label: __( 'Four Second' ),
371
- value: 'delay-4s'
372
- },
373
- {
374
- label: __( 'Five Second' ),
375
- value: 'delay-5s'
376
- }
377
- ];
378
-
379
- export const speedList = [
380
- {
381
- label: __( 'Default' ),
382
- value: 'none'
383
- },
384
- {
385
- label: __( 'Slow' ),
386
- value: 'slow'
387
- },
388
- {
389
- label: __( 'Slower' ),
390
- value: 'slower'
391
- },
392
- {
393
- label: __( 'Fast' ),
394
- value: 'fast'
395
- },
396
- {
397
- label: __( 'Faster' ),
398
- value: 'faster'
399
- }
400
- ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-animation/src/editor.js DELETED
@@ -1,206 +0,0 @@
1
- /**
2
- * WordPress dependencies.
3
- */
4
- const { __ } = wp.i18n;
5
-
6
- const {
7
- SelectControl
8
- } = wp.components;
9
-
10
- const {
11
- Component,
12
- Fragment
13
- } = wp.element;
14
-
15
- /**
16
- * Internal dependencies.
17
- */
18
- import {
19
- animationsList,
20
- outAnimation,
21
- delayList,
22
- speedList
23
- } from './data.js';
24
-
25
- class AnimationControls extends Component {
26
- constructor() {
27
- super( ...arguments );
28
-
29
- this.updateAnimation = this.updateAnimation.bind( this );
30
- this.updateDelay = this.updateDelay.bind( this );
31
- this.updateSpeed = this.updateSpeed.bind( this );
32
-
33
- this.state = {
34
- animation: 'none',
35
- delay: 'default',
36
- speed: 'default'
37
- };
38
- }
39
-
40
- componentDidMount() {
41
- let classes;
42
-
43
- if ( this.props.attributes.className ) {
44
- classes = this.props.attributes.className;
45
- classes = classes.split( ' ' );
46
-
47
- const animationClass = Array.from( animationsList ).find( i => {
48
- return classes.find( o => o === i.value );
49
- });
50
-
51
- const delayClass = Array.from( delayList ).find( i => {
52
- return classes.find( o => o === i.value );
53
- });
54
-
55
- const speedClass = Array.from( speedList ).find( i => {
56
- return classes.find( o => o === i.value );
57
- });
58
-
59
- this.setState({
60
- animation: animationClass ? animationClass.value : 'none',
61
- delay: delayClass ? delayClass.value : 'default',
62
- speed: speedClass ? speedClass.value : 'default'
63
- });
64
- }
65
- }
66
-
67
- async updateAnimation( e ) {
68
- let classes;
69
- let animationValue = 'none' !== e ? e : '';
70
-
71
- if ( this.props.attributes.className ) {
72
- classes = this.props.attributes.className;
73
- classes = classes.split( ' ' );
74
- const exists = classes.find( i => i === this.state.animation );
75
- const animatedExists = classes.find( i => 'animated' === i );
76
-
77
- if ( ! animatedExists ) {
78
- classes.push( 'animated' );
79
- }
80
-
81
- if ( exists ) {
82
- classes = classes.join( ' ' ).replace( this.state.animation, animationValue );
83
- } else {
84
- classes.push( animationValue );
85
- classes = classes.join( ' ' );
86
- }
87
- } else {
88
- classes = `animated ${ animationValue }`;
89
- }
90
-
91
- if ( 'none' === e ) {
92
- classes = classes.replace( 'animated', '' ).replace( this.state.delay, '' ).replace( this.state.speed, '' );
93
-
94
- this.setState({
95
- delay: 'default',
96
- speed: 'defualt'
97
- });
98
- }
99
-
100
- classes = classes.replace( /\s+/g, ' ' );
101
-
102
- this.setState({ animation: e });
103
- await this.props.setAttributes({ className: classes });
104
-
105
- let block = document.querySelector( `#block-${ this.props.clientId } .animated` );
106
-
107
- if ( block ) {
108
- outAnimation.forEach( i => {
109
- const isOut = block.className.includes( i );
110
-
111
- if ( isOut ) {
112
- block.addEventListener( 'animationend', () => {
113
- block.classList.remove( i );
114
-
115
- block.addEventListener( 'animationstart', () => {
116
- block.classList.remove( i );
117
- });
118
- });
119
- }
120
- });
121
- }
122
- }
123
-
124
- updateDelay( e ) {
125
- let classes;
126
- let delayValue = 'none' !== e ? e : '';
127
-
128
- if ( this.props.attributes.className ) {
129
- classes = this.props.attributes.className;
130
- classes = classes.split( ' ' );
131
- const exists = classes.find( i => i === this.state.delay );
132
-
133
- if ( exists ) {
134
- classes = classes.join( ' ' ).replace( this.state.delay, delayValue );
135
- } else {
136
- classes.push( delayValue );
137
- classes = classes.join( ' ' );
138
- }
139
- } else {
140
- classes = delayValue;
141
- }
142
-
143
- classes = classes.replace( /\s+/g, ' ' );
144
-
145
- this.setState({ delay: e });
146
- this.props.setAttributes({ className: classes });
147
- }
148
-
149
- updateSpeed( e ) {
150
- let classes;
151
- let speedValue = 'none' !== e ? e : '';
152
-
153
- if ( this.props.attributes.className ) {
154
- classes = this.props.attributes.className;
155
- classes = classes.split( ' ' );
156
- const exists = classes.find( i => i === this.state.speed );
157
-
158
- if ( exists ) {
159
- classes = classes.join( ' ' ).replace( this.state.speed, speedValue );
160
- } else {
161
- classes.push( speedValue );
162
- classes = classes.join( ' ' );
163
- }
164
- } else {
165
- classes = speedValue;
166
- }
167
-
168
- classes = classes.replace( /\s+/g, ' ' );
169
-
170
- this.setState({ speed: e });
171
- this.props.setAttributes({ className: classes });
172
- }
173
-
174
- render() {
175
- return (
176
- <Fragment>
177
- <SelectControl
178
- label={ __( 'Animation' ) }
179
- value={ this.state.animation || 'none' }
180
- options={ animationsList }
181
- onChange={ this.updateAnimation }
182
- />
183
-
184
- { 'none' !== this.state.animation && (
185
- <Fragment>
186
- <SelectControl
187
- label={ __( 'Delay' ) }
188
- value={ this.state.delay || 'default' }
189
- options={ delayList }
190
- onChange={ this.updateDelay }
191
- />
192
-
193
- <SelectControl
194
- label={ __( 'Speed' ) }
195
- value={ this.state.speed || 'default' }
196
- options={ speedList }
197
- onChange={ this.updateSpeed }
198
- />
199
- </Fragment>
200
- ) }
201
- </Fragment>
202
- );
203
- }
204
- }
205
-
206
- export default AnimationControls;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-animation/src/frontend.js DELETED
@@ -1,210 +0,0 @@
1
- const animations = [
2
- 'none',
3
- 'bounce',
4
- 'flash',
5
- 'pulse',
6
- 'rubberBand',
7
- 'shake',
8
- 'headShake',
9
- 'swing',
10
- 'tada',
11
- 'wobble',
12
- 'jello',
13
- 'heartBeat',
14
- 'hinge',
15
- 'jackInTheBox',
16
- 'bounceIn',
17
- 'bounceInDown',
18
- 'bounceInLeft',
19
- 'bounceInRight',
20
- 'bounceInUp',
21
- 'bounceOut',
22
- 'bounceOutDown',
23
- 'bounceOutLeft',
24
- 'bounceOutRight',
25
- 'bounceOutUp',
26
- 'fadeIn',
27
- 'fadeInDown',
28
- 'fadeInDownBig',
29
- 'fadeInLeft',
30
- 'fadeInLeftBig',
31
- 'fadeInRight',
32
- 'fadeInRightBig',
33
- 'fadeInUp',
34
- 'fadeOut',
35
- 'fadeOutDown',
36
- 'fadeOutDownBig',
37
- 'fadeOutLeft',
38
- 'fadeOutLeftBig',
39
- 'fadeOutRight',
40
- 'fadeOutRightBig',
41
- 'fadeOutUp',
42
- 'fadeOutUpBig',
43
- 'flip',
44
- 'flipInX',
45
- 'flipInY',
46
- 'flipOutX',
47
- 'flipOutY',
48
- 'lightSpeedIn',
49
- 'lightSpeedOut',
50
- 'rotateIn',
51
- 'rotateInDownLeft',
52
- 'rotateInDownRight',
53
- 'rotateInUpLeft',
54
- 'rotateInUpRight',
55
- 'rotateOut',
56
- 'rotateOutDownLeft',
57
- 'rotateOutDownRight',
58
- 'rotateOutUpLeft',
59
- 'rotateOutUpRight',
60
- 'slideInDown',
61
- 'slideInLeft',
62
- 'slideInRight',
63
- 'slideInUp',
64
- 'slideOutDown',
65
- 'slideOutLeft',
66
- 'slideOutRight',
67
- 'slideOutUp',
68
- 'zoomIn',
69
- 'zoomInDown',
70
- 'zoomInLeft',
71
- 'zoomInRight',
72
- 'zoomInUp',
73
- 'zoomOut',
74
- 'zoomOutDown',
75
- 'zoomOutLeft',
76
- 'zoomOutRight',
77
- 'zoomOutUp',
78
- 'rollIn',
79
- 'rollOut'
80
- ];
81
-
82
- const outAnimation = [
83
- 'bounceOut',
84
- 'bounceOutDown',
85
- 'bounceOutLeft',
86
- 'bounceOutRight',
87
- 'bounceOutUp',
88
- 'fadeOut',
89
- 'fadeOutDown',
90
- 'fadeOutDownBig',
91
- 'fadeOutLeft',
92
- 'fadeOutLeftBig',
93
- 'fadeOutRight',
94
- 'fadeOutRightBig',
95
- 'fadeOutUp',
96
- 'fadeOutUpBig',
97
- 'flipOutX',
98
- 'flipOutY',
99
- 'lightSpeedOut',
100
- 'rotateOut',
101
- 'rotateOutDownLeft',
102
- 'rotateOutDownRight',
103
- 'rotateOutUpLeft',
104
- 'rotateOutUpRight',
105
- 'slideOutDown',
106
- 'slideOutLeft',
107
- 'slideOutRight',
108
- 'slideOutUp',
109
- 'zoomOut',
110
- 'zoomOutDown',
111
- 'zoomOutLeft',
112
- 'zoomOutRight',
113
- 'zoomOutUp',
114
- 'rollOut'
115
- ];
116
-
117
- const delay = [
118
- 'none',
119
- 'delay-2s',
120
- 'delay-3s',
121
- 'delay-4s',
122
- 'delay-5s'
123
- ];
124
-
125
- const speed = [
126
- 'none',
127
- 'slow',
128
- 'slower',
129
- 'fast',
130
- 'faster'
131
- ];
132
-
133
- window.onload = () => {
134
- const elements = document.querySelectorAll( '.animated' );
135
- for ( const element of elements ) {
136
- classes = element.classList;
137
- element.animationClasses = [];
138
-
139
- if ( ! isElementInViewport( element ) ) {
140
- const animationClass = animations.find( i => {
141
- return Array.from( classes ).find( o => o === i );
142
- });
143
-
144
- const delayClass = delay.find( i => {
145
- return Array.from( classes ).find( o => o === i );
146
- });
147
-
148
- const speedClass = speed.find( i => {
149
- return Array.from( classes ).find( o => o === i );
150
- });
151
-
152
- element.classList.add( 'hidden-animated' );
153
-
154
- if ( animationClass ) {
155
- element.animationClasses.push( animationClass );
156
- element.classList.remove( animationClass );
157
- }
158
-
159
- if ( delayClass ) {
160
- element.animationClasses.push( delayClass );
161
- element.classList.remove( delayClass );
162
- }
163
-
164
- if ( speedClass ) {
165
- element.animationClasses.push( speedClass );
166
- element.classList.remove( speedClass );
167
- }
168
- }
169
-
170
- outAnimation.forEach( i => {
171
- const isOut = element.className.includes( i );
172
-
173
- if ( isOut ) {
174
- element.addEventListener( 'animationend', () => {
175
- element.classList.remove( i );
176
- });
177
- }
178
- });
179
- }
180
-
181
- window.onscroll = () => {
182
- for ( const element of elements ) {
183
- if ( element.getBoundingClientRect().top <= window.innerHeight * 0.75 && 0 < element.getBoundingClientRect().top ) {
184
- if ( element.animationClasses && 0 < element.animationClasses.length ) {
185
- const classes = element.animationClasses;
186
- classes.forEach( i => element.classList.add( i ) );
187
- element.classList.remove( 'hidden-animated' );
188
- delete element.animationClasses;
189
- }
190
- }
191
- }
192
- };
193
- };
194
-
195
- const isElementInViewport = el => {
196
- const scroll = window.scrollY || window.pageYOffset;
197
- const boundsTop = el.getBoundingClientRect().top + scroll;
198
-
199
- const viewport = {
200
- top: scroll,
201
- bottom: scroll + window.innerHeight
202
- };
203
-
204
- const bounds = {
205
- top: boundsTop,
206
- bottom: boundsTop + el.clientHeight
207
- };
208
-
209
- return ( bounds.bottom >= viewport.top && bounds.bottom <= viewport.bottom ) || ( bounds.top <= viewport.bottom && bounds.top >= viewport.top );
210
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-animation/src/index.js DELETED
@@ -1,50 +0,0 @@
1
- /**
2
- * WordPress dependencies.
3
- */
4
- const { __ } = wp.i18n;
5
-
6
- const { hasBlockSupport } = wp.blocks;
7
-
8
- const { PanelBody } = wp.components;
9
-
10
- const { createHigherOrderComponent } = wp.compose;
11
-
12
- const { InspectorControls } = wp.blockEditor || wp.editor;
13
-
14
- const { Fragment } = wp.element;
15
-
16
- const { addFilter } = wp.hooks;
17
-
18
- /**
19
- * Internal dependencies.
20
- */
21
- import AnimationControls from './editor.js';
22
-
23
- const withInspectorControls = createHigherOrderComponent( ( BlockEdit ) => {
24
- return ( props ) => {
25
- const hasCustomClassName = hasBlockSupport( props.name, 'customClassName', true );
26
- if ( hasCustomClassName && props.isSelected ) {
27
- return (
28
- <Fragment>
29
- <BlockEdit { ...props } />
30
- <InspectorControls>
31
- <PanelBody
32
- title={ __( 'Animations' ) }
33
- initialOpen={ false }
34
- >
35
- <AnimationControls
36
- clientId={ props.clientId }
37
- setAttributes={ props.setAttributes }
38
- attributes={ props.attributes }
39
- />
40
- </PanelBody>
41
- </InspectorControls>
42
- </Fragment>
43
- );
44
- }
45
-
46
- return <BlockEdit { ...props } />;
47
- };
48
- }, 'withInspectorControl' );
49
-
50
- addFilter( 'editor.BlockEdit', 'themeisle-custom-css/with-inspector-controls', withInspectorControls );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-animation/webpack.config.js DELETED
@@ -1,56 +0,0 @@
1
- const webpack = require( 'webpack' );
2
- const NODE_ENV = process.env.NODE_ENV || 'development';
3
-
4
- module.exports = {
5
- mode: NODE_ENV,
6
- entry: {
7
- build: './src/index.js',
8
- animate: './src/frontend.js'
9
- },
10
- output: {
11
- path: __dirname,
12
- filename: './build/[name].js',
13
- chunkFilename: './build/[name].js'
14
- },
15
- module: {
16
- rules: [
17
- {
18
- test: /.js?$/,
19
- use: [ {
20
- loader: 'babel-loader',
21
- options: {
22
- presets: [ '@babel/preset-env' ],
23
- plugins: [
24
- '@babel/plugin-transform-async-to-generator',
25
- '@babel/plugin-proposal-object-rest-spread',
26
- [
27
- '@babel/plugin-transform-react-jsx', {
28
- 'pragma': 'wp.element.createElement'
29
- }
30
- ]
31
- ]
32
- }
33
- },
34
- 'eslint-loader' ],
35
- exclude: /node_modules/
36
- }
37
- ]
38
- },
39
- optimization: {
40
- splitChunks: {
41
- cacheGroups: {
42
- animate: {
43
- name: 'animate',
44
- test: /frontend\.js$/,
45
- chunks: 'all',
46
- reuseExistingChunk: true
47
- }
48
- }
49
- }
50
- },
51
- plugins: [
52
- new webpack.DefinePlugin({
53
- 'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
54
- })
55
- ]
56
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-blocks/src/frontend/google-map/index.js DELETED
@@ -1,71 +0,0 @@
1
- /**
2
- * Internal dependencies
3
- */
4
- import styles from './styles.js';
5
-
6
- const initMapScript = () => {
7
- let maps = [];
8
- maps = window.themeisleGoogleMaps;
9
-
10
- maps.forEach( map => {
11
- const googleMap = new google.maps.Map( document.getElementById( map.container ), {
12
- center: {
13
- lat: Number( map.attributes.latitude ),
14
- lng: Number( map.attributes.longitude )
15
- },
16
- gestureHandling: 'cooperative',
17
- zoom: map.attributes.zoom,
18
- mapTypeId: map.attributes.type,
19
- draggable: map.attributes.draggable,
20
- mapTypeControl: map.attributes.mapTypeControl,
21
- zoomControl: map.attributes.zoomControl,
22
- fullscreenControl: map.attributes.fullscreenControl,
23
- streetViewControl: map.attributes.streetViewControl,
24
- styles: styles[ map.attributes.style || 'standard' ]
25
- });
26
-
27
- if ( ! map.attributes.id && map.attributes.location ) {
28
- const request = {
29
- query: map.attributes.location,
30
- fields: [ 'name', 'geometry' ]
31
- };
32
-
33
- const service = new google.maps.places.PlacesService( googleMap );
34
-
35
- service.findPlaceFromQuery( request, ( results, status ) => {
36
- if ( status === google.maps.places.PlacesServiceStatus.OK ) {
37
- if ( 0 < results.length ) {
38
- googleMap.setCenter( results[0].geometry.location );
39
- }
40
- }
41
- });
42
- }
43
-
44
- if ( map.attributes.markers && 0 < map.attributes.markers.length ) {
45
- map.attributes.markers.forEach( marker => {
46
- const position = new google.maps.LatLng( marker.latitude, marker.longitude );
47
-
48
- const mark = new google.maps.Marker({
49
- position,
50
- map: googleMap,
51
- title: marker.title,
52
- icon: marker.icon || 'https://maps.google.com/mapfiles/ms/icons/red-dot.png'
53
- });
54
-
55
- if ( marker.title || marker.description ) {
56
- const contentString = `<div class="wp-block-themeisle-blocks-map-overview"><h6 class="wp-block-themeisle-blocks-map-overview-title">${ marker.title }</h6><div class="wp-block-themeisle-blocks-map-overview-content">${ marker.description ? `<p>${ marker.description }</p>` : '' }</div></div>`;
57
-
58
- const infowindow = new google.maps.InfoWindow({
59
- content: contentString
60
- });
61
-
62
- mark.addListener( 'click', () => {
63
- infowindow.open( googleMap, mark );
64
- });
65
- }
66
- });
67
- }
68
- });
69
- };
70
-
71
- window.initMapScript = initMapScript;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-blocks/src/frontend/google-map/styles.js DELETED
@@ -1,960 +0,0 @@
1
- const styles = {
2
- standard: [],
3
- silver: [
4
- {
5
- 'elementType': 'geometry',
6
- 'stylers': [
7
- {
8
- 'color': '#f5f5f5'
9
- }
10
- ]
11
- },
12
- {
13
- 'elementType': 'labels.icon',
14
- 'stylers': [
15
- {
16
- 'visibility': 'off'
17
- }
18
- ]
19
- },
20
- {
21
- 'elementType': 'labels.text.fill',
22
- 'stylers': [
23
- {
24
- 'color': '#616161'
25
- }
26
- ]
27
- },
28
- {
29
- 'elementType': 'labels.text.stroke',
30
- 'stylers': [
31
- {
32
- 'color': '#f5f5f5'
33
- }
34
- ]
35
- },
36
- {
37
- 'featureType': 'administrative.land_parcel',
38
- 'elementType': 'labels.text.fill',
39
- 'stylers': [
40
- {
41
- 'color': '#bdbdbd'
42
- }
43
- ]
44
- },
45
- {
46
- 'featureType': 'poi',
47
- 'elementType': 'geometry',
48
- 'stylers': [
49
- {
50
- 'color': '#eeeeee'
51
- }
52
- ]
53
- },
54
- {
55
- 'featureType': 'poi',
56
- 'elementType': 'labels.text.fill',
57
- 'stylers': [
58
- {
59
- 'color': '#757575'
60
- }
61
- ]
62
- },
63
- {
64
- 'featureType': 'poi.park',
65
- 'elementType': 'geometry',
66
- 'stylers': [
67
- {
68
- 'color': '#e5e5e5'
69
- }
70
- ]
71
- },
72
- {
73
- 'featureType': 'poi.park',
74
- 'elementType': 'labels.text.fill',
75
- 'stylers': [
76
- {
77
- 'color': '#9e9e9e'
78
- }
79
- ]
80
- },
81
- {
82
- 'featureType': 'road',
83
- 'elementType': 'geometry',
84
- 'stylers': [
85
- {
86
- 'color': '#ffffff'
87
- }
88
- ]
89
- },
90
- {
91
- 'featureType': 'road.arterial',
92
- 'elementType': 'labels.text.fill',
93
- 'stylers': [
94
- {
95
- 'color': '#757575'
96
- }
97
- ]
98
- },
99
- {
100
- 'featureType': 'road.highway',
101
- 'elementType': 'geometry',
102
- 'stylers': [
103
- {
104
- 'color': '#dadada'
105
- }
106
- ]
107
- },
108
- {
109
- 'featureType': 'road.highway',
110
- 'elementType': 'labels.text.fill',
111
- 'stylers': [
112
- {
113
- 'color': '#616161'
114
- }
115
- ]
116
- },
117
- {
118
- 'featureType': 'road.local',
119
- 'elementType': 'labels.text.fill',
120
- 'stylers': [
121
- {
122
- 'color': '#9e9e9e'
123
- }
124
- ]
125
- },
126
- {
127
- 'featureType': 'transit.line',
128
- 'elementType': 'geometry',
129
- 'stylers': [
130
- {
131
- 'color': '#e5e5e5'
132
- }
133
- ]
134
- },
135
- {
136
- 'featureType': 'transit.station',
137
- 'elementType': 'geometry',
138
- 'stylers': [
139
- {
140
- 'color': '#eeeeee'
141
- }
142
- ]
143
- },
144
- {
145
- 'featureType': 'water',
146
- 'elementType': 'geometry',
147
- 'stylers': [
148
- {
149
- 'color': '#c9c9c9'
150
- }
151
- ]
152
- },
153
- {
154
- 'featureType': 'water',
155
- 'elementType': 'labels.text.fill',
156
- 'stylers': [
157
- {
158
- 'color': '#9e9e9e'
159
- }
160
- ]
161
- }
162
- ],
163
- retro: [
164
- {
165
- 'elementType': 'geometry',
166
- 'stylers': [
167
- {
168
- 'color': '#ebe3cd'
169
- }
170
- ]
171
- },
172
- {
173
- 'elementType': 'labels.text.fill',
174
- 'stylers': [
175
- {
176
- 'color': '#523735'
177
- }
178
- ]
179
- },
180
- {
181
- 'elementType': 'labels.text.stroke',
182
- 'stylers': [
183
- {
184
- 'color': '#f5f1e6'
185
- }
186
- ]
187
- },
188
- {
189
- 'featureType': 'administrative',
190
- 'elementType': 'geometry.stroke',
191
- 'stylers': [
192
- {
193
- 'color': '#c9b2a6'
194
- }
195
- ]
196
- },
197
- {
198
- 'featureType': 'administrative.land_parcel',
199
- 'elementType': 'geometry.stroke',
200
- 'stylers': [
201
- {
202
- 'color': '#dcd2be'
203
- }
204
- ]
205
- },
206
- {
207
- 'featureType': 'administrative.land_parcel',
208
- 'elementType': 'labels.text.fill',
209
- 'stylers': [
210
- {
211
- 'color': '#ae9e90'
212
- }
213
- ]
214
- },
215
- {
216
- 'featureType': 'landscape.natural',
217
- 'elementType': 'geometry',
218
- 'stylers': [
219
- {
220
- 'color': '#dfd2ae'
221
- }
222
- ]
223
- },
224
- {
225
- 'featureType': 'poi',
226
- 'elementType': 'geometry',
227
- 'stylers': [
228
- {
229
- 'color': '#dfd2ae'
230
- }
231
- ]
232
- },
233
- {
234
- 'featureType': 'poi',
235
- 'elementType': 'labels.text.fill',
236
- 'stylers': [
237
- {
238
- 'color': '#93817c'
239
- }
240
- ]
241
- },
242
- {
243
- 'featureType': 'poi.park',
244
- 'elementType': 'geometry.fill',
245
- 'stylers': [
246
- {
247
- 'color': '#a5b076'
248
- }
249
- ]
250
- },
251
- {
252
- 'featureType': 'poi.park',
253
- 'elementType': 'labels.text.fill',
254
- 'stylers': [
255
- {
256
- 'color': '#447530'
257
- }
258
- ]
259
- },
260
- {
261
- 'featureType': 'road',
262
- 'elementType': 'geometry',
263
- 'stylers': [
264
- {
265
- 'color': '#f5f1e6'
266
- }
267
- ]
268
- },
269
- {
270
- 'featureType': 'road.arterial',
271
- 'elementType': 'geometry',
272
- 'stylers': [
273
- {
274
- 'color': '#fdfcf8'
275
- }
276
- ]
277
- },
278
- {
279
- 'featureType': 'road.highway',
280
- 'elementType': 'geometry',
281
- 'stylers': [
282
- {
283
- 'color': '#f8c967'
284
- }
285
- ]
286
- },
287
- {
288
- 'featureType': 'road.highway',
289
- 'elementType': 'geometry.stroke',
290
- 'stylers': [
291
- {
292
- 'color': '#e9bc62'
293
- }
294
- ]
295
- },
296
- {
297
- 'featureType': 'road.highway.controlled_access',
298
- 'elementType': 'geometry',
299
- 'stylers': [
300
- {
301
- 'color': '#e98d58'
302
- }
303
- ]
304
- },
305
- {
306
- 'featureType': 'road.highway.controlled_access',
307
- 'elementType': 'geometry.stroke',
308
- 'stylers': [
309
- {
310
- 'color': '#db8555'
311
- }
312
- ]
313
- },
314
- {
315
- 'featureType': 'road.local',
316
- 'elementType': 'labels.text.fill',
317
- 'stylers': [
318
- {
319
- 'color': '#806b63'
320
- }
321
- ]
322
- },
323
- {
324
- 'featureType': 'transit.line',
325
- 'elementType': 'geometry',
326
- 'stylers': [
327
- {
328
- 'color': '#dfd2ae'
329
- }
330
- ]
331
- },
332
- {
333
- 'featureType': 'transit.line',
334
- 'elementType': 'labels.text.fill',
335
- 'stylers': [
336
- {
337
- 'color': '#8f7d77'
338
- }
339
- ]
340
- },
341
- {
342
- 'featureType': 'transit.line',
343
- 'elementType': 'labels.text.stroke',
344
- 'stylers': [
345
- {
346
- 'color': '#ebe3cd'
347
- }
348
- ]
349
- },
350
- {
351
- 'featureType': 'transit.station',
352
- 'elementType': 'geometry',
353
- 'stylers': [
354
- {
355
- 'color': '#dfd2ae'
356
- }
357
- ]
358
- },
359
- {
360
- 'featureType': 'water',
361
- 'elementType': 'geometry.fill',
362
- 'stylers': [
363
- {
364
- 'color': '#b9d3c2'
365
- }
366
- ]
367
- },
368
- {
369
- 'featureType': 'water',
370
- 'elementType': 'labels.text.fill',
371
- 'stylers': [
372
- {
373
- 'color': '#92998d'
374
- }
375
- ]
376
- }
377
- ],
378
- dark: [
379
- {
380
- 'elementType': 'geometry',
381
- 'stylers': [
382
- {
383
- 'color': '#212121'
384
- }
385
- ]
386
- },
387
- {
388
- 'elementType': 'labels.icon',
389
- 'stylers': [
390
- {
391
- 'visibility': 'off'
392
- }
393
- ]
394
- },
395
- {
396
- 'elementType': 'labels.text.fill',
397
- 'stylers': [
398
- {
399
- 'color': '#757575'
400
- }
401
- ]
402
- },
403
- {
404
- 'elementType': 'labels.text.stroke',
405
- 'stylers': [
406
- {
407
- 'color': '#212121'
408
- }
409
- ]
410
- },
411
- {
412
- 'featureType': 'administrative',
413
- 'elementType': 'geometry',
414
- 'stylers': [
415
- {
416
- 'color': '#757575'
417
- }
418
- ]
419
- },
420
- {
421
- 'featureType': 'administrative.country',
422
- 'elementType': 'labels.text.fill',
423
- 'stylers': [
424
- {
425
- 'color': '#9e9e9e'
426
- }
427
- ]
428
- },
429
- {
430
- 'featureType': 'administrative.land_parcel',
431
- 'stylers': [
432
- {
433
- 'visibility': 'off'
434
- }
435
- ]
436
- },
437
- {
438
- 'featureType': 'administrative.locality',
439
- 'elementType': 'labels.text.fill',
440
- 'stylers': [
441
- {
442
- 'color': '#bdbdbd'
443
- }
444
- ]
445
- },
446
- {
447
- 'featureType': 'poi',
448
- 'elementType': 'labels.text.fill',
449
- 'stylers': [
450
- {
451
- 'color': '#757575'
452
- }
453
- ]
454
- },
455
- {
456
- 'featureType': 'poi.park',
457
- 'elementType': 'geometry',
458
- 'stylers': [
459
- {
460
- 'color': '#181818'
461
- }
462
- ]
463
- },
464
- {
465
- 'featureType': 'poi.park',
466
- 'elementType': 'labels.text.fill',
467
- 'stylers': [
468
- {
469
- 'color': '#616161'
470
- }
471
- ]
472
- },
473
- {
474
- 'featureType': 'poi.park',
475
- 'elementType': 'labels.text.stroke',
476
- 'stylers': [
477
- {
478
- 'color': '#1b1b1b'
479
- }
480
- ]
481
- },
482
- {
483
- 'featureType': 'road',
484
- 'elementType': 'geometry.fill',
485
- 'stylers': [
486
- {
487
- 'color': '#2c2c2c'
488
- }
489
- ]
490
- },
491
- {
492
- 'featureType': 'road',
493
- 'elementType': 'labels.text.fill',
494
- 'stylers': [
495
- {
496
- 'color': '#8a8a8a'
497
- }
498
- ]
499
- },
500
- {
501
- 'featureType': 'road.arterial',
502
- 'elementType': 'geometry',
503
- 'stylers': [
504
- {
505
- 'color': '#373737'
506
- }
507
- ]
508
- },
509
- {
510
- 'featureType': 'road.highway',
511
- 'elementType': 'geometry',
512
- 'stylers': [
513
- {
514
- 'color': '#3c3c3c'
515
- }
516
- ]
517
- },
518
- {
519
- 'featureType': 'road.highway.controlled_access',
520
- 'elementType': 'geometry',
521
- 'stylers': [
522
- {
523
- 'color': '#4e4e4e'
524
- }
525
- ]
526
- },
527
- {
528
- 'featureType': 'road.local',
529
- 'elementType': 'labels.text.fill',
530
- 'stylers': [
531
- {
532
- 'color': '#616161'
533
- }
534
- ]
535
- },
536
- {
537
- 'featureType': 'transit',
538
- 'elementType': 'labels.text.fill',
539
- 'stylers': [
540
- {
541
- 'color': '#757575'
542
- }
543
- ]
544
- },
545
- {
546
- 'featureType': 'water',
547
- 'elementType': 'geometry',
548
- 'stylers': [
549
- {
550
- 'color': '#000000'
551
- }
552
- ]
553
- },
554
- {
555
- 'featureType': 'water',
556
- 'elementType': 'labels.text.fill',
557
- 'stylers': [
558
- {
559
- 'color': '#3d3d3d'
560
- }
561
- ]
562
- }
563
- ],
564
- night: [
565
- {
566
- 'elementType': 'geometry',
567
- 'stylers': [
568
- {
569
- 'color': '#242f3e'
570
- }
571
- ]
572
- },
573
- {
574
- 'elementType': 'labels.text.fill',
575
- 'stylers': [
576
- {
577
- 'color': '#746855'
578
- }
579
- ]
580
- },
581
- {
582
- 'elementType': 'labels.text.stroke',
583
- 'stylers': [
584
- {
585
- 'color': '#242f3e'
586
- }
587
- ]
588
- },
589
- {
590
- 'featureType': 'administrative.locality',
591
- 'elementType': 'labels.text.fill',
592
- 'stylers': [
593
- {
594
- 'color': '#d59563'
595
- }
596
- ]
597
- },
598
- {
599
- 'featureType': 'poi',
600
- 'elementType': 'labels.text.fill',
601
- 'stylers': [
602
- {
603
- 'color': '#d59563'
604
- }
605
- ]
606
- },
607
- {
608
- 'featureType': 'poi.park',
609
- 'elementType': 'geometry',
610
- 'stylers': [
611
- {
612
- 'color': '#263c3f'
613
- }
614
- ]
615
- },
616
- {
617
- 'featureType': 'poi.park',
618
- 'elementType': 'labels.text.fill',
619
- 'stylers': [
620
- {
621
- 'color': '#6b9a76'
622
- }
623
- ]
624
- },
625
- {
626
- 'featureType': 'road',
627
- 'elementType': 'geometry',
628
- 'stylers': [
629
- {
630
- 'color': '#38414e'
631
- }
632
- ]
633
- },
634
- {
635
- 'featureType': 'road',
636
- 'elementType': 'geometry.stroke',
637
- 'stylers': [
638
- {
639
- 'color': '#212a37'
640
- }
641
- ]
642
- },
643
- {
644
- 'featureType': 'road',
645
- 'elementType': 'labels.text.fill',
646
- 'stylers': [
647
- {
648
- 'color': '#9ca5b3'
649
- }
650
- ]
651
- },
652
- {
653
- 'featureType': 'road.highway',
654
- 'elementType': 'geometry',
655
- 'stylers': [
656
- {
657
- 'color': '#746855'
658
- }
659
- ]
660
- },
661
- {
662
- 'featureType': 'road.highway',
663
- 'elementType': 'geometry.stroke',
664
- 'stylers': [
665
- {
666
- 'color': '#1f2835'
667
- }
668
- ]
669
- },
670
- {
671
- 'featureType': 'road.highway',
672
- 'elementType': 'labels.text.fill',
673
- 'stylers': [
674
- {
675
- 'color': '#f3d19c'
676
- }
677
- ]
678
- },
679
- {
680
- 'featureType': 'transit',
681
- 'elementType': 'geometry',
682
- 'stylers': [
683
- {
684
- 'color': '#2f3948'
685
- }
686
- ]
687
- },
688
- {
689
- 'featureType': 'transit.station',
690
- 'elementType': 'labels.text.fill',
691
- 'stylers': [
692
- {
693
- 'color': '#d59563'
694
- }
695
- ]
696
- },
697
- {
698
- 'featureType': 'water',
699
- 'elementType': 'geometry',
700
- 'stylers': [
701
- {
702
- 'color': '#17263c'
703
- }
704
- ]
705
- },
706
- {
707
- 'featureType': 'water',
708
- 'elementType': 'labels.text.fill',
709
- 'stylers': [
710
- {
711
- 'color': '#515c6d'
712
- }
713
- ]
714
- },
715
- {
716
- 'featureType': 'water',
717
- 'elementType': 'labels.text.stroke',
718
- 'stylers': [
719
- {
720
- 'color': '#17263c'
721
- }
722
- ]
723
- }
724
- ],
725
- aubergine: [
726
- {
727
- 'elementType': 'geometry',
728
- 'stylers': [
729
- {
730
- 'color': '#1d2c4d'
731
- }
732
- ]
733
- },
734
- {
735
- 'elementType': 'labels.text.fill',
736
- 'stylers': [
737
- {
738
- 'color': '#8ec3b9'
739
- }
740
- ]
741
- },
742
- {
743
- 'elementType': 'labels.text.stroke',
744
- 'stylers': [
745
- {
746
- 'color': '#1a3646'
747
- }
748
- ]
749
- },
750
- {
751
- 'featureType': 'administrative.country',
752
- 'elementType': 'geometry.stroke',
753
- 'stylers': [
754
- {
755
- 'color': '#4b6878'
756
- }
757
- ]
758
- },
759
- {
760
- 'featureType': 'administrative.land_parcel',
761
- 'elementType': 'labels.text.fill',
762
- 'stylers': [
763
- {
764
- 'color': '#64779e'
765
- }
766
- ]
767
- },
768
- {
769
- 'featureType': 'administrative.province',
770
- 'elementType': 'geometry.stroke',
771
- 'stylers': [
772
- {
773
- 'color': '#4b6878'
774
- }
775
- ]
776
- },
777
- {
778
- 'featureType': 'landscape.man_made',
779
- 'elementType': 'geometry.stroke',
780
- 'stylers': [
781
- {
782
- 'color': '#334e87'
783
- }
784
- ]
785
- },
786
- {
787
- 'featureType': 'landscape.natural',
788
- 'elementType': 'geometry',
789
- 'stylers': [
790
- {
791
- 'color': '#023e58'
792
- }
793
- ]
794
- },
795
- {
796
- 'featureType': 'poi',
797
- 'elementType': 'geometry',
798
- 'stylers': [
799
- {
800
- 'color': '#283d6a'
801
- }
802
- ]
803
- },
804
- {
805
- 'featureType': 'poi',
806
- 'elementType': 'labels.text.fill',
807
- 'stylers': [
808
- {
809
- 'color': '#6f9ba5'
810
- }
811
- ]
812
- },
813
- {
814
- 'featureType': 'poi',
815
- 'elementType': 'labels.text.stroke',
816
- 'stylers': [
817
- {
818
- 'color': '#1d2c4d'
819
- }
820
- ]
821
- },
822
- {
823
- 'featureType': 'poi.park',
824
- 'elementType': 'geometry.fill',
825
- 'stylers': [
826
- {
827
- 'color': '#023e58'
828
- }
829
- ]
830
- },
831
- {
832
- 'featureType': 'poi.park',
833
- 'elementType': 'labels.text.fill',
834
- 'stylers': [
835
- {
836
- 'color': '#3C7680'
837
- }
838
- ]
839
- },
840
- {
841
- 'featureType': 'road',
842
- 'elementType': 'geometry',
843
- 'stylers': [
844
- {
845
- 'color': '#304a7d'
846
- }
847
- ]
848
- },
849
- {
850
- 'featureType': 'road',
851
- 'elementType': 'labels.text.fill',
852
- 'stylers': [
853
- {
854
- 'color': '#98a5be'
855
- }
856
- ]
857
- },
858
- {
859
- 'featureType': 'road',
860
- 'elementType': 'labels.text.stroke',
861
- 'stylers': [
862
- {
863
- 'color': '#1d2c4d'
864
- }
865
- ]
866
- },
867
- {
868
- 'featureType': 'road.highway',
869
- 'elementType': 'geometry',
870
- 'stylers': [
871
- {
872
- 'color': '#2c6675'
873
- }
874
- ]
875
- },
876
- {
877
- 'featureType': 'road.highway',
878
- 'elementType': 'geometry.stroke',
879
- 'stylers': [
880
- {
881
- 'color': '#255763'
882
- }
883
- ]
884
- },
885
- {
886
- 'featureType': 'road.highway',
887
- 'elementType': 'labels.text.fill',
888
- 'stylers': [
889
- {
890
- 'color': '#b0d5ce'
891
- }
892
- ]
893
- },
894
- {
895
- 'featureType': 'road.highway',
896
- 'elementType': 'labels.text.stroke',
897
- 'stylers': [
898
- {
899
- 'color': '#023e58'
900
- }
901
- ]
902
- },
903
- {
904
- 'featureType': 'transit',
905
- 'elementType': 'labels.text.fill',
906
- 'stylers': [
907
- {
908
- 'color': '#98a5be'
909
- }
910
- ]
911
- },
912
- {
913
- 'featureType': 'transit',
914
- 'elementType': 'labels.text.stroke',
915
- 'stylers': [
916
- {
917
- 'color': '#1d2c4d'
918
- }
919
- ]
920
- },
921
- {
922
- 'featureType': 'transit.line',
923
- 'elementType': 'geometry.fill',
924
- 'stylers': [
925
- {
926
- 'color': '#283d6a'
927
- }
928
- ]
929
- },
930
- {
931
- 'featureType': 'transit.station',
932
- 'elementType': 'geometry',
933
- 'stylers': [
934
- {
935
- 'color': '#3a4762'
936
- }
937
- ]
938
- },
939
- {
940
- 'featureType': 'water',
941
- 'elementType': 'geometry',
942
- 'stylers': [
943
- {
944
- 'color': '#0e1626'
945
- }
946
- ]
947
- },
948
- {
949
- 'featureType': 'water',
950
- 'elementType': 'labels.text.fill',
951
- 'stylers': [
952
- {
953
- 'color': '#4e6d70'
954
- }
955
- ]
956
- }
957
- ]
958
- };
959
-
960
- export default styles;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-blocks/src/frontend/slider/index.js DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- const { omit } = lodash;
5
-
6
- const domReady = wp.domReady;
7
-
8
- domReady( () => {
9
- const sliders = document.querySelectorAll( '.wp-block-themeisle-blocks-slider' );
10
- sliders.forEach( slider => {
11
- const options = omit({ ...slider.dataset }, [ 'autoplay' ]);
12
- Object.keys( options ).map( option => options[option] = Number( options[option]) );
13
- new Glide( `#${ slider.id }`, {
14
- type: 'carousel',
15
- keyboard: true,
16
- autoplay: 'true' === slider.dataset.autoplay ? 2000 : false,
17
- hoverpause: true,
18
- ...options,
19
- breakpoints: {
20
- 800: {
21
- perView: 1,
22
- peek: 0,
23
- gap: 0
24
- }
25
- }
26
- }).mount();
27
- });
28
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-blocks/webpack.config.js DELETED
@@ -1,108 +0,0 @@
1
- const webpack = require( 'webpack' );
2
- const NODE_ENV = process.env.NODE_ENV || 'development';
3
- const glob = require( 'glob' );
4
- const path = require( 'path' );
5
- const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
6
- const { CleanWebpackPlugin } = require( 'clean-webpack-plugin' );
7
-
8
- module.exports = {
9
- mode: NODE_ENV,
10
- entry: {
11
- blocks: [
12
- './src/index.js',
13
- './src/plugins/registerPlugin.js',
14
- ...glob.sync( './src/blocks/**/index.js' )
15
- ],
16
- maps: [
17
- ...glob.sync( './src/frontend/google-map/index.js' )
18
- ],
19
- slider: [
20
- ...glob.sync( './src/frontend/slider/index.js' )
21
- ]
22
- },
23
- externals: {
24
- 'react': 'React',
25
- 'react-dom': 'ReactDOM'
26
- },
27
- output: {
28
- path: path.resolve( __dirname, 'build' ),
29
- filename: '[name].js',
30
- chunkFilename: 'chunk-[name].js',
31
- jsonpFunction: 'tiOtterWebpackJsonp'
32
- },
33
- module: {
34
- rules: [
35
- {
36
- test: /.js?$/,
37
- use: [ {
38
- loader: 'babel-loader',
39
- options: {
40
- presets: [ '@babel/preset-env' ],
41
- plugins: [
42
- '@babel/plugin-transform-async-to-generator',
43
- '@babel/plugin-proposal-object-rest-spread',
44
- '@babel/plugin-syntax-dynamic-import',
45
- [
46
- '@babel/plugin-transform-react-jsx', {
47
- pragma: 'wp.element.createElement',
48
- pragmaFrag: 'wp.element.Fragment'
49
- }
50
- ]
51
- ]
52
- }
53
- },
54
- 'eslint-loader' ]
55
- },
56
- {
57
- test: /\.(css|scss)$/,
58
- use: [ {
59
- loader: MiniCssExtractPlugin.loader
60
- },
61
- 'css-loader',
62
- {
63
- loader: 'postcss-loader',
64
- options: {
65
- plugins: [
66
- require( 'autoprefixer' )
67
- ]
68
- }
69
- },
70
- {
71
- loader: 'sass-loader',
72
- query: {
73
- outputStyle:
74
- 'production' === process.env.NODE_ENV ? 'compressed' : 'nested'
75
- }
76
- } ]
77
- }
78
- ]
79
- },
80
- optimization: {
81
- splitChunks: {
82
- cacheGroups: {
83
- vendor: {
84
- name: 'vendor',
85
- test: /[\\/]node_modules[\\/]/,
86
- chunks: 'all',
87
- reuseExistingChunk: true
88
- },
89
- editorStyles: {
90
- name: 'vendor',
91
- test: /editor\.scss$/,
92
- chunks: 'all',
93
- enforce: true
94
- }
95
- }
96
- }
97
- },
98
- plugins: [
99
- new webpack.DefinePlugin({
100
- 'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
101
- }),
102
- new MiniCssExtractPlugin({
103
- filename: 'style.css',
104
- chunkFilename: 'edit-blocks.css'
105
- }),
106
- new CleanWebpackPlugin()
107
- ]
108
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/gutenberg-css/webpack.config.js DELETED
@@ -1,70 +0,0 @@
1
- const webpack = require( 'webpack' );
2
- const NODE_ENV = process.env.NODE_ENV || 'development';
3
- const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
4
-
5
- module.exports = {
6
- mode: NODE_ENV,
7
- entry: './src/index.js',
8
- externals: {
9
- 'react': 'React',
10
- 'react-dom': 'ReactDOM'
11
- },
12
- output: {
13
- path: __dirname,
14
- filename: './build/build.js'
15
- },
16
- module: {
17
- rules: [
18
- {
19
- test: /.js?$/,
20
- use: [ {
21
- loader: 'babel-loader',
22
- options: {
23
- presets: [ '@babel/preset-env' ],
24
- plugins: [
25
- '@babel/plugin-transform-async-to-generator',
26
- '@babel/plugin-proposal-object-rest-spread',
27
- [
28
- '@babel/plugin-transform-react-jsx', {
29
- 'pragma': 'wp.element.createElement'
30
- }
31
- ]
32
- ]
33
- }
34
- },
35
- 'eslint-loader' ],
36
- exclude: /node_modules/
37
- },
38
- {
39
- test: /\.(css|scss)$/,
40
- use: [ {
41
- loader: MiniCssExtractPlugin.loader
42
- },
43
- 'css-loader',
44
- {
45
- loader: 'postcss-loader',
46
- options: {
47
- plugins: [
48
- require( 'autoprefixer' )
49
- ]
50
- }
51
- },
52
- {
53
- loader: 'sass-loader',
54
- query: {
55
- outputStyle:
56
- 'production' === process.env.NODE_ENV ? 'compressed' : 'nested'
57
- }
58
- } ]
59
- }
60
- ]
61
- },
62
- plugins: [
63
- new webpack.DefinePlugin({
64
- 'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
65
- }),
66
- new MiniCssExtractPlugin({
67
- filename: './build/build.css'
68
- })
69
- ]
70
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ##### [Version 3.1.9](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.8...v3.1.9) (2020-02-24)
2
 
3
  * Add integration with GitHub actions
1
+ ##### [Version 3.2.2](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.1...v3.2.2) (2020-03-13)
2
+
3
+ * improve notice dismiss mechanism
4
+
5
+ ##### [Version 3.2.1](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.0...v3.2.1) (2020-03-05)
6
+
7
+ Fix rollback call for private products
8
+
9
+ #### [Version 3.2.0](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.9...v3.2.0) (2020-03-04)
10
+
11
+ * adds license activation/deactivation handlers for wp cli
12
+ * adds compatibility with the newest license API
13
+
14
  ##### [Version 3.1.9](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.8...v3.1.9) (2020-02-24)
15
 
16
  * Add integration with GitHub actions
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  return;
15
  }
16
  // Current SDK version and path.
17
- $themeisle_sdk_version = '3.1.9';
18
  $themeisle_sdk_path = dirname( __FILE__ );
19
 
20
  global $themeisle_sdk_max_version;
14
  return;
15
  }
16
  // Current SDK version and path.
17
+ $themeisle_sdk_version = '3.2.2';
18
  $themeisle_sdk_path = dirname( __FILE__ );
19
 
20
  global $themeisle_sdk_max_version;
vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
- /**
3
- * The abstract class for module definition.
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Loader
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 3.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Common;
13
-
14
- use ThemeisleSDK\Product;
15
-
16
- if ( ! defined( 'ABSPATH' ) ) {
17
- exit;
18
- }
19
-
20
- /**
21
- * Class Abstract_Module.
22
- *
23
- * @package ThemeisleSDK\Common
24
- */
25
- abstract class Abstract_Module {
26
- /**
27
- * Product which use the module.
28
- *
29
- * @var Product $product Product object.
30
- */
31
- protected $product = null;
32
-
33
- /**
34
- * Can load the module for the selected product.
35
- *
36
- * @param Product $product Product data.
37
- *
38
- * @return bool Should load module?
39
- */
40
- public abstract function can_load( $product );
41
-
42
- /**
43
- * Bootstrap the module.
44
- *
45
- * @param Product $product Product object.
46
- */
47
- public abstract function load( $product );
48
-
49
- /**
50
- * Check if the product is from partner.
51
- *
52
- * @param Product $product Product data.
53
- *
54
- * @return bool Is product from partner.
55
- */
56
- public function is_from_partner( $product ) {
57
-
58
- foreach ( Module_Factory::$domains as $partner_domain ) {
59
- if ( strpos( $product->get_store_url(), $partner_domain ) !== false ) {
60
- return true;
61
- }
62
- }
63
-
64
- return array_key_exists( $product->get_slug(), Module_Factory::$slugs );
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
- /**
3
- * The module factory class.
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Loader
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 3.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Common;
13
-
14
- use ThemeisleSDK\Product;
15
-
16
- if ( ! defined( 'ABSPATH' ) ) {
17
- exit;
18
- }
19
-
20
- /**
21
- * Class Job_Factory
22
- *
23
- * @package ThemeisleSDK\Common
24
- */
25
- class Module_Factory {
26
- /**
27
- * Partners slugs.
28
- *
29
- * @var array $SLUGS Partners product slugs.
30
- */
31
- public static $slugs = [
32
- 'zermatt' => true,
33
- 'neto' => true,
34
- 'olsen' => true,
35
- 'benson' => true,
36
- 'romero' => true,
37
- 'carmack' => true,
38
- 'puzzle' => true,
39
- 'broadsheet' => true,
40
- 'girlywp' => true,
41
- 'veggie' => true,
42
- 'zeko' => true,
43
- 'maishawp' => true,
44
- 'didi' => true,
45
- 'liber' => true,
46
- 'medicpress-pt' => true,
47
- 'adrenaline-pt' => true,
48
- 'consultpress-pt' => true,
49
- 'legalpress-pt' => true,
50
- 'gympress-pt' => true,
51
- 'readable-pt' => true,
52
- 'bolts-pt' => true,
53
- ];
54
- /**
55
- * Partners domains.
56
- *
57
- * @var array $DOMAINS Partners domains.
58
- */
59
- public static $domains = [
60
- 'proteusthemes.com',
61
- 'anarieldesign.com',
62
- 'prothemedesign.com',
63
- 'cssigniter.com',
64
- ];
65
- /**
66
- * Map which contains all the modules loaded for each product.
67
- *
68
- * @var array Mapping array.
69
- */
70
- private static $modules_attached = [];
71
-
72
- /**
73
- * Load availabe modules for the selected product.
74
- *
75
- * @param Product $product Loaded product.
76
- * @param array $modules List of modules.
77
- */
78
- public static function attach( $product, $modules ) {
79
-
80
- if ( ! isset( self::$modules_attached[ $product->get_slug() ] ) ) {
81
- self::$modules_attached[ $product->get_slug() ] = [];
82
- }
83
-
84
- foreach ( $modules as $module ) {
85
- $class = 'ThemeisleSDK\\Modules\\' . ucwords( $module, '_' );
86
- /**
87
- * Module object.
88
- *
89
- * @var Abstract_Module $module_object Module instance.
90
- */
91
- $module_object = new $class( $product );
92
-
93
- if ( ! $module_object->can_load( $product ) ) {
94
- continue;
95
- }
96
- self::$modules_attached[ $product->get_slug() ][ $module ] = $module_object->load( $product );
97
- }
98
- }
99
-
100
- /**
101
- * Products/Modules loaded map.
102
- *
103
- * @return array Modules map.
104
- */
105
- public static function get_modules_map() {
106
- return self::$modules_attached;
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Loader.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
- /**
3
- * The main loader class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Loader
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK;
13
-
14
- use ThemeisleSDK\Common\Module_Factory;
15
-
16
- if ( ! defined( 'ABSPATH' ) ) {
17
- exit;
18
- }
19
-
20
-
21
- /**
22
- * Singleton loader for ThemeIsle SDK.
23
- */
24
- final class Loader {
25
- /**
26
- * Singleton instance.
27
- *
28
- * @var Loader instance The singleton instance
29
- */
30
- private static $instance;
31
- /**
32
- * Current loader version.
33
- *
34
- * @var string $version The class version.
35
- */
36
- private static $version = '2.0.0';
37
- /**
38
- * Holds registered products.
39
- *
40
- * @var array The products which use the SDK.
41
- */
42
- private static $products = [];
43
- /**
44
- * Holds available modules to load.
45
- *
46
- * @var array The modules which SDK will be using.
47
- */
48
- private static $available_modules = [
49
- 'dashboard_widget',
50
- 'rollback',
51
- 'uninstall_feedback',
52
- 'licenser',
53
- 'endpoint',
54
- 'notification',
55
- 'logger',
56
- 'translate',
57
- 'review',
58
- 'recommendation',
59
-
60
- ];
61
-
62
- /**
63
- * Initialize the sdk logic.
64
- */
65
- public static function init() {
66
- if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) {
67
- self::$instance = new Loader();
68
- $modules = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) );
69
- foreach ( $modules as $key => $module ) {
70
- if ( ! class_exists( 'ThemeisleSDK\\Modules\\' . ucwords( $module, '_' ) ) ) {
71
- unset( $modules[ $key ] );
72
- }
73
- }
74
- self::$available_modules = $modules;
75
- }
76
- }
77
-
78
- /**
79
- * Register product into SDK.
80
- *
81
- * @param string $base_file The product base file.
82
- *
83
- * @return Loader The singleton object.
84
- */
85
- public static function add_product( $base_file ) {
86
-
87
- if ( ! is_file( $base_file ) ) {
88
- return self::$instance;
89
- }
90
- $product = new Product( $base_file );
91
-
92
- Module_Factory::attach( $product, self::get_modules() );
93
-
94
- self::$products[ $product->get_slug() ] = $product;
95
-
96
- return self::$instance;
97
- }
98
-
99
- /**
100
- * Get all registered modules by the SDK.
101
- *
102
- * @return array Modules available.
103
- */
104
- public static function get_modules() {
105
- return self::$available_modules;
106
- }
107
-
108
- /**
109
- * Get all products using the SDK.
110
- *
111
- * @return array Products available.
112
- */
113
- public static function get_products() {
114
- return self::$products;
115
- }
116
-
117
- /**
118
- * Get the version of the SDK.
119
- *
120
- * @return string The version.
121
- */
122
- public static function get_version() {
123
- return self::$version;
124
- }
125
-
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php DELETED
@@ -1,466 +0,0 @@
1
- <?php
2
- /**
3
- * The blog dashboard model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Modules
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- use ThemeisleSDK\Common\Abstract_Module;
15
- use ThemeisleSDK\Product;
16
-
17
- // Exit if accessed directly.
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Blog dashboard widget module for ThemeIsle SDK.
24
- */
25
- class Dashboard_Widget extends Abstract_Module {
26
-
27
- /**
28
- * Fetched feeds items.
29
- *
30
- * @var array Feed items.
31
- */
32
- private $items = array();
33
-
34
- /**
35
- * Dashboard widget title.
36
- *
37
- * @var string $dashboard_name Dashboard name.
38
- */
39
- private $dashboard_name = '';
40
-
41
- /**
42
- * Dashboard widget feed sources.
43
- *
44
- * @var array $feeds Feed url.
45
- */
46
- private $feeds = [];
47
-
48
- /**
49
- * Should we load this module.
50
- *
51
- * @param Product $product Product object.
52
- *
53
- * @return bool
54
- */
55
- public function can_load( $product ) {
56
- if ( $this->is_from_partner( $product ) ) {
57
- return false;
58
- }
59
-
60
- if ( ! apply_filters( $product->get_slug() . '_load_dashboard_widget', true ) ) {
61
- return false;
62
- }
63
-
64
- return true;
65
- }
66
-
67
- /**
68
- * Registers the hooks.
69
- *
70
- * @param Product $product Product to load.
71
- *
72
- * @return Dashboard_Widget Module instance.
73
- */
74
- public function load( $product ) {
75
- if ( apply_filters( 'themeisle_sdk_hide_dashboard_widget', false ) ) {
76
- return;
77
- }
78
- $this->product = $product;
79
- $this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' );
80
- $this->feeds = apply_filters(
81
- 'themeisle_sdk_dashboard_widget_feeds',
82
- [
83
- 'https://themeisle.com/blog/feed',
84
- ]
85
- );
86
- add_action( 'wp_dashboard_setup', array( &$this, 'add_widget' ) );
87
- add_action( 'wp_network_dashboard_setup', array( &$this, 'add_widget' ) );
88
- add_filter( 'themeisle_sdk_recommend_plugin_or_theme', array( &$this, 'recommend_plugin_or_theme' ) );
89
-
90
- return $this;
91
- }
92
-
93
-
94
- /**
95
- * Add widget to the dashboard
96
- *
97
- * @return string|void
98
- */
99
- function add_widget() {
100
- global $wp_meta_boxes;
101
- if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['themeisle'] ) ) {
102
- return;
103
- }
104
- wp_add_dashboard_widget(
105
- 'themeisle',
106
- $this->dashboard_name,
107
- [
108
- $this,
109
- 'render_dashboard_widget',
110
- ]
111
- );
112
- }
113
-
114
- /**
115
- * Render widget content
116
- */
117
- function render_dashboard_widget() {
118
- $this->setup_feeds();
119
- if ( empty( $this->items ) || ! is_array( $this->items ) ) {
120
- return;
121
- }
122
- ?>
123
- <style type="text/css">
124
- #themeisle ul li.ti-dw-recommend-item {
125
- padding-left: 7px;
126
- border-top: 1px solid #eee;
127
- margin-bottom: 0px;
128
- padding-top: 6px;
129
- }
130
-
131
- #themeisle h2.hndle {
132
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABbCAMAAADncTNAAAAAtFBMVEVHcEyAgIB/f3+xsbGgoaGBgYGCgoKKioqAgIC1tbW5ubnFx8iAgIDU1taBgYGCgoKAgIC0tLXW19jW2NiAgIC3uLiBgYHLzMy4uLhycnLW19d/f3/T1NW0tLTX19mVlZWvr6+BgYHl5eWKiottbW5JSUnW2Nm5ubnh4eHT1NWVlZVjY2N4eHh9fX6pqqq+v79PT0/39/fu7u7Nzc7Z2ttYWFgBAQHDw8P////JysoZGRk0NTZqJc/sAAAA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HzCWSnS3pZ18tOi4Ps4vl/c7i/6qomjRecN+UubrPyPGn/VEMU3T0UFHkaPzpgjxmJsnjmrtionlMDZiog0TsY/DPtn8SXtlBvbtxKtwopy7lqW3smQO+yoGE1Uu55GJ3pmI8ygoejZNnqj0vnIRCyTKfLstRdtStGQi09myUsvwvlkuzSUXbV+Xz5ryBebV33fln/A/moud69FZiEYAAAAASUVORK5CYII=');
133
- background-repeat: no-repeat;
134
- background-position: 92% 50%;
135
- background-size: 25px;
136
- }
137
-
138
- #themeisle .inside {
139
- padding: 0;
140
- }
141
-
142
- .ti-feed-list {
143
- padding: 0 12px 5px;
144
- margin-bottom: 10px;
145
- border-bottom: 1px solid #eee;
146
- }
147
-
148
- .ti-dw-feed-item a {
149
- display: flex;
150
- align-items: center;
151
- margin-bottom: 5px;
152
- padding: 5px;
153
- transition: .2s ease;
154
- border-radius: 3px;
155
- }
156
-
157
- .ti-dw-feed-item a:hover {
158
- background-color: #f8f8f8;
159
- }
160
-
161
- .ti-dw-feed-item a:hover .ti-dw-date-container {
162
- opacity: .9;
163
- }
164
-
165
- .ti-dw-feed-item .ti-dw-month-container {
166
- margin-top: -5px;
167
- text-transform: uppercase;
168
- font-size: 10px;
169
- letter-spacing: 1px;
170
- font-weight: 700;
171
- }
172
-
173
- .ti-dw-feed-item .ti-dw-date-container {
174
- border-radius: 3px;
175
- transition: .2s ease;
176
- min-height: 35px;
177
- margin-right: 5px;
178
- min-width: 35px;
179
- text-align: center;
180
- border: 1px solid #2a6f97;
181
- color: #fff;
182
- background: #2ea2cc;
183
- display: flex;
184
- flex-direction: column;
185
- justify-content: center;
186
- }
187
-
188
- .ti-dw-footer {
189
- padding: 0 12px 5px;
190
- text-align: center;
191
- }
192
-
193
- .ti-dw-recommend-item {
194
- display: block;
195
- }
196
-
197
- .ti-dw-recommend-item span {
198
- color: #72777c;
199
- }
200
-
201
- .ti-dw-powered-by {
202
- font-size: 11px;
203
- margin-top: 3px;
204
- display: block;
205
- color: #72777c;
206
- }
207
-
208
- .ti-dw-powered-by span {
209
- font-weight: 600;
210
- }
211
-
212
- </style>
213
- <?php do_action( 'themeisle_sdk_dashboard_widget_before', $this->product ); ?>
214
-
215
- <ul class="ti-feed-list">
216
- <?php
217
-
218
- foreach ( $this->items as $item ) {
219
- ?>
220
- <li class="ti-dw-feed-item">
221
- <a href="
222
- <?php
223
- echo add_query_arg(
224
- array(
225
- 'utm_source' => 'wpadmin',
226
- 'utm_campaign' => 'feed',
227
- 'utm_medium' => 'dashboard_widget',
228
- ),
229
- $item['link']
230
- );
231
- ?>
232
- " target="_blank">
233
- <span class="ti-dw-date-container"><span
234
- class="ti-dw-day-container"><?php echo date( 'd', $item['date'] ); ?></span> <span
235
- class="ti-dw-month-container"><?php echo substr( date( 'M', $item['date'] ), 0, 3 ); ?></span></span><?php echo $item['title']; ?>
236
- </a>
237
- </li>
238
- <?php
239
- }
240
- ?>
241
- </ul>
242
- <?php
243
- $recommend = apply_filters( 'themeisle_sdk_recommend_plugin_or_theme', array() );
244
- if ( ! is_array( $recommend ) || empty( $recommend ) ) {
245
- return;
246
- }
247
-
248
- $type = $recommend['type'];
249
-
250
- if ( ( 'theme' === $type && ! current_user_can( 'install_themes' ) ) ) {
251
- return;
252
- }
253
- if ( ( 'plugin' === $type && ! current_user_can( 'install_plugins' ) ) ) {
254
- return;
255
- }
256
-
257
- add_thickbox();
258
- $url = add_query_arg(
259
- [
260
- 'theme' => $recommend['slug'],
261
- ],
262
- network_admin_url( 'theme-install.php' )
263
- );
264
-
265
- if ( 'plugin' === $type ) {
266
-
267
- $url = add_query_arg(
268
- array(
269
- 'tab' => 'plugin-information',
270
- 'plugin' => $recommend['slug'],
271
- ),
272
- network_admin_url( 'plugin-install.php' )
273
- );
274
- }
275
- ?>
276
- <div class="ti-dw-footer">
277
- <span class="ti-dw-recommend-item ">
278
- <span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
279
- : </span>
280
- <?php
281
- echo trim(
282
- str_replace(
283
- array(
284
- 'lite',
285
- 'Lite',
286
- '(Lite)',
287
- '(lite)',
288
- ),
289
- '',
290
- $recommend['name']
291
- )
292
- );
293
- ?>
294
- (<a class="thickbox open-plugin-details-modal"
295
- href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
296
- </span>
297
- <span class="ti-dw-powered-by"><span><?php echo apply_filters( 'themeisle_sdk_dashboard_widget_powered_by', esc_attr( sprintf( 'Powered by %s', $this->product->get_friendly_name() ) ) ); ?></span></span>
298
- </div>
299
-
300
- <?php
301
-
302
- }
303
-
304
- /**
305
- * Setup feed items.
306
- */
307
- private function setup_feeds() {
308
- if ( false === ( $items_normalized = get_transient( 'themeisle_sdk_feed_items' ) ) ) {
309
- // Load SimplePie Instance.
310
- $feed = fetch_feed( $this->feeds );
311
- // TODO report error when is an error loading the feed.
312
- if ( is_wp_error( $feed ) ) {
313
- return;
314
- }
315
-
316
- $items = $feed->get_items( 0, 5 );
317
- foreach ( (array) $items as $item ) {
318
- $items_normalized[] = array(
319
- 'title' => $item->get_title(),
320
- 'date' => $item->get_date( 'U' ),
321
- 'link' => $item->get_permalink(),
322
- );
323
- }
324
- set_transient( 'themeisle_sdk_feed_items', $items_normalized, 48 * HOUR_IN_SECONDS );
325
- }
326
- $this->items = $items_normalized;
327
- }
328
-
329
- /**
330
- * Either the current product is installed or not.
331
- *
332
- * @param array $val The current recommended product.
333
- *
334
- * @return bool Either we should exclude the plugin or not.
335
- */
336
- public function remove_current_products( $val ) {
337
- if ( 'theme' === $val['type'] ) {
338
- $exist = wp_get_theme( $val['slug'] );
339
-
340
- return ! $exist->exists();
341
- } else {
342
- $all_plugins = array_keys( get_plugins() );
343
- foreach ( $all_plugins as $slug ) {
344
- if ( strpos( $slug, $val['slug'] ) !== false ) {
345
- return false;
346
- }
347
- }
348
-
349
- return true;
350
- }
351
- }
352
-
353
- /**
354
- * Contact the API and fetch the recommended plugins/themes
355
- */
356
- function recommend_plugin_or_theme() {
357
- $products = $this->get_product_from_api();
358
- if ( ! is_array( $products ) ) {
359
- $products = array();
360
- }
361
- $products = array_filter( $products, array( $this, 'remove_current_products' ) );
362
- $products = array_merge( $products );
363
- if ( count( $products ) > 1 ) {
364
- shuffle( $products );
365
- $products = array_slice( $products, 0, 1 );
366
- }
367
- $to_recommend = isset( $products[0] ) ? $products[0] : $products;
368
-
369
- return $to_recommend;
370
- }
371
-
372
- /**
373
- * Fetch products from the recomended section.
374
- *
375
- * @return array|mixed The list of products to use in recomended section.
376
- */
377
- function get_product_from_api() {
378
- if ( false === ( $products = get_transient( 'themeisle_sdk_products' ) ) ) {
379
- $products = array();
380
- $all_themes = $this->get_themes_from_wporg( 'themeisle' );
381
- $all_plugins = $this->get_plugins_from_wporg( 'themeisle' );
382
- static $allowed_products = [
383
- 'hestia' => true,
384
- 'neve' => true,
385
- 'visualizer' => true,
386
- 'feedzy-rss-feeds' => true,
387
- 'wp-product-review' => true,
388
- 'otter-blocks' => true,
389
- 'themeisle-companion' => true,
390
- ];
391
- foreach ( $all_themes as $theme ) {
392
- if ( $theme->active_installs < 4999 ) {
393
- continue;
394
- }
395
- if ( ! isset( $allowed_products[ $theme->slug ] ) ) {
396
- continue;
397
- }
398
- $products[] = array(
399
- 'name' => $theme->name,
400
- 'type' => 'theme',
401
- 'slug' => $theme->slug,
402
- 'installs' => $theme->active_installs,
403
- );
404
- }
405
- foreach ( $all_plugins as $plugin ) {
406
- if ( $plugin->active_installs < 4999 ) {
407
- continue;
408
- }
409
- if ( ! isset( $allowed_products[ $plugin->slug ] ) ) {
410
- continue;
411
- }
412
- $products[] = array(
413
- 'name' => $plugin->name,
414
- 'type' => 'plugin',
415
- 'slug' => $plugin->slug,
416
- 'installs' => $plugin->active_installs,
417
- );
418
- }
419
- set_transient( 'themeisle_sdk_products', $products, 6 * HOUR_IN_SECONDS );
420
- }
421
-
422
- return $products;
423
- }
424
-
425
- /**
426
- * Fetch themes from wporg api.
427
- *
428
- * @param string $author The author name.
429
- *
430
- * @return array The list of themes.
431
- */
432
- function get_themes_from_wporg( $author ) {
433
- $products = wp_remote_get(
434
- 'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=' . $author . '&request[per_page]=30&request[fields][active_installs]=true'
435
- );
436
- $products = json_decode( wp_remote_retrieve_body( $products ) );
437
- if ( is_object( $products ) ) {
438
- $products = isset( $products->themes ) ? $products->themes : array();
439
- } else {
440
- $products = array();
441
- }
442
-
443
- return (array) $products;
444
- }
445
-
446
- /**
447
- * Fetch plugin from wporg api.
448
- *
449
- * @param string $author The author slug.
450
- *
451
- * @return array The list of plugins for the selected author.
452
- */
453
- function get_plugins_from_wporg( $author ) {
454
- $products = wp_remote_get(
455
- 'https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[author]=' . $author . '&request[per_page]=40&request[fields][active_installs]=true'
456
- );
457
- $products = json_decode( wp_remote_retrieve_body( $products ) );
458
- if ( is_object( $products ) ) {
459
- $products = isset( $products->plugins ) ? $products->plugins : array();
460
- } else {
461
- $products = array();
462
- }
463
-
464
- return (array) $products;
465
- }
466
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php DELETED
@@ -1,358 +0,0 @@
1
- <?php
2
- /**
3
- * The class that exposes endpoints.
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Rollback
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- // Exit if accessed directly.
15
- use ThemeisleSDK\Common\Abstract_Module;
16
- use ThemeisleSDK\Loader;
17
- use ThemeisleSDK\Product;
18
-
19
- if ( ! defined( 'ABSPATH' ) ) {
20
- exit;
21
- }
22
-
23
- /**
24
- * Expose endpoints for ThemeIsle SDK.
25
- */
26
- class Endpoint extends Abstract_Module {
27
- /**
28
- * Endpoint slug.
29
- */
30
- const SDK_ENDPOINT = 'themeisle-sdk';
31
- /**
32
- * Endpoint version.
33
- */
34
- const SDK_ENDPOINT_VERSION = 1;
35
- /**
36
- * Hash file which contains the checksum.
37
- */
38
- const HASH_FILE = 'themeisle-hash.json';
39
-
40
- /*
41
- * If true, the endpoint will expect a product slug and will return the value only for that.
42
- */
43
- const PRODUCT_SPECIFIC = false;
44
-
45
- /**
46
- * Registers the endpoints.
47
- */
48
- function rest_register() {
49
- register_rest_route(
50
- self::SDK_ENDPOINT . '/v' . self::SDK_ENDPOINT_VERSION,
51
- '/checksum/' . ( self::PRODUCT_SPECIFIC ? '(?P<slug>.*)/' : '' ),
52
- array(
53
- 'methods' => 'GET',
54
- 'callback' => array( $this, 'checksum' ),
55
- )
56
- );
57
- }
58
-
59
- /**
60
- * The checksum endpoint.
61
- *
62
- * @param \WP_REST_Request $data the request.
63
- *
64
- * @return \WP_REST_Response Response or the error
65
- */
66
- function checksum( \WP_REST_Request $data ) {
67
- $products = Loader::get_products();
68
- if ( self::PRODUCT_SPECIFIC ) {
69
- $params = $this->validate_params( $data, array( 'slug' ) );
70
- foreach ( $products as $product ) {
71
- if ( $params['slug'] === $product->get_slug() ) {
72
- $products = array( $product );
73
- break;
74
- }
75
- }
76
- }
77
- $response = array();
78
- $custom_css = $this->has_custom_css();
79
- if ( is_bool( $custom_css ) ) {
80
- $response['custom_css'] = $custom_css;
81
- }
82
-
83
- $response['child_theme'] = $this->get_theme_properties();
84
-
85
- foreach ( $products as $product ) {
86
- $files = array();
87
- switch ( $product->get_type() ) {
88
- case 'plugin':
89
- $files = array();
90
- break;
91
- case 'theme':
92
- $files = array( 'style.css', 'functions.php' );
93
- break;
94
- }
95
-
96
- $error = '';
97
-
98
- // if any element in the $files array contains a '/', this would imply recursion is required.
99
- $diff = $this->generate_diff(
100
- $product,
101
- $files,
102
- array_reduce(
103
- $files,
104
- array(
105
- $this,
106
- 'is_recursion_required',
107
- ),
108
- false
109
- )
110
- );
111
- if ( is_wp_error( $diff ) ) {
112
- /**
113
- * Error returner by the diff checker method.
114
- *
115
- * @var \WP_Error $diff Error returned.
116
- */
117
- $error = $diff->get_error_message();
118
- $diff = array();
119
- }
120
-
121
- $response['products'][] = array(
122
- 'slug' => $product->get_slug(),
123
- 'version' => $product->get_version(),
124
- 'diffs' => $diff,
125
- 'error' => $error,
126
- );
127
- }
128
-
129
- return new \WP_REST_Response( array( 'checksum' => $response ) );
130
- }
131
-
132
- /**
133
- * Validates the parameters to the API
134
- *
135
- * @param \WP_REST_Request $data the request.
136
- * @param array $params the parameters to validate.
137
- *
138
- * @return array of parameter name=>value
139
- */
140
- private function validate_params( \WP_REST_Request $data, $params ) {
141
- $collect = array();
142
- foreach ( $params as $param ) {
143
- $value = sanitize_text_field( $data[ $param ] );
144
- if ( empty( $value ) ) {
145
- return rest_ensure_response(
146
- new \WP_Error(
147
- 'themeisle_' . $param . '_invalid',
148
- sprintf( 'Invalid %', $param ),
149
- array(
150
- 'status' => 403,
151
- )
152
- )
153
- );
154
- } else {
155
- $collect[ $param ] = $value;
156
- }
157
- }
158
-
159
- return $collect;
160
- }
161
-
162
- /**
163
- * Check if custom css has been added to the theme.
164
- *
165
- * @return bool Whether custom css has been added to the theme.
166
- */
167
- private function has_custom_css() {
168
- $query = new \WP_Query(
169
- array(
170
- 'post_type' => 'custom_css',
171
- 'post_status' => 'publish',
172
- 'numberposts' => 1,
173
- 'update_post_meta_cache' => false,
174
- 'update_post_term_cache' => false,
175
- )
176
- );
177
-
178
- if ( $query->have_posts() ) {
179
- $query->the_post();
180
- $content = get_the_content();
181
-
182
- // if the content contains a colon, a CSS rule has been added.
183
- return strpos( $content, ':' ) === false ? false : true;
184
- }
185
-
186
- return false;
187
- }
188
-
189
- /**
190
- * Get the current theme properties.
191
- *
192
- * @return mixed Properties of the current theme.
193
- */
194
- function get_theme_properties() {
195
- if ( ! is_child_theme() ) {
196
- return false;
197
- }
198
-
199
- $properties = array();
200
- $theme = wp_get_theme();
201
- // @codingStandardsIgnoreStart
202
- $properties['name'] = $theme->Name;
203
- // @codingStandardsIgnoreEnd
204
-
205
- // get the files in the child theme.
206
- require_once( ABSPATH . 'wp-admin/includes/file.php' );
207
- WP_Filesystem();
208
- global $wp_filesystem;
209
- $path = str_replace( ABSPATH, $wp_filesystem->abspath(), get_stylesheet_directory() );
210
- $list = $wp_filesystem->dirlist( $path, false, false );
211
- if ( $list ) {
212
- $list = array_keys( self::flatten_dirlist( $list ) );
213
- $properties['files'] = $list;
214
- }
215
-
216
- return $properties;
217
- }
218
-
219
- /**
220
- * Flatten the results of WP_Filesystem::dirlist() for iterating over.
221
- *
222
- * @access private
223
- *
224
- * @param array $nested_files Array of files as returned by WP_Filesystem::dirlist().
225
- * @param string $path Relative path to prepend to child nodes. Optional.
226
- *
227
- * @return array $files A flattened array of the $nested_files specified.
228
- */
229
- private static function flatten_dirlist( $nested_files, $path = '' ) {
230
- $files = array();
231
- foreach ( $nested_files as $name => $details ) {
232
- $files[ $path . $name ] = $details;
233
- // Append children recursively.
234
- if ( ! empty( $details['files'] ) ) {
235
- $children = self::flatten_dirlist( $details['files'], $path . $name . '/' );
236
- // Merge keeping possible numeric keys, which array_merge() will reindex from 0..n.
237
- $files = $files + $children;
238
- }
239
- }
240
-
241
- return $files;
242
- }
243
-
244
- /**
245
- * Generate the diff of the files.
246
- *
247
- * @param Product $product Themeisle Product.
248
- * @param array $files Array of files.
249
- * @param bool $recurse Whether to recurse or not.
250
- *
251
- * @return mixed Diff data.
252
- */
253
- private function generate_diff( $product, $files, $recurse = false ) {
254
- require_once( ABSPATH . 'wp-admin/includes/file.php' );
255
- WP_Filesystem();
256
- global $wp_filesystem;
257
-
258
- $diff = array();
259
- $path = str_replace( ABSPATH, $wp_filesystem->abspath(), plugin_dir_path( $product->get_basefile() ) );
260
- $list = $wp_filesystem->dirlist( $path, false, $recurse );
261
- // nothing found.
262
- if ( ! $list ) {
263
- return $diff;
264
- }
265
- $list = array_keys( self::flatten_dirlist( $list ) );
266
-
267
- // now let's get the valid files that actually exist.
268
- if ( empty( $files ) ) {
269
- $files = $list;
270
- } else {
271
- $files = array_intersect( $files, $list );
272
- }
273
-
274
- // fetch the calculated hashes.
275
- if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
276
- return new \WP_Error( 'themeisle_sdk_hash_not_found', sprintf( '%s not found', self::HASH_FILE ) );
277
- }
278
-
279
- $hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
280
- ksort( $hashes );
281
-
282
- $diff = array();
283
- foreach ( $files as $file ) {
284
- // file does not exist in the hashes.
285
- if ( ! array_key_exists( $file, $hashes ) ) {
286
- continue;
287
- }
288
- $new = md5( $wp_filesystem->get_contents( $path . $file ) );
289
- $old = $hashes[ $file ];
290
-
291
- // same hash, bail.
292
- if ( $new === $old ) {
293
- continue;
294
- }
295
- $diff[] = $file;
296
- }
297
-
298
- return $diff;
299
- }
300
-
301
- /**
302
- * Check if recursion needs to be enabled on the WP_Filesystem by reducing the array of files to a boolean.
303
- *
304
- * @param string $carry Value of the previous iteration.
305
- * @param string $item Value of the current iteration.
306
- *
307
- * @return bool Whether to recurse or not.
308
- */
309
- function is_recursion_required( $carry, $item ) {
310
- if ( ! $carry ) {
311
- return ( strpos( $item, '/' ) !== false );
312
- }
313
-
314
- return $carry;
315
- }
316
-
317
- /**
318
- * Load module for this product.
319
- *
320
- * @param Product $product Product to check.
321
- *
322
- * @return bool Should we load this?
323
- */
324
- public function can_load( $product ) {
325
- return true;
326
- }
327
-
328
- /**
329
- * Load module logic.
330
- *
331
- * @param Product $product Product to load.
332
- */
333
- public function load( $product ) {
334
- $this->setup_endpoints();
335
-
336
- return $this;
337
- }
338
-
339
- /**
340
- * Setup endpoints.
341
- */
342
- private function setup_endpoints() {
343
- global $wp_version;
344
- if ( version_compare( $wp_version, '4.4', '<' ) ) {
345
- // no REST support.
346
- return;
347
- }
348
-
349
- $this->setup_rest();
350
- }
351
-
352
- /**
353
- * Setup REST endpoints.
354
- */
355
- private function setup_rest() {
356
- add_action( 'rest_api_init', array( $this, 'rest_register' ) );
357
- }
358
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php DELETED
@@ -1,798 +0,0 @@
1
- <?php
2
- /**
3
- * The main loader class for license handling.
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Modules
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- // Exit if accessed directly.
15
- use ThemeisleSDK\Common\Abstract_Module;
16
- use ThemeisleSDK\Product;
17
-
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Licenser module for ThemeIsle SDK.
24
- */
25
- class Licenser extends Abstract_Module {
26
-
27
- /**
28
- * Number of max failed checks before showing the license message.
29
- *
30
- * @var int $max_failed Maximum failed checks allowed before show the notice
31
- */
32
- private static $max_failed = 5;
33
- /**
34
- * License key string.
35
- *
36
- * @var string $license_key The license key string
37
- */
38
- public $license_key;
39
- /**
40
- * This ensures that the custom API request only runs on the second time that WP fires the update check.
41
- *
42
- * @var bool $do_check Flag for request.
43
- */
44
- private $do_check = false;
45
- /**
46
- * Number of failed checks to the api endpoint.
47
- *
48
- * @var bool $failed_checks
49
- */
50
- private $failed_checks = 0;
51
- /**
52
- * The product update response key.
53
- *
54
- * @var string $product_key Product key.
55
- */
56
- private $product_key;
57
-
58
- /**
59
- * Disable wporg updates for premium products.
60
- *
61
- * @param string $r Update payload.
62
- * @param string $url The api url.
63
- *
64
- * @return mixed List of themes to check for update.
65
- */
66
- function disable_wporg_update( $r, $url ) {
67
-
68
- if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
69
- return $r;
70
- }
71
-
72
- // Decode the JSON response.
73
- $themes = json_decode( $r['body']['themes'] );
74
-
75
- unset( $themes->themes->{$this->product->get_slug()} );
76
-
77
- // Encode the updated JSON response.
78
- $r['body']['themes'] = json_encode( $themes );
79
-
80
- return $r;
81
- }
82
-
83
- /**
84
- * Register the setting for the license of the product.
85
- *
86
- * @return bool
87
- */
88
- public function register_settings() {
89
- if ( ! is_admin() ) {
90
- return false;
91
- }
92
- if ( apply_filters( $this->product->get_key() . '_hide_license_field', false ) ) {
93
- return;
94
- }
95
- add_settings_field(
96
- $this->product->get_key() . '_license',
97
- $this->product->get_name() . ' license',
98
- array( $this, 'license_view' ),
99
- 'general'
100
- );
101
- }
102
-
103
- /**
104
- * The license view field.
105
- */
106
- public function license_view() {
107
- $status = $this->get_license_status();
108
- $value = $this->license_key;
109
-
110
- $activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', 'Activate' );
111
- $deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', 'Deactivate' );
112
- $valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' );
113
- $invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' );
114
- $license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' );
115
- $error_message = $this->get_error();
116
- ?>
117
- <style type="text/css">
118
- input.themeisle-sdk-text-input-valid {
119
- border: 1px solid #7ad03a;
120
- }
121
-
122
- input.themeisle-sdk-license-input {
123
- width: 300px;
124
- padding: 0 8px;
125
- line-height: 2;
126
- min-height: 30px;
127
- }
128
-
129
- .themeisle-sdk-license-deactivate-cta {
130
- color: #fff;
131
- background: #7ad03a;
132
- display: inline-block;
133
- text-decoration: none;
134
- font-size: 13px;
135
- line-height: 30px;
136
- height: 26px;
137
- margin-left: 5px;
138
- padding: 0 10px 3px;
139
- -webkit-border-radius: 3px;
140
- border-radius: 3px;
141
- }
142
-
143
- .themeisle-sdk-license-activate-cta {
144
- color: #fff;
145
- background: #dd3d36;
146
- display: inline-block;
147
- text-decoration: none;
148
- font-size: 13px;
149
- line-height: 30px;
150
- height: 26px;
151
- margin-left: 5px;
152
- padding: 0 10px 3px;
153
- -webkit-border-radius: 3px;
154
- border-radius: 3px;
155
- }
156
-
157
- button.button.themeisle-sdk-licenser-button-cta {
158
- line-height: 26px;
159
- height: 29px;
160
- vertical-align: top;
161
- }
162
-
163
- </style>
164
- <?php
165
- echo sprintf(
166
- '<p>%s<input class="themeisle-sdk-license-input %s" type="text" id="%s_license" name="%s_license" value="%s" /><a class="%s">%s</a>&nbsp;&nbsp;&nbsp;<button name="%s_btn_trigger" class="button button-primary themeisle-sdk-licenser-button-cta" value="yes" type="submit" >%s</button></p><p class="description">%s</p>%s',
167
- ( ( 'valid' === $status ) ? sprintf( '<input type="hidden" value="%s" name="%s_license" />', $value, $this->product->get_key() ) : '' ),
168
- ( ( 'valid' === $status ) ? 'themeisle-sdk-text-input-valid' : '' ),
169
- $this->product->get_key(),
170
- ( ( 'valid' === $status ) ? $this->product->get_key() . '_mask' : $this->product->get_key() ),
171
- ( ( 'valid' === $status ) ? ( str_repeat( '*', 30 ) . substr( $value, - 5 ) ) : $value ),
172
- ( 'valid' === $status ? 'themeisle-sdk-license-deactivate-cta' : 'themeisle-sdk-license-activate-cta' ),
173
- ( 'valid' === $status ? $valid_string : $invalid_string ),
174
- $this->product->get_key(),
175
- ( 'valid' === $status ? $deactivate_string : $activate_string ),
176
- sprintf( $license_message, '<a href="' . $this->get_api_url() . '">' . $this->get_distributor_name() . '</a> ', $this->product->get_type() ),
177
- empty( $error_message ) ? '' : sprintf( '<p style="color:#dd3d36">%s</p>', $error_message )
178
- );
179
-
180
- }
181
-
182
- /**
183
- * Return the license status.
184
- *
185
- * @return string The License status.
186
- */
187
- public function get_license_status() {
188
-
189
- $license_data = get_option( $this->product->get_key() . '_license_data', '' );
190
-
191
- if ( '' === $license_data ) {
192
- return get_option( $this->product->get_key() . '_license_status', 'not_active' );
193
- }
194
-
195
- return isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
196
-
197
- }
198
-
199
- /**
200
- * Get remote api url.
201
- *
202
- * @return string Remote api url.
203
- */
204
- public function get_api_url() {
205
- if ( $this->is_from_partner( $this->product ) ) {
206
- return 'https://themeisle.com';
207
- }
208
-
209
- return $this->product->get_store_url();
210
- }
211
-
212
- /**
213
- * Get remote api url.
214
- *
215
- * @return string Remote api url.
216
- */
217
- public function get_distributor_name() {
218
- if ( $this->is_from_partner( $this->product ) ) {
219
- return 'ThemeIsle';
220
- }
221
-
222
- return $this->product->get_store_name();
223
- }
224
-
225
- /**
226
- * Show the admin notice regarding the license status.
227
- *
228
- * @return bool Should we show the notice ?
229
- */
230
- function show_notice() {
231
- if ( ! is_admin() ) {
232
- return false;
233
- }
234
-
235
- if ( apply_filters( $this->product->get_key() . '_hide_license_notices', false ) ) {
236
- return;
237
- }
238
- $status = $this->get_license_status();
239
- $no_activations_string = apply_filters( $this->product->get_key() . '_lc_no_activations_string', 'No activations left for %s !!!. You need to upgrade your plan in order to use %s on more websites. Please ask the %s Staff for more details.' );
240
- $no_valid_string = apply_filters( $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a href="%s">here</a>. ' );
241
-
242
- // No activations left for this license.
243
- if ( 'valid' != $status && $this->check_activation() ) {
244
- ?>
245
- <div class="error">
246
- <p><strong>
247
- <?php
248
- echo sprintf(
249
- $no_activations_string,
250
- $this->product->get_name(),
251
- $this->product->get_name(),
252
- '<a href="' . $this->get_api_url() . '" target="_blank">' . $this->get_distributor_name() . '</a>'
253
- );
254
- ?>
255
- </strong>
256
- </p>
257
- </div>
258
- <?php
259
- return false;
260
- }
261
- // Invalid license key.
262
- if ( 'valid' != $status ) {
263
- ?>
264
- <div class="error">
265
- <p>
266
- <strong><?php echo sprintf( $no_valid_string, $this->product->get_name() . ' ' . $this->product->get_type(), $this->get_api_url(), admin_url( 'options-general.php' ) . '#' . $this->product->get_key() . '_license' ); ?> </strong>
267
- </p>
268
- </div>
269
- <?php
270
-
271
- return false;
272
- }
273
-
274
- return true;
275
- }
276
-
277
- /**
278
- * Check if the license is active or not.
279
- *
280
- * @return bool
281
- */
282
- public function check_activation() {
283
- $license_data = get_option( $this->product->get_key() . '_license_data', '' );
284
- if ( '' === $license_data ) {
285
- return false;
286
- }
287
-
288
- return isset( $license_data->error ) ? ( 'no_activations_left' == $license_data->error ) : false;
289
-
290
- }
291
-
292
- /**
293
- * Check if the license is about to expire in the next month.
294
- *
295
- * @return bool
296
- */
297
- function check_expiration() {
298
- $license_data = get_option( $this->product->get_key() . '_license_data', '' );
299
- if ( '' === $license_data ) {
300
- return false;
301
- }
302
- if ( ! isset( $license_data->expires ) ) {
303
- return false;
304
- }
305
- if ( strtotime( $license_data->expires ) - time() > 30 * 24 * 3600 ) {
306
- return false;
307
- }
308
-
309
- return true;
310
- }
311
-
312
- /**
313
- * Return the renew url from the store used.
314
- *
315
- * @return string The renew url.
316
- */
317
- function renew_url() {
318
- $license_data = get_option( $this->product->get_key() . '_license_data', '' );
319
- if ( '' === $license_data ) {
320
- return $this->get_api_url();
321
- }
322
- if ( ! isset( $license_data->download_id ) || ! isset( $license_data->key ) ) {
323
- return $this->get_api_url();
324
- }
325
-
326
- return $this->get_api_url() . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
327
- }
328
-
329
- /**
330
- * Run the license check call.
331
- */
332
- public function product_valid() {
333
- if ( false !== ( $license = get_transient( $this->product->get_key() . '_license_data' ) ) ) {
334
- return;
335
- }
336
- $license = $this->check_license();
337
- set_transient( $this->product->get_key() . '_license_data', $license, 12 * HOUR_IN_SECONDS );
338
- update_option( $this->product->get_key() . '_license_data', $license );
339
- }
340
-
341
- /**
342
- * Check the license status.
343
- *
344
- * @return object The license data.
345
- */
346
- public function check_license() {
347
- $status = $this->get_license_status();
348
- if ( 'not_active' == $status ) {
349
- $license_data = new \stdClass();
350
- $license_data->license = 'not_active';
351
-
352
- return $license_data;
353
- }
354
- $license = trim( $this->license_key );
355
- $api_params = array(
356
- 'edd_action' => 'check_license',
357
- 'license' => $license,
358
- 'item_name' => rawurlencode( $this->product->get_name() ),
359
- 'url' => rawurlencode( home_url() ),
360
- );
361
- // Call the custom API.
362
- $response = wp_remote_get(
363
- add_query_arg( $api_params, $this->get_api_url() ),
364
- array(
365
- 'timeout' => 15,
366
- 'sslverify' => false,
367
- )
368
- );
369
- if ( is_wp_error( $response ) ) {
370
- $license_data = new \stdClass();
371
- $license_data->license = 'valid';
372
-
373
- } else {
374
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
375
- if ( ! is_object( $license_data ) ) {
376
- $license_data = new \stdClass();
377
- $license_data->license = 'valid';
378
- }
379
- }
380
- $license_old = get_option( $this->product->get_key() . '_license_data', '' );
381
- if ( 'valid' == $license_old->license && ( $license_data->license != $license_old->license ) ) {
382
- $this->increment_failed_checks();
383
- } else {
384
- $this->reset_failed_checks();
385
- }
386
-
387
- if ( $this->failed_checks <= self::$max_failed ) {
388
- return $license_old;
389
- }
390
-
391
- if ( isset( $license_old->hide_valid ) ) {
392
- $license_data->hide_valid = true;
393
- }
394
-
395
- if ( ! isset( $license_data->key ) ) {
396
- $license_data->key = isset( $license_old->key ) ? $license_old->key : '';
397
- }
398
-
399
- if ( isset( $license_old->hide_expiration ) ) {
400
- $license_data->hide_expiration = true;
401
- }
402
-
403
- if ( isset( $license_old->hide_activation ) ) {
404
- $license_data->hide_activation = true;
405
- }
406
-
407
- return $license_data;
408
-
409
- }
410
-
411
- /**
412
- * Increment the failed checks.
413
- */
414
- private function increment_failed_checks() {
415
- $this->failed_checks ++;
416
- update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
417
- }
418
-
419
- /**
420
- * Reset the failed checks
421
- */
422
- private function reset_failed_checks() {
423
- $this->failed_checks = 1;
424
- update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
425
- }
426
-
427
- /**
428
- * Set license validation error message.
429
- *
430
- * @param string $message Error message.
431
- */
432
- public function set_error( $message = '' ) {
433
- set_transient( $this->product->get_key() . 'act_err', $message, MINUTE_IN_SECONDS );
434
-
435
- return;
436
- }
437
-
438
- /**
439
- * Return the last error message.
440
- *
441
- * @return mixed Error message.
442
- */
443
- public function get_error() {
444
- return get_transient( $this->product->get_key() . 'act_err' );
445
- }
446
-
447
- /**
448
- * Activate the license remotely.
449
- */
450
- function activate_license() {
451
- // listen for our activate button to be clicked.
452
- if ( ! isset( $_POST[ $this->product->get_key() . '_btn_trigger' ] ) ) {
453
- return;
454
- }
455
- $status = $this->get_license_status();
456
- // retrieve the license from the database.
457
- $license = $_POST[ $this->product->get_key() . '_license' ];
458
- $api_params = array(
459
- 'license' => $license,
460
- 'item_name' => rawurlencode( $this->product->get_name() ),
461
- 'url' => rawurlencode( home_url() ),
462
- );
463
- if ( 'valid' != $status ) {
464
- // data to send in our API request.
465
- $api_params['edd_action'] = 'activate_license';
466
- } else {
467
- $api_params['edd_action'] = 'deactivate_license';
468
- }
469
- // Call the custom API.
470
- $response = wp_remote_get( add_query_arg( $api_params, $this->get_api_url() ) );
471
- // make sure the response came back okay.
472
- if ( is_wp_error( $response ) ) {
473
- $this->set_error( sprintf( 'ERROR: Failed to connect to the license service. Please try again later. Reason: %s', $response->get_error_message() ) );
474
-
475
- return;
476
- }
477
-
478
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
479
-
480
- if ( ! is_object( $license_data ) ) {
481
- $this->set_error( 'ERROR: Failed to validate license. Please try again in one minute.' );
482
-
483
- return;
484
- }
485
- if ( ! isset( $license_data->license ) ) {
486
- $license_data->license = 'invalid';
487
- }
488
-
489
- if ( ! isset( $license_data->key ) ) {
490
- $license_data->key = $license;
491
- }
492
- if ( 'valid' == $license_data->license ) {
493
- $this->reset_failed_checks();
494
- }
495
-
496
- $this->set_error( '' );
497
-
498
- if ( 'deactivate_license' === $api_params['edd_action'] ) {
499
-
500
- delete_option( $this->product->get_key() . '_license_data' );
501
- delete_option( $this->product->get_key() . '_license_plan' );
502
- delete_transient( $this->product->get_key() . '_license_data' );
503
-
504
- return;
505
- }
506
- if ( isset( $license_data->plan ) ) {
507
- update_option( $this->product->get_key() . '_license_plan', $license_data->plan );
508
- }
509
- update_option( $this->product->get_key() . '_license_data', $license_data );
510
- set_transient( $this->product->get_key() . '_license_data', $license_data, 12 * HOUR_IN_SECONDS );
511
-
512
- }
513
-
514
- /**
515
- * Load the Themes screen.
516
- */
517
- function load_themes_screen() {
518
- add_thickbox();
519
- add_action( 'admin_notices', array( &$this, 'update_nag' ) );
520
- }
521
-
522
- /**
523
- * Alter the nag for themes update.
524
- */
525
- function update_nag() {
526
- $theme = wp_get_theme( $this->product->get_slug() );
527
- $api_response = get_transient( $this->product_key );
528
- if ( false === $api_response || ! isset( $api_response->new_version ) ) {
529
- return;
530
- }
531
- $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
532
- $update_message = apply_filters( 'themeisle_sdk_license_update_message', 'Updating this theme will lose any customizations you have made. Cancel to stop, OK to update.' );
533
- $update_onclick = ' onclick="if ( confirm(\'' . esc_js( $update_message ) . '\') ) {return true;}return false;"';
534
- if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
535
- echo '<div id="update-nag">';
536
- printf(
537
- '<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.',
538
- $theme->get( 'Name' ),
539
- $api_response->new_version,
540
- sprintf( '%s&TB_iframe=true&amp;width=1024&amp;height=800', $this->product->get_changelog() ),
541
- $theme->get( 'Name' ),
542
- $update_url,
543
- $update_onclick
544
- );
545
- echo '</div>';
546
- echo '<div id="' . $this->product->get_slug() . '_' . 'changelog" style="display:none;">';
547
- echo wpautop( $api_response->sections['changelog'] );
548
- echo '</div>';
549
- }
550
- }
551
-
552
- /**
553
- * Alter update transient.
554
- *
555
- * @param mixed $value The transient data.
556
- *
557
- * @return mixed
558
- */
559
- function theme_update_transient( $value ) {
560
- $update_data = $this->check_for_update();
561
- if ( $update_data ) {
562
- $value->response[ $this->product->get_slug() ] = $update_data;
563
- }
564
-
565
- return $value;
566
- }
567
-
568
- /**
569
- * Check for updates
570
- *
571
- * @return array|bool Either the update data or false in case of failure.
572
- */
573
- function check_for_update() {
574
- $update_data = get_transient( $this->product_key );
575
-
576
- if ( false === $update_data ) {
577
- $failed = false;
578
- $update_data = $this->get_version_data();
579
- if ( empty( $update_data ) ) {
580
- $failed = true;
581
- }
582
- // If the response failed, try again in 30 minutes.
583
- if ( $failed ) {
584
- $data = new \stdClass();
585
- $data->new_version = $this->product->get_version();
586
- set_transient( $this->product_key, $data, 30 * MINUTE_IN_SECONDS );
587
-
588
- return false;
589
- }
590
- $update_data->sections = isset( $update_data->sections ) ? maybe_unserialize( $update_data->sections ) : null;
591
-
592
- set_transient( $this->product_key, $update_data, 12 * HOUR_IN_SECONDS );
593
- }
594
- if ( ! isset( $update_data->new_version ) ) {
595
- return false;
596
- }
597
- if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
598
- return false;
599
- }
600
-
601
- return (array) $update_data;
602
- }
603
-
604
- /**
605
- * Check remote api for latest version.
606
- *
607
- * @return bool|mixed Update api response.
608
- */
609
- private function get_version_data() {
610
- $api_params = array(
611
- 'edd_action' => 'get_version',
612
- 'version' => $this->product->get_version(),
613
- 'license' => empty( $this->license_key ) ? 'free' : $this->license_key,
614
- 'name' => rawurlencode( $this->product->get_name() ),
615
- 'slug' => $this->product->get_slug(),
616
- 'author' => rawurlencode( $this->get_distributor_name() ),
617
- 'url' => rawurlencode( home_url() ),
618
- );
619
- $response = wp_remote_get(
620
- add_query_arg( $api_params, $this->get_api_url() ),
621
- array(
622
- 'timeout' => 15,
623
- 'sslverify' => false,
624
- )
625
- );
626
- if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
627
- return false;
628
- }
629
- $update_data = json_decode( wp_remote_retrieve_body( $response ) );
630
- if ( ! is_object( $update_data ) ) {
631
- return false;
632
- }
633
-
634
- return $update_data;
635
- }
636
-
637
- /**
638
- * Delete the update transient
639
- */
640
- function delete_theme_update_transient() {
641
- delete_transient( $this->product_key );
642
- }
643
-
644
- /**
645
- * Check for Updates at the defined API endpoint and modify the update array.
646
- *
647
- * @param array $_transient_data Update array build by WordPress.
648
- *
649
- * @return mixed Modified update array with custom plugin data.
650
- */
651
- public function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
652
- if ( empty( $_transient_data ) || ! $this->do_check ) {
653
- $this->do_check = true;
654
-
655
- return $_transient_data;
656
- }
657
- $api_response = $this->api_request();
658
- if ( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
659
- if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
660
- $_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
661
- }
662
- }
663
-
664
- return $_transient_data;
665
- }
666
-
667
- /**
668
- * Calls the API and, if successfull, returns the object delivered by the API.
669
- *
670
- * @param string $_action The requested action.
671
- * @param array $_data Parameters for the API action.
672
- *
673
- * @return false||object
674
- */
675
- private function api_request( $_action = '', $_data = '' ) {
676
- $update_data = $this->get_version_data();
677
- if ( empty( $update_data ) ) {
678
- return false;
679
- }
680
- if ( $update_data && isset( $update_data->sections ) ) {
681
- $update_data->sections = maybe_unserialize( $update_data->sections );
682
- }
683
-
684
- return $update_data;
685
- }
686
-
687
- /**
688
- * Updates information on the "View version x.x details" page with custom data.
689
- *
690
- * @param mixed $_data Plugin data.
691
- * @param string $_action Action to send.
692
- * @param object $_args Arguments to use.
693
- *
694
- * @return object $_data
695
- */
696
- public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
697
- if ( ( 'plugin_information' != $_action ) || ! isset( $_args->slug ) || ( $_args->slug != $this->product->get_slug() ) ) {
698
- return $_data;
699
- }
700
- $api_response = $this->api_request();
701
- if ( false !== $api_response ) {
702
- $_data = $api_response;
703
- }
704
-
705
- return $_data;
706
- }
707
-
708
- /**
709
- * Disable SSL verification in order to prevent download update failures.
710
- *
711
- * @param array $args Http args.
712
- * @param string $url Url to check.
713
- *
714
- * @return array $array
715
- */
716
- function http_request_args( $args, $url ) {
717
- // If it is an https request and we are performing a package download, disable ssl verification.
718
- if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
719
- $args['sslverify'] = false;
720
- }
721
-
722
- return $args;
723
- }
724
-
725
- /**
726
- * Check if we should load the module for this product.
727
- *
728
- * @param Product $product Product data.
729
- *
730
- * @return bool Should we load the module?
731
- */
732
- public function can_load( $product ) {
733
-
734
- if ( $product->is_wordpress_available() ) {
735
- return false;
736
- }
737
-
738
- return ( apply_filters( $product->get_key() . '_enable_licenser', true ) === true );
739
-
740
- }
741
-
742
- /**
743
- * Load module logic.
744
- *
745
- * @param Product $product Product to load the module for.
746
- *
747
- * @return Licenser Module object.
748
- */
749
- public function load( $product ) {
750
- $this->product = $product;
751
-
752
- $this->product_key = $this->product->get_key() . '-update-response';
753
-
754
- $this->license_key = $this->product->get_license();
755
- if ( $this->product->requires_license() ) {
756
- $this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
757
- $this->register_license_hooks();
758
- }
759
-
760
- if ( $this->product->is_plugin() ) {
761
- add_filter(
762
- 'pre_set_site_transient_update_plugins',
763
- [
764
- $this,
765
- 'pre_set_site_transient_update_plugins_filter',
766
- ]
767
- );
768
- add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
769
- add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
770
-
771
- return $this;
772
- }
773
- if ( $this->product->is_theme() ) {
774
- add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
775
- add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
776
- add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
777
- add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
778
- add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
779
- add_filter( 'http_request_args', array( $this, 'disable_wporg_update' ), 5, 2 );
780
-
781
- return $this;
782
-
783
- }
784
-
785
- return $this;
786
- }
787
-
788
- /**
789
- * Register license fields for the products.
790
- */
791
- public function register_license_hooks() {
792
- add_action( 'admin_init', array( $this, 'register_settings' ) );
793
- add_action( 'admin_init', array( $this, 'activate_license' ) );
794
- add_action( 'admin_init', array( $this, 'product_valid' ), 99999999 );
795
- add_action( 'admin_notices', array( $this, 'show_notice' ) );
796
- add_filter( $this->product->get_key() . '_license_status', array( $this, 'get_license_status' ) );
797
- }
798
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- /**
3
- * The logger model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Modules
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- use ThemeisleSDK\Common\Abstract_Module;
15
- use ThemeisleSDK\Loader;
16
- use ThemeisleSDK\Product;
17
-
18
- // Exit if accessed directly.
19
- if ( ! defined( 'ABSPATH' ) ) {
20
- exit;
21
- }
22
-
23
- /**
24
- * Logger module for ThemeIsle SDK.
25
- */
26
- class Logger extends Abstract_Module {
27
- /**
28
- * Endpoint where to collect logs.
29
- */
30
- const TRACKING_ENDPOINT = 'http://log.themeisle.com/wp-json/v1/logs/';
31
-
32
-
33
- /**
34
- * Check if we should load the module for this product.
35
- *
36
- * @param Product $product Product to load the module for.
37
- *
38
- * @return bool Should we load ?
39
- */
40
- public function can_load( $product ) {
41
-
42
- return apply_filters( $product->get_slug() . '_sdk_enable_logger', true );
43
- }
44
-
45
- /**
46
- * Load module logic.
47
- *
48
- * @param Product $product Product to load.
49
- *
50
- * @return Logger Module object.
51
- */
52
- public function load( $product ) {
53
- $this->product = $product;
54
- $this->setup_notification();
55
- $this->setup_actions();
56
-
57
- return $this;
58
- }
59
-
60
- /**
61
- * Setup notification on admin.
62
- */
63
- public function setup_notification() {
64
- if ( ! $this->product->is_wordpress_available() ) {
65
- return;
66
- }
67
-
68
- add_filter( 'themeisle_sdk_registered_notifications', [ $this, 'add_notification' ] );
69
-
70
- }
71
-
72
- /**
73
- * Setup tracking actions.
74
- */
75
- public function setup_actions() {
76
- if ( ! $this->is_logger_active() ) {
77
- return;
78
- }
79
- $action_key = $this->product->get_key() . '_log_activity';
80
- if ( ! wp_next_scheduled( $action_key ) ) {
81
- wp_schedule_single_event( time() + ( rand( 1, 24 ) * 3600 ), $action_key );
82
- }
83
- add_action( $action_key, array( $this, 'send_log' ) );
84
-
85
- }
86
-
87
- /**
88
- * Check if the logger is active.
89
- *
90
- * @return bool Is logger active?
91
- */
92
- private function is_logger_active() {
93
- if ( ! $this->product->is_wordpress_available() ) {
94
- return true;
95
- }
96
- $pro_slug = $this->product->get_pro_slug();
97
-
98
- if ( ! empty( $pro_slug ) ) {
99
- $all_products = Loader::get_products();
100
- if ( isset( $all_products[ $pro_slug ] ) ) {
101
- return true;
102
- }
103
- }
104
-
105
- return ( get_option( $this->product->get_key() . '_logger_flag', 'no' ) === 'yes' );
106
- }
107
-
108
- /**
109
- * Add notification to queue.
110
- *
111
- * @param array $all_notifications Previous notification.
112
- *
113
- * @return array All notifications.
114
- */
115
- public function add_notification( $all_notifications ) {
116
-
117
- $message = apply_filters( $this->product->get_key() . '_logger_heading', 'Do you enjoy <b>{product}</b>? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.' );
118
-
119
- $message = str_replace(
120
- array( '{product}' ),
121
- $this->product->get_friendly_name(),
122
- $message
123
- );
124
- $button_submit = apply_filters( $this->product->get_key() . '_logger_button_submit', 'Sure, I would love to help.' );
125
- $button_cancel = apply_filters( $this->product->get_key() . '_logger_button_cancel', 'No, thanks.' );
126
-
127
- $all_notifications[] = [
128
- 'id' => $this->product->get_key() . '_logger_flag',
129
- 'message' => $message,
130
- 'ctas' => [
131
- 'confirm' => [
132
- 'link' => '#',
133
- 'text' => $button_submit,
134
- ],
135
- 'cancel' => [
136
- 'link' => '#',
137
- 'text' => $button_cancel,
138
- ],
139
- ],
140
- ];
141
-
142
- return $all_notifications;
143
- }
144
-
145
- /**
146
- * Send the statistics to the api endpoint.
147
- */
148
- public function send_log() {
149
- $environment = array();
150
- $theme = wp_get_theme();
151
- $environment['theme'] = array();
152
- $environment['theme']['name'] = $theme->get( 'Name' );
153
- $environment['theme']['author'] = $theme->get( 'Author' );
154
- $environment['plugins'] = get_option( 'active_plugins' );
155
- global $wp_version;
156
- wp_remote_post(
157
- self::TRACKING_ENDPOINT,
158
- array(
159
- 'method' => 'POST',
160
- 'timeout' => 3,
161
- 'redirection' => 5,
162
- 'headers' => array(
163
- 'X-ThemeIsle-Event' => 'log_site',
164
- ),
165
- 'body' => array(
166
- 'site' => get_site_url(),
167
- 'slug' => $this->product->get_slug(),
168
- 'version' => $this->product->get_version(),
169
- 'wp_version' => $wp_version,
170
- 'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
171
- 'environment' => $environment,
172
- 'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
173
- ),
174
- )
175
- );
176
- }
177
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php DELETED
@@ -1,459 +0,0 @@
1
- <?php
2
- /**
3
- * The notification model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Modules
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- use ThemeisleSDK\Common\Abstract_Module;
15
- use ThemeisleSDK\Product;
16
-
17
- // Exit if accessed directly.
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Notification module for ThemeIsle SDK.
24
- */
25
- class Notification extends Abstract_Module {
26
- /**
27
- * Show notifications only after the user has the product installed after this amount of time, in hours.
28
- */
29
- const MIN_INSTALL_TIME = 100;
30
- /**
31
- * How much time should we show the notification, in days.
32
- */
33
- const MAX_TIME_TO_LIVE = 7;
34
-
35
- /**
36
- * Number of days between notifications.
37
- */
38
- const TIME_BETWEEN_NOTIFICATIONS = 5;
39
-
40
- /**
41
- * Holds a possible notification list.
42
- *
43
- * @var array Notifications list.
44
- */
45
- private static $notifications = [];
46
-
47
- /**
48
- * Show notification data.
49
- */
50
- public static function show_notification() {
51
-
52
- $current_notification = self::get_last_notification();
53
-
54
- $notification_details = [];
55
- // Check if the saved notification is still present among the possible ones.
56
- if ( ! empty( $current_notification ) ) {
57
- $notification_details = self::get_notification_details( $current_notification );
58
- if ( empty( $notification_details ) ) {
59
- $current_notification = [];
60
- }
61
- }
62
- // Check if the notificatin is expired.
63
- if ( ! empty( $current_notification ) && self::is_notification_expired( $current_notification ) ) {
64
- update_option( $current_notification['id'], 'no' );
65
- self::set_last_active_notification_timestamp();
66
- $current_notification = [];
67
- }
68
- // If we don't have any saved notification, get a new one.
69
- if ( empty( $current_notification ) ) {
70
- $notification_details = self::get_random_notification();
71
- if ( empty( $notification_details ) ) {
72
- return;
73
- }
74
- self::set_active_notification(
75
- [
76
- 'id' => $notification_details['id'],
77
- 'display_at' => time(),
78
- ]
79
- );
80
- }
81
- if ( empty( $notification_details ) ) {
82
- return;
83
- }
84
- $notification_html = self::get_notification_html( $notification_details );
85
- do_action( $notification_details['id'] . '_before_render' );
86
-
87
- echo $notification_html;
88
-
89
- do_action( $notification_details['id'] . '_after_render' );
90
- self::render_snippets();
91
- }
92
-
93
- /**
94
- * Get last notification details.
95
- *
96
- * @return array Last notification details.
97
- */
98
- private static function get_last_notification() {
99
- $notification = self::get_notifications_metadata();
100
-
101
- return isset( $notification['last_notification'] ) ? $notification['last_notification'] : [];
102
- }
103
-
104
- /**
105
- * Get notification center details.
106
- *
107
- * @return array Notification center details.
108
- */
109
- private static function get_notifications_metadata() {
110
-
111
- $data = get_option(
112
- 'themeisle_sdk_notifications',
113
- [
114
- 'last_notification' => [],
115
- 'last_notification_active' => 0,
116
- ]
117
- );
118
-
119
- return $data;
120
-
121
- }
122
-
123
- /**
124
- * Check if the notification is still possible.
125
- *
126
- * @param array $notification Notification to check.
127
- *
128
- * @return array Either is still active or not.
129
- */
130
- private static function get_notification_details( $notification ) {
131
- $notifications = array_filter(
132
- self::$notifications,
133
- function ( $value ) use ( $notification ) {
134
- if ( isset( $value['id'] ) && isset( $notification['id'] ) && $value['id'] === $notification['id'] ) {
135
- return true;
136
- }
137
-
138
- return false;
139
- }
140
- );
141
-
142
- return ! empty( $notifications ) ? reset( $notifications ) : [];
143
- }
144
-
145
- /**
146
- * Check if the notification is expired.
147
- *
148
- * @param array $notification Notification to check.
149
- *
150
- * @return bool Either the notification is due.
151
- */
152
- private static function is_notification_expired( $notification ) {
153
- if ( ! isset( $notification['display_at'] ) ) {
154
- return true;
155
- }
156
-
157
- $notifications = array_filter(
158
- self::$notifications,
159
- function ( $value ) use ( $notification ) {
160
- if ( isset( $value['id'] ) && isset( $notification['id'] ) && $value['id'] === $notification['id'] ) {
161
- return true;
162
- }
163
-
164
- return false;
165
- }
166
- );
167
-
168
- if ( empty( $notifications ) ) {
169
- return true;
170
- }
171
- $notification_definition = reset( $notifications );
172
-
173
- $when_to_expire = isset( $notification_definition['expires_at'] )
174
- ? $notification_definition['expires_at'] :
175
- ( isset( $notification_definition['expires'] )
176
- ? ( $notification['display_at'] + $notification_definition['expires'] ) :
177
- ( $notification['display_at'] + self::MAX_TIME_TO_LIVE * DAY_IN_SECONDS )
178
- );
179
-
180
- return ( $when_to_expire - time() ) < 0;
181
- }
182
-
183
- /**
184
- * Set last notification details.
185
- */
186
- private static function set_last_active_notification_timestamp() {
187
- $metadata = self::get_notifications_metadata();
188
- $metadata['last_notification_active'] = time();
189
- update_option( 'themeisle_sdk_notifications', $metadata );
190
- }
191
-
192
- /**
193
- * Return notification to show.
194
- *
195
- * @return array Notification data.
196
- */
197
- public static function get_random_notification() {
198
- if ( ( time() - self::get_last_active_notification_timestamp() ) < self::TIME_BETWEEN_NOTIFICATIONS * DAY_IN_SECONDS ) {
199
- return [];
200
- }
201
-
202
- $notifications = self::$notifications;
203
- $notifications = array_filter(
204
- $notifications,
205
- function ( $value ) {
206
- if ( isset( $value['sticky'] ) && true === $value['sticky'] ) {
207
- return true;
208
- }
209
-
210
- return false;
211
- }
212
- );
213
- // No priority notifications, use all.
214
- if ( empty( $notifications ) ) {
215
- $notifications = self::$notifications;
216
- }
217
- if ( empty( $notifications ) ) {
218
- return [];
219
- }
220
- $notifications = array_values( $notifications );
221
-
222
- return $notifications[ array_rand( $notifications, 1 ) ];
223
-
224
- }
225
-
226
- /**
227
- * Get last notification details.
228
- *
229
- * @return array Last notification details.
230
- */
231
- private static function get_last_active_notification_timestamp() {
232
- $notification = self::get_notifications_metadata();
233
-
234
- return isset( $notification['last_notification_active'] ) ? $notification['last_notification_active'] : 0;
235
- }
236
-
237
- /**
238
- * Get last notification details.
239
- *
240
- * @param array $notification Notification data.
241
- */
242
- private static function set_active_notification( $notification ) {
243
- $metadata = self::get_notifications_metadata();
244
- $metadata['last_notification'] = $notification;
245
- update_option( 'themeisle_sdk_notifications', $metadata );
246
- }
247
-
248
- /**
249
- * Get notification html.
250
- *
251
- * @param array $notification_details Notification details.
252
- *
253
- * @return string Html for notice.
254
- */
255
- public static function get_notification_html( $notification_details ) {
256
- $default = [
257
- 'id' => '',
258
- 'heading' => '',
259
- 'message' => '',
260
- 'ctas' => [
261
- 'confirm' => [
262
- 'link' => '#',
263
- 'text' => '',
264
- ],
265
- 'cancel' => [
266
- 'link' => '#',
267
- 'text' => '',
268
- ],
269
- ],
270
- ];
271
- $notification_details = wp_parse_args( $notification_details, $default );
272
-
273
- $notification_html = '<div class="notice notice-success is-dismissible themeisle-sdk-notice" data-notification-id="' . esc_attr( $notification_details['id'] ) . '" id="' . esc_attr( $notification_details['id'] ) . '-notification"> <div class="themeisle-sdk-notification-box">';
274
-
275
- if ( ! empty( $notification_details['heading'] ) ) {
276
- $notification_html .= sprintf( '<h4>%s</h4>', wp_kses_post( $notification_details['heading'] ) );
277
- }
278
- if ( ! empty( $notification_details['message'] ) ) {
279
- $notification_html .= wp_kses_post( $notification_details['message'] );
280
- }
281
- $notification_html .= '<div class="actions">';
282
-
283
- if ( ! empty( $notification_details['ctas']['confirm']['text'] ) ) {
284
- $notification_html .= sprintf(
285
- '<a href="%s" target="_blank" class=" button button-primary %s" data-confirm="yes" >%s</a>',
286
- esc_url( $notification_details['ctas']['confirm']['link'] ),
287
- esc_attr( $notification_details['id'] . '_confirm' ),
288
- wp_kses_post( $notification_details['ctas']['confirm']['text'] )
289
- );
290
- }
291
-
292
- if ( ! empty( $notification_details['ctas']['cancel']['text'] ) ) {
293
- $notification_html .= sprintf(
294
- '<a href="%s" class=" button %s" data-confirm="no">%s</a>',
295
- esc_url( $notification_details['ctas']['cancel']['link'] ),
296
- esc_attr( $notification_details['id'] ) . '_cancel',
297
- wp_kses_post( $notification_details['ctas']['cancel']['text'] )
298
- );
299
- }
300
-
301
- $notification_html .= '</div>';
302
- $notification_html .= ' </div>';
303
- $notification_html .= ' </div>';
304
-
305
- return $notification_html;
306
- }
307
-
308
- /**
309
- * Adds js snippet for hiding the notice.
310
- */
311
- public static function render_snippets() {
312
-
313
- ?>
314
- <style type="text/css">
315
- .themeisle-sdk-notification-box {
316
- padding: 3px;
317
- }
318
-
319
- .themeisle-sdk-notification-box .actions {
320
- margin-top: 6px;
321
- margin-bottom: 4px;
322
- }
323
-
324
- .themeisle-sdk-notification-box .button {
325
- margin-right: 5px;
326
- }
327
- </style>
328
- <script type="text/javascript">
329
- (function ($) {
330
- $(document).ready(function () {
331
- $('#wpbody-content').on('click', ".themeisle-sdk-notice a.button, .themeisle-sdk-notice .notice-dismiss", function (e) {
332
-
333
- var container = $('.themeisle-sdk-notice');
334
- var link = $(this);
335
- var notification_id = container.attr('data-notification-id');
336
- var confirm = link.attr('data-confirm');
337
- if (typeof confirm === "undefined") {
338
- confirm = 'no';
339
- }
340
- $.post(
341
- ajaxurl,
342
- {
343
- 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
344
- 'action': 'themeisle_sdk_dismiss_notice',
345
- 'id': notification_id,
346
- 'confirm': confirm
347
- }
348
- );
349
- if (confirm === 'yes') {
350
- $(this).trigger('themeisle-sdk:confirmed');
351
- } else {
352
- $(this).trigger('themeisle-sdk:canceled');
353
- }
354
- container.hide();
355
- if (link.attr('href') === '#') {
356
- return false;
357
- }
358
- });
359
- });
360
- })(jQuery);
361
- </script>
362
- <?php
363
- }
364
-
365
- /**
366
- * Dismiss the notification.
367
- */
368
- static function dismiss() {
369
- check_ajax_referer( (string) __CLASS__, 'nonce' );
370
-
371
- $id = isset( $_POST['id'] ) ? sanitize_text_field( $_POST['id'] ) : '';
372
- $confirm = isset( $_POST['confirm'] ) ? sanitize_text_field( $_POST['confirm'] ) : 'no';
373
-
374
- if ( empty( $id ) ) {
375
- wp_send_json( [] );
376
- }
377
- self::set_last_active_notification_timestamp();
378
- update_option( $id, $confirm );
379
- do_action( $id . '_process_confirm', $confirm );
380
- wp_send_json( [] );
381
- }
382
-
383
- /**
384
- * Check if we should load the notification module.
385
- *
386
- * @param Product $product Product to check.
387
- *
388
- * @return bool Should we load this?
389
- */
390
- public function can_load( $product ) {
391
-
392
- if ( $this->is_from_partner( $product ) ) {
393
- return false;
394
- }
395
- if ( ! current_user_can( 'manage_options' ) ) {
396
- return false;
397
- }
398
- if ( ( time() - $product->get_install_time() ) < ( self::MIN_INSTALL_TIME * HOUR_IN_SECONDS ) ) {
399
- return false;
400
- }
401
-
402
- return true;
403
- }
404
-
405
- /**
406
- * Setup notifications queue.
407
- */
408
- public static function setup_notifications() {
409
- $notifications = apply_filters( 'themeisle_sdk_registered_notifications', [] );
410
- $notifications = array_filter(
411
- $notifications,
412
- function ( $value ) {
413
- if ( ! isset( $value['id'] ) ) {
414
- return false;
415
- }
416
- if ( get_option( $value['id'], '' ) !== '' ) {
417
- return false;
418
- }
419
-
420
- return apply_filters( $value['id'] . '_should_show', true );
421
- }
422
- );
423
- self::$notifications = $notifications;
424
- }
425
- /**
426
- * Load the module logic.
427
- *
428
- * @param Product $product Product to load the module for.
429
- *
430
- * @return Notification Module instance.
431
- */
432
- public function load( $product ) {
433
- if ( apply_filters( 'themeisle_sdk_hide_notifications', false ) ) {
434
- return;
435
- }
436
- $this->product = $product;
437
-
438
- $notifications = apply_filters( 'themeisle_sdk_registered_notifications', [] );
439
- $notifications = array_filter(
440
- $notifications,
441
- function ( $value ) {
442
- if ( ! isset( $value['id'] ) ) {
443
- return false;
444
- }
445
- if ( get_option( $value['id'], '' ) !== '' ) {
446
- return false;
447
- }
448
-
449
- return apply_filters( $value['id'] . '_should_show', true );
450
- }
451
- );
452
- self::$notifications = $notifications;
453
- add_action( 'admin_notices', array( __CLASS__, 'show_notification' ) );
454
- add_action( 'wp_ajax_themeisle_sdk_dismiss_notice', array( __CLASS__, 'dismiss' ) );
455
- add_action( 'admin_head', array( __CLASS__, 'setup_notifications' ) );
456
-
457
- return $this;
458
- }
459
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php DELETED
@@ -1,374 +0,0 @@
1
- <?php
2
- /**
3
- * The class that exposes hooks for recommend.
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Rollback
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- // Exit if accessed directly.
15
- use ThemeisleSDK\Common\Abstract_Module;
16
- use ThemeisleSDK\Product;
17
-
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Expose endpoints for ThemeIsle SDK.
24
- */
25
- class Recommendation extends Abstract_Module {
26
-
27
-
28
- /**
29
- * Load module logic.
30
- *
31
- * @param Product $product Product to load.
32
- */
33
- public function load( $product ) {
34
- $this->product = $product;
35
- $this->setup_hooks();
36
-
37
- return $this;
38
- }
39
-
40
- /**
41
- * Setup endpoints.
42
- */
43
- private function setup_hooks() {
44
- add_action( $this->product->get_key() . '_recommend_products', array( $this, 'render_products_box' ), 10, 4 );
45
- add_action( 'admin_head', array( $this, 'enqueue' ) );
46
- }
47
-
48
- /**
49
- * Check if we should load the module for this product.
50
- *
51
- * @param Product $product Product data.
52
- *
53
- * @return bool Should we load the module?
54
- */
55
- public function can_load( $product ) {
56
- return true;
57
- }
58
-
59
- /**
60
- * Render products box content.
61
- *
62
- * @param array $plugins_list - list of useful plugins (in slug => nicename format).
63
- * @param array $themes_list - list of useful themes (in slug => nicename format).
64
- * @param array $strings - list of translated strings.
65
- * @param array $preferences - list of preferences.
66
- */
67
- function render_products_box( $plugins_list, $themes_list, $strings, $preferences = array() ) {
68
-
69
- if ( empty( $plugins_list ) && empty( $themes_list ) ) {
70
- return;
71
- }
72
-
73
- if ( ! empty( $plugins_list ) && ! current_user_can( 'install_plugins' ) ) {
74
- return;
75
- }
76
-
77
- if ( ! empty( $themes_list ) && ! current_user_can( 'install_themes' ) ) {
78
- return;
79
- }
80
-
81
- add_thickbox();
82
-
83
- if ( ! empty( $themes_list ) ) {
84
- $list = $this->get_themes( $themes_list, $preferences );
85
-
86
- if ( has_action( $this->product->get_key() . '_recommend_products_theme_template' ) ) {
87
- do_action( $this->product->get_key() . '_recommend_products_theme_template', $list, $strings, $preferences );
88
- } else {
89
- echo '<div class="recommend-product">';
90
-
91
- foreach ( $list as $theme ) {
92
- echo '<div class="plugin_box">';
93
- echo ' <img class="theme-banner" src="' . $theme->screenshot_url . '">';
94
- echo ' <div class="title-action-wrapper">';
95
- echo ' <span class="plugin-name">' . esc_html( $theme->custom_name ) . '</span>';
96
- if ( ! isset( $preferences['description'] ) || ( isset( $preferences['description'] ) && $preferences['description'] ) ) {
97
- echo '<span class="plugin-desc">' . esc_html( substr( $theme->description, 0, strpos( $theme->description, '.' ) ) ) . '.</span>';
98
- }
99
- echo ' </div>';
100
- echo '<div class="plugin-box-footer">';
101
- echo ' <div class="button-wrap">';
102
- echo ' <a class="button button-primary " href="' . esc_url( $theme->custom_url ) . '"><span class="dashicons dashicons-external"></span>' . esc_html( $strings['install'] ) . '</a>';
103
- echo ' </div>';
104
- echo ' </div>';
105
- echo '</div>';
106
- }
107
-
108
- echo '</div>';
109
- }
110
- }
111
- if ( ! empty( $plugins_list ) ) {
112
- $list = $this->get_plugins( $plugins_list, $preferences );
113
-
114
- if ( has_action( $this->product->get_key() . '_recommend_products_plugin_template' ) ) {
115
- do_action( $this->product->get_key() . '_recommend_products_plugin_template', $list, $strings, $preferences );
116
- } else {
117
- echo '<div class="recommend-product">';
118
-
119
- foreach ( $list as $current_plugin ) {
120
- echo '<div class="plugin_box">';
121
- echo ' <img class="plugin-banner" src="' . $current_plugin->custom_image . '">';
122
- echo ' <div class="title-action-wrapper">';
123
- echo ' <span class="plugin-name">' . esc_html( $current_plugin->custom_name ) . '</span>';
124
- if ( ! isset( $preferences['description'] ) || ( isset( $preferences['description'] ) && $preferences['description'] ) ) {
125
- echo '<span class="plugin-desc">' . esc_html( substr( $current_plugin->short_description, 0, strpos( $current_plugin->short_description, '.' ) ) ) . '. </span>';
126
- }
127
- echo ' </div>';
128
- echo ' <div class="plugin-box-footer">';
129
- echo ' <a class="button button-primary thickbox open-plugin-details-modal" href="' . esc_url( $current_plugin->custom_url ) . '"><span class="dashicons dashicons-external"></span>' . esc_html( $strings['install'] ) . '</a>';
130
- echo ' </div>';
131
- echo '</div>';
132
- }
133
-
134
- echo '</div>';
135
- }
136
- }
137
-
138
- }
139
-
140
- /**
141
- * Collect all the information for the themes list.
142
- *
143
- * @param array $themes_list - list of useful themes (in slug => nicename format).
144
- * @param array $preferences - list of preferences.
145
- *
146
- * @return array
147
- */
148
- private function get_themes( $themes_list, $preferences ) {
149
- $list = array();
150
- foreach ( $themes_list as $slug => $nicename ) {
151
- $theme = $this->call_theme_api( $slug );
152
- if ( ! $theme ) {
153
- continue;
154
- }
155
-
156
- $url = add_query_arg(
157
- array(
158
- 'theme' => $theme->slug,
159
- ),
160
- network_admin_url( 'theme-install.php' )
161
- );
162
-
163
- $name = empty( $nicename ) ? $theme->name : $nicename;
164
-
165
- $theme->custom_url = $url;
166
- $theme->custom_name = $name;
167
-
168
- $list[] = $theme;
169
- }
170
-
171
- return $list;
172
- }
173
-
174
- /**
175
- * Call theme api
176
- *
177
- * @param string $slug theme slug.
178
- *
179
- * @return array|mixed|object
180
- */
181
- private function call_theme_api( $slug ) {
182
- $theme = get_transient( 'ti_theme_info_' . $slug );
183
-
184
- if ( false !== $theme ) {
185
- return $theme;
186
- }
187
-
188
- $products = wp_remote_get(
189
- 'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[theme]=' . $slug . '&request[per_page]=1'
190
- );
191
- $products = json_decode( wp_remote_retrieve_body( $products ) );
192
- if ( is_object( $products ) ) {
193
- $theme = $products->themes[0];
194
- set_transient( 'ti_theme_info_' . $slug, $theme, 6 * HOUR_IN_SECONDS );
195
- }
196
-
197
- return $theme;
198
- }
199
-
200
- /**
201
- * Collect all the information for the plugins list.
202
- *
203
- * @param array $plugins_list - list of useful plugins (in slug => nicename format).
204
- * @param array $preferences - list of preferences.
205
- *
206
- * @return array
207
- */
208
- private function get_plugins( $plugins_list, $preferences ) {
209
- $list = array();
210
- foreach ( $plugins_list as $plugin => $nicename ) {
211
- $current_plugin = $this->call_plugin_api( $plugin );
212
-
213
- $name = empty( $nicename ) ? $current_plugin->name : $nicename;
214
-
215
- $image = $current_plugin->banners['low'];
216
- if ( isset( $preferences['image'] ) && 'icon' === $preferences['image'] ) {
217
- $image = $current_plugin->icons['1x'];
218
- }
219
-
220
- $url = add_query_arg(
221
- array(
222
- 'tab' => 'plugin-information',
223
- 'plugin' => $current_plugin->slug,
224
- 'TB_iframe' => true,
225
- 'width' => 800,
226
- 'height' => 800,
227
- ),
228
- network_admin_url( 'plugin-install.php' )
229
- );
230
-
231
- $current_plugin->custom_url = $url;
232
- $current_plugin->custom_name = $name;
233
- $current_plugin->custom_image = $image;
234
-
235
- $list[] = $current_plugin;
236
- }
237
-
238
- return $list;
239
- }
240
-
241
- /**
242
- * Call plugin api
243
- *
244
- * @param string $slug plugin slug.
245
- *
246
- * @return array|mixed|object
247
- */
248
- private function call_plugin_api( $slug ) {
249
- include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
250
-
251
- $call_api = get_transient( 'ti_plugin_info_' . $slug );
252
-
253
- if ( false === $call_api ) {
254
- $call_api = plugins_api(
255
- 'plugin_information',
256
- array(
257
- 'slug' => $slug,
258
- 'fields' => array(
259
- 'downloaded' => false,
260
- 'rating' => false,
261
- 'description' => false,
262
- 'short_description' => true,
263
- 'donate_link' => false,
264
- 'tags' => false,
265
- 'sections' => true,
266
- 'homepage' => true,
267
- 'added' => false,
268
- 'last_updated' => false,
269
- 'compatibility' => false,
270
- 'tested' => false,
271
- 'requires' => false,
272
- 'downloadlink' => false,
273
- 'icons' => true,
274
- 'banners' => true,
275
- ),
276
- )
277
- );
278
- set_transient( 'ti_plugin_info_' . $slug, $call_api, 30 * MINUTE_IN_SECONDS );
279
- }
280
-
281
- return $call_api;
282
- }
283
-
284
- /**
285
- * Load css and scripts for the plugin recommend page.
286
- */
287
- public function enqueue() {
288
- $screen = get_current_screen();
289
-
290
- if ( ! isset( $screen->id ) ) {
291
- return;
292
- }
293
- if ( false === apply_filters( $this->product->get_key() . '_enqueue_recommend', false, $screen->id ) ) {
294
- return;
295
- }
296
-
297
- ?>
298
- <style type="text/css">
299
- .recommend-product {
300
- display: flex;
301
- justify-content: space-between;
302
- flex-wrap: wrap;
303
- }
304
-
305
- .recommend-product .theme-banner {
306
- width:200px;
307
- margin: auto;
308
- }
309
- .recommend-product .plugin-banner {
310
- width: 100px;
311
- margin: auto;
312
- }
313
-
314
- .recommend-product .plugin_box .button span{
315
-
316
- margin-top: 2px;
317
- margin-right: 7px;
318
- }
319
- .recommend-product .plugin_box .button{
320
- margin-bottom:10px;
321
- }
322
- .recommend-product .plugin_box {
323
- margin-bottom: 20px;
324
- padding-top: 5px;
325
- display: flex;
326
- box-shadow: 0px 0px 10px -5px rgba(0,0,0,0.55);
327
- background: #fff;
328
- border-radius: 5px;
329
- flex-direction: column;
330
- justify-content: flex-start;
331
- width: 95%;
332
- }
333
-
334
- .recommend-product .title-action-wrapper {
335
- padding: 15px 20px 5px 20px;
336
- }
337
-
338
- .recommend-product .plugin-name {
339
- font-size: 18px;
340
- display: block;
341
- white-space: nowrap;
342
- text-overflow: ellipsis;
343
- margin-bottom: 10px;
344
- overflow: hidden;
345
- line-height: normal;
346
- }
347
-
348
-
349
- .recommend-product .plugin-desc {
350
- display: block;
351
- margin-bottom: 10px;
352
- font-size: 13px;
353
- color: #777;
354
- line-height: 1.6;
355
- }
356
-
357
- .recommend-product .button-wrap > div {
358
- padding: 0;
359
- margin: 0;
360
- }
361
-
362
- .plugin-box-footer {
363
- display: flex;
364
- justify-content: space-around;
365
- vertical-align: middle;
366
- align-items: center;
367
- padding: 0px 10px 5px;
368
- flex: 1;
369
- margin-top: auto;
370
- }
371
- </style>
372
- <?php
373
- }
374
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Review.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
- /**
3
- * The Review model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Modules
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- use ThemeisleSDK\Common\Abstract_Module;
15
- use ThemeisleSDK\Product;
16
-
17
- // Exit if accessed directly.
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Review module for ThemeIsle SDK.
24
- */
25
- class Review extends Abstract_Module {
26
-
27
- /**
28
- * Check if we should load module for this.
29
- *
30
- * @param Product $product Product to check.
31
- *
32
- * @return bool Should load ?
33
- */
34
- public function can_load( $product ) {
35
- if ( $this->is_from_partner( $product ) ) {
36
- return false;
37
- }
38
- if ( ! $product->is_wordpress_available() ) {
39
- return false;
40
- }
41
-
42
- return apply_filters( $product->get_slug() . '_sdk_should_review', true );
43
- }
44
-
45
-
46
- /**
47
- * Add notification to queue.
48
- *
49
- * @param array $all_notifications Previous notification.
50
- *
51
- * @return array All notifications.
52
- */
53
- public function add_notification( $all_notifications ) {
54
-
55
- $developers = [
56
- 'Bogdan',
57
- 'Marius',
58
- 'Hardeep',
59
- 'Rodica',
60
- 'Stefan',
61
- 'Uriahs',
62
- 'Madalin',
63
- 'Cristi',
64
- 'Silviu',
65
- 'Andrei',
66
- ];
67
-
68
- $link = 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
69
-
70
- $message = apply_filters( $this->product->get_key() . '_feedback_review_message', '<p>Hey, it’s great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}</p>' );
71
-
72
- $button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', 'Ok, I will gladly help.' );
73
- $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', 'No, thanks.' );
74
- $message = str_replace(
75
- [ '{product}', '{developer}' ],
76
- [
77
- $this->product->get_friendly_name(),
78
- $developers[ strlen( get_site_url() ) % 10 ],
79
- ],
80
- $message
81
- );
82
-
83
- $all_notifications[] = [
84
- 'id' => $this->product->get_key() . '_review_flag',
85
- 'message' => $message,
86
- 'ctas' => [
87
- 'confirm' => [
88
- 'link' => $link,
89
- 'text' => $button_submit,
90
- ],
91
- 'cancel' => [
92
- 'link' => '#',
93
- 'text' => $button_cancel,
94
- ],
95
- ],
96
- ];
97
-
98
- return $all_notifications;
99
- }
100
-
101
-
102
- /**
103
- * Load module logic.
104
- *
105
- * @param Product $product Product to load.
106
- *
107
- * @return Review Module instance.
108
- */
109
- public function load( $product ) {
110
-
111
- $this->product = $product;
112
-
113
- add_filter( 'themeisle_sdk_registered_notifications', [ $this, 'add_notification' ] );
114
-
115
- return $this;
116
- }
117
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php DELETED
@@ -1,376 +0,0 @@
1
- <?php
2
- /**
3
- * The rollback class for ThemeIsle SDK.
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Rollback
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- // Exit if accessed directly.
15
- use ThemeisleSDK\Common\Abstract_Module;
16
- use ThemeisleSDK\Product;
17
-
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Rollback for ThemeIsle SDK.
24
- */
25
- class Rollback extends Abstract_Module {
26
-
27
- /**
28
- * Add js scripts for themes rollback.
29
- */
30
- public function add_footer() {
31
- $screen = get_current_screen();
32
- if ( ! isset( $screen->parent_file ) ) {
33
- return;
34
- }
35
- if ( 'themes.php' !== $screen->parent_file ) {
36
- return;
37
- }
38
- if ( ! $this->product->is_theme() ) {
39
- return;
40
- }
41
- $version = $this->get_rollback();
42
- if ( empty( $version ) ) {
43
- return;
44
- }
45
- ?>
46
- <script type="text/javascript">
47
- jQuery(document).ready(function ($) {
48
- setInterval(checkTheme, 500);
49
-
50
- function checkTheme() {
51
- var theme = '<?php echo esc_attr( $this->product->get_slug() ); ?>-action';
52
-
53
- if (jQuery('#' + theme).length > 0) {
54
- if (jQuery('.theme-overlay.active').is(':visible')) {
55
- if (jQuery('#' + theme + '-rollback').length === 0) {
56
- jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) ); ?>">Rollback to v<?php echo esc_attr( $version['version'] ); ?></a>')
57
- }
58
- }
59
-
60
- }
61
- }
62
- })
63
-
64
- </script>
65
- <?php
66
-
67
- }
68
-
69
- /**
70
- * Get the last rollback for this product.
71
- *
72
- * @return array The rollback version.
73
- */
74
- public function get_rollback() {
75
- $rollback = array();
76
- $versions = $this->get_api_versions();
77
- $versions = apply_filters( $this->product->get_key() . '_rollbacks', $versions );
78
- if ( empty( $versions ) ) {
79
- return $rollback;
80
- }
81
- if ( $versions ) {
82
- usort( $versions, array( $this, 'sort_rollback_array' ) );
83
- foreach ( $versions as $version ) {
84
- if ( isset( $version['version'] ) && isset( $version['url'] ) && version_compare( $this->product->get_version(), $version['version'], '>' ) ) {
85
- $rollback = $version;
86
- break;
87
- }
88
- }
89
- }
90
-
91
- return $rollback;
92
- }
93
-
94
- /**
95
- * Get versions array from wp.org
96
- *
97
- * @return array Array of versions.
98
- */
99
- private function get_api_versions() {
100
-
101
- $cache_key = $this->product->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->product->get_version() ) . 'versions';
102
- $cache_versions = get_transient( $cache_key );
103
- if ( false === $cache_versions ) {
104
- $versions = $this->get_remote_versions();
105
- set_transient( $cache_key, $versions, 5 * DAY_IN_SECONDS );
106
- } else {
107
- $versions = is_array( $cache_versions ) ? $cache_versions : array();
108
- }
109
-
110
- return $versions;
111
- }
112
-
113
- /**
114
- * Get remote versions zips.
115
- *
116
- * @return array Array of available versions.
117
- */
118
- private function get_remote_versions() {
119
- $url = $this->get_versions_api_url();
120
- if ( empty( $url ) ) {
121
- return [];
122
- }
123
- $response = wp_remote_get( $url );
124
- if ( is_wp_error( $response ) ) {
125
- return array();
126
- }
127
- $response = wp_remote_retrieve_body( $response );
128
-
129
- if ( is_serialized( $response ) ) {
130
- $response = maybe_unserialize( $response );
131
- } else {
132
- $response = json_decode( $response );
133
- }
134
-
135
- if ( ! is_object( $response ) ) {
136
- return array();
137
- }
138
- if ( ! isset( $response->versions ) ) {
139
- return array();
140
- }
141
-
142
- $versions = array();
143
- foreach ( $response->versions as $key => $value ) {
144
- $versions[] = array(
145
- 'version' => is_object( $value ) ? $value->version : $key,
146
- 'url' => is_object( $value ) ? $value->file : $value,
147
- );
148
- }
149
-
150
- return $versions;
151
- }
152
-
153
- /**
154
- * Return url where to check for versions.
155
- *
156
- * @return string Url where to check for versions.
157
- */
158
- private function get_versions_api_url() {
159
- if ( $this->product->is_wordpress_available() && $this->product->is_plugin() ) {
160
- return sprintf( 'https://api.wordpress.org/plugins/info/1.0/%s', $this->product->get_slug() );
161
- }
162
- if ( $this->product->is_wordpress_available() && $this->product->is_theme() ) {
163
- return sprintf( 'https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=%s&request[fields][versions]=true', $this->product->get_slug() );
164
- }
165
- $license = $this->product->get_license();
166
- if ( $this->product->requires_license() && strlen( $license ) < 10 ) {
167
- return '';
168
- }
169
-
170
- return sprintf( '%s?edd_action=get_versions&name=%s&url=%s&license=%s', $this->product->get_store_url(), urlencode( $this->product->get_name() ), urlencode( get_site_url() ), $license );
171
- }
172
-
173
- /**
174
- * Show the rollback links in the plugin page.
175
- *
176
- * @param array $links Plugin links.
177
- *
178
- * @return array $links Altered links.
179
- */
180
- public function add_rollback_link( $links ) {
181
- $version = $this->get_rollback();
182
- if ( empty( $version ) ) {
183
- return $links;
184
- }
185
- $links[] = '<a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) . '">' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', 'Rollback to v%s' ), $version['version'] ) . '</a>';
186
-
187
- return $links;
188
- }
189
-
190
- /**
191
- * Start the rollback operation.
192
- */
193
- public function start_rollback() {
194
- if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) {
195
- wp_nonce_ays( '' );
196
- }
197
-
198
- if ( $this->product->is_plugin() ) {
199
- $this->start_rollback_plugin();
200
-
201
- return;
202
- }
203
- if ( $this->product->is_theme() ) {
204
- $this->start_rollback_theme();
205
-
206
- return;
207
- }
208
- }
209
-
210
- /**
211
- * Start the rollback operation for the plugin.
212
- */
213
- private function start_rollback_plugin() {
214
- $rollback = $this->get_rollback();
215
- $plugin_transient = get_site_transient( 'update_plugins' );
216
- $plugin_folder = $this->product->get_slug();
217
- $plugin_file = $this->product->get_file();
218
- $version = $rollback['version'];
219
- $temp_array = array(
220
- 'slug' => $plugin_folder,
221
- 'new_version' => $version,
222
- 'package' => $rollback['url'],
223
- );
224
-
225
- $temp_object = (object) $temp_array;
226
- $plugin_transient->response[ $plugin_folder . '/' . $plugin_file ] = $temp_object;
227
- set_site_transient( 'update_plugins', $plugin_transient );
228
-
229
- $transient = get_transient( $this->product->get_key() . '_warning_rollback' );
230
-
231
- if ( false === $transient ) {
232
- set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
233
- require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
234
- $title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
235
- $plugin = $plugin_folder . '/' . $plugin_file;
236
- $nonce = 'upgrade-plugin_' . $plugin;
237
- $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
238
- $upgrader_skin = new \Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) );
239
- $upgrader = new \Plugin_Upgrader( $upgrader_skin );
240
- $upgrader->upgrade( $plugin );
241
- delete_transient( $this->product->get_key() . '_warning_rollback' );
242
- wp_die(
243
- '',
244
- $title,
245
- array(
246
- 'response' => 200,
247
- )
248
- );
249
- }
250
- }
251
-
252
- /**
253
- * Start the rollback operation for the theme.
254
- */
255
- private function start_rollback_theme() {
256
- add_filter( 'update_theme_complete_actions', array( $this, 'alter_links_theme_upgrade' ) );
257
- $rollback = $this->get_rollback();
258
- $transient = get_site_transient( 'update_themes' );
259
- $folder = $this->product->get_slug();
260
- $version = $rollback['version'];
261
- $temp_array = array(
262
- 'new_version' => $version,
263
- 'package' => $rollback['url'],
264
- );
265
-
266
- $transient->response[ $folder . '/style.css' ] = $temp_array;
267
- set_site_transient( 'update_themes', $transient );
268
-
269
- $transient = get_transient( $this->product->get_key() . '_warning_rollback' );
270
-
271
- if ( false === $transient ) {
272
- set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
273
- require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
274
- $title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
275
- $theme = $folder . '/style.css';
276
- $nonce = 'upgrade-theme_' . $theme;
277
- $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
278
-
279
- $upgrader = new \Theme_Upgrader( new \Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
280
- $upgrader->upgrade( $theme );
281
- delete_transient( $this->product->get_key() . '_warning_rollback' );
282
- wp_die(
283
- '',
284
- $title,
285
- array(
286
- 'response' => 200,
287
- )
288
- );
289
- }
290
- }
291
-
292
- /**
293
- * Alter links and remove duplicate customize message.
294
- *
295
- * @param array $links Array of old links.
296
- *
297
- * @return mixed Array of links.
298
- */
299
- public function alter_links_theme_upgrade( $links ) {
300
- if ( isset( $links['preview'] ) ) {
301
- $links['preview'] = str_replace( '<span aria-hidden="true">Customize</span>', '', $links['preview'] );
302
- }
303
-
304
- return $links;
305
- }
306
-
307
- /**
308
- * Loads product object.
309
- *
310
- * @param Product $product Product object.
311
- *
312
- * @return bool Should we load the module?
313
- */
314
- public function can_load( $product ) {
315
- if ( $this->is_from_partner( $product ) ) {
316
- return false;
317
- }
318
- if ( $product->is_theme() && ! current_user_can( 'switch_themes' ) ) {
319
- return false;
320
- }
321
-
322
- if ( $product->is_plugin() && ! current_user_can( 'install_plugins' ) ) {
323
- return false;
324
- }
325
-
326
- return true;
327
- }
328
-
329
- /**
330
- * Sort the rollbacks array in descending order.
331
- *
332
- * @param mixed $a First version to compare.
333
- * @param mixed $b Second version to compare.
334
- *
335
- * @return bool Which version is greater?
336
- */
337
- public function sort_rollback_array( $a, $b ) {
338
- return version_compare( $a['version'], $b['version'], '<' ) > 0;
339
- }
340
-
341
- /**
342
- * Load module logic.
343
- *
344
- * @param Product $product Product object.
345
- *
346
- * @return $this Module object.
347
- */
348
- public function load( $product ) {
349
- $this->product = $product;
350
- $this->show_link();
351
- $this->add_hooks();
352
-
353
- return $this;
354
- }
355
-
356
- /**
357
- * If product can be rolled back, show the link to rollback.
358
- */
359
- private function show_link() {
360
- add_filter(
361
- 'plugin_action_links_' . plugin_basename( $this->product->get_basefile() ),
362
- array(
363
- $this,
364
- 'add_rollback_link',
365
- )
366
- );
367
- }
368
-
369
- /**
370
- * Set the rollback hook. Strangely, this does not work if placed in the ThemeIsle_SDK_Rollback class, so it is being called from there instead.
371
- */
372
- public function add_hooks() {
373
- add_action( 'admin_post_' . $this->product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
374
- add_action( 'admin_footer', array( $this, 'add_footer' ) );
375
- }
376
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php DELETED
@@ -1,918 +0,0 @@
1
- <?php
2
- /**
3
- * The translate model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Modules
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- use ThemeisleSDK\Common\Abstract_Module;
15
- use ThemeisleSDK\Product;
16
-
17
- // Exit if accessed directly.
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Translate module for ThemeIsle SDK.
24
- */
25
- class Translate extends Abstract_Module {
26
- /**
27
- * List of available locales.
28
- *
29
- * @var array Array of available locals.
30
- */
31
- private static $locales = array(
32
- 'af' => array(
33
- 'slug' => 'af',
34
- 'name' => 'Afrikaans',
35
- ),
36
- 'ak' => array(
37
- 'slug' => 'ak',
38
- 'name' => 'Akan',
39
- ),
40
- 'am' => array(
41
- 'slug' => 'am',
42
- 'name' => 'Amharic',
43
- ),
44
- 'ar' => array(
45
- 'slug' => 'ar',
46
- 'name' => 'Arabic',
47
- ),
48
- 'arq' => array(
49
- 'slug' => 'arq',
50
- 'name' => 'Algerian Arabic',
51
- ),
52
- 'ary' => array(
53
- 'slug' => 'ary',
54
- 'name' => 'Moroccan Arabic',
55
- ),
56
- 'as' => array(
57
- 'slug' => 'as',
58
- 'name' => 'Assamese',
59
- ),
60
- 'ast' => array(
61
- 'slug' => 'ast',
62
- 'name' => 'Asturian',
63
- ),
64
- 'az' => array(
65
- 'slug' => 'az',
66
- 'name' => 'Azerbaijani',
67
- ),
68
- 'azb' => array(
69
- 'slug' => 'azb',
70
- 'name' => 'South Azerbaijani',
71
- ),
72
- 'az_TR' => array(
73
- 'slug' => 'az-tr',
74
- 'name' => 'Azerbaijani (Turkey)',
75
- ),
76
- 'ba' => array(
77
- 'slug' => 'ba',
78
- 'name' => 'Bashkir',
79
- ),
80
- 'bal' => array(
81
- 'slug' => 'bal',
82
- 'name' => 'Catalan (Balear)',
83
- ),
84
- 'bcc' => array(
85
- 'slug' => 'bcc',
86
- 'name' => 'Balochi Southern',
87
- ),
88
- 'bel' => array(
89
- 'slug' => 'bel',
90
- 'name' => 'Belarusian',
91
- ),
92
- 'bg_BG' => array(
93
- 'slug' => 'bg',
94
- 'name' => 'Bulgarian',
95
- ),
96
- 'bn_BD' => array(
97
- 'slug' => 'bn',
98
- 'name' => 'Bengali',
99
- ),
100
- 'bo' => array(
101
- 'slug' => 'bo',
102
- 'name' => 'Tibetan',
103
- ),
104
- 'bre' => array(
105
- 'slug' => 'br',
106
- 'name' => 'Breton',
107
- ),
108
- 'bs_BA' => array(
109
- 'slug' => 'bs',
110
- 'name' => 'Bosnian',
111
- ),
112
- 'ca' => array(
113
- 'slug' => 'ca',
114
- 'name' => 'Catalan',
115
- ),
116
- 'ceb' => array(
117
- 'slug' => 'ceb',
118
- 'name' => 'Cebuano',
119
- ),
120
- 'ckb' => array(
121
- 'slug' => 'ckb',
122
- 'name' => 'Kurdish (Sorani)',
123
- ),
124
- 'co' => array(
125
- 'slug' => 'co',
126
- 'name' => 'Corsican',
127
- ),
128
- 'cs_CZ' => array(
129
- 'slug' => 'cs',
130
- 'name' => 'Czech',
131
- ),
132
- 'cy' => array(
133
- 'slug' => 'cy',
134
- 'name' => 'Welsh',
135
- ),
136
- 'da_DK' => array(
137
- 'slug' => 'da',
138
- 'name' => 'Danish',
139
- ),
140
- 'de_DE' => array(
141
- 'slug' => 'de',
142
- 'name' => 'German',
143
- ),
144
- 'de_CH' => array(
145
- 'slug' => 'de-ch',
146
- 'name' => 'German (Switzerland)',
147
- ),
148
- 'dv' => array(
149
- 'slug' => 'dv',
150
- 'name' => 'Dhivehi',
151
- ),
152
- 'dzo' => array(
153
- 'slug' => 'dzo',
154
- 'name' => 'Dzongkha',
155
- ),
156
- 'el' => array(
157
- 'slug' => 'el',
158
- 'name' => 'Greek',
159
- ),
160
- 'art_xemoji' => array(
161
- 'slug' => 'art-xemoji',
162
- 'name' => 'Emoji',
163
- ),
164
- 'en_US' => array(
165
- 'slug' => 'en',
166
- 'name' => 'English',
167
- ),
168
- 'en_AU' => array(
169
- 'slug' => 'en-au',
170
- 'name' => 'English (Australia)',
171
- ),
172
- 'en_CA' => array(
173
- 'slug' => 'en-ca',
174
- 'name' => 'English (Canada)',
175
- ),
176
- 'en_GB' => array(
177
- 'slug' => 'en-gb',
178
- 'name' => 'English (UK)',
179
- ),
180
- 'en_NZ' => array(
181
- 'slug' => 'en-nz',
182
- 'name' => 'English (New Zealand)',
183
- ),
184
- 'en_ZA' => array(
185
- 'slug' => 'en-za',
186
- 'name' => 'English (South Africa)',
187
- ),
188
- 'eo' => array(
189
- 'slug' => 'eo',
190
- 'name' => 'Esperanto',
191
- ),
192
- 'es_ES' => array(
193
- 'slug' => 'es',
194
- 'name' => 'Spanish (Spain)',
195
- ),
196
- 'es_AR' => array(
197
- 'slug' => 'es-ar',
198
- 'name' => 'Spanish (Argentina)',
199
- ),
200
- 'es_CL' => array(
201
- 'slug' => 'es-cl',
202
- 'name' => 'Spanish (Chile)',
203
- ),
204
- 'es_CO' => array(
205
- 'slug' => 'es-co',
206
- 'name' => 'Spanish (Colombia)',
207
- ),
208
- 'es_CR' => array(
209
- 'slug' => 'es-cr',
210
- 'name' => 'Spanish (Costa Rica)',
211
- ),
212
- 'es_GT' => array(
213
- 'slug' => 'es-gt',
214
- 'name' => 'Spanish (Guatemala)',
215
- ),
216
- 'es_MX' => array(
217
- 'slug' => 'es-mx',
218
- 'name' => 'Spanish (Mexico)',
219
- ),
220
- 'es_PE' => array(
221
- 'slug' => 'es-pe',
222
- 'name' => 'Spanish (Peru)',
223
- ),
224
- 'es_PR' => array(
225
- 'slug' => 'es-pr',
226
- 'name' => 'Spanish (Puerto Rico)',
227
- ),
228
- 'es_VE' => array(
229
- 'slug' => 'es-ve',
230
- 'name' => 'Spanish (Venezuela)',
231
- ),
232
- 'et' => array(
233
- 'slug' => 'et',
234
- 'name' => 'Estonian',
235
- ),
236
- 'eu' => array(
237
- 'slug' => 'eu',
238
- 'name' => 'Basque',
239
- ),
240
- 'fa_IR' => array(
241
- 'slug' => 'fa',
242
- 'name' => 'Persian',
243
- ),
244
- 'fa_AF' => array(
245
- 'slug' => 'fa-af',
246
- 'name' => 'Persian (Afghanistan)',
247
- ),
248
- 'fuc' => array(
249
- 'slug' => 'fuc',
250
- 'name' => 'Fulah',
251
- ),
252
- 'fi' => array(
253
- 'slug' => 'fi',
254
- 'name' => 'Finnish',
255
- ),
256
- 'fo' => array(
257
- 'slug' => 'fo',
258
- 'name' => 'Faroese',
259
- ),
260
- 'fr_FR' => array(
261
- 'slug' => 'fr',
262
- 'name' => 'French (France)',
263
- ),
264
- 'fr_BE' => array(
265
- 'slug' => 'fr-be',
266
- 'name' => 'French (Belgium)',
267
- ),
268
- 'fr_CA' => array(
269
- 'slug' => 'fr-ca',
270
- 'name' => 'French (Canada)',
271
- ),
272
- 'frp' => array(
273
- 'slug' => 'frp',
274
- 'name' => 'Arpitan',
275
- ),
276
- 'fur' => array(
277
- 'slug' => 'fur',
278
- 'name' => 'Friulian',
279
- ),
280
- 'fy' => array(
281
- 'slug' => 'fy',
282
- 'name' => 'Frisian',
283
- ),
284
- 'ga' => array(
285
- 'slug' => 'ga',
286
- 'name' => 'Irish',
287
- ),
288
- 'gd' => array(
289
- 'slug' => 'gd',
290
- 'name' => 'Scottish Gaelic',
291
- ),
292
- 'gl_ES' => array(
293
- 'slug' => 'gl',
294
- 'name' => 'Galician',
295
- ),
296
- 'gn' => array(
297
- 'slug' => 'gn',
298
- 'name' => 'Guaraní',
299
- ),
300
- 'gsw' => array(
301
- 'slug' => 'gsw',
302
- 'name' => 'Swiss German',
303
- ),
304
- 'gu' => array(
305
- 'slug' => 'gu',
306
- 'name' => 'Gujarati',
307
- ),
308
- 'hat' => array(
309
- 'slug' => 'hat',
310
- 'name' => 'Haitian Creole',
311
- ),
312
- 'hau' => array(
313
- 'slug' => 'hau',
314
- 'name' => 'Hausa',
315
- ),
316
- 'haw_US' => array(
317
- 'slug' => 'haw',
318
- 'name' => 'Hawaiian',
319
- ),
320
- 'haz' => array(
321
- 'slug' => 'haz',
322
- 'name' => 'Hazaragi',
323
- ),
324
- 'he_IL' => array(
325
- 'slug' => 'he',
326
- 'name' => 'Hebrew',
327
- ),
328
- 'hi_IN' => array(
329
- 'slug' => 'hi',
330
- 'name' => 'Hindi',
331
- ),
332
- 'hr' => array(
333
- 'slug' => 'hr',
334
- 'name' => 'Croatian',
335
- ),
336
- 'hu_HU' => array(
337
- 'slug' => 'hu',
338
- 'name' => 'Hungarian',
339
- ),
340
- 'hy' => array(
341
- 'slug' => 'hy',
342
- 'name' => 'Armenian',
343
- ),
344
- 'id_ID' => array(
345
- 'slug' => 'id',
346
- 'name' => 'Indonesian',
347
- ),
348
- 'ido' => array(
349
- 'slug' => 'ido',
350
- 'name' => 'Ido',
351
- ),
352
- 'is_IS' => array(
353
- 'slug' => 'is',
354
- 'name' => 'Icelandic',
355
- ),
356
- 'it_IT' => array(
357
- 'slug' => 'it',
358
- 'name' => 'Italian',
359
- ),
360
- 'ja' => array(
361
- 'slug' => 'ja',
362
- 'name' => 'Japanese',
363
- ),
364
- 'jv_ID' => array(
365
- 'slug' => 'jv',
366
- 'name' => 'Javanese',
367
- ),
368
- 'ka_GE' => array(
369
- 'slug' => 'ka',
370
- 'name' => 'Georgian',
371
- ),
372
- 'kab' => array(
373
- 'slug' => 'kab',
374
- 'name' => 'Kabyle',
375
- ),
376
- 'kal' => array(
377
- 'slug' => 'kal',
378
- 'name' => 'Greenlandic',
379
- ),
380
- 'kin' => array(
381
- 'slug' => 'kin',
382
- 'name' => 'Kinyarwanda',
383
- ),
384
- 'kk' => array(
385
- 'slug' => 'kk',
386
- 'name' => 'Kazakh',
387
- ),
388
- 'km' => array(
389
- 'slug' => 'km',
390
- 'name' => 'Khmer',
391
- ),
392
- 'kn' => array(
393
- 'slug' => 'kn',
394
- 'name' => 'Kannada',
395
- ),
396
- 'ko_KR' => array(
397
- 'slug' => 'ko',
398
- 'name' => 'Korean',
399
- ),
400
- 'kir' => array(
401
- 'slug' => 'kir',
402
- 'name' => 'Kyrgyz',
403
- ),
404
- 'lb_LU' => array(
405
- 'slug' => 'lb',
406
- 'name' => 'Luxembourgish',
407
- ),
408
- 'li' => array(
409
- 'slug' => 'li',
410
- 'name' => 'Limburgish',
411
- ),
412
- 'lin' => array(
413
- 'slug' => 'lin',
414
- 'name' => 'Lingala',
415
- ),
416
- 'lo' => array(
417
- 'slug' => 'lo',
418
- 'name' => 'Lao',
419
- ),
420
- 'lt_LT' => array(
421
- 'slug' => 'lt',
422
- 'name' => 'Lithuanian',
423
- ),
424
- 'lv' => array(
425
- 'slug' => 'lv',
426
- 'name' => 'Latvian',
427
- ),
428
- 'me_ME' => array(
429
- 'slug' => 'me',
430
- 'name' => 'Montenegrin',
431
- ),
432
- 'mg_MG' => array(
433
- 'slug' => 'mg',
434
- 'name' => 'Malagasy',
435
- ),
436
- 'mk_MK' => array(
437
- 'slug' => 'mk',
438
- 'name' => 'Macedonian',
439
- ),
440
- 'ml_IN' => array(
441
- 'slug' => 'ml',
442
- 'name' => 'Malayalam',
443
- ),
444
- 'mlt' => array(
445
- 'slug' => 'mlt',
446
- 'name' => 'Maltese',
447
- ),
448
- 'mn' => array(
449
- 'slug' => 'mn',
450
- 'name' => 'Mongolian',
451
- ),
452
- 'mr' => array(
453
- 'slug' => 'mr',
454
- 'name' => 'Marathi',
455
- ),
456
- 'mri' => array(
457
- 'slug' => 'mri',
458
- 'name' => 'Maori',
459
- ),
460
- 'ms_MY' => array(
461
- 'slug' => 'ms',
462
- 'name' => 'Malay',
463
- ),
464
- 'my_MM' => array(
465
- 'slug' => 'mya',
466
- 'name' => 'Myanmar (Burmese)',
467
- ),
468
- 'ne_NP' => array(
469
- 'slug' => 'ne',
470
- 'name' => 'Nepali',
471
- ),
472
- 'nb_NO' => array(
473
- 'slug' => 'nb',
474
- 'name' => 'Norwegian (Bokmål)',
475
- ),
476
- 'nl_NL' => array(
477
- 'slug' => 'nl',
478
- 'name' => 'Dutch',
479
- ),
480
- 'nl_BE' => array(
481
- 'slug' => 'nl-be',
482
- 'name' => 'Dutch (Belgium)',
483
- ),
484
- 'nn_NO' => array(
485
- 'slug' => 'nn',
486
- 'name' => 'Norwegian (Nynorsk)',
487
- ),
488
- 'oci' => array(
489
- 'slug' => 'oci',
490
- 'name' => 'Occitan',
491
- ),
492
- 'ory' => array(
493
- 'slug' => 'ory',
494
- 'name' => 'Oriya',
495
- ),
496
- 'os' => array(
497
- 'slug' => 'os',
498
- 'name' => 'Ossetic',
499
- ),
500
- 'pa_IN' => array(
501
- 'slug' => 'pa',
502
- 'name' => 'Punjabi',
503
- ),
504
- 'pl_PL' => array(
505
- 'slug' => 'pl',
506
- 'name' => 'Polish',
507
- ),
508
- 'pt_BR' => array(
509
- 'slug' => 'pt-br',
510
- 'name' => 'Portuguese (Brazil)',
511
- ),
512
- 'pt_PT' => array(
513
- 'slug' => 'pt',
514
- 'name' => 'Portuguese (Portugal)',
515
- ),
516
- 'ps' => array(
517
- 'slug' => 'ps',
518
- 'name' => 'Pashto',
519
- ),
520
- 'rhg' => array(
521
- 'slug' => 'rhg',
522
- 'name' => 'Rohingya',
523
- ),
524
- 'ro_RO' => array(
525
- 'slug' => 'ro',
526
- 'name' => 'Romanian',
527
- ),
528
- 'roh' => array(
529
- 'slug' => 'roh',
530
- 'name' => 'Romansh',
531
- ),
532
- 'ru_RU' => array(
533
- 'slug' => 'ru',
534
- 'name' => 'Russian',
535
- ),
536
- 'rue' => array(
537
- 'slug' => 'rue',
538
- 'name' => 'Rusyn',
539
- ),
540
- 'rup_MK' => array(
541
- 'slug' => 'rup',
542
- 'name' => 'Aromanian',
543
- ),
544
- 'sah' => array(
545
- 'slug' => 'sah',
546
- 'name' => 'Sakha',
547
- ),
548
- 'sa_IN' => array(
549
- 'slug' => 'sa-in',
550
- 'name' => 'Sanskrit',
551
- ),
552
- 'scn' => array(
553
- 'slug' => 'scn',
554
- 'name' => 'Sicilian',
555
- ),
556
- 'si_LK' => array(
557
- 'slug' => 'si',
558
- 'name' => 'Sinhala',
559
- ),
560
- 'sk_SK' => array(
561
- 'slug' => 'sk',
562
- 'name' => 'Slovak',
563
- ),
564
- 'sl_SI' => array(
565
- 'slug' => 'sl',
566
- 'name' => 'Slovenian',
567
- ),
568
- 'sna' => array(
569
- 'slug' => 'sna',
570
- 'name' => 'Shona',
571
- ),
572
- 'snd' => array(
573
- 'slug' => 'snd',
574
- 'name' => 'Sindhi',
575
- ),
576
- 'so_SO' => array(
577
- 'slug' => 'so',
578
- 'name' => 'Somali',
579
- ),
580
- 'sq' => array(
581
- 'slug' => 'sq',
582
- 'name' => 'Albanian',
583
- ),
584
- 'sq_XK' => array(
585
- 'slug' => 'sq-xk',
586
- 'name' => 'Shqip (Kosovo)',
587
- ),
588
- 'sr_RS' => array(
589
- 'slug' => 'sr',
590
- 'name' => 'Serbian',
591
- ),
592
- 'srd' => array(
593
- 'slug' => 'srd',
594
- 'name' => 'Sardinian',
595
- ),
596
- 'su_ID' => array(
597
- 'slug' => 'su',
598
- 'name' => 'Sundanese',
599
- ),
600
- 'sv_SE' => array(
601
- 'slug' => 'sv',
602
- 'name' => 'Swedish',
603
- ),
604
- 'sw' => array(
605
- 'slug' => 'sw',
606
- 'name' => 'Swahili',
607
- ),
608
- 'syr' => array(
609
- 'slug' => 'syr',
610
- 'name' => 'Syriac',
611
- ),
612
- 'szl' => array(
613
- 'slug' => 'szl',
614
- 'name' => 'Silesian',
615
- ),
616
- 'ta_IN' => array(
617
- 'slug' => 'ta',
618
- 'name' => 'Tamil',
619
- ),
620
- 'ta_LK' => array(
621
- 'slug' => 'ta-lk',
622
- 'name' => 'Tamil (Sri Lanka)',
623
- ),
624
- 'tah' => array(
625
- 'slug' => 'tah',
626
- 'name' => 'Tahitian',
627
- ),
628
- 'te' => array(
629
- 'slug' => 'te',
630
- 'name' => 'Telugu',
631
- ),
632
- 'tg' => array(
633
- 'slug' => 'tg',
634
- 'name' => 'Tajik',
635
- ),
636
- 'th' => array(
637
- 'slug' => 'th',
638
- 'name' => 'Thai',
639
- ),
640
- 'tir' => array(
641
- 'slug' => 'tir',
642
- 'name' => 'Tigrinya',
643
- ),
644
- 'tl' => array(
645
- 'slug' => 'tl',
646
- 'name' => 'Tagalog',
647
- ),
648
- 'tr_TR' => array(
649
- 'slug' => 'tr',
650
- 'name' => 'Turkish',
651
- ),
652
- 'tt_RU' => array(
653
- 'slug' => 'tt',
654
- 'name' => 'Tatar',
655
- ),
656
- 'tuk' => array(
657
- 'slug' => 'tuk',
658
- 'name' => 'Turkmen',
659
- ),
660
- 'twd' => array(
661
- 'slug' => 'twd',
662
- 'name' => 'Tweants',
663
- ),
664
- 'tzm' => array(
665
- 'slug' => 'tzm',
666
- 'name' => 'Tamazight (Central Atlas)',
667
- ),
668
- 'ug_CN' => array(
669
- 'slug' => 'ug',
670
- 'name' => 'Uighur',
671
- ),
672
- 'uk' => array(
673
- 'slug' => 'uk',
674
- 'name' => 'Ukrainian',
675
- ),
676
- 'ur' => array(
677
- 'slug' => 'ur',
678
- 'name' => 'Urdu',
679
- ),
680
- 'uz_UZ' => array(
681
- 'slug' => 'uz',
682
- 'name' => 'Uzbek',
683
- ),
684
- 'vi' => array(
685
- 'slug' => 'vi',
686
- 'name' => 'Vietnamese',
687
- ),
688
- 'wa' => array(
689
- 'slug' => 'wa',
690
- 'name' => 'Walloon',
691
- ),
692
- 'xho' => array(
693
- 'slug' => 'xho',
694
- 'name' => 'Xhosa',
695
- ),
696
- 'xmf' => array(
697
- 'slug' => 'xmf',
698
- 'name' => 'Mingrelian',
699
- ),
700
- 'yor' => array(
701
- 'slug' => 'yor',
702
- 'name' => 'Yoruba',
703
- ),
704
- 'zh_CN' => array(
705
- 'slug' => 'zh-cn',
706
- 'name' => 'Chinese (China)',
707
- ),
708
- 'zh_HK' => array(
709
- 'slug' => 'zh-hk',
710
- 'name' => 'Chinese (Hong Kong)',
711
- ),
712
- 'zh_TW' => array(
713
- 'slug' => 'zh-tw',
714
- 'name' => 'Chinese (Taiwan)',
715
- ),
716
- 'de_DE_formal' => array(
717
- 'slug' => 'de/formal',
718
- 'name' => 'German (Formal)',
719
- ),
720
- 'nl_NL_formal' => array(
721
- 'slug' => 'nl/formal',
722
- 'name' => 'Dutch (Formal)',
723
- ),
724
- 'de_CH_informal' => array(
725
- 'slug' => 'de-ch/informal',
726
- 'name' => 'Chinese (Taiwan)',
727
- ),
728
- 'pt_PT_ao90' => array(
729
- 'slug' => 'pt/ao90',
730
- 'name' => 'Portuguese (Portugal, AO90)',
731
- ),
732
- );
733
-
734
- /**
735
- * Check if we should load module for this.
736
- *
737
- * @param Product $product Product to check.
738
- *
739
- * @return bool Should load ?
740
- */
741
- public function can_load( $product ) {
742
- if ( $this->is_from_partner( $product ) ) {
743
- return false;
744
- }
745
- if ( ! $product->is_wordpress_available() ) {
746
- return false;
747
- }
748
-
749
- $lang = $this->get_user_locale();
750
-
751
- if ( 'en_US' === $lang ) {
752
- return false;
753
- }
754
-
755
- $languages = $this->get_translations( $product );
756
-
757
- if ( ! is_array( $languages ) ) {
758
- return false;
759
- }
760
-
761
- if ( ! isset( $languages['translations'] ) ) {
762
- return false;
763
- }
764
-
765
- $languages = $languages['translations'];
766
-
767
- $available = wp_list_pluck( $languages, 'language' );
768
-
769
- if ( in_array( $lang, $available ) ) {
770
- return false;
771
- }
772
-
773
- if ( ! isset( self::$locales[ $lang ] ) ) {
774
- return false;
775
- }
776
-
777
- return apply_filters( $product->get_slug() . '_sdk_enable_translate', true );
778
- }
779
-
780
- /**
781
- * Get the user's locale.
782
- */
783
- private function get_user_locale() {
784
- global $wp_version;
785
- if ( version_compare( $wp_version, '4.7.0', '>=' ) ) {
786
- return get_user_locale();
787
- }
788
- $user = wp_get_current_user();
789
- if ( $user ) {
790
- $locale = $user->locale;
791
- }
792
-
793
- return $locale ? $locale : get_locale();
794
- }
795
-
796
- /**
797
- * Fetch translations from api.
798
- *
799
- * @param Product $product Product to check.
800
- *
801
- * @return mixed Translation array.
802
- */
803
- private function get_translations( $product ) {
804
- $cache_key = $product->get_key() . '_all_languages';
805
- $translations = get_transient( $cache_key );
806
-
807
- if ( false === $translations ) {
808
- require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
809
- $translations = translations_api(
810
- $product->get_type() . 's',
811
- array(
812
- 'slug' => $product->get_slug(),
813
- 'version' => $product->get_version(),
814
- )
815
- );
816
- set_transient( $cache_key, $translations, WEEK_IN_SECONDS );
817
- }
818
-
819
- return $translations;
820
-
821
- }
822
-
823
- /**
824
- * Add notification to queue.
825
- *
826
- * @param array $all_notifications Previous notification.
827
- *
828
- * @return array All notifications.
829
- */
830
- public function add_notification( $all_notifications ) {
831
-
832
- $lang = $this->get_user_locale();
833
- $link = $this->get_locale_paths( $lang );
834
- $language_meta = self::$locales[ $lang ];
835
-
836
- $heading = apply_filters( $this->product->get_key() . '_feedback_translate_heading', 'Improve {product}' );
837
- $heading = str_replace(
838
- array( '{product}' ),
839
- $this->product->get_friendly_name(),
840
- $heading
841
- );
842
- $message = apply_filters(
843
- $this->product->get_key() . '_feedback_translation',
844
- 'Translating <b>{product}</b> into as many languages as possible is a huge project. We still need help with a lot of them, so if you are good at translating into <b>{language}</b>, it would be greatly appreciated.
845
- The process is easy, and you can join by following the link below!'
846
- );
847
-
848
- $message = str_replace(
849
- [ '{product}', '{language}' ],
850
- [
851
- $this->product->get_friendly_name(),
852
- $language_meta['name'],
853
- ],
854
- $message
855
- );
856
-
857
- $button_submit = apply_filters( $this->product->get_key() . '_feedback_translate_button_do', 'Ok, I will gladly help.' );
858
- $button_cancel = apply_filters( $this->product->get_key() . '_feedback_translate_button_cancel', 'No, thanks.' );
859
-
860
- $all_notifications[] = [
861
- 'id' => $this->product->get_key() . '_translate_flag',
862
- 'heading' => $heading,
863
- 'message' => $message,
864
- 'ctas' => [
865
- 'confirm' => [
866
- 'link' => $link,
867
- 'text' => $button_submit,
868
- ],
869
- 'cancel' => [
870
- 'link' => '#',
871
- 'text' => $button_cancel,
872
- ],
873
- ],
874
- ];
875
-
876
- return $all_notifications;
877
- }
878
-
879
- /**
880
- * Return the locale path.
881
- *
882
- * @param string $locale Locale code.
883
- *
884
- * @return string Locale path.
885
- */
886
- private function get_locale_paths( $locale ) {
887
- if ( empty( $locale ) ) {
888
- return '';
889
- }
890
-
891
- $slug = isset( self::$locales[ $locale ] ) ? self::$locales[ $locale ]['slug'] : '';
892
- if ( empty( $slug ) ) {
893
- return '';
894
- }
895
- if ( strpos( $slug, '/' ) === false ) {
896
- $slug .= '/default';
897
- }
898
- $url = 'https://translate.wordpress.org/projects/wp-' . $this->product->get_type() . 's/' . $this->product->get_slug() . '/' . ( $this->product->get_type() === 'plugin' ? 'dev/' : '' ) . $slug . '?filters%5Bstatus%5D=untranslated&sort%5Bby%5D=random';
899
-
900
- return $url;
901
- }
902
-
903
- /**
904
- * Load module logic.
905
- *
906
- * @param Product $product Product to load.
907
- *
908
- * @return Translate Module instance.
909
- */
910
- public function load( $product ) {
911
-
912
- $this->product = $product;
913
-
914
- add_filter( 'themeisle_sdk_registered_notifications', [ $this, 'add_notification' ] );
915
-
916
- return $this;
917
- }
918
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php DELETED
@@ -1,850 +0,0 @@
1
- <?php
2
- /**
3
- * The deactivate feedback model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Feedback
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK\Modules;
13
-
14
- use ThemeisleSDK\Common\Abstract_Module;
15
- use ThemeisleSDK\Product;
16
-
17
- // Exit if accessed directly.
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- /**
23
- * Uninstall feedback module for ThemeIsle SDK.
24
- */
25
- class Uninstall_Feedback extends Abstract_Module {
26
- /**
27
- * How many seconds before the deactivation window is triggered for themes?
28
- *
29
- * @var int Number of days.
30
- */
31
- const AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS = 3;
32
- /**
33
- * How many days before the deactivation window pops up again for the theme?
34
- *
35
- * @var int Number of days.
36
- */
37
- const PAUSE_DEACTIVATE_WINDOW_DAYS = 100;
38
- /**
39
- * Where to send the data.
40
- *
41
- * @var string Endpoint url.
42
- */
43
- const FEEDBACK_ENDPOINT = 'http://feedback.themeisle.com/wordpress/wp-json/__pirate_feedback_/v1/feedback';
44
-
45
- /**
46
- * Default options for plugins.
47
- *
48
- * @var array $options_plugin The main options list for plugins.
49
- */
50
- private $options_plugin = array(
51
- 'I found a better plugin' => array(
52
- 'id' => 3,
53
- 'type' => 'text',
54
- 'placeholder' => 'What\'s the plugin\'s name?',
55
- ),
56
- 'I could not get the plugin to work' => array(
57
- 'type' => 'textarea',
58
- 'placeholder' => 'What problem are you experiencing?',
59
- 'id' => 4,
60
- ),
61
- 'I no longer need the plugin' => array(
62
- 'id' => 5,
63
- 'type' => 'textarea',
64
- 'placeholder' => 'If you could improve one thing about our product, what would it be?',
65
- ),
66
- 'It\'s a temporary deactivation. I\'m just debugging an issue.' => array(
67
- 'type' => 'textarea',
68
- 'placeholder' => 'What problem are you experiencing?',
69
- 'id' => 6,
70
- ),
71
- );
72
- /**
73
- * Default options for theme.
74
- *
75
- * @var array $options_theme The main options list for themes.
76
- */
77
- private $options_theme = array(
78
- 'I don\'t know how to make it look like demo' => array(
79
- 'id' => 7,
80
- ),
81
- 'It lacks options' => array(
82
- 'placeholder' => 'What option is missing?',
83
- 'type' => 'text',
84
- 'id' => 8,
85
- ),
86
- 'Is not working with a plugin that I need' => array(
87
- 'id' => 9,
88
- 'type' => 'text',
89
- 'placeholder' => 'What is the name of the plugin',
90
- ),
91
- 'I want to try a new design, I don\'t like {theme} style' => array(
92
- 'id' => 10,
93
- ),
94
- );
95
- /**
96
- * Default other option.
97
- *
98
- * @var array $other The other option
99
- */
100
- private $other = array(
101
- 'Other' => array(
102
- 'id' => 999,
103
- 'type' => 'textarea',
104
- 'placeholder' => 'What can we do better?',
105
- ),
106
- );
107
- /**
108
- * Default heading for plugin.
109
- *
110
- * @var string $heading_plugin The heading of the modal
111
- */
112
- private $heading_plugin = 'What’s wrong?';
113
- /**
114
- * Default heading for theme.
115
- *
116
- * @var string $heading_theme The heading of the modal
117
- */
118
- private $heading_theme = 'What does not work for you in {theme}?';
119
- /**
120
- * Default submit button action text.
121
- *
122
- * @var string $button_submit The text of the deactivate button
123
- */
124
- private $button_submit = 'Submit &amp; Deactivate';
125
- /**
126
- * Default cancel button.
127
- *
128
- * @var string $button_cancel The text of the cancel button
129
- */
130
- private $button_cancel = 'Skip &amp; Deactivate';
131
-
132
- /**
133
- * Loads the additional resources
134
- */
135
- function load_resources() {
136
- $screen = get_current_screen();
137
-
138
- if ( ! $screen || ! in_array( $screen->id, array( 'theme-install', 'plugins' ) ) ) {
139
- return;
140
- }
141
-
142
- $this->add_feedback_popup_style();
143
-
144
- if ( $this->product->get_type() === 'theme' ) {
145
- $this->add_theme_feedback_drawer_js();
146
- $this->render_theme_feedback_popup();
147
-
148
- return;
149
- }
150
- $this->add_plugin_feedback_popup_js();
151
- $this->render_plugin_feedback_popup();
152
- }
153
-
154
- /**
155
- * Render theme feedback drawer.
156
- */
157
- private function render_theme_feedback_popup() {
158
- $heading = str_replace( '{theme}', $this->product->get_name(), $this->heading_theme );
159
- $button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', 'Submit' );
160
- $options = $this->options_theme;
161
- $options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $options ) );
162
- $info_disclosure_link = '<a href="#" class="info-disclosure-link">' . apply_filters( $this->product->get_slug() . '_themeisle_sdk_info_collect_cta', 'What info do we collect?' ) . '</a>';
163
-
164
- $options += $this->other;
165
-
166
- ?>
167
- <div class="ti-theme-uninstall-feedback-drawer ti-feedback">
168
- <div class="popup--header">
169
- <h5><?php echo wp_kses( $heading, array( 'span' => true ) ); ?> </h5>
170
- <button class="toggle"><span>&times;</span></button>
171
- </div><!--/.popup--header-->
172
- <div class="popup--body">
173
- <?php $this->render_options_list( $options ); ?>
174
- </div><!--/.popup--body-->
175
- <div class="popup--footer">
176
- <div class="actions">
177
- <?php
178
- echo wp_kses_post( $info_disclosure_link );
179
- echo wp_kses_post( $this->get_disclosure_labels() );
180
- echo '<div class="buttons">';
181
- echo get_submit_button(
182
- $button_submit,
183
- 'secondary',
184
- $this->product->get_key() . 'ti-deactivate-yes',
185
- false,
186
- array(
187
- 'data-after-text' => $button_submit,
188
- 'disabled' => true,
189
- )
190
- );
191
- echo '</div>';
192
- ?>
193
- </div><!--/.actions-->
194
- </div><!--/.popup--footer-->
195
- </div>
196
- <?php
197
- }
198
-
199
- /**
200
- * Add feedback styles.
201
- */
202
- private function add_feedback_popup_style() {
203
- ?>
204
- <style>
205
- .ti-feedback {
206
- background: #fff;
207
- max-width: 400px;
208
- z-index: 10000;
209
- box-shadow: 0 0 15px -5px rgba(0, 0, 0, .5);
210
- transition: all .3s ease-out;
211
- }
212
-
213
-
214
- .ti-feedback .popup--header {
215
- position: relative;
216
- background-color: #23A1CE;
217
- }
218
-
219
- .ti-feedback .popup--header h5 {
220
- margin: 0;
221
- font-size: 16px;
222
- padding: 15px;
223
- color: #fff;
224
- font-weight: 600;
225
- text-align: center;
226
- letter-spacing: .3px;
227
- }
228
-
229
- .ti-feedback .popup--body {
230
- padding: 15px;
231
- }
232
-
233
- .ti-feedback .popup--form {
234
- margin: 0;
235
- font-size: 13px;
236
- }
237
-
238
- .ti-feedback .popup--form input[type="radio"] {
239
- margin: 0 10px 0 0;
240
- }
241
-
242
- .ti-feedback .popup--form input[type="radio"]:checked ~ textarea {
243
- display: block;
244
- }
245
-
246
- .ti-feedback .popup--form textarea {
247
- width: 100%;
248
- margin: 10px 0 0;
249
- display: none;
250
- max-height: 150px;
251
- }
252
-
253
- .ti-feedback li {
254
- display: flex;
255
- align-items: center;
256
- margin-bottom: 15px;
257
- flex-wrap: wrap;
258
- }
259
-
260
- .ti-feedback li label {
261
- max-width: 90%;
262
- }
263
-
264
- .ti-feedback li:last-child {
265
- margin-bottom: 0;
266
- }
267
-
268
- .ti-feedback .popup--footer {
269
- padding: 0 15px 15px;
270
- }
271
-
272
- .ti-feedback .actions {
273
- display: flex;
274
- flex-wrap: wrap;
275
- }
276
-
277
- .info-disclosure-link {
278
- width: 100%;
279
- margin-bottom: 15px;
280
- }
281
-
282
- .ti-feedback .info-disclosure-content {
283
- max-height: 0;
284
- overflow: hidden;
285
- width: 100%;
286
- transition: .3s ease;
287
- }
288
-
289
- .ti-feedback .info-disclosure-content.active {
290
- max-height: 300px;
291
- }
292
-
293
- .ti-feedback .info-disclosure-content p {
294
- margin: 0;
295
- }
296
-
297
- .ti-feedback .info-disclosure-content ul {
298
- margin: 10px 0;
299
- border-radius: 3px;
300
- }
301
-
302
- .ti-feedback .info-disclosure-content ul li {
303
- display: flex;
304
- align-items: center;
305
- justify-content: space-between;
306
- margin-bottom: 0;
307
- padding: 5px 0;
308
- border-bottom: 1px solid #ccc;
309
- }
310
-
311
- .ti-feedback .buttons {
312
- display: flex;
313
- width: 100%;
314
- }
315
-
316
- .ti-feedback .buttons input:last-child {
317
- margin-left: auto;
318
- }
319
-
320
- .ti-theme-uninstall-feedback-drawer {
321
- border-top-left-radius: 5px;
322
- position: fixed;
323
- top: 100%;
324
- right: 15px;
325
- }
326
-
327
- .ti-theme-uninstall-feedback-drawer.active {
328
- transform: translateY(-100%);
329
- }
330
-
331
- .ti-theme-uninstall-feedback-drawer .popup--header {
332
- border-top-left-radius: 5px;
333
- }
334
-
335
- .ti-theme-uninstall-feedback-drawer .popup--header .toggle {
336
- position: absolute;
337
- padding: 3px 0;
338
- width: 30px;
339
- top: -26px;
340
- right: 0;
341
- cursor: pointer;
342
- border-top-left-radius: 5px;
343
- border-top-right-radius: 5px;
344
- font-size: 20px;
345
- background-color: #23A1CE;
346
- color: #fff;
347
- border: none;
348
- line-height: 20px;
349
- }
350
-
351
- .ti-theme-uninstall-feedback-drawer .toggle span {
352
- margin: 0;
353
- display: inline-block;
354
- }
355
-
356
- .ti-theme-uninstall-feedback-drawer:not(.active) .toggle span {
357
- transform: rotate(45deg);
358
- }
359
-
360
- .ti-theme-uninstall-feedback-drawer .popup--header .toggle:hover {
361
- background-color: #1880a5;
362
- }
363
-
364
-
365
- .ti-plugin-uninstall-feedback-popup .popup--header:before {
366
- content: "";
367
- display: block;
368
- position: absolute;
369
- border: 20px solid #23A1CE;
370
- left: -10px;
371
- top: 50%;
372
- border-top: 20px solid transparent;
373
- border-bottom: 20px solid transparent;
374
- border-left: 0;
375
- transform: translateY(-50%);
376
- }
377
-
378
- .ti-plugin-uninstall-feedback-popup {
379
- display: none;
380
- position: absolute;
381
- white-space: normal;
382
- width: 400px;
383
- left: 100%;
384
- top: -15px;
385
- }
386
-
387
- .ti-plugin-uninstall-feedback-popup.sending-feedback .popup--body i {
388
- animation: rotation 2s infinite linear;
389
- display: block;
390
- float: none;
391
- align-items: center;
392
- width: 100%;
393
- margin: 0 auto;
394
- height: 100%;
395
- background: transparent;
396
- padding: 0;
397
- }
398
-
399
- .ti-plugin-uninstall-feedback-popup.sending-feedback .popup--body i:before {
400
- padding: 0;
401
- background: transparent;
402
- box-shadow: none;
403
- color: #b4b9be
404
- }
405
-
406
-
407
- .ti-plugin-uninstall-feedback-popup.active {
408
- display: block;
409
- }
410
-
411
- tr[data-plugin^="<?php echo $this->product->get_slug(); ?>"] .deactivate {
412
- position: relative;
413
- }
414
-
415
- body.ti-feedback-open .ti-feedback-overlay {
416
- content: "";
417
- display: block;
418
- background-color: rgba(0, 0, 0, 0.5);
419
- top: 0;
420
- bottom: 0;
421
- right: 0;
422
- left: 0;
423
- z-index: 10000;
424
- position: fixed;
425
- }
426
-
427
- @media (max-width: 768px) {
428
- .ti-plugin-uninstall-feedback-popup {
429
- position: fixed;
430
- max-width: 100%;
431
- margin: 0 auto;
432
- left: 50%;
433
- top: 50px;
434
- transform: translateX(-50%);
435
- }
436
-
437
- .ti-plugin-uninstall-feedback-popup .popup--header:before {
438
- display: none;
439
- }
440
- }
441
- </style>
442
- <?php
443
- }
444
-
445
- /**
446
- * Theme feedback drawer JS.
447
- */
448
- private function add_theme_feedback_drawer_js() {
449
- $key = $this->product->get_key();
450
- ?>
451
- <script type="text/javascript" id="ti-deactivate-js">
452
- (function ($) {
453
- $(document).ready(function () {
454
- setTimeout(function () {
455
- $('.ti-theme-uninstall-feedback-drawer').addClass('active');
456
- }, <?php echo absint( self::AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS * 1000 ); ?> );
457
-
458
- $('.ti-theme-uninstall-feedback-drawer .toggle').on('click', function (e) {
459
- e.preventDefault();
460
- $('.ti-theme-uninstall-feedback-drawer').toggleClass('active');
461
- });
462
-
463
- $('.info-disclosure-link').on('click', function (e) {
464
- e.preventDefault();
465
- $('.info-disclosure-content').toggleClass('active');
466
- });
467
-
468
- $('.ti-theme-uninstall-feedback-drawer input[type="radio"]').on('change', function () {
469
- var radio = $(this);
470
- if (radio.parent().find('textarea').length > 0 &&
471
- radio.parent().find('textarea').val().length === 0) {
472
- $('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
473
- radio.parent().find('textarea').on('keyup', function (e) {
474
- if ($(this).val().length === 0) {
475
- $('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
476
- } else {
477
- $('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
478
- }
479
- });
480
- } else {
481
- $('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
482
- }
483
- });
484
-
485
- $('#<?php echo $key; ?>ti-deactivate-yes').on('click', function (e) {
486
- e.preventDefault();
487
- e.stopPropagation();
488
-
489
- var selectedOption = $(
490
- '.ti-theme-uninstall-feedback-drawer input[name="ti-deactivate-option"]:checked');
491
- $.post(ajaxurl, {
492
- 'action': '<?php echo esc_attr( $key ) . '_uninstall_feedback'; ?>',
493
- 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
494
- 'id': selectedOption.parent().attr('ti-option-id'),
495
- 'msg': selectedOption.parent().find('textarea').val(),
496
- 'type': 'theme',
497
- 'key': '<?php echo esc_attr( $key ); ?>'
498
- });
499
- $('.ti-theme-uninstall-feedback-drawer').fadeOut();
500
- });
501
- });
502
- })(jQuery);
503
-
504
- </script>
505
- <?php
506
- do_action( $this->product->get_key() . '_uninstall_feedback_after_js' );
507
- }
508
-
509
- /**
510
- * Render the options list.
511
- *
512
- * @param array $options the options for the feedback form.
513
- */
514
- private function render_options_list( $options ) {
515
- $key = $this->product->get_key();
516
- $inputs_row_map = [
517
- 'text' => 1,
518
- 'textarea' => 2,
519
- ];
520
- ?>
521
- <ul class="popup--form">
522
- <?php foreach ( $options as $title => $attributes ) { ?>
523
- <li ti-option-id="<?php echo esc_attr( $attributes['id'] ); ?>">
524
- <input type="radio" name="ti-deactivate-option" id="<?php echo esc_attr( $key . $attributes['id'] ); ?>">
525
- <label for="<?php echo esc_attr( $key . $attributes['id'] ); ?>">
526
- <?php echo str_replace( '{theme}', $this->product->get_name(), $title ); ?>
527
- </label>
528
- <?php
529
- if ( array_key_exists( 'type', $attributes ) ) {
530
- $placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
531
- echo '<textarea width="100%" rows="' . $inputs_row_map[ $attributes['type'] ] . '" name="comments" placeholder="' . esc_attr( $placeholder ) . '"></textarea>';
532
- }
533
- ?>
534
- </li>
535
- <?php } ?>
536
- </ul>
537
- <?php
538
- }
539
-
540
- /**
541
- * Render plugin feedback popup.
542
- */
543
- private function render_plugin_feedback_popup() {
544
- $button_cancel = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_cancel', $this->button_cancel );
545
- $button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', $this->button_submit );
546
- $options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $this->options_plugin ) );
547
- $info_disclosure_link = '<a href="#" class="info-disclosure-link">' . apply_filters( $this->product->get_slug() . '_themeisle_sdk_info_collect_cta', 'What info do we collect?' ) . '</a>';
548
-
549
- $options += $this->other;
550
- ?>
551
- <div class="ti-plugin-uninstall-feedback-popup ti-feedback" id="<?php echo esc_attr( $this->product->get_slug() . '_uninstall_feedback_popup' ); ?>">
552
- <div class="popup--header">
553
- <h5><?php echo wp_kses( $this->heading_plugin, array( 'span' => true ) ); ?> </h5>
554
- </div><!--/.popup--header-->
555
- <div class="popup--body">
556
- <?php $this->render_options_list( $options ); ?>
557
- </div><!--/.popup--body-->
558
- <div class="popup--footer">
559
- <div class="actions">
560
- <?php
561
- echo wp_kses_post( $info_disclosure_link );
562
- echo wp_kses_post( $this->get_disclosure_labels() );
563
- echo '<div class="buttons">';
564
- echo get_submit_button(
565
- $button_cancel,
566
- 'secondary',
567
- $this->product->get_key() . 'ti-deactivate-no',
568
- false
569
- );
570
- echo get_submit_button(
571
- $button_submit,
572
- 'primary',
573
- $this->product->get_key() . 'ti-deactivate-yes',
574
- false,
575
- array(
576
- 'data-after-text' => $button_submit,
577
- 'disabled' => true,
578
- )
579
- );
580
- echo '</div>';
581
- ?>
582
- </div><!--/.actions-->
583
- </div><!--/.popup--footer-->
584
- </div>
585
-
586
- <?php
587
- }
588
-
589
- /**
590
- * Add plugin feedback popup JS
591
- */
592
- private function add_plugin_feedback_popup_js() {
593
- $popup_id = '#' . $this->product->get_slug() . '_uninstall_feedback_popup';
594
- $key = $this->product->get_key();
595
- ?>
596
- <script type="text/javascript" id="ti-deactivate-js">
597
- (function ($) {
598
- $(document).ready(function () {
599
- var targetElement = 'tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a';
600
- var redirectUrl = $(targetElement).attr('href');
601
- if ($('.ti-feedback-overlay').length === 0) {
602
- $('body').prepend('<div class="ti-feedback-overlay"></div>');
603
- }
604
- $('<?php echo esc_attr( $popup_id ); ?> ').appendTo($(targetElement).parent());
605
-
606
- $(targetElement).on('click', function (e) {
607
- e.preventDefault();
608
- $('<?php echo esc_attr( $popup_id ); ?> ').addClass('active');
609
- $('body').addClass('ti-feedback-open');
610
- $('.ti-feedback-overlay').on('click', function () {
611
- $('<?php echo esc_attr( $popup_id ); ?> ').removeClass('active');
612
- $('body').removeClass('ti-feedback-open');
613
- });
614
- });
615
-
616
- $('<?php echo esc_attr( $popup_id ); ?> .info-disclosure-link').on('click', function (e) {
617
- e.preventDefault();
618
- $(this).parent().find('.info-disclosure-content').toggleClass('active');
619
- });
620
-
621
- $('<?php echo esc_attr( $popup_id ); ?> input[type="radio"]').on('change', function () {
622
- var radio = $(this);
623
- if (radio.parent().find('textarea').length > 0 &&
624
- radio.parent().find('textarea').val().length === 0) {
625
- $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
626
- radio.parent().find('textarea').on('keyup', function (e) {
627
- if ($(this).val().length === 0) {
628
- $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
629
- } else {
630
- $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
631
- }
632
- });
633
- } else {
634
- $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
635
- }
636
- });
637
-
638
- $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-no').on('click', function (e) {
639
- e.preventDefault();
640
- e.stopPropagation();
641
- $(targetElement).unbind('click');
642
- $('body').removeClass('ti-feedback-open');
643
- $('<?php echo esc_attr( $popup_id ); ?>').remove();
644
- if (redirectUrl !== '') {
645
- location.href = redirectUrl;
646
- }
647
- });
648
-
649
- $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').on('click', function (e) {
650
- e.preventDefault();
651
- e.stopPropagation();
652
- $(targetElement).unbind('click');
653
- var selectedOption = $(
654
- '<?php echo esc_attr( $popup_id ); ?> input[name="ti-deactivate-option"]:checked');
655
- var data = {
656
- 'action': '<?php echo esc_attr( $key ) . '_uninstall_feedback'; ?>',
657
- 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
658
- 'id': selectedOption.parent().attr('ti-option-id'),
659
- 'msg': selectedOption.parent().find('textarea').val(),
660
- 'type': 'plugin',
661
- 'key': '<?php echo esc_attr( $key ); ?>'
662
- };
663
- $.ajax({
664
- type: 'POST',
665
- url: ajaxurl,
666
- data: data,
667
- complete() {
668
- $('body').removeClass('ti-feedback-open');
669
- $('<?php echo esc_attr( $popup_id ); ?>').remove();
670
- if (redirectUrl !== '') {
671
- location.href = redirectUrl;
672
- }
673
- },
674
- beforeSend() {
675
- $('<?php echo esc_attr( $popup_id ); ?>').addClass('sending-feedback');
676
- $('<?php echo esc_attr( $popup_id ); ?> .popup--footer').remove();
677
- $('<?php echo esc_attr( $popup_id ); ?> .popup--body').html('<i class="dashicons dashicons-update-alt"></i>');
678
- }
679
- });
680
- });
681
- });
682
- })(jQuery);
683
-
684
- </script>
685
- <?php
686
- do_action( $this->product->get_key() . '_uninstall_feedback_after_js' );
687
- }
688
-
689
- /**
690
- * Get the disclosure labels markup.
691
- *
692
- * @return string
693
- */
694
- private function get_disclosure_labels() {
695
- $disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
696
- $disclosure_labels = array_merge(
697
- [
698
- 'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
699
- 'items' => [
700
- sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
701
- sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
702
- ],
703
- ],
704
- $disclosure_new_labels
705
- );
706
-
707
- $info_disclosure_content = '<div class="info-disclosure-content"><p>' . wp_kses_post( $disclosure_labels['title'] ) . '</p><ul>';
708
- foreach ( $disclosure_labels['items'] as $disclosure_item ) {
709
- $info_disclosure_content .= sprintf( '<li>%s</li>', wp_kses_post( $disclosure_item ) );
710
- }
711
- $info_disclosure_content .= '</ul></div>';
712
-
713
- return $info_disclosure_content;
714
- }
715
-
716
- /**
717
- * Randomizes the options array.
718
- *
719
- * @param array $options The options array.
720
- */
721
- function randomize_options( $options ) {
722
- $new = array();
723
- $keys = array_keys( $options );
724
- shuffle( $keys );
725
-
726
- foreach ( $keys as $key ) {
727
- $new[ $key ] = $options[ $key ];
728
- }
729
-
730
- return $new;
731
- }
732
-
733
- /**
734
- * Called when the deactivate button is clicked.
735
- */
736
- function post_deactivate() {
737
- check_ajax_referer( (string) __CLASS__, 'nonce' );
738
-
739
- $this->post_deactivate_or_cancel();
740
-
741
- if ( empty( $_POST['id'] ) ) {
742
-
743
- wp_send_json( [] );
744
-
745
- return;
746
- }
747
- $this->call_api(
748
- array(
749
- 'type' => 'deactivate',
750
- 'id' => $_POST['id'],
751
- 'comment' => isset( $_POST['msg'] ) ? $_POST['msg'] : '',
752
- )
753
- );
754
- wp_send_json( [] );
755
-
756
- }
757
-
758
- /**
759
- * Called when the deactivate/cancel button is clicked.
760
- */
761
- private function post_deactivate_or_cancel() {
762
- if ( ! isset( $_POST['type'] ) || ! isset( $_POST['key'] ) ) {
763
- return;
764
- }
765
- if ( 'theme' !== $_POST['type'] ) {
766
- return;
767
- }
768
-
769
- set_transient( 'ti_sdk_pause_' . $_POST['key'], true, self::PAUSE_DEACTIVATE_WINDOW_DAYS * DAY_IN_SECONDS );
770
-
771
- }
772
-
773
- /**
774
- * Calls the API
775
- *
776
- * @param array $attributes The attributes of the post body.
777
- *
778
- * @return bool Is the request succesfull?
779
- */
780
- protected function call_api( $attributes ) {
781
- $slug = $this->product->get_slug();
782
- $version = $this->product->get_version();
783
- $attributes['slug'] = $slug;
784
- $attributes['version'] = $version;
785
-
786
- $response = wp_remote_post(
787
- self::FEEDBACK_ENDPOINT,
788
- array(
789
- 'body' => $attributes,
790
- )
791
- );
792
-
793
- return is_wp_error( $response );
794
- }
795
-
796
- /**
797
- * Should we load this object?.
798
- *
799
- * @param Product $product Product object.
800
- *
801
- * @return bool Should we load the module?
802
- */
803
- public function can_load( $product ) {
804
- if ( $this->is_from_partner( $product ) ) {
805
- return false;
806
- }
807
- if ( $product->is_theme() && ( false !== get_transient( 'ti_sdk_pause_' . $product->get_key(), false ) ) ) {
808
- return false;
809
- }
810
-
811
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
812
- return true;
813
- }
814
- global $pagenow;
815
-
816
- if ( ! isset( $pagenow ) || empty( $pagenow ) ) {
817
- return false;
818
- }
819
-
820
- if ( $product->is_plugin() && 'plugins.php' !== $pagenow ) {
821
- return false;
822
-
823
- }
824
- if ( $product->is_theme() && 'theme-install.php' !== $pagenow ) {
825
- return false;
826
- }
827
-
828
- return true;
829
- }
830
-
831
- /**
832
- * Loads module hooks.
833
- *
834
- * @param Product $product Product details.
835
- *
836
- * @return Uninstall_Feedback Current module instance.
837
- */
838
- public function load( $product ) {
839
-
840
- if ( apply_filters( $product->get_key() . '_hide_uninstall_feedback', false ) ) {
841
- return;
842
- }
843
-
844
- $this->product = $product;
845
- add_action( 'admin_head', array( $this, 'load_resources' ) );
846
- add_action( 'wp_ajax_' . $this->product->get_key() . '_uninstall_feedback', array( $this, 'post_deactivate' ) );
847
-
848
- return $this;
849
- }
850
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-sdk/src/Product.php DELETED
@@ -1,418 +0,0 @@
1
- <?php
2
- /**
3
- * The product model class for ThemeIsle SDK
4
- *
5
- * @package ThemeIsleSDK
6
- * @subpackage Product
7
- * @copyright Copyright (c) 2017, Marius Cristea
8
- * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
- * @since 1.0.0
10
- */
11
-
12
- namespace ThemeisleSDK;
13
-
14
- // Exit if accessed directly.
15
- if ( ! defined( 'ABSPATH' ) ) {
16
- exit;
17
- }
18
-
19
- /**
20
- * Product model for ThemeIsle SDK.
21
- */
22
- class Product {
23
- /**
24
- * Define plugin type string.
25
- */
26
- const PLUGIN_TYPE = 'plugin';
27
- /**
28
- * Define theme type string.
29
- */
30
- const THEME_TYPE = 'theme';
31
- /**
32
- * If the product has a pro version, contains the pro slug.
33
- *
34
- * @var string $pro_slug Pro slug, if available.
35
- */
36
- public $pro_slug;
37
- /**
38
- * Current product slug.
39
- *
40
- * @var string $slug THe product slug.
41
- */
42
- private $slug;
43
- /**
44
- * Product basefile, with the proper metadata.
45
- *
46
- * @var string $basefile The file with headers.
47
- */
48
- private $basefile;
49
- /**
50
- * Type of the product.
51
- *
52
- * @var string $type The product type ( plugin | theme ).
53
- */
54
- private $type;
55
- /**
56
- * The file name.
57
- *
58
- * @var string $file The file name.
59
- */
60
- private $file;
61
- /**
62
- * Product name, fetched from the file headers.
63
- *
64
- * @var string $name The product name.
65
- */
66
- private $name;
67
- /**
68
- * Product normalized key.
69
- *
70
- * @var string $key The product ready key.
71
- */
72
- private $key;
73
- /**
74
- * Product store url.
75
- *
76
- * @var string $store_url The store url.
77
- */
78
- private $store_url;
79
- /**
80
- * Product install timestamp.
81
- *
82
- * @var int $install The date of install.
83
- */
84
- private $install;
85
- /**
86
- * Product store/author name.
87
- *
88
- * @var string $store_name The store name.
89
- */
90
- private $store_name;
91
- /**
92
- * Does the product requires license.
93
- *
94
- * @var bool $requires_license Either user needs to activate it with license.
95
- */
96
- private $requires_license;
97
- /**
98
- * Is the product available on wordpress.org
99
- *
100
- * @var bool $wordpress_available Either is available on WordPress or not.
101
- */
102
- private $wordpress_available;
103
- /**
104
- * Current version of the product.
105
- *
106
- * @var string $version The product version.
107
- */
108
- private $version;
109
-
110
- /**
111
- * ThemeIsle_SDK_Product constructor.
112
- *
113
- * @param string $basefile Product basefile.
114
- */
115
- public function __construct( $basefile ) {
116
- if ( ! empty( $basefile ) ) {
117
- if ( is_file( $basefile ) ) {
118
- $this->basefile = $basefile;
119
- $this->setup_from_path();
120
- $this->setup_from_fileheaders();
121
- }
122
- }
123
- $install = get_option( $this->get_key() . '_install', 0 );
124
- if ( 0 === $install ) {
125
- $install = time();
126
- update_option( $this->get_key() . '_install', time() );
127
- }
128
- $this->install = $install;
129
-
130
- }
131
-
132
- /**
133
- * Setup props from path.
134
- */
135
- public function setup_from_path() {
136
- $this->file = basename( $this->basefile );
137
- $dir = dirname( $this->basefile );
138
- $this->slug = basename( $dir );
139
- $exts = explode( '.', $this->basefile );
140
- $ext = $exts[ count( $exts ) - 1 ];
141
- if ( 'css' === $ext ) {
142
- $this->type = 'theme';
143
- }
144
- if ( 'php' === $ext ) {
145
- $this->type = 'plugin';
146
- }
147
- $this->key = self::key_ready_name( $this->slug );
148
- }
149
-
150
- /**
151
- * Normalize string.
152
- *
153
- * @param string $string the String to be normalized for cron handler.
154
- *
155
- * @return string $name The normalized string.
156
- */
157
- static function key_ready_name( $string ) {
158
- return str_replace( '-', '_', strtolower( trim( $string ) ) );
159
- }
160
-
161
- /**
162
- * Setup props from fileheaders.
163
- */
164
- public function setup_from_fileheaders() {
165
- $file_headers = array(
166
- 'Requires License' => 'Requires License',
167
- 'WordPress Available' => 'WordPress Available',
168
- 'Pro Slug' => 'Pro Slug',
169
- 'Version' => 'Version',
170
- );
171
- if ( 'plugin' === $this->type ) {
172
- $file_headers['Name'] = 'Plugin Name';
173
- $file_headers['AuthorName'] = 'Author';
174
- $file_headers['AuthorURI'] = 'Author URI';
175
- }
176
- if ( 'theme' === $this->type ) {
177
- $file_headers['Name'] = 'Theme Name';
178
- $file_headers['AuthorName'] = 'Author';
179
- $file_headers['AuthorURI'] = 'Author URI';
180
- }
181
- $file_headers = get_file_data( $this->basefile, $file_headers );
182
-
183
- $this->name = $file_headers['Name'];
184
- $this->store_name = $file_headers['AuthorName'];
185
- $this->author_url = $file_headers['AuthorURI'];
186
- $this->store_url = $file_headers['AuthorURI'];
187
-
188
- $this->requires_license = ( 'yes' === $file_headers['Requires License'] ) ? true : false;
189
- $this->wordpress_available = ( 'yes' === $file_headers['WordPress Available'] ) ? true : false;
190
- $this->pro_slug = ! empty( $file_headers['Pro Slug'] ) ? $file_headers['Pro Slug'] : '';
191
- $this->version = $file_headers['Version'];
192
-
193
- }
194
-
195
- /**
196
- * Return the product key.
197
- *
198
- * @return string The product key.
199
- */
200
- public function get_key() {
201
- return $this->key;
202
- }
203
-
204
- /**
205
- * Check if the product is either theme or plugin.
206
- *
207
- * @return string Product type.
208
- */
209
- public function get_type() {
210
- return $this->type;
211
- }
212
-
213
- /**
214
- * Return if the product is used as a plugin.
215
- *
216
- * @return bool Is plugin?
217
- */
218
- public function is_plugin() {
219
- return self::PLUGIN_TYPE === $this->type;
220
- }
221
-
222
- /**
223
- * Return if the product is used as a theme.
224
- *
225
- * @return bool Is theme ?
226
- */
227
- public function is_theme() {
228
- return self::THEME_TYPE === $this->type;
229
- }
230
-
231
- /**
232
- * Returns the product slug.
233
- *
234
- * @return string The product slug.
235
- */
236
- public function get_slug() {
237
- return $this->slug;
238
- }
239
-
240
- /**
241
- * The magic var_dump info method.
242
- *
243
- * @return array Debug info.
244
- */
245
- public function __debugInfo() {
246
- return array(
247
- 'name' => $this->name,
248
- 'slug' => $this->slug,
249
- 'version' => $this->version,
250
- 'basefile' => $this->basefile,
251
- 'key' => $this->key,
252
- 'type' => $this->type,
253
- 'store_name' => $this->store_name,
254
- 'store_url' => $this->store_url,
255
- 'wordpress_available' => $this->wordpress_available,
256
- 'requires_license' => $this->requires_license,
257
- );
258
-
259
- }
260
-
261
- /**
262
- * Getter for product version.
263
- *
264
- * @return string The product version.
265
- */
266
- public function get_version() {
267
- return $this->version;
268
- }
269
-
270
- /**
271
- * Returns current product license, if available.
272
- *
273
- * @return string Return license key, if available.
274
- */
275
- public function get_license() {
276
-
277
- if ( ! $this->requires_license() && ! $this->is_wordpress_available() ) {
278
- return 'free';
279
- }
280
- $license_data = get_option( $this->get_key() . '_license_data', '' );
281
-
282
- if ( empty( $license_data ) ) {
283
- return get_option( $this->get_key() . '_license', '' );
284
- }
285
- if ( ! isset( $license_data->key ) ) {
286
- return get_option( $this->get_key() . '_license', '' );
287
- }
288
-
289
- return $license_data->key;
290
- }
291
-
292
- /**
293
- * Either the product requires license or not.
294
- *
295
- * @return bool Either requires license or not.
296
- */
297
- public function requires_license() {
298
- return $this->requires_license;
299
- }
300
-
301
- /**
302
- * If product is available on wordpress.org or not.
303
- *
304
- * @return bool Either is wp available or not.
305
- */
306
- public function is_wordpress_available() {
307
- return $this->wordpress_available;
308
- }
309
-
310
- /**
311
- * Return friendly name.
312
- *
313
- * @return string Friendly name.
314
- */
315
- public function get_friendly_name() {
316
- $name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
317
- $name = rtrim( $name, '- ()' );
318
-
319
- return $name;
320
- }
321
-
322
- /**
323
- * Getter for product name.
324
- *
325
- * @return string The product name.
326
- */
327
- public function get_name() {
328
- return $this->name;
329
- }
330
-
331
- /**
332
- * Returns the Store name.
333
- *
334
- * @return string Store name.
335
- */
336
- public function get_store_name() {
337
- return $this->store_name;
338
- }
339
-
340
- /**
341
- * Returns the store url.
342
- *
343
- * @return string The store url.
344
- */
345
- public function get_store_url() {
346
-
347
- if ( strpos( $this->store_url, '/themeisle.com' ) !== false ) {
348
- return 'https://store.themeisle.com/';
349
- }
350
-
351
- return $this->store_url;
352
- }
353
-
354
- /**
355
- * Returns product basefile, which holds the metaheaders.
356
- *
357
- * @return string The product basefile.
358
- */
359
- public function get_basefile() {
360
- return $this->basefile;
361
- }
362
-
363
- /**
364
- * Get changelog url.
365
- *
366
- * @return string Changelog url.
367
- */
368
- public function get_changelog() {
369
- return add_query_arg(
370
- [
371
- 'name' => rawurlencode( $this->get_name() ),
372
- 'edd_action' => 'view_changelog',
373
- ],
374
- $this->get_store_url()
375
- );
376
- }
377
-
378
- /**
379
- * Returns product filename.
380
- *
381
- * @return string The product filename.
382
- */
383
- public function get_file() {
384
- return $this->file;
385
- }
386
-
387
- /**
388
- * Returns the pro slug, if available.
389
- *
390
- * @return string The pro slug.
391
- */
392
- public function get_pro_slug() {
393
- return $this->pro_slug;
394
- }
395
-
396
- /**
397
- * Return the install timestamp.
398
- *
399
- * @return int The install timestamp.
400
- */
401
- public function get_install_time() {
402
- return $this->install;
403
- }
404
-
405
- /**
406
- * Returns the URL of the product base file.
407
- *
408
- * @param string $path The path to the file.
409
- *
410
- * @return string The URL of the product base file.
411
- */
412
- public function get_base_url( $path = '/' ) {
413
- if ( $this->type ) {
414
- return plugins_url( $path, $this->basefile );
415
- }
416
- }
417
-
418
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita8c63f4e9c2954bc69536840bf87006d
6
  {
7
  private static $loader;
8
 
@@ -13,21 +13,24 @@ class ComposerAutoloaderInita8c63f4e9c2954bc69536840bf87006d
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInita8c63f4e9c2954bc69536840bf87006d', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInita8c63f4e9c2954bc69536840bf87006d', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInita8c63f4e9c2954bc69536840bf87006d::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +51,19 @@ class ComposerAutoloaderInita8c63f4e9c2954bc69536840bf87006d
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInita8c63f4e9c2954bc69536840bf87006d::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequirea8c63f4e9c2954bc69536840bf87006d($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequirea8c63f4e9c2954bc69536840bf87006d($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite4069214b60b0efef4a17b4633ac2190
6
  {
7
  private static $loader;
8
 
13
  }
14
  }
15
 
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInite4069214b60b0efef4a17b4633ac2190', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInite4069214b60b0efef4a17b4633ac2190', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInite4069214b60b0efef4a17b4633ac2190::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInite4069214b60b0efef4a17b4633ac2190::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequiree4069214b60b0efef4a17b4633ac2190($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequiree4069214b60b0efef4a17b4633ac2190($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInita8c63f4e9c2954bc69536840bf87006d
8
  {
9
  public static $files = array (
10
  '4940672e65e7c6c88ed7150711580427' => __DIR__ . '/..' . '/codeinwp/gutenberg-animation/load.php',
@@ -53,9 +53,9 @@ class ComposerStaticInita8c63f4e9c2954bc69536840bf87006d
53
  public static function getInitializer(ClassLoader $loader)
54
  {
55
  return \Closure::bind(function () use ($loader) {
56
- $loader->prefixLengthsPsr4 = ComposerStaticInita8c63f4e9c2954bc69536840bf87006d::$prefixLengthsPsr4;
57
- $loader->prefixDirsPsr4 = ComposerStaticInita8c63f4e9c2954bc69536840bf87006d::$prefixDirsPsr4;
58
- $loader->classMap = ComposerStaticInita8c63f4e9c2954bc69536840bf87006d::$classMap;
59
 
60
  }, null, ClassLoader::class);
61
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite4069214b60b0efef4a17b4633ac2190
8
  {
9
  public static $files = array (
10
  '4940672e65e7c6c88ed7150711580427' => __DIR__ . '/..' . '/codeinwp/gutenberg-animation/load.php',
53
  public static function getInitializer(ClassLoader $loader)
54
  {
55
  return \Closure::bind(function () use ($loader) {
56
+ $loader->prefixLengthsPsr4 = ComposerStaticInite4069214b60b0efef4a17b4633ac2190::$prefixLengthsPsr4;
57
+ $loader->prefixDirsPsr4 = ComposerStaticInite4069214b60b0efef4a17b4633ac2190::$prefixDirsPsr4;
58
+ $loader->classMap = ComposerStaticInite4069214b60b0efef4a17b4633ac2190::$classMap;
59
 
60
  }, null, ClassLoader::class);
61
  }
vendor/composer/installed.json CHANGED
@@ -137,17 +137,17 @@
137
  },
138
  {
139
  "name": "codeinwp/themeisle-sdk",
140
- "version": "3.1.9",
141
- "version_normalized": "3.1.9.0",
142
  "source": {
143
  "type": "git",
144
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
145
- "reference": "ec99550b38070cf869e83241a665d98a24cf0711"
146
  },
147
  "dist": {
148
  "type": "zip",
149
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/ec99550b38070cf869e83241a665d98a24cf0711",
150
- "reference": "ec99550b38070cf869e83241a665d98a24cf0711",
151
  "shasum": ""
152
  },
153
  "require-dev": {
@@ -155,7 +155,7 @@
155
  "squizlabs/php_codesniffer": "^3.1",
156
  "wp-coding-standards/wpcs": "^1.0.0"
157
  },
158
- "time": "2020-02-24T16:04:51+00:00",
159
  "type": "library",
160
  "installation-source": "dist",
161
  "notification-url": "https://packagist.org/downloads/",
137
  },
138
  {
139
  "name": "codeinwp/themeisle-sdk",
140
+ "version": "3.2.2",
141
+ "version_normalized": "3.2.2.0",
142
  "source": {
143
  "type": "git",
144
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
145
+ "reference": "1b787d10970575780b35f96380c6ef3173b00d18"
146
  },
147
  "dist": {
148
  "type": "zip",
149
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/1b787d10970575780b35f96380c6ef3173b00d18",
150
+ "reference": "1b787d10970575780b35f96380c6ef3173b00d18",
151
  "shasum": ""
152
  },
153
  "require-dev": {
155
  "squizlabs/php_codesniffer": "^3.1",
156
  "wp-coding-standards/wpcs": "^1.0.0"
157
  },
158
+ "time": "2020-03-13T15:58:53+00:00",
159
  "type": "library",
160
  "installation-source": "dist",
161
  "notification-url": "https://packagist.org/downloads/",
vendor/tubalmartin/cssmin/src/Colors.php DELETED
@@ -1,155 +0,0 @@
1
- <?php
2
-
3
- namespace tubalmartin\CssMin;
4
-
5
- class Colors
6
- {
7
- public static function getHexToNamedMap()
8
- {
9
- // Hex colors longer than named counterpart
10
- return array(
11
- '#f0ffff' => 'azure',
12
- '#f5f5dc' => 'beige',
13
- '#ffe4c4' => 'bisque',
14
- '#a52a2a' => 'brown',
15
- '#ff7f50' => 'coral',
16
- '#ffd700' => 'gold',
17
- '#808080' => 'gray',
18
- '#008000' => 'green',
19
- '#4b0082' => 'indigo',
20
- '#fffff0' => 'ivory',
21
- '#f0e68c' => 'khaki',
22
- '#faf0e6' => 'linen',
23
- '#800000' => 'maroon',
24
- '#000080' => 'navy',
25
- '#fdf5e6' => 'oldlace',
26
- '#808000' => 'olive',
27
- '#ffa500' => 'orange',
28
- '#da70d6' => 'orchid',
29
- '#cd853f' => 'peru',
30
- '#ffc0cb' => 'pink',
31
- '#dda0dd' => 'plum',
32
- '#800080' => 'purple',
33
- '#f00' => 'red',
34
- '#fa8072' => 'salmon',
35
- '#a0522d' => 'sienna',
36
- '#c0c0c0' => 'silver',
37
- '#fffafa' => 'snow',
38
- '#d2b48c' => 'tan',
39
- '#008080' => 'teal',
40
- '#ff6347' => 'tomato',
41
- '#ee82ee' => 'violet',
42
- '#f5deb3' => 'wheat'
43
- );
44
- }
45
-
46
- public static function getNamedToHexMap()
47
- {
48
- // Named colors longer than hex counterpart
49
- return array(
50
- 'aliceblue' => '#f0f8ff',
51
- 'antiquewhite' => '#faebd7',
52
- 'aquamarine' => '#7fffd4',
53
- 'black' => '#000',
54
- 'blanchedalmond' => '#ffebcd',
55
- 'blueviolet' => '#8a2be2',
56
- 'burlywood' => '#deb887',
57
- 'cadetblue' => '#5f9ea0',
58
- 'chartreuse' => '#7fff00',
59
- 'chocolate' => '#d2691e',
60
- 'cornflowerblue' => '#6495ed',
61
- 'cornsilk' => '#fff8dc',
62
- 'darkblue' => '#00008b',
63
- 'darkcyan' => '#008b8b',
64
- 'darkgoldenrod' => '#b8860b',
65
- 'darkgray' => '#a9a9a9',
66
- 'darkgreen' => '#006400',
67
- 'darkgrey' => '#a9a9a9',
68
- 'darkkhaki' => '#bdb76b',
69
- 'darkmagenta' => '#8b008b',
70
- 'darkolivegreen' => '#556b2f',
71
- 'darkorange' => '#ff8c00',
72
- 'darkorchid' => '#9932cc',
73
- 'darksalmon' => '#e9967a',
74
- 'darkseagreen' => '#8fbc8f',
75
- 'darkslateblue' => '#483d8b',
76
- 'darkslategray' => '#2f4f4f',
77
- 'darkslategrey' => '#2f4f4f',
78
- 'darkturquoise' => '#00ced1',
79
- 'darkviolet' => '#9400d3',
80
- 'deeppink' => '#ff1493',
81
- 'deepskyblue' => '#00bfff',
82
- 'dodgerblue' => '#1e90ff',
83
- 'firebrick' => '#b22222',
84
- 'floralwhite' => '#fffaf0',
85
- 'forestgreen' => '#228b22',
86
- 'fuchsia' => '#f0f',
87
- 'gainsboro' => '#dcdcdc',
88
- 'ghostwhite' => '#f8f8ff',
89
- 'goldenrod' => '#daa520',
90
- 'greenyellow' => '#adff2f',
91
- 'honeydew' => '#f0fff0',
92
- 'indianred' => '#cd5c5c',
93
- 'lavender' => '#e6e6fa',
94
- 'lavenderblush' => '#fff0f5',
95
- 'lawngreen' => '#7cfc00',
96
- 'lemonchiffon' => '#fffacd',
97
- 'lightblue' => '#add8e6',
98
- 'lightcoral' => '#f08080',
99
- 'lightcyan' => '#e0ffff',
100
- 'lightgoldenrodyellow' => '#fafad2',
101
- 'lightgray' => '#d3d3d3',
102
- 'lightgreen' => '#90ee90',
103
- 'lightgrey' => '#d3d3d3',
104
- 'lightpink' => '#ffb6c1',
105
- 'lightsalmon' => '#ffa07a',
106
- 'lightseagreen' => '#20b2aa',
107
- 'lightskyblue' => '#87cefa',
108
- 'lightslategray' => '#778899',
109
- 'lightslategrey' => '#778899',
110
- 'lightsteelblue' => '#b0c4de',
111
- 'lightyellow' => '#ffffe0',
112
- 'limegreen' => '#32cd32',
113
- 'mediumaquamarine' => '#66cdaa',
114
- 'mediumblue' => '#0000cd',
115
- 'mediumorchid' => '#ba55d3',
116
- 'mediumpurple' => '#9370db',
117
- 'mediumseagreen' => '#3cb371',
118
- 'mediumslateblue' => '#7b68ee',
119
- 'mediumspringgreen' => '#00fa9a',
120
- 'mediumturquoise' => '#48d1cc',
121
- 'mediumvioletred' => '#c71585',
122
- 'midnightblue' => '#191970',
123
- 'mintcream' => '#f5fffa',
124
- 'mistyrose' => '#ffe4e1',
125
- 'moccasin' => '#ffe4b5',
126
- 'navajowhite' => '#ffdead',
127
- 'olivedrab' => '#6b8e23',
128
- 'orangered' => '#ff4500',
129
- 'palegoldenrod' => '#eee8aa',
130
- 'palegreen' => '#98fb98',
131
- 'paleturquoise' => '#afeeee',
132
- 'palevioletred' => '#db7093',
133
- 'papayawhip' => '#ffefd5',
134
- 'peachpuff' => '#ffdab9',
135
- 'powderblue' => '#b0e0e6',
136
- 'rebeccapurple' => '#663399',
137
- 'rosybrown' => '#bc8f8f',
138
- 'royalblue' => '#4169e1',
139
- 'saddlebrown' => '#8b4513',
140
- 'sandybrown' => '#f4a460',
141
- 'seagreen' => '#2e8b57',
142
- 'seashell' => '#fff5ee',
143
- 'slateblue' => '#6a5acd',
144
- 'slategray' => '#708090',
145
- 'slategrey' => '#708090',
146
- 'springgreen' => '#00ff7f',
147
- 'steelblue' => '#4682b4',
148
- 'turquoise' => '#40e0d0',
149
- 'white' => '#fff',
150
- 'whitesmoke' => '#f5f5f5',
151
- 'yellow' => '#ff0',
152
- 'yellowgreen' => '#9acd32'
153
- );
154
- }
155
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/tubalmartin/cssmin/src/Command.php DELETED
@@ -1,223 +0,0 @@
1
- <?php
2
-
3
- namespace tubalmartin\CssMin;
4
-
5
- class Command
6
- {
7
- const SUCCESS_EXIT = 0;
8
- const FAILURE_EXIT = 1;
9
-
10
- protected $stats = array();
11
-
12
- public static function main()
13
- {
14
- $command = new self;
15
- $command->run();
16
- }
17
-
18
- public function run()
19
- {
20
- $opts = getopt(
21
- 'hi:o:',
22
- array(
23
- 'help',
24
- 'input:',
25
- 'output:',
26
- 'dry-run',
27
- 'keep-sourcemap',
28
- 'keep-sourcemap-comment',
29
- 'linebreak-position:',
30
- 'memory-limit:',
31
- 'pcre-backtrack-limit:',
32
- 'pcre-recursion-limit:',
33
- 'remove-important-comments'
34
- )
35
- );
36
-
37
- $help = $this->getOpt(array('h', 'help'), $opts);
38
- $input = $this->getOpt(array('i', 'input'), $opts);
39
- $output = $this->getOpt(array('o', 'output'), $opts);
40
- $dryrun = $this->getOpt('dry-run', $opts);
41
- $keepSourceMapComment = $this->getOpt(array('keep-sourcemap', 'keep-sourcemap-comment'), $opts);
42
- $linebreakPosition = $this->getOpt('linebreak-position', $opts);
43
- $memoryLimit = $this->getOpt('memory-limit', $opts);
44
- $backtrackLimit = $this->getOpt('pcre-backtrack-limit', $opts);
45
- $recursionLimit = $this->getOpt('pcre-recursion-limit', $opts);
46
- $removeImportantComments = $this->getOpt('remove-important-comments', $opts);
47
-
48
- if (!is_null($help)) {
49
- $this->showHelp();
50
- die(self::SUCCESS_EXIT);
51
- }
52
-
53
- if (is_null($input)) {
54
- fwrite(STDERR, '-i <file> argument is missing' . PHP_EOL);
55
- $this->showHelp();
56
- die(self::FAILURE_EXIT);
57
- }
58
-
59
- if (!is_readable($input)) {
60
- fwrite(STDERR, 'Input file is not readable' . PHP_EOL);
61
- die(self::FAILURE_EXIT);
62
- }
63
-
64
- $css = file_get_contents($input);
65
-
66
- if ($css === false) {
67
- fwrite(STDERR, 'Input CSS code could not be retrieved from input file' . PHP_EOL);
68
- die(self::FAILURE_EXIT);
69
- }
70
-
71
- $this->setStat('original-size', strlen($css));
72
-
73
- $cssmin = new Minifier;
74
-
75
- if (!is_null($keepSourceMapComment)) {
76
- $cssmin->keepSourceMapComment();
77
- }
78
-
79
- if (!is_null($removeImportantComments)) {
80
- $cssmin->removeImportantComments();
81
- }
82
-
83
- if (!is_null($linebreakPosition)) {
84
- $cssmin->setLineBreakPosition($linebreakPosition);
85
- }
86
-
87
- if (!is_null($memoryLimit)) {
88
- $cssmin->setMemoryLimit($memoryLimit);
89
- }
90
-
91
- if (!is_null($backtrackLimit)) {
92
- $cssmin->setPcreBacktrackLimit($backtrackLimit);
93
- }
94
-
95
- if (!is_null($recursionLimit)) {
96
- $cssmin->setPcreRecursionLimit($recursionLimit);
97
- }
98
-
99
- $this->setStat('compression-time-start', microtime(true));
100
-
101
- $css = $cssmin->run($css);
102
-
103
- $this->setStat('compression-time-end', microtime(true));
104
- $this->setStat('peak-memory-usage', memory_get_peak_usage(true));
105
- $this->setStat('compressed-size', strlen($css));
106
-
107
- if (!is_null($dryrun)) {
108
- $this->showStats();
109
- die(self::SUCCESS_EXIT);
110
- }
111
-
112
- if (is_null($output)) {
113
- fwrite(STDOUT, $css . PHP_EOL);
114
- $this->showStats();
115
- die(self::SUCCESS_EXIT);
116
- }
117
-
118
- if (!is_writable(dirname($output))) {
119
- fwrite(STDERR, 'Output file is not writable' . PHP_EOL);
120
- die(self::FAILURE_EXIT);
121
- }
122
-
123
- if (file_put_contents($output, $css) === false) {
124
- fwrite(STDERR, 'Compressed CSS code could not be saved to output file' . PHP_EOL);
125
- die(self::FAILURE_EXIT);
126
- }
127
-
128
- $this->showStats();
129
-
130
- die(self::SUCCESS_EXIT);
131
- }
132
-
133
- protected function getOpt($opts, $options)
134
- {
135
- $value = null;
136
-
137
- if (is_string($opts)) {
138
- $opts = array($opts);
139
- }
140
-
141
- foreach ($opts as $opt) {
142
- if (array_key_exists($opt, $options)) {
143
- $value = $options[$opt];
144
- break;
145
- }
146
- }
147
-
148
- return $value;
149
- }
150
-
151
- protected function setStat($statName, $statValue)
152
- {
153
- $this->stats[$statName] = $statValue;
154
- }
155
-
156
- protected function formatBytes($size, $precision = 2)
157
- {
158
- $base = log($size, 1024);
159
- $suffixes = array('B', 'K', 'M', 'G', 'T');
160
- return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];
161
- }
162
-
163
- protected function formatMicroSeconds($microSecs, $precision = 2)
164
- {
165
- // ms
166
- $time = round($microSecs * 1000, $precision);
167
-
168
- if ($time >= 60 * 1000) {
169
- $time = round($time / 60 * 1000, $precision) .' m'; // m
170
- } elseif ($time >= 1000) {
171
- $time = round($time / 1000, $precision) .' s'; // s
172
- } else {
173
- $time .= ' ms';
174
- }
175
-
176
- return $time;
177
- }
178
-
179
- protected function showStats()
180
- {
181
- $spaceSavings = round((1 - ($this->stats['compressed-size'] / $this->stats['original-size'])) * 100, 2);
182
- $compressionRatio = round($this->stats['original-size'] / $this->stats['compressed-size'], 2);
183
- $compressionTime = $this->formatMicroSeconds(
184
- $this->stats['compression-time-end'] - $this->stats['compression-time-start']
185
- );
186
- $peakMemoryUsage = $this->formatBytes($this->stats['peak-memory-usage']);
187
-
188
- print <<<EOT
189
-
190
- ------------------------------
191
- CSSMIN STATS
192
- ------------------------------
193
- Space savings: {$spaceSavings} %
194
- Compression ratio: {$compressionRatio}:1
195
- Compression time: $compressionTime
196
- Peak memory usage: $peakMemoryUsage
197
-
198
-
199
- EOT;
200
- }
201
-
202
- protected function showHelp()
203
- {
204
- print <<<'EOT'
205
- Usage: cssmin [options] -i <file> [-o <file>]
206
-
207
- -i|--input <file> File containing uncompressed CSS code.
208
- -o|--output <file> File to use to save compressed CSS code.
209
-
210
- Options:
211
-
212
- -h|--help Prints this usage information.
213
- --dry-run Performs a dry run displaying statistics.
214
- --keep-sourcemap[-comment] Keeps the sourcemap special comment in the output.
215
- --linebreak-position <pos> Splits long lines after a specific column in the output.
216
- --memory-limit <limit> Sets the memory limit for this script.
217
- --pcre-backtrack-limit <limit> Sets the PCRE backtrack limit for this script.
218
- --pcre-recursion-limit <limit> Sets the PCRE recursion limit for this script.
219
- --remove-important-comments Removes !important comments from output.
220
-
221
- EOT;
222
- }
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/tubalmartin/cssmin/src/Minifier.php DELETED
@@ -1,895 +0,0 @@
1
- <?php
2
-
3
- /*!
4
- * CssMin
5
- * Author: Tubal Martin - http://tubalmartin.me/
6
- * Repo: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port
7
- *
8
- * This is a PHP port of the CSS minification tool distributed with YUICompressor,
9
- * itself a port of the cssmin utility by Isaac Schlueter - http://foohack.com/
10
- * Permission is hereby granted to use the PHP version under the same
11
- * conditions as the YUICompressor.
12
- */
13
-
14
- /*!
15
- * YUI Compressor
16
- * http://developer.yahoo.com/yui/compressor/
17
- * Author: Julien Lecomte - http://www.julienlecomte.net/
18
- * Copyright (c) 2013 Yahoo! Inc. All rights reserved.
19
- * The copyrights embodied in the content of this file are licensed
20
- * by Yahoo! Inc. under the BSD (revised) open source license.
21
- */
22
-
23
- namespace tubalmartin\CssMin;
24
-
25
- class Minifier
26
- {
27
- const QUERY_FRACTION = '_CSSMIN_QF_';
28
- const COMMENT_TOKEN = '_CSSMIN_CMT_%d_';
29
- const COMMENT_TOKEN_START = '_CSSMIN_CMT_';
30
- const RULE_BODY_TOKEN = '_CSSMIN_RBT_%d_';
31
- const PRESERVED_TOKEN = '_CSSMIN_PTK_%d_';
32
-
33
- // Token lists
34
- private $comments = array();
35
- private $ruleBodies = array();
36
- private $preservedTokens = array();
37
-
38
- // Output options
39
- private $keepImportantComments = true;
40
- private $keepSourceMapComment = false;
41
- private $linebreakPosition = 0;
42
-
43
- // PHP ini limits
44
- private $raisePhpLimits;
45
- private $memoryLimit;
46
- private $maxExecutionTime = 60; // 1 min
47
- private $pcreBacktrackLimit;
48
- private $pcreRecursionLimit;
49
-
50
- // Color maps
51
- private $hexToNamedColorsMap;
52
- private $namedToHexColorsMap;
53
-
54
- // Regexes
55
- private $numRegex;
56
- private $charsetRegex = '/@charset [^;]+;/Si';
57
- private $importRegex = '/@import [^;]+;/Si';
58
- private $namespaceRegex = '/@namespace [^;]+;/Si';
59
- private $namedToHexColorsRegex;
60
- private $shortenOneZeroesRegex;
61
- private $shortenTwoZeroesRegex;
62
- private $shortenThreeZeroesRegex;
63
- private $shortenFourZeroesRegex;
64
- private $unitsGroupRegex = '(?:ch|cm|em|ex|gd|in|mm|px|pt|pc|q|rem|vh|vmax|vmin|vw|%)';
65
-
66
- /**
67
- * @param bool|int $raisePhpLimits If true, PHP settings will be raised if needed
68
- */
69
- public function __construct($raisePhpLimits = true)
70
- {
71
- $this->raisePhpLimits = (bool) $raisePhpLimits;
72
- $this->memoryLimit = 128 * 1048576; // 128MB in bytes
73
- $this->pcreBacktrackLimit = 1000 * 1000;
74
- $this->pcreRecursionLimit = 500 * 1000;
75
- $this->hexToNamedColorsMap = Colors::getHexToNamedMap();
76
- $this->namedToHexColorsMap = Colors::getNamedToHexMap();
77
- $this->namedToHexColorsRegex = sprintf(
78
- '/([:,( ])(%s)( |,|\)|;|$)/Si',
79
- implode('|', array_keys($this->namedToHexColorsMap))
80
- );
81
- $this->numRegex = sprintf('-?\d*\.?\d+%s?', $this->unitsGroupRegex);
82
- $this->setShortenZeroValuesRegexes();
83
- }
84
-
85
- /**
86
- * Parses & minifies the given input CSS string
87
- * @param string $css
88
- * @return string
89
- */
90
- public function run($css = '')
91
- {
92
- if (empty($css) || !is_string($css)) {
93
- return '';
94
- }
95
-
96
- $this->resetRunProperties();
97
-
98
- if ($this->raisePhpLimits) {
99
- $this->doRaisePhpLimits();
100
- }
101
-
102
- return $this->minify($css);
103
- }
104
-
105
- /**
106
- * Sets whether to keep or remove sourcemap special comment.
107
- * Sourcemap comments are removed by default.
108
- * @param bool $keepSourceMapComment
109
- */
110
- public function keepSourceMapComment($keepSourceMapComment = true)
111
- {
112
- $this->keepSourceMapComment = (bool) $keepSourceMapComment;
113
- }
114
-
115
- /**
116
- * Sets whether to keep or remove important comments.
117
- * Important comments outside of a declaration block are kept by default.
118
- * @param bool $removeImportantComments
119
- */
120
- public function removeImportantComments($removeImportantComments = true)
121
- {
122
- $this->keepImportantComments = !(bool) $removeImportantComments;
123
- }
124
-
125
- /**
126
- * Sets the approximate column after which long lines will be splitted in the output
127
- * with a linebreak.
128
- * @param int $position
129
- */
130
- public function setLineBreakPosition($position)
131
- {
132
- $this->linebreakPosition = (int) $position;
133
- }
134
-
135
- /**
136
- * Sets the memory limit for this script
137
- * @param int|string $limit
138
- */
139
- public function setMemoryLimit($limit)
140
- {
141
- $this->memoryLimit = Utils::normalizeInt($limit);
142
- }
143
-
144
- /**
145
- * Sets the maximum execution time for this script
146
- * @param int|string $seconds
147
- */
148
- public function setMaxExecutionTime($seconds)
149
- {
150
- $this->maxExecutionTime = (int) $seconds;
151
- }
152
-
153
- /**
154
- * Sets the PCRE backtrack limit for this script
155
- * @param int $limit
156
- */
157
- public function setPcreBacktrackLimit($limit)
158
- {
159
- $this->pcreBacktrackLimit = (int) $limit;
160
- }
161
-
162
- /**
163
- * Sets the PCRE recursion limit for this script
164
- * @param int $limit
165
- */
166
- public function setPcreRecursionLimit($limit)
167
- {
168
- $this->pcreRecursionLimit = (int) $limit;
169
- }
170
-
171
- /**
172
- * Builds regular expressions needed for shortening zero values
173
- */
174
- private function setShortenZeroValuesRegexes()
175
- {
176
- $zeroRegex = '0'. $this->unitsGroupRegex;
177
- $numOrPosRegex = '('. $this->numRegex .'|top|left|bottom|right|center) ';
178
- $oneZeroSafeProperties = array(
179
- '(?:line-)?height',
180
- '(?:(?:min|max)-)?width',
181
- 'top',
182
- 'left',
183
- 'background-position',
184
- 'bottom',
185
- 'right',
186
- 'border(?:-(?:top|left|bottom|right))?(?:-width)?',
187
- 'border-(?:(?:top|bottom)-(?:left|right)-)?radius',
188
- 'column-(?:gap|width)',
189
- 'margin(?:-(?:top|left|bottom|right))?',
190
- 'outline-width',
191
- 'padding(?:-(?:top|left|bottom|right))?'
192
- );
193
-
194
- // First zero regex
195
- $regex = '/(^|;)('. implode('|', $oneZeroSafeProperties) .'):%s/Si';
196
- $this->shortenOneZeroesRegex = sprintf($regex, $zeroRegex);
197
-
198
- // Multiple zeroes regexes
199
- $regex = '/(^|;)(margin|padding|border-(?:width|radius)|background-position):%s/Si';
200
- $this->shortenTwoZeroesRegex = sprintf($regex, $numOrPosRegex . $zeroRegex);
201
- $this->shortenThreeZeroesRegex = sprintf($regex, $numOrPosRegex . $numOrPosRegex . $zeroRegex);
202
- $this->shortenFourZeroesRegex = sprintf($regex, $numOrPosRegex . $numOrPosRegex . $numOrPosRegex . $zeroRegex);
203
- }
204
-
205
- /**
206
- * Resets properties whose value may change between runs
207
- */
208
- private function resetRunProperties()
209
- {
210
- $this->comments = array();
211
- $this->ruleBodies = array();
212
- $this->preservedTokens = array();
213
- }
214
-
215
- /**
216
- * Tries to configure PHP to use at least the suggested minimum settings
217
- * @return void
218
- */
219
- private function doRaisePhpLimits()
220
- {
221
- $phpLimits = array(
222
- 'memory_limit' => $this->memoryLimit,
223
- 'max_execution_time' => $this->maxExecutionTime,
224
- 'pcre.backtrack_limit' => $this->pcreBacktrackLimit,
225
- 'pcre.recursion_limit' => $this->pcreRecursionLimit
226
- );
227
-
228
- // If current settings are higher respect them.
229
- foreach ($phpLimits as $name => $suggested) {
230
- $current = Utils::normalizeInt(ini_get($name));
231
-
232
- if ($current >= $suggested) {
233
- continue;
234
- }
235
-
236
- // memoryLimit exception: allow -1 for "no memory limit".
237
- if ($name === 'memory_limit' && $current === -1) {
238
- continue;
239
- }
240
-
241
- // maxExecutionTime exception: allow 0 for "no memory limit".
242
- if ($name === 'max_execution_time' && $current === 0) {
243
- continue;
244
- }
245
-
246
- ini_set($name, $suggested);
247
- }
248
- }
249
-
250
- /**
251
- * Registers a preserved token
252
- * @param string $token
253
- * @return string The token ID string
254
- */
255
- private function registerPreservedToken($token)
256
- {
257
- $tokenId = sprintf(self::PRESERVED_TOKEN, count($this->preservedTokens));
258
- $this->preservedTokens[$tokenId] = $token;
259
- return $tokenId;
260
- }
261
-
262
- /**
263
- * Registers a candidate comment token
264
- * @param string $comment
265
- * @return string The comment token ID string
266
- */
267
- private function registerCommentToken($comment)
268
- {
269
- $tokenId = sprintf(self::COMMENT_TOKEN, count($this->comments));
270
- $this->comments[$tokenId] = $comment;
271
- return $tokenId;
272
- }
273
-
274
- /**
275
- * Registers a rule body token
276
- * @param string $body the minified rule body
277
- * @return string The rule body token ID string
278
- */
279
- private function registerRuleBodyToken($body)
280
- {
281
- if (empty($body)) {
282
- return '';
283
- }
284
-
285
- $tokenId = sprintf(self::RULE_BODY_TOKEN, count($this->ruleBodies));
286
- $this->ruleBodies[$tokenId] = $body;
287
- return $tokenId;
288
- }
289
-
290
- /**
291
- * Parses & minifies the given input CSS string
292
- * @param string $css
293
- * @return string
294
- */
295
- private function minify($css)
296
- {
297
- // Process data urls
298
- $css = $this->processDataUrls($css);
299
-
300
- // Process comments
301
- $css = preg_replace_callback(
302
- '/(?<!\\\\)\/\*(.*?)\*(?<!\\\\)\//Ss',
303
- array($this, 'processCommentsCallback'),
304
- $css
305
- );
306
-
307
- // IE7: Process Microsoft matrix filters (whitespaces between Matrix parameters). Can contain strings inside.
308
- $css = preg_replace_callback(
309
- '/filter:\s*progid:DXImageTransform\.Microsoft\.Matrix\(([^)]+)\)/Ss',
310
- array($this, 'processOldIeSpecificMatrixDefinitionCallback'),
311
- $css
312
- );
313
-
314
- // Process quoted unquotable attribute selectors to unquote them. Covers most common cases.
315
- // Likelyhood of a quoted attribute selector being a substring in a string: Very very low.
316
- $css = preg_replace(
317
- '/\[\s*([a-z][a-z-]+)\s*([\*\|\^\$~]?=)\s*[\'"](-?[a-z_][a-z0-9-_]+)[\'"]\s*\]/Ssi',
318
- '[$1$2$3]',
319
- $css
320
- );
321
-
322
- // Process strings so their content doesn't get accidentally minified
323
- $css = preg_replace_callback(
324
- '/(?:"(?:[^\\\\"]|\\\\.|\\\\)*")|'."(?:'(?:[^\\\\']|\\\\.|\\\\)*')/S",
325
- array($this, 'processStringsCallback'),
326
- $css
327
- );
328
-
329
- // Normalize all whitespace strings to single spaces. Easier to work with that way.
330
- $css = preg_replace('/\s+/S', ' ', $css);
331
-
332
- // Process import At-rules with unquoted URLs so URI reserved characters such as a semicolon may be used safely.
333
- $css = preg_replace_callback(
334
- '/@import url\(([^\'"]+?)\)( |;)/Si',
335
- array($this, 'processImportUnquotedUrlAtRulesCallback'),
336
- $css
337
- );
338
-
339
- // Process comments
340
- $css = $this->processComments($css);
341
-
342
- // Process rule bodies
343
- $css = $this->processRuleBodies($css);
344
-
345
- // Process at-rules and selectors
346
- $css = $this->processAtRulesAndSelectors($css);
347
-
348
- // Restore preserved rule bodies before splitting
349
- $css = strtr($css, $this->ruleBodies);
350
-
351
- // Split long lines in output if required
352
- $css = $this->processLongLineSplitting($css);
353
-
354
- // Restore preserved comments and strings
355
- $css = strtr($css, $this->preservedTokens);
356
-
357
- return trim($css);
358
- }
359
-
360
- /**
361
- * Searches & replaces all data urls with tokens before we start compressing,
362
- * to avoid performance issues running some of the subsequent regexes against large string chunks.
363
- * @param string $css
364
- * @return string
365
- */
366
- private function processDataUrls($css)
367
- {
368
- $ret = '';
369
- $searchOffset = $substrOffset = 0;
370
-
371
- // Since we need to account for non-base64 data urls, we need to handle
372
- // ' and ) being part of the data string.
373
- while (preg_match('/url\(\s*(["\']?)data:/Si', $css, $m, PREG_OFFSET_CAPTURE, $searchOffset)) {
374
- $matchStartIndex = $m[0][1];
375
- $dataStartIndex = $matchStartIndex + 4; // url( length
376
- $searchOffset = $matchStartIndex + strlen($m[0][0]);
377
- $terminator = $m[1][0]; // ', " or empty (not quoted)
378
- $terminatorRegex = '/(?<!\\\\)'. (strlen($terminator) === 0 ? '' : $terminator.'\s*') .'(\))/S';
379
-
380
- $ret .= substr($css, $substrOffset, $matchStartIndex - $substrOffset);
381
-
382
- // Terminator found
383
- if (preg_match($terminatorRegex, $css, $matches, PREG_OFFSET_CAPTURE, $searchOffset)) {
384
- $matchEndIndex = $matches[1][1];
385
- $searchOffset = $matchEndIndex + 1;
386
- $token = substr($css, $dataStartIndex, $matchEndIndex - $dataStartIndex);
387
-
388
- // Remove all spaces only for base64 encoded URLs.
389
- if (stripos($token, 'base64,') !== false) {
390
- $token = preg_replace('/\s+/S', '', $token);
391
- }
392
-
393
- $ret .= 'url('. $this->registerPreservedToken(trim($token)) .')';
394
- // No end terminator found, re-add the whole match. Should we throw/warn here?
395
- } else {
396
- $ret .= substr($css, $matchStartIndex, $searchOffset - $matchStartIndex);
397
- }
398
-
399
- $substrOffset = $searchOffset;
400
- }
401
-
402
- $ret .= substr($css, $substrOffset);
403
-
404
- return $ret;
405
- }
406
-
407
- /**
408
- * Registers all comments found as candidates to be preserved.
409
- * @param array $matches
410
- * @return string
411
- */
412
- private function processCommentsCallback($matches)
413
- {
414
- return '/*'. $this->registerCommentToken($matches[1]) .'*/';
415
- }
416
-
417
- /**
418
- * Preserves old IE Matrix string definition
419
- * @param array $matches
420
- * @return string
421
- */
422
- private function processOldIeSpecificMatrixDefinitionCallback($matches)
423
- {
424
- return 'filter:progid:DXImageTransform.Microsoft.Matrix('. $this->registerPreservedToken($matches[1]) .')';
425
- }
426
-
427
- /**
428
- * Preserves strings found
429
- * @param array $matches
430
- * @return string
431
- */
432
- private function processStringsCallback($matches)
433
- {
434
- $match = $matches[0];
435
- $quote = substr($match, 0, 1);
436
- $match = substr($match, 1, -1);
437
-
438
- // maybe the string contains a comment-like substring?
439
- // one, maybe more? put'em back then
440
- if (strpos($match, self::COMMENT_TOKEN_START) !== false) {
441
- $match = strtr($match, $this->comments);
442
- }
443
-
444
- // minify alpha opacity in filter strings
445
- $match = str_ireplace('progid:DXImageTransform.Microsoft.Alpha(Opacity=', 'alpha(opacity=', $match);
446
-
447
- return $quote . $this->registerPreservedToken($match) . $quote;
448
- }
449
-
450
- /**
451
- * Searches & replaces all import at-rule unquoted urls with tokens so URI reserved characters such as a semicolon
452
- * may be used safely in a URL.
453
- * @param array $matches
454
- * @return string
455
- */
456
- private function processImportUnquotedUrlAtRulesCallback($matches)
457
- {
458
- return '@import url('. $this->registerPreservedToken($matches[1]) .')'. $matches[2];
459
- }
460
-
461
- /**
462
- * Preserves or removes comments found.
463
- * @param string $css
464
- * @return string
465
- */
466
- private function processComments($css)
467
- {
468
- foreach ($this->comments as $commentId => $comment) {
469
- $commentIdString = '/*'. $commentId .'*/';
470
-
471
- // ! in the first position of the comment means preserve
472
- // so push to the preserved tokens keeping the !
473
- if ($this->keepImportantComments && strpos($comment, '!') === 0) {
474
- $preservedTokenId = $this->registerPreservedToken($comment);
475
- // Put new lines before and after /*! important comments
476
- $css = str_replace($commentIdString, "\n/*$preservedTokenId*/\n", $css);
477
- continue;
478
- }
479
-
480
- // # sourceMappingURL= in the first position of the comment means sourcemap
481
- // so push to the preserved tokens if {$this->keepSourceMapComment} is truthy.
482
- if ($this->keepSourceMapComment && strpos($comment, '# sourceMappingURL=') === 0) {
483
- $preservedTokenId = $this->registerPreservedToken($comment);
484
- // Add new line before the sourcemap comment
485
- $css = str_replace($commentIdString, "\n/*$preservedTokenId*/", $css);
486
- continue;
487
- }
488
-
489
- // Keep empty comments after child selectors (IE7 hack)
490
- // e.g. html >/**/ body
491
- if (strlen($comment) === 0 && strpos($css, '>/*'.$commentId) !== false) {
492
- $css = str_replace($commentId, $this->registerPreservedToken(''), $css);
493
- continue;
494
- }
495
-
496
- // in all other cases kill the comment
497
- $css = str_replace($commentIdString, '', $css);
498
- }
499
-
500
- // Normalize whitespace again
501
- $css = preg_replace('/ +/S', ' ', $css);
502
-
503
- return $css;
504
- }
505
-
506
- /**
507
- * Finds, minifies & preserves all rule bodies.
508
- * @param string $css the whole stylesheet.
509
- * @return string
510
- */
511
- private function processRuleBodies($css)
512
- {
513
- $ret = '';
514
- $searchOffset = $substrOffset = 0;
515
-
516
- while (($blockStartPos = strpos($css, '{', $searchOffset)) !== false) {
517
- $blockEndPos = strpos($css, '}', $blockStartPos);
518
- $nextBlockStartPos = strpos($css, '{', $blockStartPos + 1);
519
- $ret .= substr($css, $substrOffset, $blockStartPos - $substrOffset);
520
-
521
- if ($nextBlockStartPos !== false && $nextBlockStartPos < $blockEndPos) {
522
- $ret .= substr($css, $blockStartPos, $nextBlockStartPos - $blockStartPos);
523
- $searchOffset = $nextBlockStartPos;
524
- } else {
525
- $ruleBody = substr($css, $blockStartPos + 1, $blockEndPos - $blockStartPos - 1);
526
- $ruleBodyToken = $this->registerRuleBodyToken($this->processRuleBody($ruleBody));
527
- $ret .= '{'. $ruleBodyToken .'}';
528
- $searchOffset = $blockEndPos + 1;
529
- }
530
-
531
- $substrOffset = $searchOffset;
532
- }
533
-
534
- $ret .= substr($css, $substrOffset);
535
-
536
- return $ret;
537
- }
538
-
539
- /**
540
- * Compresses non-group rule bodies.
541
- * @param string $body The rule body without curly braces
542
- * @return string
543
- */
544
- private function processRuleBody($body)
545
- {
546
- $body = trim($body);
547
-
548
- // Remove spaces before the things that should not have spaces before them.
549
- $body = preg_replace('/ ([:=,)*\/;\n])/S', '$1', $body);
550
-
551
- // Remove the spaces after the things that should not have spaces after them.
552
- $body = preg_replace('/([:=,(*\/!;\n]) /S', '$1', $body);
553
-
554
- // Replace multiple semi-colons in a row by a single one
555
- $body = preg_replace('/;;+/S', ';', $body);
556
-
557
- // Remove semicolon before closing brace except when:
558
- // - The last property is prefixed with a `*` (lte IE7 hack) to avoid issues on Symbian S60 3.x browsers.
559
- if (!preg_match('/\*[a-z0-9-]+:[^;]+;$/Si', $body)) {
560
- $body = rtrim($body, ';');
561
- }
562
-
563
- // Remove important comments inside a rule body (because they make no sense here).
564
- if (strpos($body, '/*') !== false) {
565
- $body = preg_replace('/\n?\/\*[A-Z0-9_]+\*\/\n?/S', '', $body);
566
- }
567
-
568
- // Empty rule body? Exit :)
569
- if (empty($body)) {
570
- return '';
571
- }
572
-
573
- // Shorten font-weight values
574
- $body = preg_replace(
575
- array('/(font-weight:)bold\b/Si', '/(font-weight:)normal\b/Si'),
576
- array('${1}700', '${1}400'),
577
- $body
578
- );
579
-
580
- // Shorten background property
581
- $body = preg_replace('/(background:)(?:none|transparent)( !|;|$)/Si', '${1}0 0$2', $body);
582
-
583
- // Shorten opacity IE filter
584
- $body = str_ireplace('progid:DXImageTransform.Microsoft.Alpha(Opacity=', 'alpha(opacity=', $body);
585
-
586
- // Shorten colors from rgb(51,102,153) to #336699, rgb(100%,0%,0%) to #ff0000 (sRGB color space)
587
- // Shorten colors from hsl(0, 100%, 50%) to #ff0000 (sRGB color space)
588
- // This makes it more likely that it'll get further compressed in the next step.
589
- $body = preg_replace_callback(
590
- '/(rgb|hsl)\(([0-9,.% -]+)\)(.|$)/Si',
591
- array($this, 'shortenHslAndRgbToHexCallback'),
592
- $body
593
- );
594
-
595
- // Shorten colors from #AABBCC to #ABC or shorter color name:
596
- // - Look for hex colors which don't have a "=" in front of them (to avoid MSIE filters)
597
- $body = preg_replace_callback(
598
- '/(?<!=)#([0-9a-f]{3,6})( |,|\)|;|$)/Si',
599
- array($this, 'shortenHexColorsCallback'),
600
- $body
601
- );
602
-
603
- // Shorten long named colors with a shorter HEX counterpart: white -> #fff.
604
- // Run at least 2 times to cover most cases
605
- $body = preg_replace_callback(
606
- array($this->namedToHexColorsRegex, $this->namedToHexColorsRegex),
607
- array($this, 'shortenNamedColorsCallback'),
608
- $body
609
- );
610
-
611
- // Replace positive sign from numbers before the leading space is removed.
612
- // +1.2em to 1.2em, +.8px to .8px, +2% to 2%
613
- $body = preg_replace('/([ :,(])\+(\.?\d+)/S', '$1$2', $body);
614
-
615
- // shorten ms to s
616
- $body = preg_replace_callback('/([ :,(])(-?)(\d{3,})ms/Si', function ($matches) {
617
- return $matches[1] . $matches[2] . ((int) $matches[3] / 1000) .'s';
618
- }, $body);
619
-
620
- // Remove leading zeros from integer and float numbers.
621
- // 000.6 to .6, -0.8 to -.8, 0050 to 50, -01.05 to -1.05
622
- $body = preg_replace('/([ :,(])(-?)0+([1-9]?\.?\d+)/S', '$1$2$3', $body);
623
-
624
- // Remove trailing zeros from float numbers.
625
- // -6.0100em to -6.01em, .0100 to .01, 1.200px to 1.2px
626
- $body = preg_replace('/([ :,(])(-?\d?\.\d+?)0+([^\d])/S', '$1$2$3', $body);
627
-
628
- // Remove trailing .0 -> -9.0 to -9
629
- $body = preg_replace('/([ :,(])(-?\d+)\.0([^\d])/S', '$1$2$3', $body);
630
-
631
- // Replace 0 length numbers with 0
632
- $body = preg_replace('/([ :,(])-?\.?0+([^\d])/S', '${1}0$2', $body);
633
-
634
- // Shorten zero values for safe properties only
635
- $body = preg_replace(
636
- array(
637
- $this->shortenOneZeroesRegex,
638
- $this->shortenTwoZeroesRegex,
639
- $this->shortenThreeZeroesRegex,
640
- $this->shortenFourZeroesRegex
641
- ),
642
- array(
643
- '$1$2:0',
644
- '$1$2:$3 0',
645
- '$1$2:$3 $4 0',
646
- '$1$2:$3 $4 $5 0'
647
- ),
648
- $body
649
- );
650
-
651
- // Replace 0 0 0; or 0 0 0 0; with 0 0 for background-position property.
652
- $body = preg_replace('/(background-position):0(?: 0){2,3}( !|;|$)/Si', '$1:0 0$2', $body);
653
-
654
- // Shorten suitable shorthand properties with repeated values
655
- $body = preg_replace(
656
- array(
657
- '/(margin|padding|border-(?:width|radius)):('.$this->numRegex.')(?: \2)+( !|;|$)/Si',
658
- '/(border-(?:style|color)):([#a-z0-9]+)(?: \2)+( !|;|$)/Si'
659
- ),
660
- '$1:$2$3',
661
- $body
662
- );
663
- $body = preg_replace(
664
- array(
665
- '/(margin|padding|border-(?:width|radius)):'.
666
- '('.$this->numRegex.') ('.$this->numRegex.') \2 \3( !|;|$)/Si',
667
- '/(border-(?:style|color)):([#a-z0-9]+) ([#a-z0-9]+) \2 \3( !|;|$)/Si'
668
- ),
669
- '$1:$2 $3$4',
670
- $body
671
- );
672
- $body = preg_replace(
673
- array(
674
- '/(margin|padding|border-(?:width|radius)):'.
675
- '('.$this->numRegex.') ('.$this->numRegex.') ('.$this->numRegex.') \3( !|;|$)/Si',
676
- '/(border-(?:style|color)):([#a-z0-9]+) ([#a-z0-9]+) ([#a-z0-9]+) \3( !|;|$)/Si'
677
- ),
678
- '$1:$2 $3 $4$5',
679
- $body
680
- );
681
-
682
- // Lowercase some common functions that can be values
683
- $body = preg_replace_callback(
684
- '/(?:attr|blur|brightness|circle|contrast|cubic-bezier|drop-shadow|ellipse|from|grayscale|'.
685
- 'hsla?|hue-rotate|inset|invert|local|minmax|opacity|perspective|polygon|rgba?|rect|repeat|saturate|sepia|'.
686
- 'steps|to|url|var|-webkit-gradient|'.
687
- '(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|(?:repeating-)?(?:linear|radial)-gradient))\(/Si',
688
- array($this, 'strtolowerCallback'),
689
- $body
690
- );
691
-
692
- // Lowercase all uppercase properties
693
- $body = preg_replace_callback('/(?:^|;)[A-Z-]+:/S', array($this, 'strtolowerCallback'), $body);
694
-
695
- return $body;
696
- }
697
-
698
- /**
699
- * Compresses At-rules and selectors.
700
- * @param string $css the whole stylesheet with rule bodies tokenized.
701
- * @return string
702
- */
703
- private function processAtRulesAndSelectors($css)
704
- {
705
- $charset = '';
706
- $imports = '';
707
- $namespaces = '';
708
-
709
- // Remove spaces before the things that should not have spaces before them.
710
- $css = preg_replace('/ ([@{};>+)\]~=,\/\n])/S', '$1', $css);
711
-
712
- // Remove the spaces after the things that should not have spaces after them.
713
- $css = preg_replace('/([{}:;>+(\[~=,\/\n]) /S', '$1', $css);
714
-
715
- // Shorten shortable double colon (CSS3) pseudo-elements to single colon (CSS2)
716
- $css = preg_replace('/::(before|after|first-(?:line|letter))(\{|,)/Si', ':$1$2', $css);
717
-
718
- // Retain space for special IE6 cases
719
- $css = preg_replace_callback('/:first-(line|letter)(\{|,)/Si', function ($matches) {
720
- return ':first-'. strtolower($matches[1]) .' '. $matches[2];
721
- }, $css);
722
-
723
- // Find a fraction that may used in some @media queries such as: (min-aspect-ratio: 1/1)
724
- // Add token to add the "/" back in later
725
- $css = preg_replace('/\(([a-z-]+):([0-9]+)\/([0-9]+)\)/Si', '($1:$2'. self::QUERY_FRACTION .'$3)', $css);
726
-
727
- // Remove empty rule blocks up to 2 levels deep.
728
- $css = preg_replace(array_fill(0, 2, '/(\{)[^{};\/\n]+\{\}/S'), '$1', $css);
729
- $css = preg_replace('/[^{};\/\n]+\{\}/S', '', $css);
730
-
731
- // Two important comments next to each other? Remove extra newline.
732
- if ($this->keepImportantComments) {
733
- $css = str_replace("\n\n", "\n", $css);
734
- }
735
-
736
- // Restore fraction
737
- $css = str_replace(self::QUERY_FRACTION, '/', $css);
738
-
739
- // Lowercase some popular @directives
740
- $css = preg_replace_callback(
741
- '/(?<!\\\\)@(?:charset|document|font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframes|media|'.
742
- 'namespace|page|supports|viewport)/Si',
743
- array($this, 'strtolowerCallback'),
744
- $css
745
- );
746
-
747
- // Lowercase some popular media types
748
- $css = preg_replace_callback(
749
- '/[ ,](?:all|aural|braille|handheld|print|projection|screen|tty|tv|embossed|speech)[ ,;{]/Si',
750
- array($this, 'strtolowerCallback'),
751
- $css
752
- );
753
-
754
- // Lowercase some common pseudo-classes & pseudo-elements
755
- $css = preg_replace_callback(
756
- '/(?<!\\\\):(?:active|after|before|checked|default|disabled|empty|enabled|first-(?:child|of-type)|'.
757
- 'focus(?:-within)?|hover|indeterminate|in-range|invalid|lang\(|last-(?:child|of-type)|left|link|not\(|'.
758
- 'nth-(?:child|of-type)\(|nth-last-(?:child|of-type)\(|only-(?:child|of-type)|optional|out-of-range|'.
759
- 'read-(?:only|write)|required|right|root|:selection|target|valid|visited)/Si',
760
- array($this, 'strtolowerCallback'),
761
- $css
762
- );
763
-
764
- // @charset handling
765
- if (preg_match($this->charsetRegex, $css, $matches)) {
766
- // Keep the first @charset at-rule found
767
- $charset = $matches[0];
768
- // Delete all @charset at-rules
769
- $css = preg_replace($this->charsetRegex, '', $css);
770
- }
771
-
772
- // @import handling
773
- $css = preg_replace_callback($this->importRegex, function ($matches) use (&$imports) {
774
- // Keep all @import at-rules found for later
775
- $imports .= $matches[0];
776
- // Delete all @import at-rules
777
- return '';
778
- }, $css);
779
-
780
- // @namespace handling
781
- $css = preg_replace_callback($this->namespaceRegex, function ($matches) use (&$namespaces) {
782
- // Keep all @namespace at-rules found for later
783
- $namespaces .= $matches[0];
784
- // Delete all @namespace at-rules
785
- return '';
786
- }, $css);
787
-
788
- // Order critical at-rules:
789
- // 1. @charset first
790
- // 2. @imports below @charset
791
- // 3. @namespaces below @imports
792
- $css = $charset . $imports . $namespaces . $css;
793
-
794
- return $css;
795
- }
796
-
797
- /**
798
- * Splits long lines after a specific column.
799
- *
800
- * Some source control tools don't like it when files containing lines longer
801
- * than, say 8000 characters, are checked in. The linebreak option is used in
802
- * that case to split long lines after a specific column.
803
- *
804
- * @param string $css the whole stylesheet.
805
- * @return string
806
- */
807
- private function processLongLineSplitting($css)
808
- {
809
- if ($this->linebreakPosition > 0) {
810
- $l = strlen($css);
811
- $offset = $this->linebreakPosition;
812
- while (preg_match('/(?<!\\\\)\}(?!\n)/S', $css, $matches, PREG_OFFSET_CAPTURE, $offset)) {
813
- $matchIndex = $matches[0][1];
814
- $css = substr_replace($css, "\n", $matchIndex + 1, 0);
815
- $offset = $matchIndex + 2 + $this->linebreakPosition;
816
- $l += 1;
817
- if ($offset > $l) {
818
- break;
819
- }
820
- }
821
- }
822
-
823
- return $css;
824
- }
825
-
826
- /**
827
- * Converts hsl() & rgb() colors to HEX format.
828
- * @param $matches
829
- * @return string
830
- */
831
- private function shortenHslAndRgbToHexCallback($matches)
832
- {
833
- $type = $matches[1];
834
- $values = explode(',', $matches[2]);
835
- $terminator = $matches[3];
836
-
837
- if ($type === 'hsl') {
838
- $values = Utils::hslToRgb($values);
839
- }
840
-
841
- $hexColors = Utils::rgbToHex($values);
842
-
843
- // Restore space after rgb() or hsl() function in some cases such as:
844
- // background-image: linear-gradient(to bottom, rgb(210,180,140) 10%, rgb(255,0,0) 90%);
845
- if (!empty($terminator) && !preg_match('/[ ,);]/S', $terminator)) {
846
- $terminator = ' '. $terminator;
847
- }
848
-
849
- return '#'. implode('', $hexColors) . $terminator;
850
- }
851
-
852
- /**
853
- * Compresses HEX color values of the form #AABBCC to #ABC or short color name.
854
- * @param $matches
855
- * @return string
856
- */
857
- private function shortenHexColorsCallback($matches)
858
- {
859
- $hex = $matches[1];
860
-
861
- // Shorten suitable 6 chars HEX colors
862
- if (strlen($hex) === 6 && preg_match('/^([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3$/Si', $hex, $m)) {
863
- $hex = $m[1] . $m[2] . $m[3];
864
- }
865
-
866
- // Lowercase
867
- $hex = '#'. strtolower($hex);
868
-
869
- // Replace Hex colors with shorter color names
870
- $color = array_key_exists($hex, $this->hexToNamedColorsMap) ? $this->hexToNamedColorsMap[$hex] : $hex;
871
-
872
- return $color . $matches[2];
873
- }
874
-
875
- /**
876
- * Shortens all named colors with a shorter HEX counterpart for a set of safe properties
877
- * e.g. white -> #fff
878
- * @param array $matches
879
- * @return string
880
- */
881
- private function shortenNamedColorsCallback($matches)
882
- {
883
- return $matches[1] . $this->namedToHexColorsMap[strtolower($matches[2])] . $matches[3];
884
- }
885
-
886
- /**
887
- * Makes a string lowercase
888
- * @param array $matches
889
- * @return string
890
- */
891
- private function strtolowerCallback($matches)
892
- {
893
- return strtolower($matches[0]);
894
- }
895
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/tubalmartin/cssmin/src/Utils.php DELETED
@@ -1,149 +0,0 @@
1
- <?php
2
-
3
- namespace tubalmartin\CssMin;
4
-
5
- class Utils
6
- {
7
- /**
8
- * Clamps a number between a minimum and a maximum value.
9
- * @param int|float $n the number to clamp
10
- * @param int|float $min the lower end number allowed
11
- * @param int|float $max the higher end number allowed
12
- * @return int|float
13
- */
14
- public static function clampNumber($n, $min, $max)
15
- {
16
- return min(max($n, $min), $max);
17
- }
18
-
19
- /**
20
- * Clamps a RGB color number outside the sRGB color space
21
- * @param int|float $n the number to clamp
22
- * @return int|float
23
- */
24
- public static function clampNumberSrgb($n)
25
- {
26
- return self::clampNumber($n, 0, 255);
27
- }
28
-
29
- /**
30
- * Converts a HSL color into a RGB color
31
- * @param array $hslValues
32
- * @return array
33
- */
34
- public static function hslToRgb($hslValues)
35
- {
36
- $h = floatval($hslValues[0]);
37
- $s = floatval(str_replace('%', '', $hslValues[1]));
38
- $l = floatval(str_replace('%', '', $hslValues[2]));
39
-
40
- // Wrap and clamp, then fraction!
41
- $h = ((($h % 360) + 360) % 360) / 360;
42
- $s = self::clampNumber($s, 0, 100) / 100;
43
- $l = self::clampNumber($l, 0, 100) / 100;
44
-
45
- if ($s == 0) {
46
- $r = $g = $b = self::roundNumber(255 * $l);
47
- } else {
48
- $v2 = $l < 0.5 ? $l * (1 + $s) : ($l + $s) - ($s * $l);
49
- $v1 = (2 * $l) - $v2;
50
- $r = self::roundNumber(255 * self::hueToRgb($v1, $v2, $h + (1/3)));
51
- $g = self::roundNumber(255 * self::hueToRgb($v1, $v2, $h));
52
- $b = self::roundNumber(255 * self::hueToRgb($v1, $v2, $h - (1/3)));
53
- }
54
-
55
- return array($r, $g, $b);
56
- }
57
-
58
- /**
59
- * Tests and selects the correct formula for each RGB color channel
60
- * @param $v1
61
- * @param $v2
62
- * @param $vh
63
- * @return mixed
64
- */
65
- public static function hueToRgb($v1, $v2, $vh)
66
- {
67
- $vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh);
68
-
69
- if ($vh * 6 < 1) {
70
- return $v1 + ($v2 - $v1) * 6 * $vh;
71
- }
72
-
73
- if ($vh * 2 < 1) {
74
- return $v2;
75
- }
76
-
77
- if ($vh * 3 < 2) {
78
- return $v1 + ($v2 - $v1) * ((2 / 3) - $vh) * 6;
79
- }
80
-
81
- return $v1;
82
- }
83
-
84
- /**
85
- * Convert strings like "64M" or "30" to int values
86
- * @param mixed $size
87
- * @return int
88
- */
89
- public static function normalizeInt($size)
90
- {
91
- if (is_string($size)) {
92
- $letter = substr($size, -1);
93
- $size = intval($size);
94
- switch ($letter) {
95
- case 'M':
96
- case 'm':
97
- return (int) $size * 1048576;
98
- case 'K':
99
- case 'k':
100
- return (int) $size * 1024;
101
- case 'G':
102
- case 'g':
103
- return (int) $size * 1073741824;
104
- }
105
- }
106
- return (int) $size;
107
- }
108
-
109
- /**
110
- * Converts a string containing and RGB percentage value into a RGB integer value i.e. '90%' -> 229.5
111
- * @param $rgbPercentage
112
- * @return int
113
- */
114
- public static function rgbPercentageToRgbInteger($rgbPercentage)
115
- {
116
- if (strpos($rgbPercentage, '%') !== false) {
117
- $rgbPercentage = self::roundNumber(floatval(str_replace('%', '', $rgbPercentage)) * 2.55);
118
- }
119
-
120
- return intval($rgbPercentage, 10);
121
- }
122
-
123
- /**
124
- * Converts a RGB color into a HEX color
125
- * @param array $rgbColors
126
- * @return array
127
- */
128
- public static function rgbToHex($rgbColors)
129
- {
130
- $hexColors = array();
131
-
132
- // Values outside the sRGB color space should be clipped (0-255)
133
- for ($i = 0, $l = count($rgbColors); $i < $l; $i++) {
134
- $hexColors[$i] = sprintf("%02x", self::clampNumberSrgb(self::rgbPercentageToRgbInteger($rgbColors[$i])));
135
- }
136
-
137
- return $hexColors;
138
- }
139
-
140
- /**
141
- * Rounds a number to its closest integer
142
- * @param $n
143
- * @return int
144
- */
145
- public static function roundNumber($n)
146
- {
147
- return intval(round(floatval($n)), 10);
148
- }
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
webpack.config.js DELETED
@@ -1,74 +0,0 @@
1
- const webpack = require( 'webpack' );
2
- const NODE_ENV = process.env.NODE_ENV || 'development';
3
- const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
4
-
5
- module.exports = {
6
- mode: NODE_ENV,
7
- entry: './src/index.js',
8
- externals: {
9
- 'react': 'React',
10
- 'react-dom': 'ReactDOM'
11
- },
12
- output: {
13
- path: __dirname,
14
- filename: './build/build.js'
15
- },
16
- module: {
17
- rules: [
18
- {
19
- test: /.js?$/,
20
- use: [ {
21
- loader: 'babel-loader',
22
- options: {
23
- presets: [ '@babel/preset-env' ],
24
- plugins: [
25
- '@babel/plugin-transform-async-to-generator',
26
- '@babel/plugin-proposal-object-rest-spread',
27
- [
28
- '@babel/plugin-transform-react-jsx', {
29
- 'pragma': 'wp.element.createElement'
30
- }
31
- ]
32
- ]
33
- }
34
- },
35
- 'eslint-loader' ],
36
- exclude: /node_modules/
37
- },
38
- {
39
- test: /\.(css|scss)$/,
40
- use: [ {
41
- loader: MiniCssExtractPlugin.loader
42
- },
43
- 'css-loader',
44
- {
45
- loader: 'postcss-loader',
46
- options: {
47
- plugins: [
48
- require( 'autoprefixer' )
49
- ]
50
- }
51
- },
52
- {
53
- loader: 'sass-loader',
54
- query: {
55
- outputStyle:
56
- 'production' === process.env.NODE_ENV ? 'compressed' : 'nested'
57
- }
58
- } ]
59
- },
60
- {
61
- test: /\.(png|jpg)$/,
62
- loader: 'url-loader'
63
- }
64
- ]
65
- },
66
- plugins: [
67
- new webpack.DefinePlugin({
68
- 'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
69
- }),
70
- new MiniCssExtractPlugin({
71
- filename: './build/build.css'
72
- })
73
- ]
74
- };