From 8ef6815dc1f0c2decd99ecebec7bf83644107a46 Mon Sep 17 00:00:00 2001 From: Taylor Lovett Date: Wed, 18 Apr 2018 11:35:08 -0400 Subject: [PATCH 01/18] Start gutenberg work --- .babelrc | 2 +- .eslintrc.json | 3 +- assets/css/gutenberg-syndicated-post.css | 53 ++++++++++++++++ assets/js/gutenberg-syndicated-post.js | 62 +++++++++++++++++++ dist/css/gutenberg-syndicated-post.min.css | 2 + .../css/gutenberg-syndicated-post.min.css.map | 1 + dist/css/push.min.css.map | 2 +- dist/js/admin-distributed-post.min.js.map | 2 +- dist/js/admin-external-connection.min.js | 2 +- dist/js/admin-external-connection.min.js.map | 2 +- dist/js/admin-pull.min.js.map | 2 +- dist/js/gutenberg-syndicated-post.min.js | 2 + dist/js/gutenberg-syndicated-post.min.js.map | 1 + dist/js/gutenberg.min.js | 2 + dist/js/gutenberg.min.js.map | 1 + dist/js/push.min.js | 2 +- dist/js/push.min.js.map | 2 +- gulp-tasks/cssnext.js | 1 + includes/syndicated-post-ui.php | 62 ++++++++++++++++++- includes/utils.php | 10 +++ webpack.config.babel.js | 6 +- 21 files changed, 208 insertions(+), 14 deletions(-) create mode 100644 assets/css/gutenberg-syndicated-post.css create mode 100644 assets/js/gutenberg-syndicated-post.js create mode 100644 dist/css/gutenberg-syndicated-post.min.css create mode 100644 dist/css/gutenberg-syndicated-post.min.css.map create mode 100644 dist/js/gutenberg-syndicated-post.min.js create mode 100644 dist/js/gutenberg-syndicated-post.min.js.map create mode 100644 dist/js/gutenberg.min.js create mode 100644 dist/js/gutenberg.min.js.map diff --git a/.babelrc b/.babelrc index dd9d67eb2..28fc5d3c9 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - "presets" : ["env"] + "presets" : ["env", "react"] } diff --git a/.eslintrc.json b/.eslintrc.json index fa7734c82..06c0024bb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,7 @@ "camelcase": [ 1 ], "no-debugger": [ 1 ], "no-unused-vars": [ 1 ], - "function-paren-newline": [ 1, "never" ] + "function-paren-newline": [ 1, "never" ], + "no-extra-boolean-cast": [ 1 ] } } diff --git a/assets/css/gutenberg-syndicated-post.css b/assets/css/gutenberg-syndicated-post.css new file mode 100644 index 000000000..f44d7a964 --- /dev/null +++ b/assets/css/gutenberg-syndicated-post.css @@ -0,0 +1,53 @@ +body.dt-linked-post { + + & .edit-post-visual-editor, + & .editor-post-excerpt__textarea { + opacity: .5; + pointer-events: none; + cursor: default; + } + + & input, + & select, + & button, + & textarea, + & .button { + opacity: .5; + pointer-events: none; + cursor: default; + } + + & .edit-post-header__settings, + & .components-time-picker, + & .react-datepicker, + & .components-panel__header { + & input, + & select, + & button, + & textarea, + & .button { + opacity: 1; + pointer-events: auto; + cursor: pointer; + } + } + + & .components-panel__body-toggle, + & .edit-post-post-visibility__toggle, + & .editor-post-trash, + & .edit-post-post-schedule__toggle { + opacity: 1; + pointer-events: auto; + cursor: pointer; + } + + & #post-sticky-toggle-0 { + pointer-events: auto; + cursor: pointer; + } + + & .edit-post-last-revision__panel { + display: none; + } + +} diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js new file mode 100644 index 000000000..2933cde5e --- /dev/null +++ b/assets/js/gutenberg-syndicated-post.js @@ -0,0 +1,62 @@ +import { wp, dtGutenberg } from 'window' +import jQuery from 'jquery' + +wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) + +const messages = [] + +if ( !! parseInt( dtGutenberg.originalDeleted ) ) { + messages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) ) + messages.push( wp.element.createElement( 'a', { + href: dtGutenberg.postUrl + }, [ + dtGutenberg.originalLocationName + ] ) ) + messages.push( wp.i18n.__( '. However, the original has been deleted.' ) ) +} else if ( ! parseInt( dtGutenberg.unlinked ) ) { + messages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) ) + + messages.push( wp.element.createElement( 'a', { + href: dtGutenberg.postUrl + }, [ + dtGutenberg.originalLocationName + ] ) ) + + messages.push( '.' ) + + messages.push( wp.element.createElement( 'span', {}, [ + wp.i18n.sprintf( wp.i18n.__( " The original %1$s will update this version unless you ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), + wp.element.createElement( 'a', { + href: dtGutenberg.unlinkNonceUrl + }, [ + wp.i18n.__( 'unlink from the original.', 'distributor' ) + ] ) + ] ) ) +} else { + messages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) ) + + messages.push( wp.element.createElement( 'a', { + href: dtGutenberg.postUrl + }, [ + dtGutenberg.originalLocationName + ] ) ) + + messages.push( '.' ) + + messages.push( wp.element.createElement( 'span', {}, [ + wp.i18n.sprintf( wp.i18n.__( " This %1$s has been unlinked from the original. However, you can always ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), + wp.element.createElement( 'a', { + href: dtGutenberg.linkNonceUrl + }, [ + wp.i18n.__( 'restore it.', 'distributor' ) + ] ) + ] ) ) +} + +const messageElement = wp.element.createElement( 'p', { + className: 'dt-message-wrapper' +}, messages ) + +wp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, { + isDismissible: false +} ) diff --git a/dist/css/gutenberg-syndicated-post.min.css b/dist/css/gutenberg-syndicated-post.min.css new file mode 100644 index 000000000..5fb407211 --- /dev/null +++ b/dist/css/gutenberg-syndicated-post.min.css @@ -0,0 +1,2 @@ +body.dt-linked-post .button,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post select,body.dt-linked-post textarea{opacity:.5;pointer-events:none;cursor:default}body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{opacity:1;pointer-events:auto;cursor:pointer}body.dt-linked-post #post-sticky-toggle-0{pointer-events:auto;cursor:pointer}body.dt-linked-post .edit-post-last-revision__panel{display:none} +/*# sourceMappingURL=gutenberg-syndicated-post.min.css.map */ diff --git a/dist/css/gutenberg-syndicated-post.min.css.map b/dist/css/gutenberg-syndicated-post.min.css.map new file mode 100644 index 000000000..75af817ef --- /dev/null +++ b/dist/css/gutenberg-syndicated-post.min.css.map @@ -0,0 +1 @@ +{"version":3,"names":[],"mappings":"","sources":["gutenberg-syndicated-post.min.css"],"sourcesContent":["body.dt-linked-post .button,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post select,body.dt-linked-post textarea{opacity:.5;pointer-events:none;cursor:default}body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{opacity:1;pointer-events:auto;cursor:pointer}body.dt-linked-post #post-sticky-toggle-0{pointer-events:auto;cursor:pointer}body.dt-linked-post .edit-post-last-revision__panel{display:none}"],"file":"gutenberg-syndicated-post.min.css"} \ No newline at end of file diff --git a/dist/css/push.min.css.map b/dist/css/push.min.css.map index 48b5e1744..77abce9b3 100644 --- a/dist/css/push.min.css.map +++ b/dist/css/push.min.css.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["push.min.css"],"sourcesContent":["#distributor-push-wrapper{display:none}#wpadminbar #distributor-push-wrapper{display:none;font-size:13px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;position:absolute;top:32px;left:0;right:0;padding:2em 1em;height:auto;background-color:#32373c;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#eee;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:9999;-webkit-box-shadow:0 2px 1px 0 #000;box-shadow:0 2px 1px 0 #000;line-height:1.5}@media (min-width:480px){#wpadminbar #distributor-push-wrapper{padding:2em 0}}#wpadminbar #distributor-push-wrapper *{line-height:1.5}#wp-admin-bar-distributor:hover #distributor-push-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}#wpadminbar #distributor-push-wrapper .inner{width:100%;max-width:768px;margin:0 auto}#wpadminbar #distributor-push-wrapper .new-connections-list{overflow:auto;border:1px solid #555;max-height:125px}#wpadminbar #distributor-push-wrapper .selected-connections-list{margin-bottom:1em}#wpadminbar #distributor-push-wrapper .connections-selected{margin-top:2em;position:relative}#wpadminbar #distributor-push-wrapper .connections-selected .no-selected{display:none}#wpadminbar #distributor-push-wrapper .connections-selected.empty{opacity:.5}#wpadminbar #distributor-push-wrapper .connections-selected.empty .no-selected{display:block}#wpadminbar #distributor-push-wrapper .connections-selected.empty .with-selected{display:none}#wpadminbar #distributor-push-wrapper .connections-selected label{color:inherit}#wpadminbar #distributor-push-wrapper .connections-selected input[type=checkbox]{vertical-align:middle;margin-right:2px}#wpadminbar #distributor-push-wrapper .connections-selected.empty:after{content:\" \";position:absolute;top:0;left:0;right:0;bottom:0;background-color:transparent}#wpadminbar #distributor-push-wrapper .syndicated-notice a{display:inline-block;padding:0;margin:0}@media (min-width:480px){#wpadminbar #distributor-push-wrapper{position:fixed}#wpadminbar #distributor-push-wrapper .connections-selector{width:60%;position:relative;float:left;padding-right:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#wpadminbar #distributor-push-wrapper .connections-selector div{width:100%}#wpadminbar #distributor-push-wrapper .connections-selected{width:40%;float:right;margin-top:0;padding-left:3em;-webkit-box-sizing:border-box;box-sizing:border-box}}#wpadminbar #distributor-push-wrapper .no-connections-notice,#wpadminbar #distributor-push-wrapper .syndicated-notice{text-align:center;margin:0}#wpadminbar #distributor-push-wrapper .no-connections-notice a,#wpadminbar #distributor-push-wrapper .syndicated-notice a{color:inherit;text-decoration:underline}#wpadminbar #distributor-push-wrapper input[type=checkbox]{height:16px!important}#wpadminbar #distributor-push-wrapper input[type=text]{font-size:inherit;padding:.5278em;width:100%;background-color:#32373c;border:2px solid #555;color:#eee;margin-bottom:.5em}#wpadminbar #distributor-push-wrapper input[type=text]::-webkit-input-placeholder{color:#a6a6a6}#wpadminbar #distributor-push-wrapper input[type=text]:-ms-input-placeholder,#wpadminbar #distributor-push-wrapper input[type=text]::-ms-input-placeholder{color:#a6a6a6}#wpadminbar #distributor-push-wrapper input[type=text]::placeholder{color:#a6a6a6}#wpadminbar #distributor-push-wrapper input[type=text]:focus{color:#eee;background-color:#32373c;border:2px solid #555}#wpadminbar #distributor-push-wrapper button{background:#0085ba;border-color:#0073aa #006799 #006799;border-width:1px;border-style:solid;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799;height:30px;line-height:28px;padding:0 12px 2px;border-radius:3px;text-transform:none;font-size:13px;vertical-align:top;font-weight:400;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}#wpadminbar #distributor-push-wrapper button:focus,#wpadminbar #distributor-push-wrapper button:hover{background-color:#0085ba;outline:none}#wpadminbar #distributor-push-wrapper .new-connections-list>div:nth-child(odd){background-color:#23282d}#wpadminbar #distributor-push-wrapper .add-connection,#wpadminbar #distributor-push-wrapper .added-connection{display:block;width:100%;padding:.5em;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:pointer}#wpadminbar #distributor-push-wrapper .new-connections-list .add-connection.added{background-color:#3a4045}#wpadminbar #distributor-push-wrapper .add-connection.syndicated{cursor:default}#wpadminbar #distributor-push-wrapper .add-connection.syndicated span{color:#555}#wpadminbar #distributor-push-wrapper .add-connection.syndicated a{color:inherit;text-decoration:underline;float:right;height:auto}#wpadminbar #distributor-push-wrapper .added-connection{background-color:#555;margin-bottom:.5em;cursor:normal;position:relative}#wpadminbar #distributor-push-wrapper .added-connection .remove-connection{cursor:pointer;top:1px;display:inline-block;float:right;font-size:20px;line-height:19px;vertical-align:middle;margin-left:6px;position:relative}#wpadminbar #distributor-push-wrapper .added-connection .remove-connection:after{content:\"\\f335\";font-family:dashicons}#wpadminbar #distributor-push-wrapper header,#wpadminbar #distributor-push-wrapper p{margin:0 0 1em!important;padding:0}#wpadminbar #distributor-push-wrapper .as-draft{margin-left:.5em;height:30px;line-height:28px;padding:2px 12px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}#wpadminbar #distributor-push-wrapper .action-wrapper.loading .syndicate-button:after{content:\" \";vertical-align:middle;border-radius:50%;width:6px;margin-left:8px;height:6px;display:inline-block;font-size:9px;text-indent:-9999em;border-top:3px solid #cfcfcf;border-right:3px solid #cfcfcf;border-bottom:3px solid #cfcfcf;border-left:3px solid #00aef2;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:a 1.1s infinite linear;animation:a 1.1s infinite linear;position:relative;top:-1px;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-box-sizing:initial;box-sizing:initial}#wpadminbar #distributor-push-wrapper .messages{margin-top:1em;-webkit-box-sizing:border-box;box-sizing:border-box}@media (min-width:480px){#wpadminbar #distributor-push-wrapper .messages{width:40%;float:right;clear:right;padding-left:3em}}#wpadminbar #distributor-push-wrapper .messages *{display:none}#wpadminbar #distributor-push-wrapper.message-error .messages .dt-error,#wpadminbar #distributor-push-wrapper.message-success .messages .dt-success{display:block}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"],"file":"push.min.css"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["push.min.css"],"sourcesContent":["#distributor-push-wrapper{display:none}#wpadminbar #distributor-push-wrapper{display:none;font-size:13px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;position:absolute;top:32px;left:0;right:0;padding:2em 1em;height:auto;background-color:#32373c;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#eee;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:9999;-webkit-box-shadow:0 2px 1px 0 #000;box-shadow:0 2px 1px 0 #000;line-height:1.5}@media (min-width:480px){#wpadminbar #distributor-push-wrapper{padding:2em 0}}#wpadminbar #distributor-push-wrapper *{line-height:1.5}.distributor-show #wp-admin-bar-distributor #distributor-push-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}#wpadminbar #distributor-push-wrapper .inner{width:100%;max-width:768px;margin:0 auto}#wpadminbar #distributor-push-wrapper .new-connections-list{overflow:auto;border:1px solid #555;max-height:125px}#wpadminbar #distributor-push-wrapper .selected-connections-list{margin-bottom:1em}#wpadminbar #distributor-push-wrapper .connections-selected{margin-top:2em;position:relative}#wpadminbar #distributor-push-wrapper .connections-selected .no-selected{display:none}#wpadminbar #distributor-push-wrapper .connections-selected.empty{opacity:.5}#wpadminbar #distributor-push-wrapper .connections-selected.empty .no-selected{display:block}#wpadminbar #distributor-push-wrapper .connections-selected.empty .with-selected{display:none}#wpadminbar #distributor-push-wrapper .connections-selected label{color:inherit}#wpadminbar #distributor-push-wrapper .connections-selected input[type=checkbox]{vertical-align:middle;margin-right:2px}#wpadminbar #distributor-push-wrapper .connections-selected.empty:after{content:\" \";position:absolute;top:0;left:0;right:0;bottom:0;background-color:transparent}#wpadminbar #distributor-push-wrapper .syndicated-notice a{display:inline-block;padding:0;margin:0}@media (min-width:480px){#wpadminbar #distributor-push-wrapper{position:fixed}#wpadminbar #distributor-push-wrapper .connections-selector{width:60%;position:relative;float:left;padding-right:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#wpadminbar #distributor-push-wrapper .connections-selector div{width:100%}#wpadminbar #distributor-push-wrapper .connections-selected{width:40%;float:right;margin-top:0;padding-left:3em;-webkit-box-sizing:border-box;box-sizing:border-box}}#wpadminbar #distributor-push-wrapper .no-connections-notice,#wpadminbar #distributor-push-wrapper .syndicated-notice{text-align:center;margin:0}#wpadminbar #distributor-push-wrapper .no-connections-notice a,#wpadminbar #distributor-push-wrapper .syndicated-notice a{color:inherit;text-decoration:underline}#wpadminbar #distributor-push-wrapper input[type=checkbox]{height:16px!important}#wpadminbar #distributor-push-wrapper input[type=text]{font-size:inherit;padding:.5278em;width:100%;background-color:#32373c;border:2px solid #555;color:#eee;margin-bottom:.5em}#wpadminbar #distributor-push-wrapper input[type=text]::-webkit-input-placeholder{color:#a6a6a6}#wpadminbar #distributor-push-wrapper input[type=text]:-ms-input-placeholder,#wpadminbar #distributor-push-wrapper input[type=text]::-ms-input-placeholder{color:#a6a6a6}#wpadminbar #distributor-push-wrapper input[type=text]::placeholder{color:#a6a6a6}#wpadminbar #distributor-push-wrapper input[type=text]:focus{color:#eee;background-color:#32373c;border:2px solid #555}#wpadminbar #distributor-push-wrapper button{background:#0085ba;border-color:#0073aa #006799 #006799;border-width:1px;border-style:solid;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799;height:30px;line-height:28px;padding:0 12px 2px;border-radius:3px;text-transform:none;font-size:13px;vertical-align:top;font-weight:400;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}#wpadminbar #distributor-push-wrapper button:focus,#wpadminbar #distributor-push-wrapper button:hover{background-color:#0085ba;outline:none}#wpadminbar #distributor-push-wrapper .new-connections-list>div:nth-child(odd){background-color:#23282d}#wpadminbar #distributor-push-wrapper .add-connection,#wpadminbar #distributor-push-wrapper .added-connection{display:block;width:100%;padding:.5em;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:pointer}#wpadminbar #distributor-push-wrapper .new-connections-list .add-connection.added{background-color:#3a4045}#wpadminbar #distributor-push-wrapper .add-connection.syndicated{cursor:default}#wpadminbar #distributor-push-wrapper .add-connection.syndicated span{color:#555}#wpadminbar #distributor-push-wrapper .add-connection.syndicated a{color:inherit;text-decoration:underline;float:right;height:auto}#wpadminbar #distributor-push-wrapper .added-connection{background-color:#555;margin-bottom:.5em;cursor:normal;position:relative}#wpadminbar #distributor-push-wrapper .added-connection .remove-connection{cursor:pointer;top:1px;display:inline-block;float:right;font-size:20px;line-height:19px;vertical-align:middle;margin-left:6px;position:relative}#wpadminbar #distributor-push-wrapper .added-connection .remove-connection:after{content:\"\\f335\";font-family:dashicons}#wpadminbar #distributor-push-wrapper header,#wpadminbar #distributor-push-wrapper p{margin:0 0 1em!important;padding:0}#wpadminbar #distributor-push-wrapper .as-draft{margin-left:.5em;height:30px;line-height:28px;padding:2px 12px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}#wpadminbar #distributor-push-wrapper .action-wrapper.loading .syndicate-button:after{content:\" \";vertical-align:middle;border-radius:50%;width:6px;margin-left:8px;height:6px;display:inline-block;font-size:9px;text-indent:-9999em;border-top:3px solid #cfcfcf;border-right:3px solid #cfcfcf;border-bottom:3px solid #cfcfcf;border-left:3px solid #00aef2;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:a 1.1s infinite linear;animation:a 1.1s infinite linear;position:relative;top:-1px;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-box-sizing:initial;box-sizing:initial}#wpadminbar #distributor-push-wrapper .messages{margin-top:1em;-webkit-box-sizing:border-box;box-sizing:border-box}@media (min-width:480px){#wpadminbar #distributor-push-wrapper .messages{width:40%;float:right;clear:right;padding-left:3em}}#wpadminbar #distributor-push-wrapper .messages *{display:none}#wpadminbar #distributor-push-wrapper.message-error .messages .dt-error,#wpadminbar #distributor-push-wrapper.message-success .messages .dt-success{display:block}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"],"file":"push.min.css"} \ No newline at end of file diff --git a/dist/js/admin-distributed-post.min.js.map b/dist/js/admin-distributed-post.min.js.map index 4cb6d7a54..c6f9e608a 100644 --- a/dist/js/admin-distributed-post.min.js.map +++ b/dist/js/admin-distributed-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap 73760e3c33dbc2fa4f5c","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 73760e3c33dbc2fa4f5c","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js b/dist/js/admin-external-connection.min.js index 074a90379..40a1b296f 100644 --- a/dist/js/admin-external-connection.min.js +++ b/dist/js/admin-external-connection.min.js @@ -1,2 +1,2 @@ -!function(e){function t(a){if(n[a])return n[a].exports;var d=n[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,t),d.l=!0,d.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=_},function(e,t){e.exports=window},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function d(){if(!1!==b&&b.abort(),""===c.value)return v.innerText="",h.innerText="",void h.removeAttribute("data-endpoint-state");h.setAttribute("data-endpoint-state","loading"),h.innerText=l.dt.endpoint_checking_message,v.innerText="";var e={};i.default.each(m,function(t){if(!t.disabled){var n=t.getAttribute("data-auth-field");n&&(e[n]=t.value)}});var t=0;_&&_.value&&(t=_.value),b=r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_verify_external_connection",auth:e,url:c.value,type:f.value,endpoint_id:t}}).done(function(e){if(e.success)if(e.data.errors.no_external_connection)if(h.setAttribute("data-endpoint-state","error"),e.data.endpoint_suggestion){h.innerText=l.dt.endpoint_suggestion+" ";var t=document.createElement("a");t.classList.add("suggest"),t.innerText=e.data.endpoint_suggestion,h.appendChild(t)}else h.innerText=l.dt.bad_connection;else if(e.data.errors.no_distributor||!e.data.can_post.length){h.setAttribute("data-endpoint-state","warning"),h.innerText=l.dt.limited_connection;var n=[];e.data.errors.no_distributor?h.innerText+=" "+l.dt.no_distributor:h.innerText+=" "+l.dt.bad_auth,n.push(l.dt.no_push),n.push(l.dt.pull_limited),n.forEach(function(e){var t=document.createElement("li");t.innerText=e,v.append(t)})}else h.setAttribute("data-endpoint-state","valid"),h.innerText=l.dt.good_connection;else h.setAttribute("data-endpoint-state","error")}).complete(function(){h.classList.remove("loading")})}var o=n(0),r=a(o),u=n(1),i=a(u),l=n(2),c=document.getElementsByClassName("external-connection-url-field")[0],s=document.getElementById("dt_external_connection_details"),f=document.getElementsByClassName("external-connection-type-field")[0],m=document.getElementsByClassName("auth-field"),p=document.getElementsByClassName("dt-roles-allowed"),g=document.getElementById("title"),h=document.querySelector(".endpoint-result"),v=document.querySelector(".endpoint-errors"),_=document.getElementById("post_ID"),b=!1;setTimeout(function(){d()},300),(0,r.default)(s).on("click",".suggest",function(e){c.value=e.currentTarget.innerText,(0,r.default)(c).trigger("input")}),(0,r.default)(s).on("keyup input",".auth-field, .external-connection-url-field",i.default.debounce(d,250)),(0,r.default)(c).on("blur",function(e){""===g.value&&""!==e.currentTarget.value&&(g.value=e.currentTarget.value.replace(/https?:\/\//i,""),g.focus(),g.blur())});var x=document.getElementById("dt_password"),y=document.getElementById("dt_username"),E=document.querySelector(".change-password");(0,r.default)(y).on("keyup change",i.default.debounce(function(){E&&(x.disabled=!1,x.value="",E.style.display="none")},250)),(0,r.default)(E).on("click",function(e){e.preventDefault(),x.disabled?(x.disabled=!1,x.value="",e.currentTarget.innerText=l.dt.cancel):(x.disabled=!0,x.value="sdfdsfsdfdsfdsfsd",e.currentTarget.innerText=l.dt.change),d()}),(0,r.default)(p).on("click",".dt-role-checkbox",function(e){e.target.classList.contains("dt-role-checkbox")&&e.target.checked&&"administrator"!==e.target.value&&"editor"!==e.target.value&&alert(l.dt.roles_warning)});var T=(0,r.default)(".hide-until-authed"),B=(0,r.default)(".auth-credentials"),w=(0,r.default)(document.getElementById("dt_client_secret")),I=(0,r.default)(document.getElementById("dt_client_id")),k=function(){0===document.getElementsByClassName("oauth-connection-established").length&&T.hide()},C=function(e,t){return""===e.val()?(t.preventDefault(),e.addClass("error-required"),!1):(e.removeClass("error-required"),!0)};(0,r.default)(f).on("change",function(){var e=f.value;B.hide(),(0,r.default)(".auth-credentials."+e).show(),"wpdotcom"===e?k():T.show()}),"wpdotcom"===f.value&&k();var A=document.getElementById("create-oauth-connection");A&&(0,r.default)(A).on("click",function(e){var t=C(w,e),n=C(I,e);if(!t||!n)return e.preventDefault(),!1});var j=document.getElementById("oauth-authentication-change-credentials"),q=(0,r.default)(".oauth-authentication-details-wrapper");j&&(0,r.default)(j).on("click",function(){q.show(),w.val(""),(0,r.default)(".oauth-connection-established").remove(),k()});var D=document.getElementById("begin-authorization");D&&(0,r.default)(D).on("click",function(e){var t=(0,r.default)(g),n=t.val();C(t,e)&&((0,r.default)(D).addClass("disabled"),t.removeClass("error-required"),r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_begin_authorization",title:n,id:(0,r.default)(document.getElementById("post_ID")).val()}}).done(function(e){if(e.success&&e.data.id){var t=l.dt.admin_url+"post.php?post="+e.data.id+"&action=edit";history.pushState({},"Oauth Authorize Details",t),(0,r.default)(document.getElementById("dt_redirect_uri")).val(t),(0,r.default)(document.getElementById("dt_created_post_id")).val(e.data.id),(0,r.default)(document.getElementById("original_post_status")).val("publish"),(0,r.default)(".oauth-begin-authentication-wrapper").hide(),q.show()}}).complete(function(){(0,r.default)(D).removeClass("disabled")}))})}]); +!function(e){function t(a){if(n[a])return n[a].exports;var d=n[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,t),d.l=!0,d.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},function(e,t){e.exports=_},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function d(){if(!1!==b&&b.abort(),""===c.value)return v.innerText="",h.innerText="",void h.removeAttribute("data-endpoint-state");h.setAttribute("data-endpoint-state","loading"),h.innerText=l.dt.endpoint_checking_message,v.innerText="";var e={};i.default.each(m,function(t){if(!t.disabled){var n=t.getAttribute("data-auth-field");n&&(e[n]=t.value)}});var t=0;_&&_.value&&(t=_.value),b=r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_verify_external_connection",auth:e,url:c.value,type:f.value,endpoint_id:t}}).done(function(e){if(e.success)if(e.data.errors.no_external_connection)if(h.setAttribute("data-endpoint-state","error"),e.data.endpoint_suggestion){h.innerText=l.dt.endpoint_suggestion+" ";var t=document.createElement("a");t.classList.add("suggest"),t.innerText=e.data.endpoint_suggestion,h.appendChild(t)}else h.innerText=l.dt.bad_connection;else if(e.data.errors.no_distributor||!e.data.can_post.length){h.setAttribute("data-endpoint-state","warning"),h.innerText=l.dt.limited_connection;var n=[];e.data.errors.no_distributor?h.innerText+=" "+l.dt.no_distributor:h.innerText+=" "+l.dt.bad_auth,n.push(l.dt.no_push),n.push(l.dt.pull_limited),n.forEach(function(e){var t=document.createElement("li");t.innerText=e,v.append(t)})}else h.setAttribute("data-endpoint-state","valid"),h.innerText=l.dt.good_connection;else h.setAttribute("data-endpoint-state","error")}).complete(function(){h.classList.remove("loading")})}var o=n(0),r=a(o),u=n(2),i=a(u),l=n(1),c=document.getElementsByClassName("external-connection-url-field")[0],s=document.getElementById("dt_external_connection_details"),f=document.getElementsByClassName("external-connection-type-field")[0],m=document.getElementsByClassName("auth-field"),p=document.getElementsByClassName("dt-roles-allowed"),g=document.getElementById("title"),h=document.querySelector(".endpoint-result"),v=document.querySelector(".endpoint-errors"),_=document.getElementById("post_ID"),b=!1;setTimeout(function(){d()},300),(0,r.default)(s).on("click",".suggest",function(e){c.value=e.currentTarget.innerText,(0,r.default)(c).trigger("input")}),(0,r.default)(s).on("keyup input",".auth-field, .external-connection-url-field",i.default.debounce(d,250)),(0,r.default)(c).on("blur",function(e){""===g.value&&""!==e.currentTarget.value&&(g.value=e.currentTarget.value.replace(/https?:\/\//i,""),g.focus(),g.blur())});var x=document.getElementById("dt_password"),y=document.getElementById("dt_username"),E=document.querySelector(".change-password");(0,r.default)(y).on("keyup change",i.default.debounce(function(){E&&(x.disabled=!1,x.value="",E.style.display="none")},250)),(0,r.default)(E).on("click",function(e){e.preventDefault(),x.disabled?(x.disabled=!1,x.value="",e.currentTarget.innerText=l.dt.cancel):(x.disabled=!0,x.value="sdfdsfsdfdsfdsfsd",e.currentTarget.innerText=l.dt.change),d()}),(0,r.default)(p).on("click",".dt-role-checkbox",function(e){e.target.classList.contains("dt-role-checkbox")&&e.target.checked&&"administrator"!==e.target.value&&"editor"!==e.target.value&&alert(l.dt.roles_warning)});var T=(0,r.default)(".hide-until-authed"),B=(0,r.default)(".auth-credentials"),w=(0,r.default)(document.getElementById("dt_client_secret")),I=(0,r.default)(document.getElementById("dt_client_id")),k=function(){0===document.getElementsByClassName("oauth-connection-established").length&&T.hide()},C=function(e,t){return""===e.val()?(t.preventDefault(),e.addClass("error-required"),!1):(e.removeClass("error-required"),!0)};(0,r.default)(f).on("change",function(){var e=f.value;B.hide(),(0,r.default)(".auth-credentials."+e).show(),"wpdotcom"===e?k():T.show()}),"wpdotcom"===f.value&&k();var A=document.getElementById("create-oauth-connection");A&&(0,r.default)(A).on("click",function(e){var t=C(w,e),n=C(I,e);if(!t||!n)return e.preventDefault(),!1});var j=document.getElementById("oauth-authentication-change-credentials"),q=(0,r.default)(".oauth-authentication-details-wrapper");j&&(0,r.default)(j).on("click",function(){q.show(),w.val(""),(0,r.default)(".oauth-connection-established").remove(),k()});var D=document.getElementById("begin-authorization");D&&(0,r.default)(D).on("click",function(e){var t=(0,r.default)(g),n=t.val();C(t,e)&&((0,r.default)(D).addClass("disabled"),t.removeClass("error-required"),r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_begin_authorization",title:n,id:(0,r.default)(document.getElementById("post_ID")).val()}}).done(function(e){if(e.success&&e.data.id){var t=l.dt.admin_url+"post.php?post="+e.data.id+"&action=edit";history.pushState({},"Oauth Authorize Details",t),(0,r.default)(document.getElementById("dt_redirect_uri")).val(t),(0,r.default)(document.getElementById("dt_created_post_id")).val(e.data.id),(0,r.default)(document.getElementById("original_post_status")).val("publish"),(0,r.default)(".oauth-begin-authentication-wrapper").hide(),q.show()}}).complete(function(){(0,r.default)(D).removeClass("disabled")}))})}]); //# sourceMappingURL=admin-external-connection.min.js.map \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js.map b/dist/js/admin-external-connection.min.js.map index 6f212dd14..5d711c789 100644 --- a/dist/js/admin-external-connection.min.js.map +++ b/dist/js/admin-external-connection.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 73760e3c33dbc2fa4f5c","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///external \"window\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_","window","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFyEM,SAAUvB,EAAQD,GGzExBC,EAAAD,QAAAyB,GH+EM,SAAUxB,EAAQD,GI/ExBC,EAAAD,QAAA0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BACRmF,MAAOA,EACPC,IAAI,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,YAAckC,SAEjDnE,KAAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKsF,GAAK,CAG3C,GAAMxF,GAAMf,EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(1);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 73760e3c33dbc2fa4f5c","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 1\n// module chunks = 0 1","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,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AgB,2CAC9D2C,GAAgC,EAAAtF,EAAAxB,SAAQ,wCAEpC6G,KAEJ,EAAArF,EAAAxB,SAAQ6G,GAAoBrC,GAAI,QAAS,WAGxCsC,EAA8BL,OAG9BV,EAAcM,IAAK,KAGnB,EAAA7E,EAAAxB,SAAQ,iCAAkC8D,SAG1CmC,KAKF,IAAMc,GAAiBtE,SAAS0B,eAAgB,sBAC3C4C,KAGJ,EAAAvF,EAAAxB,SAAQ+G,GAAiBvC,GAAI,QAAS,SAAEC,GACvC,GAAMuC,IAAW,EAAAxF,EAAAxB,SAAQqE,GACxB4C,EAAQD,EAASX,KAGbF,GAAea,EAAUvC,MAG7B,EAAAjD,EAAAxB,SAAQ+G,GAAiBT,SAAU,YAGnCU,EAAST,YAAa,kBAGtB/E,EAAAxB,QAAOyB,MACNC,cACAC,OAAQ,OACRC,MACCC,MAAOlB,EAAAC,GAAGiB,MACVC,OAAQ,yBACRmF,MAAOA,EACPC,IAAI,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,YAAckC,SAEjDnE,KAAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKsF,GAAK,CAG3C,GAAMxF,GAAMf,EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-pull.min.js.map b/dist/js/admin-pull.min.js.map index 60b340eb4..ce0b7bf1b 100644 --- a/dist/js/admin-pull.min.js.map +++ b/dist/js/admin-pull.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 73760e3c33dbc2fa4f5c","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,CACA,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 73760e3c33dbc2fa4f5c","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,CACA,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js b/dist/js/gutenberg-syndicated-post.min.js new file mode 100644 index 000000000..1fd3b9619 --- /dev/null +++ b/dist/js/gutenberg-syndicated-post.min.js @@ -0,0 +1,2 @@ +!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},,,,,,function(e,t,r){"use strict";var n=r(1),i=r(0);!function(e){e&&e.__esModule}(i);n.wp.i18n.setLocaleData(n.dtGutenberg.i18n,"distributor");var o=[];parseInt(n.dtGutenberg.originalDeleted)?(o.push(n.wp.i18n.sprintf(n.wp.i18n.__("This %s was distributed from "),n.dtGutenberg.postTypeSingular)),o.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),o.push(n.wp.i18n.__(". However, the original has been deleted."))):parseInt(n.dtGutenberg.unlinked)?(o.push(n.wp.i18n.__("Originally distributed from ","distributor")),o.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),o.push("."),o.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.linkNonceUrl},[n.wp.i18n.__("restore it.","distributor")])]))):(o.push(n.wp.i18n.__("Distributed from ","distributor")),o.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),o.push("."),o.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.unlinkNonceUrl},[n.wp.i18n.__("unlink from the original.","distributor")])])));var s=n.wp.element.createElement("p",{className:"dt-message-wrapper"},o);n.wp.data.dispatch("core/editor").createWarningNotice(s,{isDismissible:!1})}]); +//# sourceMappingURL=gutenberg-syndicated-post.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js.map b/dist/js/gutenberg-syndicated-post.min.js.map new file mode 100644 index 000000000..f69a2a093 --- /dev/null +++ b/dist/js/gutenberg-syndicated-post.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_window","_jquery","obj","wp","i18n","setLocaleData","dtGutenberg","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM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AAAG,GAAGC,KAAKQ,GAAI,+BAAgC,gBAE3DL,EAASG,KAAMV,EAAAG,GAAGW,QAAQC,cAAe,KACxCC,KAAMhB,EAAAM,YAAYW,UAElBjB,EAAAM,YAAYY,wBAGbX,EAASG,KAAM,KAEfH,EAASG,KAAMV,EAAAG,GAAGW,QAAQC,cAAe,WACxCf,EAAAG,GAAGC,KAAKO,QAASX,EAAAG,GAAGC,KAAKQ,GAAI,2EAA4E,eAAiBZ,EAAAM,YAAYO,iBAAiBO,eACvJpB,EAAAG,GAAGW,QAAQC,cAAe,KACzBC,KAAMhB,EAAAM,YAAYe,eAElBrB,EAAAG,GAAGC,KAAKQ,GAAI,cAAe,sBAlC7BL,EAASG,KAAMV,EAAAG,GAAGC,KAAKQ,GAAI,oBAAqB,gBAEhDL,EAASG,KAAMV,EAAAG,GAAGW,QAAQC,cAAe,KACxCC,KAAMhB,EAAAM,YAAYW,UAElBjB,EAAAM,YAAYY,wBAGbX,EAASG,KAAM,KAEfH,EAASG,KAAMV,EAAAG,GAAGW,QAAQC,cAAe,WACxCf,EAAAG,GAAGC,KAAKO,QAASX,EAAAG,GAAGC,KAAKQ,GAAI,0DAA2D,eAAiBZ,EAAAM,YAAYO,iBAAiBO,eACtIpB,EAAAG,GAAGW,QAAQC,cAAe,KACzBC,KAAMhB,EAAAM,YAAYgB,iBAElBtB,EAAAG,GAAGC,KAAKQ,GAAI,4BAA6B,oBAwB5C,IAAMW,GAAiBvB,EAAAG,GAAGW,QAAQC,cAAe,KAChDS,UAAW,sBACTjB,EAEHP,GAAAG,GAAGsB,KAAKC,SAAU,eAAgBC,oBAAqBJ,GACtDK,eAAe","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\n\nvar messages = [];\n\nif (!!parseInt(_window.dtGutenberg.originalDeleted)) {\n\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n} else {\n\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.linkNonceUrl\n\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n}\n\nvar messageElement = _window.wp.element.createElement('p', {\n\tclassName: 'dt-message-wrapper'\n}, messages);\n\n_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\tisDismissible: false\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","import { wp, dtGutenberg } from 'window'\nimport jQuery from 'jquery'\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\n\nconst messages = []\n\nif ( !! parseInt( dtGutenberg.originalDeleted ) ) {\n\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t] )\n\t] ) )\n} else {\n\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t] )\n\t] ) )\n}\n\nconst messageElement = wp.element.createElement( 'p', {\n\tclassName: 'dt-message-wrapper'\n}, messages )\n\nwp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\tisDismissible: false\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg.min.js b/dist/js/gutenberg.min.js new file mode 100644 index 000000000..bc1be8348 --- /dev/null +++ b/dist/js/gutenberg.min.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}({1:function(e,t){e.exports=window},7:function(e,t,n){"use strict";var r=n(1),i=r.wp.element.Fragment,a=r.wp.editPost.PluginSidebar,o=r.wp.editPost.__experimental.PluginMoreMenuItem;(0,r.wp.plugins.registerPlugin)("distributor",{render:function(){return React.createElement(i,null,React.createElement(o,{name:"menu-item-name",type:"sidebar",target:"sidebar-name"},"My Sidebar"),React.createElement(a,{name:"sidebar-name",title:"My Sidebar"},"Content of the sidebar"))}})}}); +//# sourceMappingURL=gutenberg.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg.min.js.map b/dist/js/gutenberg.min.js.map new file mode 100644 index 000000000..260a5e68d --- /dev/null +++ b/dist/js/gutenberg.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///gutenberg.min.js","webpack:///webpack/bootstrap b08876edbef75efc6331","webpack:///external \"window\"","webpack:///./assets/js/gutenberg.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","window","7","_window","Fragment","wp","element","PluginSidebar","editPost","PluginMoreMenuItem","__experimental","registerPlugin","plugins","render","React","createElement","type","target","title"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GAEQ+B,EAAaD,EAAAE,GAAGC,QAAhBF,SACAG,EAAkBJ,EAAAE,GAAGG,SAArBD,cACAE,EAAuBN,EAAAE,GAAGG,SAASE,eAAnCD,oBAqBRE,EApB2BR,EAAAE,GAAGO,QAAtBD,gBAoBQ,eACfE,OAnBiB,iBACjBC,OAAAC,cAACX,EAAD,KACCU,MAAAC,cAACN,GACAzB,KAAK,iBACLgC,KAAK,UACLC,OAAO,gBAHR,cAOAH,MAAAC,cAACR,GACAvB,KAAK,eACLkC,MAAM,cAFP","file":"gutenberg.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\nvar Fragment = _window.wp.element.Fragment;\nvar PluginSidebar = _window.wp.editPost.PluginSidebar;\nvar PluginMoreMenuItem = _window.wp.editPost.__experimental.PluginMoreMenuItem;\nvar registerPlugin = _window.wp.plugins.registerPlugin;\n\n\nvar Component = function Component() {\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginMoreMenuItem,\n\t\t\t{\n\t\t\t\tname: \"menu-item-name\",\n\t\t\t\ttype: \"sidebar\",\n\t\t\t\ttarget: \"sidebar-name\"\n\t\t\t},\n\t\t\t\"My Sidebar\"\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"sidebar-name\",\n\t\t\t\ttitle: \"My Sidebar\"\n\t\t\t},\n\t\t\t\"Content of the sidebar\"\n\t\t)\n\t);\n};\n\nregisterPlugin('distributor', {\n\trender: Component\n});\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b08876edbef75efc6331","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","import { wp } from 'window';\n\nconst { Fragment } = wp.element;\nconst { PluginSidebar } = wp.editPost;\nconst { PluginMoreMenuItem } = wp.editPost.__experimental;\nconst { registerPlugin } = wp.plugins;\n\nconst Component = () => (\n\t\n\t\t\n\t\t\tMy Sidebar\n\t\t\n\t\t\n\t\t\tContent of the sidebar\n\t\t\n\t\n);\n\nregisterPlugin( 'distributor', {\n\trender: Component,\n} );\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/push.min.js b/dist/js/push.min.js index cc4e32992..4a8e05220 100644 --- a/dist/js/push.min.js +++ b/dist/js/push.min.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=_},function(e,t){e.exports=window},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(0),a=r(o),c=n(1),i=r(c),s=n(2),d={},u="",l=i.default.memoize(function(e){var t=document.getElementById(e);if(!t)return!1;var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g};return i.default.template(t.innerHTML,null,n)});(0,a.default)(window).load(function(){function e(){f.classList.add("message-error"),setTimeout(function(){f.classList.remove("message-error")},6e3)}function t(t){var r=!1;i.default.each(t.internal,function(e,t){"fail"===e.status?r=!0:s.dtConnections["internal"+t].syndicated=e.url}),i.default.each(t.external,function(e,t){"fail"===e.status?r=!0:s.dtConnections["external"+t].syndicated=!0}),r?e():(f.classList.add("message-success"),p.classList.add("empty"),g.innerText="",setTimeout(function(){f.classList.remove("message-success")},6e3)),d={},n()}function n(){m.innerText="",i.default.each(s.dtConnections,function(e){if(""!==u){var t=e.name.replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase()),n=e.url.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase());if(!t&&!n)return}var r=l("dt-add-connection")({connection:e,selectedConnections:d});m.innerHTML+=r})}function r(){c.focus(),document.body.classList.toggle("distributor-show")}function o(){c.blur(),document.body.classList.toggle("distributor-show")}var c=document.querySelector("#wp-admin-bar-distributor"),f=document.querySelector("#distributor-push-wrapper");if(c&&f){var p=f.querySelector(".connections-selected"),g=f.querySelector(".selected-connections-list"),m=f.querySelector(".new-connections-list"),v=document.getElementById("dt-connection-search"),y=f.querySelector(".syndicate-button"),h=f.querySelector(".action-wrapper"),L=document.getElementById("dt-as-draft");c.appendChild(f),(0,a.default)(c).hoverIntent(r,300,o),(0,a.default)(y).on("click",function(){if(!h.classList.contains("loading")){h.classList.add("loading");var n={action:"dt_push",nonce:s.dt.nonce,connections:d,post_id:s.dt.post_id};L.checked&&(n.draft=!0);var r=!!s.dt.usexhr&&{withCredentials:!0};a.default.ajax({url:s.dt.ajaxurl,xhrFields:r,method:"post",data:n}).done(function(n){setTimeout(function(){if(h.classList.remove("loading"),!n.data||!n.data.results)return void e();t(n.data.results)},500)}).error(function(){setTimeout(function(){h.classList.remove("loading"),e()},500)})}}),(0,a.default)(f).on("click",".add-connection",function(e){if("A"!==e.target.nodeName&&(e.preventDefault(),!e.currentTarget.classList.contains("syndicated")))if(e.currentTarget.classList.contains("added")){var t=e.currentTarget.getAttribute("data-connection-type"),r=e.currentTarget.getAttribute("data-connection-id"),o=g.querySelector('[data-connection-id="'+r+'"][data-connection-type="'+t+'"]');o.parentNode.removeChild(o),delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}else{var a=e.currentTarget.getAttribute("data-connection-type"),c=e.currentTarget.getAttribute("data-connection-id");d[a+c]=s.dtConnections[a+c],p.classList.remove("empty");var i=e.currentTarget.cloneNode();i.innerText=e.currentTarget.innerText;var u=document.createElement("span");u.classList.add("remove-connection"),i.appendChild(u),i.classList="added-connection",g.appendChild(i),n()}}),(0,a.default)(f).on("click",".remove-connection",function(e){e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);var t=e.currentTarget.parentNode.getAttribute("data-connection-type"),r=e.currentTarget.parentNode.getAttribute("data-connection-id");delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}),(0,a.default)(v).on("keyup change",i.default.debounce(function(e){""===e.currentTarget.value&&n(s.dtConnections),u=e.currentTarget.value.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,""),n()},300))}})}]); +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},function(e,t){e.exports=_},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(0),a=r(o),c=n(2),i=r(c),s=n(1),d={},u="",l=i.default.memoize(function(e){var t=document.getElementById(e);if(!t)return!1;var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g};return i.default.template(t.innerHTML,null,n)});(0,a.default)(window).load(function(){function e(){f.classList.add("message-error"),setTimeout(function(){f.classList.remove("message-error")},6e3)}function t(t){var r=!1;i.default.each(t.internal,function(e,t){"fail"===e.status?r=!0:s.dtConnections["internal"+t].syndicated=e.url}),i.default.each(t.external,function(e,t){"fail"===e.status?r=!0:s.dtConnections["external"+t].syndicated=!0}),r?e():(f.classList.add("message-success"),p.classList.add("empty"),g.innerText="",setTimeout(function(){f.classList.remove("message-success")},6e3)),d={},n()}function n(){m.innerText="",i.default.each(s.dtConnections,function(e){if(""!==u){var t=e.name.replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase()),n=e.url.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase());if(!t&&!n)return}var r=l("dt-add-connection")({connection:e,selectedConnections:d});m.innerHTML+=r})}function r(){c.focus(),document.body.classList.toggle("distributor-show")}function o(){c.blur(),document.body.classList.toggle("distributor-show")}var c=document.querySelector("#wp-admin-bar-distributor"),f=document.querySelector("#distributor-push-wrapper");if(c&&f){var p=f.querySelector(".connections-selected"),g=f.querySelector(".selected-connections-list"),m=f.querySelector(".new-connections-list"),v=document.getElementById("dt-connection-search"),y=f.querySelector(".syndicate-button"),h=f.querySelector(".action-wrapper"),L=document.getElementById("dt-as-draft");c.appendChild(f),(0,a.default)(c).hoverIntent(r,300,o),(0,a.default)(y).on("click",function(){if(!h.classList.contains("loading")){h.classList.add("loading");var n={action:"dt_push",nonce:s.dt.nonce,connections:d,post_id:s.dt.post_id};L.checked&&(n.draft=!0);var r=!!s.dt.usexhr&&{withCredentials:!0};a.default.ajax({url:s.dt.ajaxurl,xhrFields:r,method:"post",data:n}).done(function(n){setTimeout(function(){if(h.classList.remove("loading"),!n.data||!n.data.results)return void e();t(n.data.results)},500)}).error(function(){setTimeout(function(){h.classList.remove("loading"),e()},500)})}}),(0,a.default)(f).on("click",".add-connection",function(e){if("A"!==e.target.nodeName&&(e.preventDefault(),!e.currentTarget.classList.contains("syndicated")))if(e.currentTarget.classList.contains("added")){var t=e.currentTarget.getAttribute("data-connection-type"),r=e.currentTarget.getAttribute("data-connection-id"),o=g.querySelector('[data-connection-id="'+r+'"][data-connection-type="'+t+'"]');o.parentNode.removeChild(o),delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}else{var a=e.currentTarget.getAttribute("data-connection-type"),c=e.currentTarget.getAttribute("data-connection-id");d[a+c]=s.dtConnections[a+c],p.classList.remove("empty");var i=e.currentTarget.cloneNode();i.innerText=e.currentTarget.innerText;var u=document.createElement("span");u.classList.add("remove-connection"),i.appendChild(u),i.classList="added-connection",g.appendChild(i),n()}}),(0,a.default)(f).on("click",".remove-connection",function(e){e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);var t=e.currentTarget.parentNode.getAttribute("data-connection-type"),r=e.currentTarget.parentNode.getAttribute("data-connection-id");delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}),(0,a.default)(v).on("keyup change",i.default.debounce(function(e){""===e.currentTarget.value&&n(s.dtConnections),u=e.currentTarget.value.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,""),n()},300))}})}]); //# sourceMappingURL=push.min.js.map \ No newline at end of file diff --git a/dist/js/push.min.js.map b/dist/js/push.min.js.map index 8dd932acc..6df7cc90d 100644 --- a/dist/js/push.min.js.map +++ b/dist/js/push.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 189560f6fb04c238a86a","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///external \"window\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_","window","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS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B,UAAY2C,EAAMI,cAAc/C,SAExC,IAAMwD,GAAarF,SAASsF,cAAe,OAC3CD,GAAW1E,UAAUC,IAAK,qBAE1Bb,EAAQoD,YAAakC,GACrBtF,EAAQY,UAAY,mBAEpBiB,EAAwBuB,YAAapD,GAErC+B,QAOF,EAAAxC,EAAAF,SAAQsB,GAAyB2C,GAAI,QAAS,qBAAsB,SAAEmB,GACrEA,EAAMI,cAAcI,WAAWA,WAAWC,YAAaT,EAAMI,cAAcI,WAC3E,IAAMH,GAAOL,EAAMI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgB7D,EAAAJ,QAAEmG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,mBAGDnC,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(1);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 189560f6fb04c238a86a","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 1\n// module chunks = 0 1","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,G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AAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file diff --git a/gulp-tasks/cssnext.js b/gulp-tasks/cssnext.js index fe3c1a7e3..c65ef00ee 100644 --- a/gulp-tasks/cssnext.js +++ b/gulp-tasks/cssnext.js @@ -20,6 +20,7 @@ gulp.task( 'cssnext', ( cb ) => { './assets/css/admin-pull-table.css', './assets/css/admin-edit-table.css', './assets/css/admin-syndicated-post.css', + './assets/css/gutenberg-syndicated-post.css', './assets/css/admin.css', './assets/css/push.css' ]; diff --git a/includes/syndicated-post-ui.php b/includes/syndicated-post-ui.php index ae6cde14b..c65777378 100644 --- a/includes/syndicated-post-ui.php +++ b/includes/syndicated-post-ui.php @@ -13,13 +13,18 @@ function setup() { add_action( 'edit_form_top', __NAMESPACE__ . '\syndicated_message', 9, 1 ); add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_post_scripts' ); add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_edit_scripts' ); + add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_gutenberg_edit_scripts' ); add_action( 'admin_init', __NAMESPACE__ . '\unlink' ); add_action( 'admin_init', __NAMESPACE__ . '\link' ); add_action( 'post_submitbox_misc_actions', __NAMESPACE__ . '\syndication_date' ); add_filter( 'admin_body_class', __NAMESPACE__ . '\add_linked_class' ); add_filter( 'post_row_actions', __NAMESPACE__ . '\remove_quick_edit', 10, 2 ); - add_action( 'do_meta_boxes', __NAMESPACE__ . '\replace_revisions_meta_box', 10, 3 ); - add_action( 'add_meta_boxes', __NAMESPACE__ . '\add_revisions_meta_box' ); + + if ( ! \Distributor\Utils\is_using_gutenberg() ) { + add_action( 'do_meta_boxes', __NAMESPACE__ . '\replace_revisions_meta_box', 10, 3 ); + add_action( 'add_meta_boxes', __NAMESPACE__ . '\add_revisions_meta_box' ); + } + add_action( 'admin_init', __NAMESPACE__ . '\setup_columns' ); } ); @@ -432,7 +437,11 @@ function enqueue_post_scripts( $hook ) { return; } - wp_enqueue_style( 'dt-admin-syndicated-post', plugins_url( '/dist/css/admin-syndicated-post.min.css', __DIR__ ), array(), DT_VERSION ); + if ( \Distributor\Utils\is_using_gutenberg() ) { + wp_enqueue_style( 'dt-gutenberg-syndicated-post', plugins_url( '/dist/css/gutenberg-syndicated-post.min.css', __DIR__ ), array(), DT_VERSION ); + } else { + wp_enqueue_style( 'dt-admin-syndicated-post', plugins_url( '/dist/css/admin-syndicated-post.min.css', __DIR__ ), array(), DT_VERSION ); + } $unlinked = (bool) get_post_meta( $post->ID, 'dt_unlinked', true ); @@ -441,6 +450,53 @@ function enqueue_post_scripts( $hook ) { } } +function enqueue_gutenberg_edit_scripts( $hook ) { + /*if ( 'post-new.php' !== $hook && 'post.php' !== $hook ) { + return; + }*/ + + global $post; + + $original_blog_id = get_post_meta( $post->ID, 'dt_original_blog_id', true ); + $original_post_id = get_post_meta( $post->ID, 'dt_original_post_id', true ); + $original_source_id = get_post_meta( $post->ID, 'dt_original_source_id', true ); + $original_deleted = get_post_meta( $post->ID, 'dt_original_post_deleted', true ); + $unlinked = get_post_meta( $post->ID, 'dt_unlinked', true ); + $post_type_object = get_post_type_object( $post->post_type ); + $post_url = get_post_meta( $post->ID, 'dt_original_post_url', true ); + $original_site_name = get_post_meta( $post->ID, 'dt_original_site_name', true ); + + if ( ! empty( $original_blog_id ) ) { + switch_to_blog( $original_blog_id ); + $original_location_name = get_bloginfo( 'name' ); + restore_current_blog(); + + if ( empty( $original_location_name ) ) { + $original_location_name = sprintf( esc_html__( 'Blog #%d', 'distributor' ), $original_blog_id ); + } + } else { + $original_location_name = $original_site_name; + } + + $post_type_singular = $post_type_object->labels->singular_name; + + wp_enqueue_script( 'dt-gutenberg-syndicated-post', plugins_url( '/dist/js/gutenberg-syndicated-post.min.js', __DIR__ ), [ 'wp-blocks' ], DT_VERSION, true ); + wp_localize_script( 'dt-gutenberg-syndicated-post', 'dtGutenberg', [ + 'i18n' => gutenberg_get_jed_locale_data( 'distributor' ), + 'originalBlogId' => (int) $original_blog_id, + 'originalPostId' => (int) $original_post_id, + 'originalSourceId' => (int) $original_source_id, + 'originalDelete' => (int) $original_deleted, + 'unlinked' => (int) $unlinked, + 'postTypeSingular' => sanitize_text_field( $post_type_singular ), + 'postUrl' => sanitize_text_field( $post_url ), + 'originalSiteName' => sanitize_text_field( $original_site_name ), + 'originalLocationName' => sanitize_text_field( $original_location_name ), + 'unlinkNonceUrl' => wp_nonce_url( add_query_arg( 'action', 'unlink', admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ), "unlink-post_{$post->ID}" ), + 'linkNonceUrl' => wp_nonce_url( add_query_arg( 'action', 'link', admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ), "link-post_{$post->ID}" ), + ] ); +} + /** * Enqueue admin scripts/styles for edit.php * diff --git a/includes/utils.php b/includes/utils.php index b9f9d0ac0..148978eb8 100644 --- a/includes/utils.php +++ b/includes/utils.php @@ -12,6 +12,16 @@ function is_vip_com() { return ( defined( 'WPCOM_IS_VIP_ENV' ) && WPCOM_IS_VIP_ENV ); } +/** + * Determine if Gutenberg is being used + * + * @since 1.2 + * @return boolean + */ +function is_using_gutenberg() { + return ( function_exists( 'the_gutenberg_project' ) ); +} + /** * Get Distributor settings with defaults * diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 62679582d..c5f3b992d 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -11,7 +11,8 @@ module.exports = { 'admin-external-connection': './assets/js/admin-external-connection.js', 'admin-pull': './assets/js/admin-pull.js', 'admin-distributed-post': './assets/js/admin-distributed-post.js', - push: './assets/js/push.js' + push: './assets/js/push.js', + 'gutenberg-syndicated-post': './assets/js/gutenberg-syndicated-post.js', }, output: { path: DIST_PATH, @@ -54,7 +55,8 @@ module.exports = { externals: { jquery: 'jQuery', underscores: '_', - window: 'window' + window: 'window', + wp: 'wp' }, stats: { colors: true }, } From 651a4cc245fc268d9fe75b2e2490d1026efa1edf Mon Sep 17 00:00:00 2001 From: Taylor Lovett Date: Wed, 18 Apr 2018 13:39:10 -0400 Subject: [PATCH 02/18] Only include distributed message when needed --- includes/syndicated-post-ui.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/includes/syndicated-post-ui.php b/includes/syndicated-post-ui.php index c65777378..cb9f698d3 100644 --- a/includes/syndicated-post-ui.php +++ b/includes/syndicated-post-ui.php @@ -450,16 +450,21 @@ function enqueue_post_scripts( $hook ) { } } -function enqueue_gutenberg_edit_scripts( $hook ) { - /*if ( 'post-new.php' !== $hook && 'post.php' !== $hook ) { - return; - }*/ - +function enqueue_gutenberg_edit_scripts() { global $post; + if ( empty( $post ) ) { + return; + } + $original_blog_id = get_post_meta( $post->ID, 'dt_original_blog_id', true ); $original_post_id = get_post_meta( $post->ID, 'dt_original_post_id', true ); $original_source_id = get_post_meta( $post->ID, 'dt_original_source_id', true ); + + if ( empty( $original_post_id ) || ( empty( $original_blog_id ) && empty( $original_source_id ) ) ) { + return; + } + $original_deleted = get_post_meta( $post->ID, 'dt_original_post_deleted', true ); $unlinked = get_post_meta( $post->ID, 'dt_unlinked', true ); $post_type_object = get_post_type_object( $post->post_type ); From 227edeb10d432df942241b8c677d258011bf686b Mon Sep 17 00:00:00 2001 From: Taylor Lovett Date: Wed, 18 Apr 2018 16:19:59 -0400 Subject: [PATCH 03/18] remove jquery --- assets/js/gutenberg-syndicated-post.js | 1 - dist/js/admin-distributed-post.min.js.map | 2 +- dist/js/admin-external-connection.min.js.map | 2 +- dist/js/admin-pull.min.js.map | 2 +- dist/js/gutenberg-syndicated-post.min.js | 2 +- dist/js/gutenberg-syndicated-post.min.js.map | 2 +- dist/js/push.min.js.map | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index 2933cde5e..f20d6a3bf 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -1,5 +1,4 @@ import { wp, dtGutenberg } from 'window' -import jQuery from 'jquery' wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) diff --git a/dist/js/admin-distributed-post.min.js.map b/dist/js/admin-distributed-post.min.js.map index c6f9e608a..b26e108d0 100644 --- a/dist/js/admin-distributed-post.min.js.map +++ b/dist/js/admin-distributed-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js.map b/dist/js/admin-external-connection.min.js.map index 5d711c789..d2206b158 100644 --- a/dist/js/admin-external-connection.min.js.map +++ b/dist/js/admin-external-connection.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EA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B,eAAgB,2CAC9D2C,GAAgC,EAAAtF,EAAAxB,SAAQ,wCAEpC6G,KAEJ,EAAArF,EAAAxB,SAAQ6G,GAAoBrC,GAAI,QAAS,WAGxCsC,EAA8BL,OAG9BV,EAAcM,IAAK,KAGnB,EAAA7E,EAAAxB,SAAQ,iCAAkC8D,SAG1CmC,KAKF,IAAMc,GAAiBtE,SAAS0B,eAAgB,sBAC3C4C,KAGJ,EAAAvF,EAAAxB,SAAQ+G,GAAiBvC,GAAI,QAAS,SAAEC,GACvC,GAAMuC,IAAW,EAAAxF,EAAAxB,SAAQqE,GACxB4C,EAAQD,EAASX,KAGbF,GAAea,EAAUvC,MAG7B,EAAAjD,EAAAxB,SAAQ+G,GAAiBT,SAAU,YAGnCU,EAAST,YAAa,kBAGtB/E,EAAAxB,QAAOyB,MACNC,cACAC,OAAQ,OACRC,MACCC,MAAOlB,EAAAC,GAAGiB,MACVC,OAAQ,yBACRmF,MAAOA,EACPC,IAAI,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,YAAckC,SAEjDnE,KAAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKsF,GAAK,CAG3C,GAAMxF,GAAMf,EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFyEM,SAAUvB,EAAQD,GGzExBC,EAAAD,QAAAyB,QH+EM,SAAUxB,EAAQD,GI/ExBC,EAAAD,QAAA0B,GJqFM,SAAUzB,EAAQD,EAASH,GAEjC,YAaA,SAAS8B,GAAuBC,GAAO,MAAOA,IAAOA,EAA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AAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKsF,GAAK,CAG3C,GAAMxF,GAAMf,EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-pull.min.js.map b/dist/js/admin-pull.min.js.map index ce0b7bf1b..672059717 100644 --- a/dist/js/admin-pull.min.js.map +++ b/dist/js/admin-pull.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,CACA,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,CACA,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js b/dist/js/gutenberg-syndicated-post.min.js index 1fd3b9619..8802aa2bf 100644 --- a/dist/js/gutenberg-syndicated-post.min.js +++ b/dist/js/gutenberg-syndicated-post.min.js @@ -1,2 +1,2 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},,,,,,function(e,t,r){"use strict";var n=r(1),i=r(0);!function(e){e&&e.__esModule}(i);n.wp.i18n.setLocaleData(n.dtGutenberg.i18n,"distributor");var o=[];parseInt(n.dtGutenberg.originalDeleted)?(o.push(n.wp.i18n.sprintf(n.wp.i18n.__("This %s was distributed from "),n.dtGutenberg.postTypeSingular)),o.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),o.push(n.wp.i18n.__(". However, the original has been deleted."))):parseInt(n.dtGutenberg.unlinked)?(o.push(n.wp.i18n.__("Originally distributed from ","distributor")),o.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),o.push("."),o.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.linkNonceUrl},[n.wp.i18n.__("restore it.","distributor")])]))):(o.push(n.wp.i18n.__("Distributed from ","distributor")),o.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),o.push("."),o.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.unlinkNonceUrl},[n.wp.i18n.__("unlink from the original.","distributor")])])));var s=n.wp.element.createElement("p",{className:"dt-message-wrapper"},o);n.wp.data.dispatch("core/editor").createWarningNotice(s,{isDismissible:!1})}]); +!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}({1:function(e,t){e.exports=window},7:function(e,t,r){"use strict";var n=r(1);n.wp.i18n.setLocaleData(n.dtGutenberg.i18n,"distributor");var i=[];parseInt(n.dtGutenberg.originalDeleted)?(i.push(n.wp.i18n.sprintf(n.wp.i18n.__("This %s was distributed from "),n.dtGutenberg.postTypeSingular)),i.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),i.push(n.wp.i18n.__(". However, the original has been deleted."))):parseInt(n.dtGutenberg.unlinked)?(i.push(n.wp.i18n.__("Originally distributed from ","distributor")),i.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),i.push("."),i.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.linkNonceUrl},[n.wp.i18n.__("restore it.","distributor")])]))):(i.push(n.wp.i18n.__("Distributed from ","distributor")),i.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),i.push("."),i.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.unlinkNonceUrl},[n.wp.i18n.__("unlink from the original.","distributor")])])));var o=n.wp.element.createElement("p",{className:"dt-message-wrapper"},i);n.wp.data.dispatch("core/editor").createWarningNotice(o,{isDismissible:!1})}}); //# sourceMappingURL=gutenberg-syndicated-post.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js.map b/dist/js/gutenberg-syndicated-post.min.js.map index f69a2a093..18e68f79a 100644 --- a/dist/js/gutenberg-syndicated-post.min.js.map +++ b/dist/js/gutenberg-syndicated-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_window","_jquery","obj","wp","i18n","setLocaleData","dtGutenberg","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAA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YW,UAElBjB,EAAAM,YAAYY,wBAGbX,EAASG,KAAM,KAEfH,EAASG,KAAMV,EAAAG,GAAGW,QAAQC,cAAe,WACxCf,EAAAG,GAAGC,KAAKO,QAASX,EAAAG,GAAGC,KAAKQ,GAAI,0DAA2D,eAAiBZ,EAAAM,YAAYO,iBAAiBO,eACtIpB,EAAAG,GAAGW,QAAQC,cAAe,KACzBC,KAAMhB,EAAAM,YAAYgB,iBAElBtB,EAAAG,GAAGC,KAAKQ,GAAI,4BAA6B,oBAwB5C,IAAMW,GAAiBvB,EAAAG,GAAGW,QAAQC,cAAe,KAChDS,UAAW,sBACTjB,EAEHP,GAAAG,GAAGsB,KAAKC,SAAU,eAAgBC,oBAAqBJ,GACtDK,eAAe","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\n\nvar messages = [];\n\nif (!!parseInt(_window.dtGutenberg.originalDeleted)) {\n\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n} else {\n\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.linkNonceUrl\n\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n}\n\nvar messageElement = _window.wp.element.createElement('p', {\n\tclassName: 'dt-message-wrapper'\n}, messages);\n\n_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\tisDismissible: false\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","import { wp, dtGutenberg } from 'window'\nimport jQuery from 'jquery'\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\n\nconst messages = []\n\nif ( !! parseInt( dtGutenberg.originalDeleted ) ) {\n\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t] )\n\t] ) )\n} else {\n\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t] )\n\t] ) )\n}\n\nconst messageElement = wp.element.createElement( 'p', {\n\tclassName: 'dt-message-wrapper'\n}, messages )\n\nwp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\tisDismissible: false\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","window","7","_window","wp","i18n","setLocaleData","dtGutenberg","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDM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AAKQ,GAAI,0DAA2D,eAAiBV,EAAAI,YAAYO,iBAAiBO,eACtIlB,EAAAC,GAAGW,QAAQC,cAAe,KACzBC,KAAMd,EAAAI,YAAYgB,iBAElBpB,EAAAC,GAAGC,KAAKQ,GAAI,4BAA6B,oBAwB5C,IAAMW,GAAiBrB,EAAAC,GAAGW,QAAQC,cAAe,KAChDS,UAAW,sBACTjB,EAEHL,GAAAC,GAAGsB,KAAKC,SAAU,eAAgBC,oBAAqBJ,GACtDK,eAAe","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\n\nvar messages = [];\n\nif (!!parseInt(_window.dtGutenberg.originalDeleted)) {\n\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n} else {\n\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.linkNonceUrl\n\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n}\n\nvar messageElement = _window.wp.element.createElement('p', {\n\tclassName: 'dt-message-wrapper'\n}, messages);\n\n_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\tisDismissible: false\n});\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","import { wp, dtGutenberg } from 'window'\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\n\nconst messages = []\n\nif ( !! parseInt( dtGutenberg.originalDeleted ) ) {\n\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t] )\n\t] ) )\n} else {\n\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t] )\n\t] ) )\n}\n\nconst messageElement = wp.element.createElement( 'p', {\n\tclassName: 'dt-message-wrapper'\n}, messages )\n\nwp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\tisDismissible: false\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/push.min.js.map b/dist/js/push.min.js.map index 6df7cc90d..561deb3f5 100644 --- a/dist/js/push.min.js.map +++ b/dist/js/push.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap be7300159d0f92229610","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAA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arF,SAASsF,cAAe,OAC3CD,GAAW1E,UAAUC,IAAK,qBAE1Bb,EAAQoD,YAAakC,GACrBtF,EAAQY,UAAY,mBAEpBiB,EAAwBuB,YAAapD,GAErC+B,QAOF,EAAAxC,EAAAF,SAAQsB,GAAyB2C,GAAI,QAAS,qBAAsB,SAAEmB,GACrEA,EAAMI,cAAcI,WAAWA,WAAWC,YAAaT,EAAMI,cAAcI,WAC3E,IAAMH,GAAOL,EAAMI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgB7D,EAAAJ,QAAEmG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,mBAGDnC,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be7300159d0f92229610","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 2 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAA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KA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file From 9376861a4bb4ad29188b6a65d355d2753c058dc6 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 19 Apr 2018 08:18:09 -0400 Subject: [PATCH 04/18] localize the syndication time --- includes/syndicated-post-ui.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/syndicated-post-ui.php b/includes/syndicated-post-ui.php index cb9f698d3..c8dae0361 100644 --- a/includes/syndicated-post-ui.php +++ b/includes/syndicated-post-ui.php @@ -470,6 +470,7 @@ function enqueue_gutenberg_edit_scripts() { $post_type_object = get_post_type_object( $post->post_type ); $post_url = get_post_meta( $post->ID, 'dt_original_post_url', true ); $original_site_name = get_post_meta( $post->ID, 'dt_original_site_name', true ); + $syndication_time = get_post_meta( $post->ID, 'dt_syndicate_time', true ); if ( ! empty( $original_blog_id ) ) { switch_to_blog( $original_blog_id ); @@ -496,6 +497,7 @@ function enqueue_gutenberg_edit_scripts() { 'postTypeSingular' => sanitize_text_field( $post_type_singular ), 'postUrl' => sanitize_text_field( $post_url ), 'originalSiteName' => sanitize_text_field( $original_site_name ), + 'syndicationTime' => esc_html( date( 'M j, Y @ h:i', ( $syndication_time + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) ) ), 'originalLocationName' => sanitize_text_field( $original_location_name ), 'unlinkNonceUrl' => wp_nonce_url( add_query_arg( 'action', 'unlink', admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ), "unlink-post_{$post->ID}" ), 'linkNonceUrl' => wp_nonce_url( add_query_arg( 'action', 'link', admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ), "link-post_{$post->ID}" ), From ae4f012db9401c2a5401eb56f2df73e36c12fc67 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 19 Apr 2018 08:18:47 -0400 Subject: [PATCH 05/18] enable the plugin selector panel for syndicated posts --- assets/css/gutenberg-syndicated-post.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/gutenberg-syndicated-post.css b/assets/css/gutenberg-syndicated-post.css index f44d7a964..176f83f15 100644 --- a/assets/css/gutenberg-syndicated-post.css +++ b/assets/css/gutenberg-syndicated-post.css @@ -35,7 +35,8 @@ body.dt-linked-post { & .components-panel__body-toggle, & .edit-post-post-visibility__toggle, & .editor-post-trash, - & .edit-post-post-schedule__toggle { + & .edit-post-post-schedule__toggle, + & .components-menu-item__button { opacity: 1; pointer-events: auto; cursor: pointer; From 6b5612e26442da74903d2a9ecb00897817de7a3c Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 19 Apr 2018 08:20:08 -0400 Subject: [PATCH 06/18] Add the distributor details sidebar --- assets/js/gutenberg-sidebar.js | 27 ++++++++++++++++++++++++++ assets/js/gutenberg-syndicated-post.js | 8 +++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 assets/js/gutenberg-sidebar.js diff --git a/assets/js/gutenberg-sidebar.js b/assets/js/gutenberg-sidebar.js new file mode 100644 index 000000000..ecb79b589 --- /dev/null +++ b/assets/js/gutenberg-sidebar.js @@ -0,0 +1,27 @@ +import { wp, dtGutenberg } from 'window' +const { Button, PanelBody } = wp.components +const { dispatch } = wp.data +const { Fragment } = wp.element +const { __ } = wp.i18n +const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost + +export const DistributorSidebar = () => { + + return ( + + + +

{ __( 'Distributed on: ' ) + dtGutenberg.syndicationTime }

+
+
+ + { __( 'Distributor Details' ) } + +
+ ) +} diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index f20d6a3bf..8d8cfade0 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -1,10 +1,13 @@ import { wp, dtGutenberg } from 'window' +import { DistributorSidebar } from './gutenberg-sidebar.js' +const { registerPlugin } = wp.plugins + wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) const messages = [] -if ( !! parseInt( dtGutenberg.originalDeleted ) ) { +if ( parseInt( dtGutenberg.originalDeleted ) ) { messages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) ) messages.push( wp.element.createElement( 'a', { href: dtGutenberg.postUrl @@ -13,6 +16,9 @@ if ( !! parseInt( dtGutenberg.originalDeleted ) ) { ] ) ) messages.push( wp.i18n.__( '. However, the original has been deleted.' ) ) } else if ( ! parseInt( dtGutenberg.unlinked ) ) { + registerPlugin( 'distributor-sidebar', { + render: DistributorSidebar, + } ) messages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) ) messages.push( wp.element.createElement( 'a', { From a93c6e26f038cc45a450f1710f30c5fdf29d9662 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 19 Apr 2018 09:03:22 -0400 Subject: [PATCH 07/18] Add syndicationCount and syndicated to sidebar --- ... => gutenberg-distributed-from-sidebar.js} | 9 +- assets/js/gutenberg-distributed-to-sidebar.js | 33 ++++++ assets/js/gutenberg-syndicated-post.js | 112 ++++++++++-------- includes/syndicated-post-ui.php | 12 +- 4 files changed, 108 insertions(+), 58 deletions(-) rename assets/js/{gutenberg-sidebar.js => gutenberg-distributed-from-sidebar.js} (77%) create mode 100644 assets/js/gutenberg-distributed-to-sidebar.js diff --git a/assets/js/gutenberg-sidebar.js b/assets/js/gutenberg-distributed-from-sidebar.js similarity index 77% rename from assets/js/gutenberg-sidebar.js rename to assets/js/gutenberg-distributed-from-sidebar.js index ecb79b589..712fb75ed 100644 --- a/assets/js/gutenberg-sidebar.js +++ b/assets/js/gutenberg-distributed-from-sidebar.js @@ -3,9 +3,9 @@ const { Button, PanelBody } = wp.components const { dispatch } = wp.data const { Fragment } = wp.element const { __ } = wp.i18n -const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost +const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost; -export const DistributorSidebar = () => { +export const DistributedFromSidebar = () => { return ( @@ -14,7 +14,10 @@ export const DistributorSidebar = () => { title="Distributor Details" > -

{ __( 'Distributed on: ' ) + dtGutenberg.syndicationTime }

+

+ { __( 'Distributed on: ' ) } + { dtGutenberg.syndicationTime } +

{ + + return ( + + + +

+ { wp.i18n.sprintf( + wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), + dtGutenberg.syndicationCount, + '1' === dtGutenberg.syndicationCount ? '' : 's' + ) } +

+
+
+ + { __( 'Distributor Details' ) } + +
+ ) +} diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index 8d8cfade0..006e460bd 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -1,67 +1,77 @@ import { wp, dtGutenberg } from 'window' -import { DistributorSidebar } from './gutenberg-sidebar.js' +import { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js' +import { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js' const { registerPlugin } = wp.plugins - wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) -const messages = [] - -if ( parseInt( dtGutenberg.originalDeleted ) ) { - messages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) ) - messages.push( wp.element.createElement( 'a', { - href: dtGutenberg.postUrl - }, [ - dtGutenberg.originalLocationName - ] ) ) - messages.push( wp.i18n.__( '. However, the original has been deleted.' ) ) -} else if ( ! parseInt( dtGutenberg.unlinked ) ) { - registerPlugin( 'distributor-sidebar', { - render: DistributorSidebar, +console.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount ); +if ( dtGutenberg.syndicationCount > 0 ) { + registerPlugin( 'distributor-sidebar', { + render: DistributedToSidebar, } ) - messages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) ) +} - messages.push( wp.element.createElement( 'a', { - href: dtGutenberg.postUrl - }, [ - dtGutenberg.originalLocationName - ] ) ) +if ( '0' !== dtGutenberg.originalSourceId ) { - messages.push( '.' ) + const messages = [] + + if ( parseInt( dtGutenberg.originalDeleted ) ) { + messages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) ) + messages.push( wp.element.createElement( 'a', { + href: dtGutenberg.postUrl + }, [ + dtGutenberg.originalLocationName + ] ) ) + messages.push( wp.i18n.__( '. However, the original has been deleted.' ) ) + } else if ( ! parseInt( dtGutenberg.unlinked ) ) { + registerPlugin( 'distributor-sidebar', { + render: DistributedFromSidebar, + } ) + messages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) ) - messages.push( wp.element.createElement( 'span', {}, [ - wp.i18n.sprintf( wp.i18n.__( " The original %1$s will update this version unless you ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), - wp.element.createElement( 'a', { - href: dtGutenberg.unlinkNonceUrl + messages.push( wp.element.createElement( 'a', { + href: dtGutenberg.postUrl }, [ - wp.i18n.__( 'unlink from the original.', 'distributor' ) - ] ) - ] ) ) -} else { - messages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) ) + dtGutenberg.originalLocationName + ] ) ) - messages.push( wp.element.createElement( 'a', { - href: dtGutenberg.postUrl - }, [ - dtGutenberg.originalLocationName - ] ) ) + messages.push( '.' ) - messages.push( '.' ) + messages.push( wp.element.createElement( 'span', {}, [ + wp.i18n.sprintf( wp.i18n.__( " The original %1$s will update this version unless you ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), + wp.element.createElement( 'a', { + href: dtGutenberg.unlinkNonceUrl + }, [ + wp.i18n.__( 'unlink from the original.', 'distributor' ) + ] ) + ] ) ) + } else { + messages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) ) - messages.push( wp.element.createElement( 'span', {}, [ - wp.i18n.sprintf( wp.i18n.__( " This %1$s has been unlinked from the original. However, you can always ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), - wp.element.createElement( 'a', { - href: dtGutenberg.linkNonceUrl + messages.push( wp.element.createElement( 'a', { + href: dtGutenberg.postUrl }, [ - wp.i18n.__( 'restore it.', 'distributor' ) - ] ) - ] ) ) -} + dtGutenberg.originalLocationName + ] ) ) + + messages.push( '.' ) + + messages.push( wp.element.createElement( 'span', {}, [ + wp.i18n.sprintf( wp.i18n.__( " This %1$s has been unlinked from the original. However, you can always ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), + wp.element.createElement( 'a', { + href: dtGutenberg.linkNonceUrl + }, [ + wp.i18n.__( 'restore it.', 'distributor' ) + ] ) + ] ) ) + } -const messageElement = wp.element.createElement( 'p', { - className: 'dt-message-wrapper' -}, messages ) + const messageElement = wp.element.createElement( 'p', { + className: 'dt-message-wrapper' + }, messages ) -wp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, { - isDismissible: false -} ) + wp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, { + isDismissible: false + } ) +} diff --git a/includes/syndicated-post-ui.php b/includes/syndicated-post-ui.php index c8dae0361..b11611878 100644 --- a/includes/syndicated-post-ui.php +++ b/includes/syndicated-post-ui.php @@ -461,16 +461,19 @@ function enqueue_gutenberg_edit_scripts() { $original_post_id = get_post_meta( $post->ID, 'dt_original_post_id', true ); $original_source_id = get_post_meta( $post->ID, 'dt_original_source_id', true ); - if ( empty( $original_post_id ) || ( empty( $original_blog_id ) && empty( $original_source_id ) ) ) { - return; - } - $original_deleted = get_post_meta( $post->ID, 'dt_original_post_deleted', true ); $unlinked = get_post_meta( $post->ID, 'dt_unlinked', true ); $post_type_object = get_post_type_object( $post->post_type ); $post_url = get_post_meta( $post->ID, 'dt_original_post_url', true ); $original_site_name = get_post_meta( $post->ID, 'dt_original_site_name', true ); $syndication_time = get_post_meta( $post->ID, 'dt_syndicate_time', true ); + $connection_map = get_post_meta( $post->ID, 'dt_connection_map', true ); + + if ( empty( $connection_map ) ) { + $total_connections = 0; + } else { + $total_connections = count( $connection_map['internal'] ) + count( $connection_map['external'] ); + } if ( ! empty( $original_blog_id ) ) { switch_to_blog( $original_blog_id ); @@ -498,6 +501,7 @@ function enqueue_gutenberg_edit_scripts() { 'postUrl' => sanitize_text_field( $post_url ), 'originalSiteName' => sanitize_text_field( $original_site_name ), 'syndicationTime' => esc_html( date( 'M j, Y @ h:i', ( $syndication_time + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) ) ), + 'syndicationCount' => $total_connections, 'originalLocationName' => sanitize_text_field( $original_location_name ), 'unlinkNonceUrl' => wp_nonce_url( add_query_arg( 'action', 'unlink', admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ), "unlink-post_{$post->ID}" ), 'linkNonceUrl' => wp_nonce_url( add_query_arg( 'action', 'link', admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ), "link-post_{$post->ID}" ), From 8fe3da1e3f61ef28e13d01d0492b0902a4b4e101 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Thu, 19 Apr 2018 22:10:46 -0400 Subject: [PATCH 08/18] Adding registerPlugin to inject the Distributor details in to the Status and Availability panel. Relies on https://github.com/WordPress/gutenberg/pull/6300 --- assets/js/gutenberg-status-plugin.js | 37 + assets/js/gutenberg-syndicated-post.js | 9 +- dist/css/gutenberg-syndicated-post.min.css | 2 +- .../css/gutenberg-syndicated-post.min.css.map | 2 +- dist/js/admin-distributed-post.min.js | 2 +- dist/js/admin-distributed-post.min.js.map | 2 +- dist/js/admin-external-connection.min.js | 2 +- dist/js/admin-external-connection.min.js.map | 2 +- dist/js/admin-pull.min.js | 2 +- dist/js/admin-pull.min.js.map | 2 +- dist/js/gutenberg-status-plugin.min.js | 2 + dist/js/gutenberg-status-plugin.min.js.map | 1 + dist/js/gutenberg-syndicated-plugin.min.js | 2 + .../js/gutenberg-syndicated-plugin.min.js.map | 1 + dist/js/gutenberg-syndicated-post.min.js | 2 +- dist/js/gutenberg-syndicated-post.min.js.map | 2 +- dist/js/push.min.js | 2 +- dist/js/push.min.js.map | 2 +- includes/syndicated-post-ui.php | 3 +- package-lock.json | 12029 +++++++++++++--- package.json | 6 +- webpack.config.babel.js | 1 + 22 files changed, 9848 insertions(+), 2267 deletions(-) create mode 100644 assets/js/gutenberg-status-plugin.js create mode 100644 dist/js/gutenberg-status-plugin.min.js create mode 100644 dist/js/gutenberg-status-plugin.min.js.map create mode 100644 dist/js/gutenberg-syndicated-plugin.min.js create mode 100644 dist/js/gutenberg-syndicated-plugin.min.js.map diff --git a/assets/js/gutenberg-status-plugin.js b/assets/js/gutenberg-status-plugin.js new file mode 100644 index 000000000..e26887f16 --- /dev/null +++ b/assets/js/gutenberg-status-plugin.js @@ -0,0 +1,37 @@ +import { wp, dtGutenberg } from 'window' + +const { registerPlugin } = wp.plugins; +const { PluginPostStatusVisibility } = wp.editPost; +const { __ } = wp.i18n; +const { PanelRow } = wp.components; + +const renderDistributedFrom = () => { + return( + +

+ { __( 'Distributed on: ' ) } + { dtGutenberg.syndicationTime } +

+
+ ) +} + +const renderDistributedTo = () => { + return( + + +

+ { wp.i18n.sprintf( + wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), + dtGutenberg.syndicationCount, + '1' === dtGutenberg.syndicationCount ? '' : 's' + ) } +

+
+
+ ) +} + +const renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom + +registerPlugin( 'distributor-status-panel', { render: renderFunction } ); \ No newline at end of file diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index 006e460bd..eac6c8ac1 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -1,15 +1,16 @@ import { wp, dtGutenberg } from 'window' import { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js' import { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js' -const { registerPlugin } = wp.plugins +const { registerPlugin } = wp.plugins; -wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) +wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) console.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount ); if ( dtGutenberg.syndicationCount > 0 ) { registerPlugin( 'distributor-sidebar', { - render: DistributedToSidebar, - } ) + render: DistributedToSidebar, + } ) + } if ( '0' !== dtGutenberg.originalSourceId ) { diff --git a/dist/css/gutenberg-syndicated-post.min.css b/dist/css/gutenberg-syndicated-post.min.css index 5fb407211..36740c038 100644 --- a/dist/css/gutenberg-syndicated-post.min.css +++ b/dist/css/gutenberg-syndicated-post.min.css @@ -1,2 +1,2 @@ -body.dt-linked-post .button,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post select,body.dt-linked-post textarea{opacity:.5;pointer-events:none;cursor:default}body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{opacity:1;pointer-events:auto;cursor:pointer}body.dt-linked-post #post-sticky-toggle-0{pointer-events:auto;cursor:pointer}body.dt-linked-post .edit-post-last-revision__panel{display:none} +body.dt-linked-post .button,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post select,body.dt-linked-post textarea{opacity:.5;pointer-events:none;cursor:default}body.dt-linked-post .components-menu-item__button,body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{opacity:1;pointer-events:auto;cursor:pointer}body.dt-linked-post #post-sticky-toggle-0{pointer-events:auto;cursor:pointer}body.dt-linked-post .edit-post-last-revision__panel{display:none} /*# sourceMappingURL=gutenberg-syndicated-post.min.css.map */ diff --git a/dist/css/gutenberg-syndicated-post.min.css.map b/dist/css/gutenberg-syndicated-post.min.css.map index 75af817ef..80205c324 100644 --- a/dist/css/gutenberg-syndicated-post.min.css.map +++ b/dist/css/gutenberg-syndicated-post.min.css.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["gutenberg-syndicated-post.min.css"],"sourcesContent":["body.dt-linked-post .button,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post select,body.dt-linked-post textarea{opacity:.5;pointer-events:none;cursor:default}body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{opacity:1;pointer-events:auto;cursor:pointer}body.dt-linked-post #post-sticky-toggle-0{pointer-events:auto;cursor:pointer}body.dt-linked-post .edit-post-last-revision__panel{display:none}"],"file":"gutenberg-syndicated-post.min.css"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["gutenberg-syndicated-post.min.css"],"sourcesContent":["body.dt-linked-post .button,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post select,body.dt-linked-post textarea{opacity:.5;pointer-events:none;cursor:default}body.dt-linked-post .components-menu-item__button,body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{opacity:1;pointer-events:auto;cursor:pointer}body.dt-linked-post #post-sticky-toggle-0{pointer-events:auto;cursor:pointer}body.dt-linked-post .edit-post-last-revision__panel{display:none}"],"file":"gutenberg-syndicated-post.min.css"} \ No newline at end of file diff --git a/dist/js/admin-distributed-post.min.js b/dist/js/admin-distributed-post.min.js index 3be0aaddb..8655f2338 100644 --- a/dist/js/admin-distributed-post.min.js +++ b/dist/js/admin-distributed-post.min.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}({0:function(e,t){e.exports=jQuery},5:function(e,t,n){"use strict";for(var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),u=document.querySelectorAll(".open-distributor-help"),c=document.getElementById("contextual-help-link"),l=document.querySelector("#tab-link-distributer a"),i=0;i {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js b/dist/js/admin-external-connection.min.js index 40a1b296f..b84402f8a 100644 --- a/dist/js/admin-external-connection.min.js +++ b/dist/js/admin-external-connection.min.js @@ -1,2 +1,2 @@ -!function(e){function t(a){if(n[a])return n[a].exports;var d=n[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,t),d.l=!0,d.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},function(e,t){e.exports=_},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function d(){if(!1!==b&&b.abort(),""===c.value)return v.innerText="",h.innerText="",void h.removeAttribute("data-endpoint-state");h.setAttribute("data-endpoint-state","loading"),h.innerText=l.dt.endpoint_checking_message,v.innerText="";var e={};i.default.each(m,function(t){if(!t.disabled){var n=t.getAttribute("data-auth-field");n&&(e[n]=t.value)}});var t=0;_&&_.value&&(t=_.value),b=r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_verify_external_connection",auth:e,url:c.value,type:f.value,endpoint_id:t}}).done(function(e){if(e.success)if(e.data.errors.no_external_connection)if(h.setAttribute("data-endpoint-state","error"),e.data.endpoint_suggestion){h.innerText=l.dt.endpoint_suggestion+" ";var t=document.createElement("a");t.classList.add("suggest"),t.innerText=e.data.endpoint_suggestion,h.appendChild(t)}else h.innerText=l.dt.bad_connection;else if(e.data.errors.no_distributor||!e.data.can_post.length){h.setAttribute("data-endpoint-state","warning"),h.innerText=l.dt.limited_connection;var n=[];e.data.errors.no_distributor?h.innerText+=" "+l.dt.no_distributor:h.innerText+=" "+l.dt.bad_auth,n.push(l.dt.no_push),n.push(l.dt.pull_limited),n.forEach(function(e){var t=document.createElement("li");t.innerText=e,v.append(t)})}else h.setAttribute("data-endpoint-state","valid"),h.innerText=l.dt.good_connection;else h.setAttribute("data-endpoint-state","error")}).complete(function(){h.classList.remove("loading")})}var o=n(0),r=a(o),u=n(2),i=a(u),l=n(1),c=document.getElementsByClassName("external-connection-url-field")[0],s=document.getElementById("dt_external_connection_details"),f=document.getElementsByClassName("external-connection-type-field")[0],m=document.getElementsByClassName("auth-field"),p=document.getElementsByClassName("dt-roles-allowed"),g=document.getElementById("title"),h=document.querySelector(".endpoint-result"),v=document.querySelector(".endpoint-errors"),_=document.getElementById("post_ID"),b=!1;setTimeout(function(){d()},300),(0,r.default)(s).on("click",".suggest",function(e){c.value=e.currentTarget.innerText,(0,r.default)(c).trigger("input")}),(0,r.default)(s).on("keyup input",".auth-field, .external-connection-url-field",i.default.debounce(d,250)),(0,r.default)(c).on("blur",function(e){""===g.value&&""!==e.currentTarget.value&&(g.value=e.currentTarget.value.replace(/https?:\/\//i,""),g.focus(),g.blur())});var x=document.getElementById("dt_password"),y=document.getElementById("dt_username"),E=document.querySelector(".change-password");(0,r.default)(y).on("keyup change",i.default.debounce(function(){E&&(x.disabled=!1,x.value="",E.style.display="none")},250)),(0,r.default)(E).on("click",function(e){e.preventDefault(),x.disabled?(x.disabled=!1,x.value="",e.currentTarget.innerText=l.dt.cancel):(x.disabled=!0,x.value="sdfdsfsdfdsfdsfsd",e.currentTarget.innerText=l.dt.change),d()}),(0,r.default)(p).on("click",".dt-role-checkbox",function(e){e.target.classList.contains("dt-role-checkbox")&&e.target.checked&&"administrator"!==e.target.value&&"editor"!==e.target.value&&alert(l.dt.roles_warning)});var T=(0,r.default)(".hide-until-authed"),B=(0,r.default)(".auth-credentials"),w=(0,r.default)(document.getElementById("dt_client_secret")),I=(0,r.default)(document.getElementById("dt_client_id")),k=function(){0===document.getElementsByClassName("oauth-connection-established").length&&T.hide()},C=function(e,t){return""===e.val()?(t.preventDefault(),e.addClass("error-required"),!1):(e.removeClass("error-required"),!0)};(0,r.default)(f).on("change",function(){var e=f.value;B.hide(),(0,r.default)(".auth-credentials."+e).show(),"wpdotcom"===e?k():T.show()}),"wpdotcom"===f.value&&k();var A=document.getElementById("create-oauth-connection");A&&(0,r.default)(A).on("click",function(e){var t=C(w,e),n=C(I,e);if(!t||!n)return e.preventDefault(),!1});var j=document.getElementById("oauth-authentication-change-credentials"),q=(0,r.default)(".oauth-authentication-details-wrapper");j&&(0,r.default)(j).on("click",function(){q.show(),w.val(""),(0,r.default)(".oauth-connection-established").remove(),k()});var D=document.getElementById("begin-authorization");D&&(0,r.default)(D).on("click",function(e){var t=(0,r.default)(g),n=t.val();C(t,e)&&((0,r.default)(D).addClass("disabled"),t.removeClass("error-required"),r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_begin_authorization",title:n,id:(0,r.default)(document.getElementById("post_ID")).val()}}).done(function(e){if(e.success&&e.data.id){var t=l.dt.admin_url+"post.php?post="+e.data.id+"&action=edit";history.pushState({},"Oauth Authorize Details",t),(0,r.default)(document.getElementById("dt_redirect_uri")).val(t),(0,r.default)(document.getElementById("dt_created_post_id")).val(e.data.id),(0,r.default)(document.getElementById("original_post_status")).val("publish"),(0,r.default)(".oauth-begin-authentication-wrapper").hide(),q.show()}}).complete(function(){(0,r.default)(D).removeClass("disabled")}))})}]); +!function(e){function t(a){if(n[a])return n[a].exports;var d=n[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,t),d.l=!0,d.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=window},function(e,t){e.exports=jQuery},function(e,t){e.exports=_},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function d(){if(!1!==b&&b.abort(),""===c.value)return v.innerText="",h.innerText="",void h.removeAttribute("data-endpoint-state");h.setAttribute("data-endpoint-state","loading"),h.innerText=l.dt.endpoint_checking_message,v.innerText="";var e={};i.default.each(m,function(t){if(!t.disabled){var n=t.getAttribute("data-auth-field");n&&(e[n]=t.value)}});var t=0;_&&_.value&&(t=_.value),b=r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_verify_external_connection",auth:e,url:c.value,type:f.value,endpoint_id:t}}).done(function(e){if(e.success)if(e.data.errors.no_external_connection)if(h.setAttribute("data-endpoint-state","error"),e.data.endpoint_suggestion){h.innerText=l.dt.endpoint_suggestion+" ";var t=document.createElement("a");t.classList.add("suggest"),t.innerText=e.data.endpoint_suggestion,h.appendChild(t)}else h.innerText=l.dt.bad_connection;else if(e.data.errors.no_distributor||!e.data.can_post.length){h.setAttribute("data-endpoint-state","warning"),h.innerText=l.dt.limited_connection;var n=[];e.data.errors.no_distributor?h.innerText+=" "+l.dt.no_distributor:h.innerText+=" "+l.dt.bad_auth,n.push(l.dt.no_push),n.push(l.dt.pull_limited),n.forEach(function(e){var t=document.createElement("li");t.innerText=e,v.append(t)})}else h.setAttribute("data-endpoint-state","valid"),h.innerText=l.dt.good_connection;else h.setAttribute("data-endpoint-state","error")}).complete(function(){h.classList.remove("loading")})}var o=n(1),r=a(o),u=n(2),i=a(u),l=n(0),c=document.getElementsByClassName("external-connection-url-field")[0],s=document.getElementById("dt_external_connection_details"),f=document.getElementsByClassName("external-connection-type-field")[0],m=document.getElementsByClassName("auth-field"),p=document.getElementsByClassName("dt-roles-allowed"),g=document.getElementById("title"),h=document.querySelector(".endpoint-result"),v=document.querySelector(".endpoint-errors"),_=document.getElementById("post_ID"),b=!1;setTimeout(function(){d()},300),(0,r.default)(s).on("click",".suggest",function(e){c.value=e.currentTarget.innerText,(0,r.default)(c).trigger("input")}),(0,r.default)(s).on("keyup input",".auth-field, .external-connection-url-field",i.default.debounce(d,250)),(0,r.default)(c).on("blur",function(e){""===g.value&&""!==e.currentTarget.value&&(g.value=e.currentTarget.value.replace(/https?:\/\//i,""),g.focus(),g.blur())});var x=document.getElementById("dt_password"),y=document.getElementById("dt_username"),E=document.querySelector(".change-password");(0,r.default)(y).on("keyup change",i.default.debounce(function(){E&&(x.disabled=!1,x.value="",E.style.display="none")},250)),(0,r.default)(E).on("click",function(e){e.preventDefault(),x.disabled?(x.disabled=!1,x.value="",e.currentTarget.innerText=l.dt.cancel):(x.disabled=!0,x.value="sdfdsfsdfdsfdsfsd",e.currentTarget.innerText=l.dt.change),d()}),(0,r.default)(p).on("click",".dt-role-checkbox",function(e){e.target.classList.contains("dt-role-checkbox")&&e.target.checked&&"administrator"!==e.target.value&&"editor"!==e.target.value&&alert(l.dt.roles_warning)});var T=(0,r.default)(".hide-until-authed"),B=(0,r.default)(".auth-credentials"),w=(0,r.default)(document.getElementById("dt_client_secret")),I=(0,r.default)(document.getElementById("dt_client_id")),k=function(){0===document.getElementsByClassName("oauth-connection-established").length&&T.hide()},C=function(e,t){return""===e.val()?(t.preventDefault(),e.addClass("error-required"),!1):(e.removeClass("error-required"),!0)};(0,r.default)(f).on("change",function(){var e=f.value;B.hide(),(0,r.default)(".auth-credentials."+e).show(),"wpdotcom"===e?k():T.show()}),"wpdotcom"===f.value&&k();var A=document.getElementById("create-oauth-connection");A&&(0,r.default)(A).on("click",function(e){var t=C(w,e),n=C(I,e);if(!t||!n)return e.preventDefault(),!1});var j=document.getElementById("oauth-authentication-change-credentials"),q=(0,r.default)(".oauth-authentication-details-wrapper");j&&(0,r.default)(j).on("click",function(){q.show(),w.val(""),(0,r.default)(".oauth-connection-established").remove(),k()});var D=document.getElementById("begin-authorization");D&&(0,r.default)(D).on("click",function(e){var t=(0,r.default)(g),n=t.val();C(t,e)&&((0,r.default)(D).addClass("disabled"),t.removeClass("error-required"),r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_begin_authorization",title:n,id:(0,r.default)(document.getElementById("post_ID")).val()}}).done(function(e){if(e.success&&e.data.id){var t=l.dt.admin_url+"post.php?post="+e.data.id+"&action=edit";history.pushState({},"Oauth Authorize Details",t),(0,r.default)(document.getElementById("dt_redirect_uri")).val(t),(0,r.default)(document.getElementById("dt_created_post_id")).val(e.data.id),(0,r.default)(document.getElementById("original_post_status")).val("publish"),(0,r.default)(".oauth-begin-authentication-wrapper").hide(),q.show()}}).complete(function(){(0,r.default)(D).removeClass("disabled")}))})}]); //# sourceMappingURL=admin-external-connection.min.js.map \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js.map b/dist/js/admin-external-connection.min.js.map index d2206b158..35239be04 100644 --- a/dist/js/admin-external-connection.min.js.map +++ b/dist/js/admin-external-connection.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,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ache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFyEM,SAAUvB,EAAQD,GGzExBC,EAAAD,QAAAyB,QH+EM,SAAUxB,EAAQD,GI/ExBC,EAAAD,QAAA0B,GJqFM,SAAUzB,EAAQD,EAASH,GAEjC,YAaA,SAAS8B,GAAuBC,GAAO,MAAOA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,SAEjDnE,KAAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKsF,GAAK,CAG3C,GAAMxF,GAAMf,EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-pull.min.js b/dist/js/admin-pull.min.js index ed4fd6da9..16892e62b 100644 --- a/dist/js/admin-pull.min.js +++ b/dist/js/admin-pull.min.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e){t.exports=jQuery},,,,function(t,e,n){"use strict";var r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r),u=document.getElementById("pull_connections");(0,o.default)(u).on("change",function(t){document.location=t.currentTarget.options[t.currentTarget.selectedIndex].getAttribute("data-pull-url")})}]); +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([,function(t,e){t.exports=jQuery},,,function(t,e,n){"use strict";var r=n(1),o=function(t){return t&&t.__esModule?t:{default:t}}(r),u=document.getElementById("pull_connections");(0,o.default)(u).on("change",function(t){document.location=t.currentTarget.options[t.currentTarget.selectedIndex].getAttribute("data-pull-url")})}]); //# sourceMappingURL=admin-pull.min.js.map \ No newline at end of file diff --git a/dist/js/admin-pull.min.js.map b/dist/js/admin-pull.min.js.map index 672059717..f28f0ad00 100644 --- a/dist/js/admin-pull.min.js.map +++ b/dist/js/admin-pull.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,CACA,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDKO,CAED,SAAUtB,EAAQD,GEpExBC,EAAAD,QAAAwB,QFyEO,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-status-plugin.min.js b/dist/js/gutenberg-status-plugin.min.js new file mode 100644 index 000000000..9ed013c60 --- /dev/null +++ b/dist/js/gutenberg-status-plugin.min.js @@ -0,0 +1,2 @@ +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}({0:function(t,e){t.exports=window},10:function(t,e,n){"use strict";var r=n(0),i=r.wp.plugins.registerPlugin,u=r.wp.editPost.PluginPostStatusVisibility,o=r.wp.i18n.__,l=r.wp.components.PanelRow,c=function(){return React.createElement(u.Fill,null,React.createElement("p",null,o("Distributed on: "),React.createElement("strong",null," ",r.dtGutenberg.syndicationTime," ")))},s=function(){return React.createElement(l,null,React.createElement(u.Fill,null,React.createElement("p",null,r.wp.i18n.sprintf(r.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),r.dtGutenberg.syndicationCount,"1"===r.dtGutenberg.syndicationCount?"":"s"))))};i("distributor-status-panel",{render:r.dtGutenberg.syndicationCount>0?s:c})}}); +//# sourceMappingURL=gutenberg-status-plugin.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-status-plugin.min.js.map b/dist/js/gutenberg-status-plugin.min.js.map new file mode 100644 index 000000000..8c40ff8d6 --- /dev/null +++ b/dist/js/gutenberg-status-plugin.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///gutenberg-status-plugin.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-status-plugin.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","window","10","_window","registerPlugin","wp","plugins","PluginPostStatusVisibility","editPost","__","i18n","PanelRow","components","renderDistributedFrom","React","createElement","Fill","dtGutenberg","syndicationTime","renderDistributedTo","sprintf","syndicationCount","render"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,GACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GAEQ+B,EAAmBD,EAAAE,GAAGC,QAAtBF,eACAG,EAA+BJ,EAAAE,GAAGG,SAAlCD,2BACAE,EAAON,EAAAE,GAAGK,KAAVD,GACAE,EAAcR,EAAAE,GAAGO,WAAjBD,SAEFE,EAAwB,WAC7B,MACCC,OAAAC,cAACR,EAA2BS,KAA5B,KACEF,MAAAC,cAAA,SACGN,EAAI,oBACNK,MAAAC,cAAA,kBAAWZ,EAAAc,YAAYC,gBAAvB,QAMCC,EAAsB,WAC3B,MACCL,OAAAC,cAACJ,EAAD,KACCG,MAAAC,cAACR,EAA2BS,KAA5B,KACEF,MAAAC,cAAA,SACEZ,EAAAE,GAAGK,KAAKU,QACTjB,EAAAE,GAAGK,KAAKD,GAAI,sCAAuC,eACnDN,EAAAc,YAAYI,iBACZ,MAAQlB,EAAAc,YAAYI,iBAAmB,GAAK,QAUlDjB,GAAgB,4BAA8BkB,OAFrBnB,EAAAc,YAAYI,iBAAmB,EAAOF,EAAsBN","file":"gutenberg-status-plugin.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 10);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\nvar PluginPostStatusVisibility = _window.wp.editPost.PluginPostStatusVisibility;\nvar __ = _window.wp.i18n.__;\nvar PanelRow = _window.wp.components.PanelRow;\n\n\nvar renderDistributedFrom = function renderDistributedFrom() {\n\treturn React.createElement(\n\t\tPluginPostStatusVisibility.Fill,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t__('Distributed on: '),\n\t\t\tReact.createElement(\n\t\t\t\t'strong',\n\t\t\t\tnull,\n\t\t\t\t' ',\n\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderDistributedTo = function renderDistributedTo() {\n\treturn React.createElement(\n\t\tPanelRow,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginPostStatusVisibility.Fill,\n\t\t\tnull,\n\t\t\tReact.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderFunction = _window.dtGutenberg.syndicationCount > 0 ? renderDistributedTo : renderDistributedFrom;\n\nregisterPlugin('distributor-status-panel', { render: renderFunction });\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-status-plugin.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\n\nconst { registerPlugin } = wp.plugins;\nconst { PluginPostStatusVisibility } = wp.editPost;\nconst { __ } = wp.i18n;\nconst { PanelRow } = wp.components;\n\nconst renderDistributedFrom = () => {\n\treturn(\n\t\t\n\t\t\t\t

\n\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t

\n\t\t
\n\t)\n}\n\nconst renderDistributedTo = () => {\n\treturn(\n\t\t\n\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t\t) }\n\t\t\t\t\t

\n\t\t\t
\n\t\t
\n\t)\n}\n\nconst renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom\n\nregisterPlugin( 'distributor-status-panel', { render: renderFunction } );\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-status-plugin.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-plugin.min.js b/dist/js/gutenberg-syndicated-plugin.min.js new file mode 100644 index 000000000..b1cec4020 --- /dev/null +++ b/dist/js/gutenberg-syndicated-plugin.min.js @@ -0,0 +1,2 @@ +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}({0:function(t,e){t.exports=window},10:function(t,e,n){"use strict";var r=n(0),i=r.wp.plugins.registerPlugin,u=r.wp.editPost.__experimental.PluginPostStatusVisibilityPanel,o=r.wp.i18n.__;i("distributor-status-panel",{render:function(){return React.createElement(u.Fill,null,React.createElement("p",null,o("Distributed on: "),React.createElement("strong",null," ",r.dtGutenberg.syndicationTime," ")))}})}}); +//# sourceMappingURL=gutenberg-syndicated-plugin.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-plugin.min.js.map b/dist/js/gutenberg-syndicated-plugin.min.js.map new file mode 100644 index 000000000..55c98d555 --- /dev/null +++ b/dist/js/gutenberg-syndicated-plugin.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///gutenberg-syndicated-plugin.min.js","webpack:///webpack/bootstrap caa5895237fe8a63d996","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-status-plugin.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","window","10","_window","registerPlugin","wp","plugins","PluginPostStatusVisibilityPanel","editPost","__experimental","__","i18n","render","React","createElement","Fill","dtGutenberg","syndicationTime"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,GACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GACQ+B,EAAmBD,EAAAE,GAAGC,QAAtBF,eACAG,EAAoCJ,EAAAE,GAAGG,SAASC,eAAhDF,gCACAG,EAAOP,EAAAE,GAAGM,KAAVD,EAaRN,GAAgB,4BAA8BQ,OAXf,WAC9B,MACCC,OAAAC,cAACP,EAAgCQ,KAAjC,KACCF,MAAAC,cAAA,SACGJ,EAAI,oBACNG,MAAAC,cAAA,kBAAWX,EAAAa,YAAYC,gBAAvB","file":"gutenberg-syndicated-plugin.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 10);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\nvar PluginPostStatusVisibilityPanel = _window.wp.editPost.__experimental.PluginPostStatusVisibilityPanel;\nvar __ = _window.wp.i18n.__;\n\n\nvar renderDistributedPanel = function renderDistributedPanel() {\n\treturn React.createElement(\n\t\tPluginPostStatusVisibilityPanel.Fill,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t__('Distributed on: '),\n\t\t\tReact.createElement(\n\t\t\t\t'strong',\n\t\t\t\tnull,\n\t\t\t\t' ',\n\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t);\n};\n\nregisterPlugin('distributor-status-panel', { render: renderDistributedPanel });\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-plugin.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap caa5895237fe8a63d996","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\nconst { registerPlugin } = wp.plugins;\nconst { PluginPostStatusVisibilityPanel } = wp.editPost.__experimental;\nconst { __ } = wp.i18n;\n\nconst renderDistributedPanel = () => {\n\treturn(\n\t\t\n\t\t\t

\n\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t

\n\t\t
\n\t)\n}\n\nregisterPlugin( 'distributor-status-panel', { render: renderDistributedPanel } )\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-status-plugin.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js b/dist/js/gutenberg-syndicated-post.min.js index 8802aa2bf..7b8d58a7a 100644 --- a/dist/js/gutenberg-syndicated-post.min.js +++ b/dist/js/gutenberg-syndicated-post.min.js @@ -1,2 +1,2 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}({1:function(e,t){e.exports=window},7:function(e,t,r){"use strict";var n=r(1);n.wp.i18n.setLocaleData(n.dtGutenberg.i18n,"distributor");var i=[];parseInt(n.dtGutenberg.originalDeleted)?(i.push(n.wp.i18n.sprintf(n.wp.i18n.__("This %s was distributed from "),n.dtGutenberg.postTypeSingular)),i.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),i.push(n.wp.i18n.__(". However, the original has been deleted."))):parseInt(n.dtGutenberg.unlinked)?(i.push(n.wp.i18n.__("Originally distributed from ","distributor")),i.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),i.push("."),i.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.linkNonceUrl},[n.wp.i18n.__("restore it.","distributor")])]))):(i.push(n.wp.i18n.__("Distributed from ","distributor")),i.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),i.push("."),i.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.unlinkNonceUrl},[n.wp.i18n.__("unlink from the original.","distributor")])])));var o=n.wp.element.createElement("p",{className:"dt-message-wrapper"},i);n.wp.data.dispatch("core/editor").createWarningNotice(o,{isDismissible:!1})}}); +!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){e.exports=window},,,,,,,function(e,t,r){"use strict";var n=r(0),i=r(8),a=r(9),o=n.wp.plugins.registerPlugin;if(n.wp.i18n.setLocaleData(n.dtGutenberg.i18n,"distributor"),console.log("dtGutenberg.syndicationCount",n.dtGutenberg.syndicationCount),n.dtGutenberg.syndicationCount>0&&o("distributor-sidebar",{render:a.DistributedToSidebar}),"0"!==n.dtGutenberg.originalSourceId){var u=[];parseInt(n.dtGutenberg.originalDeleted)?(u.push(n.wp.i18n.sprintf(n.wp.i18n.__("This %s was distributed from "),n.dtGutenberg.postTypeSingular)),u.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),u.push(n.wp.i18n.__(". However, the original has been deleted."))):parseInt(n.dtGutenberg.unlinked)?(u.push(n.wp.i18n.__("Originally distributed from ","distributor")),u.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),u.push("."),u.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.linkNonceUrl},[n.wp.i18n.__("restore it.","distributor")])]))):(o("distributor-sidebar",{render:i.DistributedFromSidebar}),u.push(n.wp.i18n.__("Distributed from ","distributor")),u.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),u.push("."),u.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.unlinkNonceUrl},[n.wp.i18n.__("unlink from the original.","distributor")])])));var s=n.wp.element.createElement("p",{className:"dt-message-wrapper"},u);n.wp.data.dispatch("core/editor").createWarningNotice(s,{isDismissible:!1})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedFromSidebar=void 0;var n=r(0),i=n.wp.components,a=(i.Button,i.PanelBody),o=(n.wp.data.dispatch,n.wp.element.Fragment),u=n.wp.i18n.__,s=n.wp.editPost,l=s.PluginSidebar,d=s.PluginSidebarMoreMenuItem;t.DistributedFromSidebar=function(){return React.createElement(o,null,React.createElement(l,{name:"distributor-sidebar",title:"Distributor Details"},React.createElement(a,null,React.createElement("p",null,u("Distributed on: "),React.createElement("strong",null," ",n.dtGutenberg.syndicationTime," ")))),React.createElement(d,{target:"distributor-sidebar"},u("Distributor Details")))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedToSidebar=void 0;var n=r(0),i=n.wp.components,a=(i.Button,i.PanelBody),o=(n.wp.data.dispatch,n.wp.element.Fragment),u=n.wp.i18n.__,s=n.wp.editPost,l=s.PluginSidebar,d=s.PluginSidebarMoreMenuItem;t.DistributedToSidebar=function(){return React.createElement(o,null,React.createElement(l,{name:"distributor-sidebar",title:"Distributor Details"},React.createElement(a,null,React.createElement("p",null,n.wp.i18n.sprintf(n.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),n.dtGutenberg.syndicationCount,"1"===n.dtGutenberg.syndicationCount?"":"s")))),React.createElement(d,{target:"distributor-sidebar"},u("Distributor Details")))}}]); //# sourceMappingURL=gutenberg-syndicated-post.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js.map b/dist/js/gutenberg-syndicated-post.min.js.map index 18e68f79a..3e57a8ee8 100644 --- a/dist/js/gutenberg-syndicated-post.min.js.map +++ b/dist/js/gutenberg-syndicated-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","window","7","_window","wp","i18n","setLocaleData","dtGutenberg","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC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AAgC,gBAE3DL,EAASG,KAAMR,EAAAC,GAAGW,QAAQC,cAAe,KACxCC,KAAMd,EAAAI,YAAYW,UAElBf,EAAAI,YAAYY,wBAGbX,EAASG,KAAM,KAEfH,EAASG,KAAMR,EAAAC,GAAGW,QAAQC,cAAe,WACxCb,EAAAC,GAAGC,KAAKO,QAAST,EAAAC,GAAGC,KAAKQ,GAAI,2EAA4E,eAAiBV,EAAAI,YAAYO,iBAAiBO,eACvJlB,EAAAC,GAAGW,QAAQC,cAAe,KACzBC,KAAMd,EAAAI,YAAYe,eAElBnB,EAAAC,GAAGC,KAAKQ,GAAI,cAAe,sBAlC7BL,EAASG,KAAMR,EAAAC,GAAGC,KAAKQ,GAAI,oBAAqB,gBAEhDL,EAASG,KAAMR,EAAAC,GAAGW,QAAQC,cAAe,KACxCC,KAAMd,EAAAI,YAAYW,UAElBf,EAAAI,YAAYY,wBAGbX,EAASG,KAAM,KAEfH,EAASG,KAAMR,EAAAC,GAAGW,QAAQC,cAAe,WACxCb,EAAAC,GAAGC,KAAKO,QAAST,EAAAC,GAAGC,KAAKQ,GAAI,0DAA2D,eAAiBV,EAAAI,YAAYO,iBAAiBO,eACtIlB,EAAAC,GAAGW,QAAQC,cAAe,KACzBC,KAAMd,EAAAI,YAAYgB,iBAElBpB,EAAAC,GAAGC,KAAKQ,GAAI,4BAA6B,oBAwB5C,IAAMW,GAAiBrB,EAAAC,GAAGW,QAAQC,cAAe,KAChDS,UAAW,sBACTjB,EAEHL,GAAAC,GAAGsB,KAAKC,SAAU,eAAgBC,oBAAqBJ,GACtDK,eAAe","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\n\nvar messages = [];\n\nif (!!parseInt(_window.dtGutenberg.originalDeleted)) {\n\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n} else {\n\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\tmessages.push(_window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.postUrl\n\t}, [_window.dtGutenberg.originalLocationName]));\n\n\tmessages.push('.');\n\n\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\thref: _window.dtGutenberg.linkNonceUrl\n\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n}\n\nvar messageElement = _window.wp.element.createElement('p', {\n\tclassName: 'dt-message-wrapper'\n}, messages);\n\n_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\tisDismissible: false\n});\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","import { wp, dtGutenberg } from 'window'\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\n\nconst messages = []\n\nif ( !! parseInt( dtGutenberg.originalDeleted ) ) {\n\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t] )\n\t] ) )\n} else {\n\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\tmessages.push( wp.element.createElement( 'a', {\n\t\thref: dtGutenberg.postUrl\n\t}, [\n\t\tdtGutenberg.originalLocationName\n\t] ) )\n\n\tmessages.push( '.' )\n\n\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\twp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t}, [\n\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t] )\n\t] ) )\n}\n\nconst messageElement = wp.element.createElement( 'p', {\n\tclassName: 'dt-message-wrapper'\n}, messages )\n\nwp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\tisDismissible: false\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js","webpack:///./assets/js/gutenberg-distributed-from-sidebar.js","webpack:///./assets/js/gutenberg-distributed-to-sidebar.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","_window","_gutenbergDistributedFromSidebar","_gutenbergDistributedToSidebar","registerPlugin","wp","plugins","i18n","setLocaleData","dtGutenberg","console","log","syndicationCount","render","originalSourceId","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible","value","DistributedFromSidebar","undefined","_wp$components","components","PanelBody","Button","Fragment","_wp$editPost","editPost","PluginSidebar","PluginSidebarMoreMenuItem","React","title","syndicationTime","target","DistributedToSidebar"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,E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AmB,GAAK,QAKhDqC,MAAA1B,cAACyB,GACAI,OAAO,uBAELhC,EAAI","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar _gutenbergDistributedFromSidebar = __webpack_require__(8);\n\nvar _gutenbergDistributedToSidebar = __webpack_require__(9);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\n\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\nconsole.log('dtGutenberg.syndicationCount', _window.dtGutenberg.syndicationCount);\nif (_window.dtGutenberg.syndicationCount > 0) {\n\tregisterPlugin('distributor-sidebar', {\n\t\trender: _gutenbergDistributedToSidebar.DistributedToSidebar\n\t});\n}\n\nif ('0' !== _window.dtGutenberg.originalSourceId) {\n\n\tvar messages = [];\n\n\tif (parseInt(_window.dtGutenberg.originalDeleted)) {\n\t\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\t\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n\t} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\t\tregisterPlugin('distributor-sidebar', {\n\t\t\trender: _gutenbergDistributedFromSidebar.DistributedFromSidebar\n\t\t});\n\t\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n\t} else {\n\t\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.linkNonceUrl\n\t\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n\t}\n\n\tvar messageElement = _window.wp.element.createElement('p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages);\n\n\t_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\t\tisDismissible: false\n\t});\n}\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedFromSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedFromSidebar = exports.DistributedFromSidebar = function DistributedFromSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t__('Distributed on: '),\n\t\t\t\t\tReact.createElement(\n\t\t\t\t\t\t\"strong\",\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\" \",\n\t\t\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t\t\t\" \"\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedToSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedToSidebar = exports.DistributedToSidebar = function DistributedToSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\nimport { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js'\nimport { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js'\nconst { registerPlugin } = wp.plugins;\n\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\nconsole.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount );\nif ( dtGutenberg.syndicationCount > 0 ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedToSidebar,\n\t\t} )\n\n}\n\nif ( '0' !== dtGutenberg.originalSourceId ) {\n\n\tconst messages = []\n\n\tif ( parseInt( dtGutenberg.originalDeleted ) ) {\n\t\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\t\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n\t} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedFromSidebar,\n\t\t} )\n\t\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t} else {\n\t\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t}\n\n\tconst messageElement = wp.element.createElement( 'p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages )\n\n\twp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\t\tisDismissible: false\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedFromSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t
\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-from-sidebar.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedToSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t\t\t) }\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-to-sidebar.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/push.min.js b/dist/js/push.min.js index 4a8e05220..faf308d71 100644 --- a/dist/js/push.min.js +++ b/dist/js/push.min.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},function(e,t){e.exports=_},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(0),a=r(o),c=n(2),i=r(c),s=n(1),d={},u="",l=i.default.memoize(function(e){var t=document.getElementById(e);if(!t)return!1;var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g};return i.default.template(t.innerHTML,null,n)});(0,a.default)(window).load(function(){function e(){f.classList.add("message-error"),setTimeout(function(){f.classList.remove("message-error")},6e3)}function t(t){var r=!1;i.default.each(t.internal,function(e,t){"fail"===e.status?r=!0:s.dtConnections["internal"+t].syndicated=e.url}),i.default.each(t.external,function(e,t){"fail"===e.status?r=!0:s.dtConnections["external"+t].syndicated=!0}),r?e():(f.classList.add("message-success"),p.classList.add("empty"),g.innerText="",setTimeout(function(){f.classList.remove("message-success")},6e3)),d={},n()}function n(){m.innerText="",i.default.each(s.dtConnections,function(e){if(""!==u){var t=e.name.replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase()),n=e.url.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase());if(!t&&!n)return}var r=l("dt-add-connection")({connection:e,selectedConnections:d});m.innerHTML+=r})}function r(){c.focus(),document.body.classList.toggle("distributor-show")}function o(){c.blur(),document.body.classList.toggle("distributor-show")}var c=document.querySelector("#wp-admin-bar-distributor"),f=document.querySelector("#distributor-push-wrapper");if(c&&f){var p=f.querySelector(".connections-selected"),g=f.querySelector(".selected-connections-list"),m=f.querySelector(".new-connections-list"),v=document.getElementById("dt-connection-search"),y=f.querySelector(".syndicate-button"),h=f.querySelector(".action-wrapper"),L=document.getElementById("dt-as-draft");c.appendChild(f),(0,a.default)(c).hoverIntent(r,300,o),(0,a.default)(y).on("click",function(){if(!h.classList.contains("loading")){h.classList.add("loading");var n={action:"dt_push",nonce:s.dt.nonce,connections:d,post_id:s.dt.post_id};L.checked&&(n.draft=!0);var r=!!s.dt.usexhr&&{withCredentials:!0};a.default.ajax({url:s.dt.ajaxurl,xhrFields:r,method:"post",data:n}).done(function(n){setTimeout(function(){if(h.classList.remove("loading"),!n.data||!n.data.results)return void e();t(n.data.results)},500)}).error(function(){setTimeout(function(){h.classList.remove("loading"),e()},500)})}}),(0,a.default)(f).on("click",".add-connection",function(e){if("A"!==e.target.nodeName&&(e.preventDefault(),!e.currentTarget.classList.contains("syndicated")))if(e.currentTarget.classList.contains("added")){var t=e.currentTarget.getAttribute("data-connection-type"),r=e.currentTarget.getAttribute("data-connection-id"),o=g.querySelector('[data-connection-id="'+r+'"][data-connection-type="'+t+'"]');o.parentNode.removeChild(o),delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}else{var a=e.currentTarget.getAttribute("data-connection-type"),c=e.currentTarget.getAttribute("data-connection-id");d[a+c]=s.dtConnections[a+c],p.classList.remove("empty");var i=e.currentTarget.cloneNode();i.innerText=e.currentTarget.innerText;var u=document.createElement("span");u.classList.add("remove-connection"),i.appendChild(u),i.classList="added-connection",g.appendChild(i),n()}}),(0,a.default)(f).on("click",".remove-connection",function(e){e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);var t=e.currentTarget.parentNode.getAttribute("data-connection-type"),r=e.currentTarget.parentNode.getAttribute("data-connection-id");delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}),(0,a.default)(v).on("keyup change",i.default.debounce(function(e){""===e.currentTarget.value&&n(s.dtConnections),u=e.currentTarget.value.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,""),n()},300))}})}]); +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){e.exports=window},function(e,t){e.exports=jQuery},function(e,t){e.exports=_},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),a=r(o),c=n(2),i=r(c),s=n(0),d={},u="",l=i.default.memoize(function(e){var t=document.getElementById(e);if(!t)return!1;var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g};return i.default.template(t.innerHTML,null,n)});(0,a.default)(window).load(function(){function e(){f.classList.add("message-error"),setTimeout(function(){f.classList.remove("message-error")},6e3)}function t(t){var r=!1;i.default.each(t.internal,function(e,t){"fail"===e.status?r=!0:s.dtConnections["internal"+t].syndicated=e.url}),i.default.each(t.external,function(e,t){"fail"===e.status?r=!0:s.dtConnections["external"+t].syndicated=!0}),r?e():(f.classList.add("message-success"),p.classList.add("empty"),g.innerText="",setTimeout(function(){f.classList.remove("message-success")},6e3)),d={},n()}function n(){m.innerText="",i.default.each(s.dtConnections,function(e){if(""!==u){var t=e.name.replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase()),n=e.url.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase());if(!t&&!n)return}var r=l("dt-add-connection")({connection:e,selectedConnections:d});m.innerHTML+=r})}function r(){c.focus(),document.body.classList.toggle("distributor-show")}function o(){c.blur(),document.body.classList.toggle("distributor-show")}var c=document.querySelector("#wp-admin-bar-distributor"),f=document.querySelector("#distributor-push-wrapper");if(c&&f){var p=f.querySelector(".connections-selected"),g=f.querySelector(".selected-connections-list"),m=f.querySelector(".new-connections-list"),v=document.getElementById("dt-connection-search"),y=f.querySelector(".syndicate-button"),h=f.querySelector(".action-wrapper"),L=document.getElementById("dt-as-draft");c.appendChild(f),(0,a.default)(c).hoverIntent(r,300,o),(0,a.default)(y).on("click",function(){if(!h.classList.contains("loading")){h.classList.add("loading");var n={action:"dt_push",nonce:s.dt.nonce,connections:d,post_id:s.dt.post_id};L.checked&&(n.draft=!0);var r=!!s.dt.usexhr&&{withCredentials:!0};a.default.ajax({url:s.dt.ajaxurl,xhrFields:r,method:"post",data:n}).done(function(n){setTimeout(function(){if(h.classList.remove("loading"),!n.data||!n.data.results)return void e();t(n.data.results)},500)}).error(function(){setTimeout(function(){h.classList.remove("loading"),e()},500)})}}),(0,a.default)(f).on("click",".add-connection",function(e){if("A"!==e.target.nodeName&&(e.preventDefault(),!e.currentTarget.classList.contains("syndicated")))if(e.currentTarget.classList.contains("added")){var t=e.currentTarget.getAttribute("data-connection-type"),r=e.currentTarget.getAttribute("data-connection-id"),o=g.querySelector('[data-connection-id="'+r+'"][data-connection-type="'+t+'"]');o.parentNode.removeChild(o),delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}else{var a=e.currentTarget.getAttribute("data-connection-type"),c=e.currentTarget.getAttribute("data-connection-id");d[a+c]=s.dtConnections[a+c],p.classList.remove("empty");var i=e.currentTarget.cloneNode();i.innerText=e.currentTarget.innerText;var u=document.createElement("span");u.classList.add("remove-connection"),i.appendChild(u),i.classList="added-connection",g.appendChild(i),n()}}),(0,a.default)(f).on("click",".remove-connection",function(e){e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);var t=e.currentTarget.parentNode.getAttribute("data-connection-type"),r=e.currentTarget.parentNode.getAttribute("data-connection-id");delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}),(0,a.default)(v).on("keyup change",i.default.debounce(function(e){""===e.currentTarget.value&&n(s.dtConnections),u=e.currentTarget.value.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,""),n()},300))}})}]); //# sourceMappingURL=push.min.js.map \ No newline at end of file diff --git a/dist/js/push.min.js.map b/dist/js/push.min.js.map index 561deb3f5..e1b0ca941 100644 --- a/dist/js/push.min.js.map +++ b/dist/js/push.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 6157c80b80a91031d0f5","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,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,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6157c80b80a91031d0f5","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 3 4","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA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,UAAUC,IAAK,qBAE1Bb,EAAQoD,YAAakC,GACrBtF,EAAQY,UAAY,mBAEpBiB,EAAwBuB,YAAapD,GAErC+B,QAOF,EAAAxC,EAAAF,SAAQsB,GAAyB2C,GAAI,QAAS,qBAAsB,SAAEmB,GACrEA,EAAMI,cAAcI,WAAWA,WAAWC,YAAaT,EAAMI,cAAcI,WAC3E,IAAMH,GAAOL,EAAMI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgB7D,EAAAJ,QAAEmG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,mBAGDnC,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file diff --git a/includes/syndicated-post-ui.php b/includes/syndicated-post-ui.php index b11611878..5ac5c5575 100644 --- a/includes/syndicated-post-ui.php +++ b/includes/syndicated-post-ui.php @@ -490,8 +490,9 @@ function enqueue_gutenberg_edit_scripts() { $post_type_singular = $post_type_object->labels->singular_name; wp_enqueue_script( 'dt-gutenberg-syndicated-post', plugins_url( '/dist/js/gutenberg-syndicated-post.min.js', __DIR__ ), [ 'wp-blocks' ], DT_VERSION, true ); + wp_enqueue_script( 'dt-gutenberg-syndicated-status-plugin', plugins_url( '/dist/js/gutenberg-status-plugin.min.js', __DIR__ ), [ 'wp-blocks' ], DT_VERSION, true ); wp_localize_script( 'dt-gutenberg-syndicated-post', 'dtGutenberg', [ - 'i18n' => gutenberg_get_jed_locale_data( 'distributor' ), + 'i18n' => gutenberg_get_jed_locale_data( 'distributor' ), 'originalBlogId' => (int) $original_blog_id, 'originalPostId' => (int) $original_post_id, 'originalSourceId' => (int) $original_source_id, diff --git a/package-lock.json b/package-lock.json index c19bd9cf9..783452306 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3,83 +3,391 @@ "requires": true, "lockfileVersion": 1, "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true + "@babel/code-frame": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", + "integrity": "sha512-cuAuTTIQ9RqcFRJ/Y8PvTh+paepNcaGxwQwjIDRWPXmzzyAeCO4KqS9ikMvq0MCbRk6GlYKwfzStrcP3/jSL8g==", + "requires": { + "@babel/highlight": "7.0.0-beta.44" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.44.tgz", + "integrity": "sha512-5xVb7hlhjGcdkKpMXgicAVgx8syK5VJz193k0i/0sLP6DzE6lRrU1K3B/rFefgdo9LPGMAOOOAWW4jycj07ShQ==", + "requires": { + "@babel/types": "7.0.0-beta.44", + "jsesc": "2.5.1", + "lodash": "4.17.5", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=" + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz", + "integrity": "sha512-MHRG2qZMKMFaBavX0LWpfZ2e+hLloT++N7rfM3DYOMUOGCD8cVjqZpwiL8a0bOX3IYcQev1ruciT0gdFFRTxzg==", + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.44", + "@babel/template": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz", + "integrity": "sha512-w0YjWVwrM2HwP6/H3sEgrSQdkCaxppqFeJtAnB23pRiJB5E/O9Yp7JAAeWBl+gGEgmBFinnTyOv2RN7rcSmMiw==", + "requires": { + "@babel/types": "7.0.0-beta.44" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz", + "integrity": "sha512-aQ7QowtkgKKzPGf0j6u77kBMdUFVBKNHw2p/3HX/POt5/oz8ec5cs0GwlgM8Hz7ui5EwJnzyfRmkNF1Nx1N7aA==", + "requires": { + "@babel/types": "7.0.0-beta.44" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.44.tgz", + "integrity": "sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==", + "requires": { + "chalk": "2.4.0", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + } + } + }, + "@babel/template": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.44.tgz", + "integrity": "sha512-w750Sloq0UNifLx1rUqwfbnC6uSUk0mfwwgGRfdLiaUzfAOiH0tHJE6ILQIUi3KYkjiCDTskoIsnfqZvWLBDng==", + "requires": { + "@babel/code-frame": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44", + "babylon": "7.0.0-beta.44", + "lodash": "4.17.5" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==" + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.44.tgz", + "integrity": "sha512-UHuDz8ukQkJCDASKHf+oDt3FVUzFd+QYfuBIsiNu/4+/ix6pP/C+uQZJ6K1oEfbCMv/IKWbgDEh7fcsnIE5AtA==", + "requires": { + "@babel/code-frame": "7.0.0-beta.44", + "@babel/generator": "7.0.0-beta.44", + "@babel/helper-function-name": "7.0.0-beta.44", + "@babel/helper-split-export-declaration": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44", + "babylon": "7.0.0-beta.44", + "debug": "3.1.0", + "globals": "11.4.0", + "invariant": "2.2.4", + "lodash": "4.17.5" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", + "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==" + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.44.tgz", + "integrity": "sha512-5eTV4WRmqbaFM3v9gHAIljEQJU4Ssc6fxL61JN+Oe2ga/BwyjzjamwkCVVAQjHGuAX8i0BWo42dshL8eO5KfLQ==", + "requires": { + "esutils": "2.0.2", + "lodash": "4.17.5", + "to-fast-properties": "2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + } + } + }, + "@gulp-sourcemaps/identity-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.1.tgz", + "integrity": "sha1-z6I7xYQPkQTOMqZedNt+epdLvuE=", + "requires": { + "acorn": "5.5.3", + "css": "2.2.1", + "normalize-path": "2.1.1", + "source-map": "0.5.7", + "through2": "2.0.3" + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "requires": { + "normalize-path": "2.1.1", + "through2": "2.0.3" + } + }, + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "requires": { + "acorn": "4.0.13" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + } + } + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + } + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" }, "align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, "requires": { "kind-of": "3.2.2", "longest": "1.0.1", "repeat-string": "1.6.1" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" + }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "requires": { + "ansi-wrap": "0.1.0" + } }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=" }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "dev": true, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.4" + "micromatch": "3.1.10", + "normalize-path": "2.1.1" } }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "dev": true, + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { "sprintf-js": "1.0.3" } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, "array-differ": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, "requires": { "array-uniq": "1.0.3" } @@ -87,2694 +395,9869 @@ "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "requires": { + "util": "0.10.3" + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.5" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "atob": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", + "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==" }, "autoprefixer": { "version": "6.7.7", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", - "dev": true, "requires": { "browserslist": "1.7.7", - "caniuse-db": "1.0.30000808", + "caniuse-db": "1.0.30000830", "normalize-range": "0.1.2", "num2fraction": "1.2.2", "postcss": "5.2.18", "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000830", + "electron-to-chromium": "1.3.42" + } + } } }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "dev": true, - "optional": true, + "babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", "requires": { - "tweetnacl": "0.14.5" + "babel-core": "6.26.0", + "babel-polyfill": "6.26.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "chokidar": "1.7.0", + "commander": "2.15.1", + "convert-source-map": "1.5.1", + "fs-readdir-recursive": "1.1.0", + "glob": "7.1.2", + "lodash": "4.17.5", + "output-file-sync": "1.1.2", + "path-is-absolute": "1.0.1", + "slash": "1.0.0", + "source-map": "0.5.7", + "v8flags": "2.1.1" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "optional": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "optional": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "optional": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "optional": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "optional": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.1.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "optional": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "optional": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "optional": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "optional": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + } } }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "requires": { - "inherits": "2.0.3" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.5", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } } }, - "body-parser": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", - "integrity": "sha1-EBXLH+LEQ4WCWVgdtTMy+NDPUPk=", - "dev": true, + "babel-eslint": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.3.tgz", + "integrity": "sha512-0HeSTtaXg/Em7FCUWxwOT+KeFSO1O7LuRuzhk7g+1BjwdlQGlHq4OyMi3GqGxrNfEq8jEi6Hmt5ylEQUhurgiQ==", "requires": { - "bytes": "2.2.0", - "content-type": "1.0.4", - "debug": "2.2.0", - "depd": "1.1.2", - "http-errors": "1.3.1", - "iconv-lite": "0.4.13", - "on-finished": "2.3.0", - "qs": "5.2.0", - "raw-body": "2.1.7", - "type-is": "1.6.15" + "@babel/code-frame": "7.0.0-beta.44", + "@babel/traverse": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44", + "babylon": "7.0.0-beta.44", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0" }, "dependencies": { - "iconv-lite": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", - "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", - "dev": true - }, - "qs": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", - "integrity": "sha1-qfMRQq9GjLcrJbMBNrokVoNJFr4=", - "dev": true + "babylon": { + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==" } } }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "requires": { - "hoek": "2.16.3" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.5", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, + "babel-helper-builder-react-jsx": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", + "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=", "requires": { - "pako": "0.2.9" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "esutils": "2.0.2" } }, - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "dev": true, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "requires": { - "caniuse-db": "1.0.30000808", - "electron-to-chromium": "1.3.33" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "bytes": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz", - "integrity": "sha1-/TVGSkA/b5EXwt42Cez/nK4ABYg=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, - "caniuse-db": { - "version": "1.0.30000808", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000808.tgz", - "integrity": "sha1-MN/YMAnVcE8C3/s3clBo7RKjZrs=", - "dev": true + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, - "clean-css": { - "version": "3.4.28", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", - "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=", - "dev": true, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "requires": { - "commander": "2.8.1", - "source-map": "0.4.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" }, "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": "1.0.1" - } + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" } } }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "coffeescript": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", - "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "requires": { + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "dev": true, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "requires": { - "delayed-stream": "1.0.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "dev": true, + "babel-loader": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.4.tgz", + "integrity": "sha512-/hbyEvPzBJuGpk9o80R0ZyTej6heEOr59GoEUtn8qFKbnx4cJm9FWES6J/iv644sYgrtVw9JJQkjaLW/bqb5gw==", "requires": { - "graceful-readlink": "1.0.1" + "find-cache-dir": "1.0.0", + "loader-utils": "1.1.0", + "mkdirp": "0.5.1" } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "6.26.0" + } }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "dev": true, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.4", - "typedarray": "0.0.6" + "babel-runtime": "6.26.0" } }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=" }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=" + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "requires": { - "lru-cache": "4.1.1", - "which": "1.2.14" + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" } }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "requires": { - "boom": "2.10.1" + "babel-runtime": "6.26.0" } }, - "cssmin": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/cssmin/-/cssmin-0.4.3.tgz", - "integrity": "sha1-yRlAd+Dr2s1pHV9ZAVudgZ840BU=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "requires": { - "array-find-index": "1.0.2" + "babel-runtime": "6.26.0" } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", "requires": { - "assert-plus": "1.0.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" } } }, - "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "requires": { - "get-stdin": "4.0.1", - "meow": "3.7.0" + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "dev": true, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "requires": { - "ms": "0.7.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "babel-runtime": "6.26.0" } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "diff": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz", - "integrity": "sha1-YOr9DSjukG5Oj/ClLBIpUhAzv5k=", - "dev": true - }, - "each-async": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz", - "integrity": "sha1-3uUim98KtrogEqOV4bhpq/iBNHM=", - "dev": true, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "requires": { - "onetime": "1.1.0", - "set-immediate-shim": "1.0.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "dev": true, - "optional": true, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "requires": { - "jsbn": "0.1.1" + "babel-runtime": "6.26.0" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.33", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz", - "integrity": "sha1-vwBwPWKnxlI4E2V4w1LWxcBCpUU=", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "requires": { - "iconv-lite": "0.4.19" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "requires": { - "is-arrayish": "0.2.1" + "babel-runtime": "6.26.0" } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", - "dev": true + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "requires": { + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "requires": { - "websocket-driver": "0.7.0" + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" } }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, - "findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", - "dev": true, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "requires": { - "glob": "5.0.15" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } + "babel-runtime": "6.26.0" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "requires": { + "babel-runtime": "6.26.0" + } }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "babel-runtime": "6.26.0" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" + } }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.2.8" + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" } }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "requires": { + "babel-plugin-syntax-flow": "6.18.0", + "babel-runtime": "6.26.0" } }, - "gaze": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", - "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", - "dev": true, + "babel-plugin-transform-react-display-name": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", + "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=", "requires": { - "globule": "1.2.0" + "babel-runtime": "6.26.0" } }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true + "babel-plugin-transform-react-jsx": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", + "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", + "requires": { + "babel-helper-builder-react-jsx": "6.26.0", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, + "babel-plugin-transform-react-jsx-self": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", + "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=", "requires": { - "is-property": "1.0.2" + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" } }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true + "babel-plugin-transform-react-jsx-source": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", + "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=", + "requires": { + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "requires": { + "regenerator-transform": "0.10.1" + } }, - "getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", - "dev": true + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", "requires": { - "assert-plus": "1.0.0" + "babel-runtime": "6.26.0", + "core-js": "2.5.5", + "regenerator-runtime": "0.10.5" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" } } }, - "gettext-parser": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.1.2.tgz", - "integrity": "sha1-zw8MnJCJrtsO5RSZKRg+ncQ1hKc=", - "dev": true, + "babel-preset-env": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", + "integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==", + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0", + "browserslist": "2.11.3", + "invariant": "2.2.4", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + } + } + }, + "babel-preset-flow": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", + "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", "requires": { - "encoding": "0.1.12" + "babel-plugin-transform-flow-strip-types": "6.22.0" } }, - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, + "babel-preset-react": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", + "integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "babel-plugin-syntax-jsx": "6.18.0", + "babel-plugin-transform-react-display-name": "6.25.0", + "babel-plugin-transform-react-jsx": "6.24.1", + "babel-plugin-transform-react-jsx-self": "6.22.0", + "babel-plugin-transform-react-jsx-source": "6.22.0", + "babel-preset-flow": "6.23.0" } }, - "globule": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", - "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", - "dev": true, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "requires": { - "glob": "7.1.2", + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.5", + "home-or-tmp": "2.0.0", "lodash": "4.17.5", - "minimatch": "3.0.4" + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" }, "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.5", "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" } }, "lodash": { "version": "4.17.5", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" + } }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.5" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } }, - "grunt": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.2.tgz", - "integrity": "sha1-TmpeaVtwRy/VME9fqeNCNoNqc7w=", - "dev": true, - "requires": { - "coffeescript": "1.10.0", - "dateformat": "1.0.12", - "eventemitter2": "0.4.14", - "exit": "0.1.2", - "findup-sync": "0.3.0", - "glob": "7.0.6", - "grunt-cli": "1.2.0", - "grunt-known-options": "1.1.0", - "grunt-legacy-log": "1.0.0", - "grunt-legacy-util": "1.0.0", - "iconv-lite": "0.4.19", - "js-yaml": "3.5.5", - "minimatch": "3.0.4", - "nopt": "3.0.6", - "path-is-absolute": "1.0.1", - "rimraf": "2.2.8" + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.5" }, "dependencies": { - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", - "dev": true, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "findup-sync": "0.3.0", - "grunt-known-options": "1.1.0", - "nopt": "3.0.6", - "resolve": "1.1.7" + "ms": "2.0.0" } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "grunt-contrib-cssmin": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-1.0.2.tgz", - "integrity": "sha1-FzTL09hMpzZHWLflj/GOUqpgu3Y=", - "dev": true, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "requires": { - "chalk": "1.1.3", - "clean-css": "3.4.28", - "maxmin": "1.1.0" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.5", + "to-fast-properties": "1.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } } }, - "grunt-contrib-uglify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-2.3.0.tgz", - "integrity": "sha1-s9AmDr3WzvoS/y+Onh4ln33kIW8=", - "dev": true, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=" + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "body-parser": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", + "integrity": "sha1-EBXLH+LEQ4WCWVgdtTMy+NDPUPk=", "requires": { - "chalk": "1.1.3", - "maxmin": "1.1.0", - "object.assign": "4.1.0", - "uglify-js": "2.8.29", - "uri-path": "1.0.0" + "bytes": "2.2.0", + "content-type": "1.0.4", + "debug": "2.2.0", + "depd": "1.1.2", + "http-errors": "1.3.1", + "iconv-lite": "0.4.13", + "on-finished": "2.3.0", + "qs": "5.2.0", + "raw-body": "2.1.7", + "type-is": "1.6.16" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "requires": { + "ms": "0.7.1" + } + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=" + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" + }, + "qs": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", + "integrity": "sha1-qfMRQq9GjLcrJbMBNrokVoNJFr4=" + } } }, - "grunt-contrib-watch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.0.0.tgz", - "integrity": "sha1-hKGnodar0m7VaEE0lscxM+mQAY8=", - "dev": true, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "async": "1.5.2", - "gaze": "1.1.2", - "lodash": "3.10.1", - "tiny-lr": "0.2.1" + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "grunt-known-options": { + "brorand": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", - "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", - "dev": true + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.6" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "1.0.6" + } + }, + "browserslist": { + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", + "requires": { + "caniuse-lite": "1.0.30000830", + "electron-to-chromium": "1.3.42" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + } + } }, - "grunt-legacy-log": { + "buffer-from": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz", - "integrity": "sha1-+4bxgJhHvAfcR4Q/ns1srLYt8tU=", - "dev": true, + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "bytes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz", + "integrity": "sha1-/TVGSkA/b5EXwt42Cez/nK4ABYg=" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "colors": "1.1.2", - "grunt-legacy-log-utils": "1.0.0", - "hooker": "0.2.3", - "lodash": "3.10.1", - "underscore.string": "3.2.3" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "requires": { + "browserslist": "1.7.7", + "caniuse-db": "1.0.30000830", + "lodash.memoize": "4.1.2", + "lodash.uniq": "4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000830", + "electron-to-chromium": "1.3.42" + } + } + } + }, + "caniuse-db": { + "version": "1.0.30000830", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000830.tgz", + "integrity": "sha1-bkUlWzRWSf0V/1kHLaHhK7PeLxM=" + }, + "caniuse-lite": { + "version": "1.0.30000830", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz", + "integrity": "sha512-yMqGkujkoOIZfvOYiWdqPALgY/PVGiqCHUJb6yNq7xhI/pR+gQO0U2K6lRDqAiJv4+CIU3CtTLblNGw0QGnr6g==" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" + }, + "chokidar": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.4" + }, + "dependencies": { + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" + }, + "clap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", + "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "requires": { + "chalk": "1.1.3" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "requires": { + "inherits": "2.0.3", + "process-nextick-args": "2.0.0", + "readable-stream": "2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "coa": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "requires": { + "q": "1.5.1" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "requires": { + "clone": "1.0.4", + "color-convert": "1.9.1", + "color-string": "0.3.0" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "requires": { + "color-name": "1.1.3" + } + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + }, + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "requires": { + "color": "0.11.4", + "css-color-names": "0.0.4", + "has": "1.0.1" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "requires": { + "is-directory": "0.3.1", + "js-yaml": "3.11.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "require-from-string": "1.2.1" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "create-ecdh": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.1.tgz", + "integrity": "sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ==", + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + } + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.14", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" + } + }, + "css": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.1.tgz", + "integrity": "sha1-c6TIHehdtmTU7mdPfUcIXjstVdw=", + "requires": { + "inherits": "2.0.3", + "source-map": "0.1.43", + "source-map-resolve": "0.3.1", + "urix": "0.1.0" + }, + "dependencies": { + "atob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-1.1.3.tgz", + "integrity": "sha1-lfE2KbEsOlGl0hWr3OKqnzL4B3M=" + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "requires": { + "amdefine": "1.0.1" + } + }, + "source-map-resolve": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.3.1.tgz", + "integrity": "sha1-YQ9hIqRFuN1RU1oqcbeD38Ekh2E=", + "requires": { + "atob": "1.1.3", + "resolve-url": "0.2.1", + "source-map-url": "0.3.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.3.0.tgz", + "integrity": "sha1-fsrxO1e80J2opAxdJp2zN5nUqvk=" + } + } + }, + "css-color-function": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/css-color-function/-/css-color-function-1.3.3.tgz", + "integrity": "sha1-jtJMLAIFBzM5+voAS8jBQfzLKC4=", + "requires": { + "balanced-match": "0.1.0", + "color": "0.11.4", + "debug": "3.1.0", + "rgb": "0.1.0" + }, + "dependencies": { + "balanced-match": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.1.0.tgz", + "integrity": "sha1-tQS9BYabOSWd0MXvw12EMXbczEo=" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=" + }, + "css-unit-converter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", + "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=" + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "requires": { + "autoprefixer": "6.7.7", + "decamelize": "1.2.0", + "defined": "1.0.0", + "has": "1.0.1", + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-calc": "5.3.1", + "postcss-colormin": "2.2.2", + "postcss-convert-values": "2.6.1", + "postcss-discard-comments": "2.0.4", + "postcss-discard-duplicates": "2.1.0", + "postcss-discard-empty": "2.1.0", + "postcss-discard-overridden": "0.1.1", + "postcss-discard-unused": "2.2.3", + "postcss-filter-plugins": "2.0.2", + "postcss-merge-idents": "2.1.7", + "postcss-merge-longhand": "2.0.2", + "postcss-merge-rules": "2.1.2", + "postcss-minify-font-values": "1.0.5", + "postcss-minify-gradients": "1.0.5", + "postcss-minify-params": "1.2.2", + "postcss-minify-selectors": "2.1.1", + "postcss-normalize-charset": "1.1.1", + "postcss-normalize-url": "3.0.8", + "postcss-ordered-values": "2.2.3", + "postcss-reduce-idents": "2.4.0", + "postcss-reduce-initial": "1.0.1", + "postcss-reduce-transforms": "1.0.4", + "postcss-svgo": "2.1.6", + "postcss-unique-selectors": "2.0.2", + "postcss-value-parser": "3.3.0", + "postcss-zindex": "2.2.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "csso": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "requires": { + "clap": "1.2.3", + "source-map": "0.5.7" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "0.10.42" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "debug-fabulous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", + "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", + "requires": { + "debug": "3.1.0", + "memoizee": "0.4.12", + "object-assign": "4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "1.0.4" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=" + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "2.0.1" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "2.0.2" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "requires": { + "readable-stream": "1.1.14" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "electron-to-chromium": { + "version": "1.3.42", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz", + "integrity": "sha1-lcM78B0MxAVVauyJn+Yf1NduoPk=" + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "0.4.21" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "requires": { + "once": "1.3.3" + } + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "object-assign": "4.1.1", + "tapable": "0.2.8" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "requires": { + "prr": "1.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "requires": { + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.4.0", + "concat-stream": "1.6.2", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.4.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.11.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.5", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "globals": { + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", + "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==" + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "eslint-loader": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.9.0.tgz", + "integrity": "sha512-40aN976qSNPyb9ejTqjEthZITpls1SVKtwguahmH1dzGCwQU/vySE+xX33VZmD8csU0ahVNCtFlsPgKqRBiqgg==", + "requires": { + "loader-fs-cache": "1.0.1", + "loader-utils": "1.1.0", + "object-assign": "4.1.1", + "object-hash": "1.3.0", + "rimraf": "2.6.2" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "requires": { + "acorn": "5.5.3", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "requires": { + "estraverse": "4.2.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42" + } + }, + "event-stream": { + "version": "3.3.4", + "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "optional": true, + "requires": { + "fill-range": "2.2.3" + }, + "dependencies": { + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "optional": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "optional": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "optional": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "optional": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "1.0.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.21", + "tmp": "0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "fancy-log": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "requires": { + "ansi-gray": "0.1.1", + "color-support": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "faye-websocket": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.3.tgz", + "integrity": "sha1-zEB0x/Sk39A69U3WXDVLE1EyzhE=", + "requires": { + "websocket-driver": "0.7.0" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "optional": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "requires": { + "commondir": "1.0.1", + "make-dir": "1.2.0", + "pkg-dir": "2.0.0" + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "requires": { + "detect-file": "1.0.0", + "is-glob": "3.1.0", + "micromatch": "3.1.10", + "resolve-dir": "1.0.1" + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "requires": { + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.2" + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" + }, + "flagged-respawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", + "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=" + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + } + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "1.0.2" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "0.2.2" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "requires": { + "globule": "0.1.0" + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "gettext-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.3.1.tgz", + "integrity": "sha512-W4t55eB/c7WrH0gbCHFiHuaEnJ1WiPJVnbFFiNEoh2QkOmuSLxs0PmJDGAmCQuTJCU740Fmb6D+2D/2xECWZGQ==", + "requires": { + "encoding": "0.1.12", + "safe-buffer": "5.1.1" + } + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.3.3" + }, + "dependencies": { + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.11" + } + } + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "optional": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "optional": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "requires": { + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "requires": { + "gaze": "0.5.2" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "requires": { + "find-index": "0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "1.0.2", + "is-windows": "1.0.2", + "resolve-dir": "1.0.1" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "requires": { + "expand-tilde": "2.0.2", + "homedir-polyfill": "1.0.1", + "ini": "1.3.5", + "is-windows": "1.0.2", + "which": "1.3.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "requires": { + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glogg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "requires": { + "sparkles": "1.0.0" + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "1.1.3" + } + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "requires": { + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.1.0", + "liftoff": "2.5.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" + } + }, + "gulp-cssnano": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz", + "integrity": "sha512-r8qdX5pTXsBb/IRm9loE8Ijz8UiPW/URMC/bKJe4FPNHRaz4aEx8Bev03L0FYHd/7BSGu/ebmfumAkpGuTdenA==", + "requires": { + "buffer-from": "1.0.0", + "cssnano": "3.10.0", + "object-assign": "4.1.1", + "plugin-error": "1.0.1", + "vinyl-sourcemaps-apply": "0.2.1" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "gulp-filter": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", + "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", + "requires": { + "multimatch": "2.1.0", + "plugin-error": "0.1.2", + "streamfilter": "1.0.7" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "requires": { + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=" + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=" + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "requires": { + "kind-of": "1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "requires": { + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" + } + } + } + }, + "gulp-livereload": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/gulp-livereload/-/gulp-livereload-3.8.1.tgz", + "integrity": "sha1-APdEstdJ0+njdGWJyKRKysd5tQ8=", + "requires": { + "chalk": "0.5.1", + "debug": "2.6.9", + "event-stream": "3.3.4", + "gulp-util": "3.0.8", + "lodash.assign": "3.2.0", + "mini-lr": "0.1.9" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=" + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=" + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "requires": { + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" + } + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "requires": { + "ansi-regex": "0.2.1" + } + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "requires": { + "ansi-regex": "0.2.1" + } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=" + } + } + }, + "gulp-postcss": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/gulp-postcss/-/gulp-postcss-7.0.1.tgz", + "integrity": "sha1-Pxw22xGXFAw5nCUt3/M5EpY445U=", + "requires": { + "fancy-log": "1.3.2", + "plugin-error": "0.1.2", + "postcss": "6.0.21", + "postcss-load-config": "1.2.0", + "vinyl-sourcemaps-apply": "0.2.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "requires": { + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=" + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=" + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "requires": { + "kind-of": "1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "requires": { + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "gulp-rename": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz", + "integrity": "sha1-OtRCh2PwXidk3sHGfYaNsnVoeBc=" + }, + "gulp-sourcemaps": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.4.tgz", + "integrity": "sha1-y7IAhFCxvM5s0jv5gze+dRv24wo=", + "requires": { + "@gulp-sourcemaps/identity-map": "1.0.1", + "@gulp-sourcemaps/map-sources": "1.0.0", + "acorn": "5.5.3", + "convert-source-map": "1.5.1", + "css": "2.2.1", + "debug-fabulous": "1.1.0", + "detect-newline": "2.1.0", + "graceful-fs": "4.1.11", + "source-map": "0.6.1", + "strip-bom-string": "1.0.0", + "through2": "2.0.3" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.2", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "requires": { + "glogg": "1.0.1" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "requires": { + "sparkles": "1.0.0" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "1.0.0" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==" + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=" + }, + "http-errors": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", + "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", + "requires": { + "inherits": "2.0.3", + "statuses": "1.5.0" + } + }, + "http-parser-js": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.11.tgz", + "integrity": "sha512-QCR5O2AjjMW8Mo4HyI1ctFcv+O99j/0g367V3YoVnrNw5hkDvAWZD0lWGcc+F4yN3V55USPCVix4efb75HxFfA==" + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "iconv-lite": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ieee754": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==" + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + }, + "imports-loader": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/imports-loader/-/imports-loader-0.7.1.tgz", + "integrity": "sha1-8gS180cCoywdt9SNidXoZ6BEElM=", + "requires": { + "loader-utils": "1.1.0", + "source-map": "0.5.7" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.3.3", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.5", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "1.0.0", + "is-windows": "1.0.2" + } + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "optional": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "optional": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "optional": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "optional": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "1.0.0" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "requires": { + "html-comment-regex": "1.1.1" + } + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isnumeric": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/isnumeric/-/isnumeric-0.2.0.tgz", + "integrity": "sha1-ojR7o2DeGeM9D/1ZD933dVy/LmQ=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "js-base64": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", + "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "requires": { + "extend": "3.0.1", + "findup-sync": "2.0.0", + "fined": "1.1.0", + "flagged-respawn": "1.0.0", + "is-plain-object": "2.0.4", + "object.map": "1.0.1", + "rechoir": "0.6.2", + "resolve": "1.7.1" + } + }, + "livereload-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.3.0.tgz", + "integrity": "sha512-j1R0/FeGa64Y+NmqfZhyoVRzcFlOZ8sNlKzHjh4VvLULFACZhn68XrX5DFg2FhMvSMJmROuFxRSa560ECWKBMg==" + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "loader-fs-cache": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz", + "integrity": "sha1-VuC/CL2XCLJqdltoUJhAyN7J/bw=", + "requires": { + "find-cache-dir": "0.1.1", + "mkdirp": "0.5.1" + }, + "dependencies": { + "find-cache-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", + "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "requires": { + "find-up": "1.1.2" + } + } + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=" + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=" + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=" + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "requires": { + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9", + "lodash.restparam": "3.6.1" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._createassigner": "3.1.1", + "lodash.keys": "3.1.2" + } + }, + "lodash.clone": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", + "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "requires": { + "es5-ext": "0.10.42" + } + }, + "macaddress": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", + "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=" + }, + "make-dir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "requires": { + "pify": "3.0.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "1.0.1" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=" + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "1.2.0" + } + }, + "memoizee": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.12.tgz", + "integrity": "sha512-sprBu6nwxBWBvBOh5v2jcsGqiGLlL2xr2dLub3vR8dnE8YB17omwtm/0NSHl8jjNbcsJd5GMWJAnTSVe/O0Wfg==", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-weak-map": "2.0.2", + "event-emitter": "0.3.5", + "is-promise": "2.1.0", + "lru-queue": "0.1.0", + "next-tick": "1.0.0", + "timers-ext": "0.1.5" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "0.1.7", + "readable-stream": "2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, + "mini-lr": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/mini-lr/-/mini-lr-0.1.9.tgz", + "integrity": "sha1-AhmdJzR5U9H9HW297UJh8Yey0PY=", + "requires": { + "body-parser": "1.14.2", + "debug": "2.6.9", + "faye-websocket": "0.7.3", + "livereload-js": "2.3.0", + "parseurl": "1.3.2", + "qs": "2.2.5" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + } + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "natives": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.3.tgz", + "integrity": "sha512-BZGSYV4YOLxzoTK73l0/s/0sH9l8SHs2ocReMH1f8JYSh5FUWu4ZrKCpJdRkWXV6HFR/pZDz7bwWOVAY07q77g==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.1", + "string_decoder": "1.1.1", + "timers-browserify": "2.0.10", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "node-wp-i18n": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/node-wp-i18n/-/node-wp-i18n-1.1.1.tgz", + "integrity": "sha512-SI3+vhddQDBh2pkOowqPdXs/YN/bRnNvR4gDmcSJaQ4P+z8jSuPRZTFFClaD/fVv0AG0zY/ku07oQuayr844Mg==", + "requires": { + "bluebird": "3.5.1", + "gettext-parser": "1.3.1", + "glob": "7.1.2", + "lodash": "4.17.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "tmp": "0.0.33" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "4.3.6", + "validate-npm-package-license": "3.0.3" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "requires": { + "object-assign": "4.1.1", + "prepend-http": "1.0.4", + "query-string": "4.3.4", + "sort-keys": "1.1.2" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "2.0.1" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "object-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.0.tgz", + "integrity": "sha512-05KzQ70lSeGSrZJQXE5wNDiTkBJDlUT/myi6RX9dVIvz7a7Qh4oH93BQdiPMn27nldYvVQCKMUaM83AfizZlsQ==" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "3.0.1" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "1.0.1", + "array-slice": "1.1.0", + "for-own": "1.0.0", + "isobject": "3.0.1" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "requires": { + "for-own": "1.0.0", + "make-iterator": "1.0.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "optional": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + }, + "dependencies": { + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "optional": true, + "requires": { + "for-in": "1.0.2" + } + } + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "requires": { + "wrappy": "1.0.2" + } + }, + "onecolor": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-3.0.5.tgz", + "integrity": "sha1-Nu/zIgE3nv3xGA+0ReUajiQl+fY=" + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "1.2.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "requires": { + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.1" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=" + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "requires": { + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "object-assign": "4.1.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "1.2.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "requires": { + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.14" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "requires": { + "is-absolute": "1.0.0", + "map-cache": "0.2.2", + "path-root": "0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "optional": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "optional": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "requires": { + "through": "2.3.8" + } + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "requires": { + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "pixrem": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pixrem/-/pixrem-4.0.1.tgz", + "integrity": "sha1-LaSh3m7EQjxfw3lOkwuB1EkOxoY=", + "requires": { + "browserslist": "2.11.3", + "postcss": "6.0.21", + "reduce-css-calc": "1.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "requires": { + "find-up": "2.1.0" + } + }, + "pleeease-filters": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pleeease-filters/-/pleeease-filters-4.0.0.tgz", + "integrity": "sha1-ZjKy+wVkjSdY2GU4T7zteeHMrsc=", + "requires": { + "onecolor": "3.0.5", + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "requires": { + "ansi-colors": "1.1.0", + "arr-diff": "4.0.0", + "arr-union": "3.1.0", + "extend-shallow": "3.0.2" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.3", + "source-map": "0.5.7", + "supports-color": "3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-apply": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/postcss-apply/-/postcss-apply-0.8.0.tgz", + "integrity": "sha1-FOVEu7XLbxweBIhXll15rgZrE0M=", + "requires": { + "babel-runtime": "6.26.0", + "balanced-match": "0.4.2", + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-attribute-case-insensitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-2.0.0.tgz", + "integrity": "sha1-lNxCLI+QmX8WvTOjZUu77AhJY7Q=", + "requires": { + "postcss": "6.0.21", + "postcss-selector-parser": "2.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "requires": { + "postcss": "5.2.18", + "postcss-message-helpers": "2.0.0", + "reduce-css-calc": "1.3.0" + } + }, + "postcss-color-function": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-color-function/-/postcss-color-function-4.0.1.tgz", + "integrity": "sha1-QCs/LOvD9pR+YY+2vjZU++zvZEQ=", + "requires": { + "css-color-function": "1.3.3", + "postcss": "6.0.21", + "postcss-message-helpers": "2.0.0", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-gray": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-color-gray/-/postcss-color-gray-4.1.0.tgz", + "integrity": "sha512-L4iLKQLdqChz6ZOgGb6dRxkBNw78JFYcJmBz1orHpZoeLtuhDDGegRtX9gSyfoCIM7rWZ3VNOyiqqvk83BEN+w==", + "requires": { + "color": "2.0.1", + "postcss": "6.0.21", + "postcss-message-helpers": "2.0.0", + "reduce-function-call": "1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "color": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color/-/color-2.0.1.tgz", + "integrity": "sha512-ubUCVVKfT7r2w2D3qtHakj8mbmKms+tThR8gI8zEYCbUBl8/voqFGt3kgBqGwXAopgXybnkuOq+qMYCRrp4cXw==", + "requires": { + "color-convert": "1.9.1", + "color-string": "1.5.2" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "requires": { + "color-name": "1.1.3", + "simple-swizzle": "0.2.2" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-hex-alpha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-3.0.0.tgz", + "integrity": "sha1-HlPmyKyyN5Vej9CLfs2xuLgwn5U=", + "requires": { + "color": "1.0.3", + "postcss": "6.0.21", + "postcss-message-helpers": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "color": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz", + "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", + "requires": { + "color-convert": "1.9.1", + "color-string": "1.5.2" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "requires": { + "color-name": "1.1.3", + "simple-swizzle": "0.2.2" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-hsl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-hsl/-/postcss-color-hsl-2.0.0.tgz", + "integrity": "sha1-EnA2ZvoxBDDj8wpFTawThjF9WEQ=", + "requires": { + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0", + "units-css": "0.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-hwb": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-hwb/-/postcss-color-hwb-3.0.0.tgz", + "integrity": "sha1-NAKxnvTYSXVAwftQcr6YY8qVVx4=", + "requires": { + "color": "1.0.3", + "postcss": "6.0.21", + "postcss-message-helpers": "2.0.0", + "reduce-function-call": "1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "color": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz", + "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", + "requires": { + "color-convert": "1.9.1", + "color-string": "1.5.2" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "requires": { + "color-name": "1.1.3", + "simple-swizzle": "0.2.2" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-rebeccapurple": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-3.0.0.tgz", + "integrity": "sha1-7rrwPTY7QwC5Z5K9MIHBntZlE9M=", + "requires": { + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-rgb": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-rgb/-/postcss-color-rgb-2.0.0.tgz", + "integrity": "sha1-FFOcinExSUtILg3RzCZf9lFLUmM=", + "requires": { + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-color-rgba-fallback": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-rgba-fallback/-/postcss-color-rgba-fallback-3.0.0.tgz", + "integrity": "sha1-N9XJNToHoJJwkSqCYGu0Kg1wLAQ=", + "requires": { + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0", + "rgb-hex": "2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "requires": { + "colormin": "1.1.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "requires": { + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-cssnext": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-cssnext/-/postcss-cssnext-3.1.0.tgz", + "integrity": "sha512-awPDhI4OKetcHCr560iVCoDuP6e/vn0r6EAqdWPpAavJMvkBSZ6kDpSN4b3mB3Ti57hQMunHHM8Wvx9PeuYXtA==", + "requires": { + "autoprefixer": "7.2.6", + "caniuse-api": "2.0.0", + "chalk": "2.4.0", + "pixrem": "4.0.1", + "pleeease-filters": "4.0.0", + "postcss": "6.0.21", + "postcss-apply": "0.8.0", + "postcss-attribute-case-insensitive": "2.0.0", + "postcss-calc": "6.0.1", + "postcss-color-function": "4.0.1", + "postcss-color-gray": "4.1.0", + "postcss-color-hex-alpha": "3.0.0", + "postcss-color-hsl": "2.0.0", + "postcss-color-hwb": "3.0.0", + "postcss-color-rebeccapurple": "3.0.0", + "postcss-color-rgb": "2.0.0", + "postcss-color-rgba-fallback": "3.0.0", + "postcss-custom-media": "6.0.0", + "postcss-custom-properties": "6.3.1", + "postcss-custom-selectors": "4.0.1", + "postcss-font-family-system-ui": "3.0.0", + "postcss-font-variant": "3.0.0", + "postcss-image-set-polyfill": "0.3.5", + "postcss-initial": "2.0.0", + "postcss-media-minmax": "3.0.0", + "postcss-nesting": "4.2.1", + "postcss-pseudo-class-any-link": "4.0.0", + "postcss-pseudoelements": "5.0.0", + "postcss-replace-overflow-wrap": "2.0.0", + "postcss-selector-matches": "3.0.1", + "postcss-selector-not": "3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "autoprefixer": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", + "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", + "requires": { + "browserslist": "2.11.3", + "caniuse-lite": "1.0.30000830", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0" + } + }, + "caniuse-api": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-2.0.0.tgz", + "integrity": "sha1-sd21pZZrFvSNxJmERNS7xsfZ2DQ=", + "requires": { + "browserslist": "2.11.3", + "caniuse-lite": "1.0.30000830", + "lodash.memoize": "4.1.2", + "lodash.uniq": "4.5.0" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "postcss-calc": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-6.0.1.tgz", + "integrity": "sha1-PSQXG79udinUIqQ26/5t2VEfQzA=", + "requires": { + "css-unit-converter": "1.1.1", + "postcss": "6.0.21", + "postcss-selector-parser": "2.2.3", + "reduce-css-calc": "2.1.4" + } + }, + "reduce-css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz", + "integrity": "sha512-i/vWQbyd3aJRmip9OVSN9V6nIjLf/gg/ctxb0CpvHWtcRysFl/ngDBQD+rqavxdw/doScA3GMBXhzkHQ4GCzFQ==", + "requires": { + "css-unit-converter": "1.1.1", + "postcss-value-parser": "3.3.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-custom-media": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-6.0.0.tgz", + "integrity": "sha1-vlMnhBEOyylQRPtTlaGABushpzc=", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-custom-properties": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-6.3.1.tgz", + "integrity": "sha512-zoiwn4sCiUFbr4KcgcNZLFkR6gVQom647L+z1p/KBVHZ1OYwT87apnS42atJtx6XlX2yI7N5fjXbFixShQO2QQ==", + "requires": { + "balanced-match": "1.0.0", + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-custom-selectors": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-4.0.1.tgz", + "integrity": "sha1-eBOC+UxS5yfvXKR3bqKt9JphE4I=", + "requires": { + "postcss": "6.0.21", + "postcss-selector-matches": "3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "requires": { + "postcss": "5.2.18", + "uniqs": "2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", + "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", + "requires": { + "postcss": "5.2.18", + "uniqid": "4.1.1" + } + }, + "postcss-font-family-system-ui": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-font-family-system-ui/-/postcss-font-family-system-ui-3.0.0.tgz", + "integrity": "sha512-58G/hTxMSSKlIRpcPUjlyo6hV2MEzvcVO2m4L/T7Bb2fJTG4DYYfQjQeRvuimKQh1V1sOzCIz99g+H2aFNtlQw==", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-font-variant": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-3.0.0.tgz", + "integrity": "sha1-CMzIj2BQuoLtjvLMdsDGprQfGD4=", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-image-set-polyfill": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/postcss-image-set-polyfill/-/postcss-image-set-polyfill-0.3.5.tgz", + "integrity": "sha1-Dxk0E3AM8fgr05Bm7wFtZaShgYE=", + "requires": { + "postcss": "6.0.21", + "postcss-media-query-parser": "0.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-import": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", + "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", + "requires": { + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0", + "read-cache": "1.0.0", + "resolve": "1.7.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-initial": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-2.0.0.tgz", + "integrity": "sha1-cnFfczbgu3k1HZnuZcSiU6hEG6Q=", + "requires": { + "lodash.template": "4.4.0", + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.templatesettings": "4.1.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "requires": { + "lodash._reinterpolate": "3.0.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "requires": { + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1", + "postcss-load-options": "1.2.0", + "postcss-load-plugins": "2.3.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "requires": { + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "requires": { + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "postcss-media-minmax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-3.0.0.tgz", + "integrity": "sha1-Z1JWA3pD70C8Twdgv9BtTcadSNI=", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=" + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "requires": { + "browserslist": "1.7.7", + "caniuse-api": "1.6.1", + "postcss": "5.2.18", + "postcss-selector-parser": "2.2.3", + "vendors": "1.0.2" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000830", + "electron-to-chromium": "1.3.42" + } + } + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=" + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "requires": { + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "requires": { + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0", + "uniqs": "2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "requires": { + "alphanum-sort": "1.0.2", + "has": "1.0.1", + "postcss": "5.2.18", + "postcss-selector-parser": "2.2.3" + } + }, + "postcss-nesting": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-4.2.1.tgz", + "integrity": "sha512-IkyWXICwagCnlaviRexi7qOdwPw3+xVVjgFfGsxmztvRVaNxAlrypOIKqDE5mxY+BVxnId1rnUKBRQoNE2VDaA==", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "requires": { + "is-absolute-url": "2.1.0", + "normalize-url": "1.9.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "requires": { + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-pseudo-class-any-link": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-4.0.0.tgz", + "integrity": "sha1-kVKgYT00UHIFE+iJKFS65C0O5o4=", + "requires": { + "postcss": "6.0.21", + "postcss-selector-parser": "2.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-pseudoelements": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-pseudoelements/-/postcss-pseudoelements-5.0.0.tgz", + "integrity": "sha1-7vGU6NUkZFylIKlJ6V5RjoEkAss=", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "requires": { + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "requires": { + "postcss": "5.2.18" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-replace-overflow-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-2.0.0.tgz", + "integrity": "sha1-eU22+qVPjbEAhUOSqTr0V2i04ls=", + "requires": { + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-selector-matches": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postcss-selector-matches/-/postcss-selector-matches-3.0.1.tgz", + "integrity": "sha1-5WNAEeE5UIgYYbvdWMLQER/8lqs=", + "requires": { + "balanced-match": "0.4.2", + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-selector-not": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-3.0.1.tgz", + "integrity": "sha1-Lk2y8JZTNsAefOx9tsYN/3ZzNdk=", + "requires": { + "balanced-match": "0.4.2", + "postcss": "6.0.21" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "requires": { + "chalk": "2.4.0", + "source-map": "0.6.1", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "requires": { + "flatten": "1.0.2", + "indexes-of": "1.0.1", + "uniq": "1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "requires": { + "is-svg": "2.1.0", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0", + "svgo": "0.7.2" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.18", + "uniqs": "2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.18", + "uniqs": "2.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "optional": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "1.4.1", + "once": "1.3.3" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "1.4.0" + }, + "dependencies": { + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + } + } + } + } + }, + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qs": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz", + "integrity": "sha1-EIirr53MCuWuRbcJ5sa1iIsjkjw=" + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "requires": { + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "optional": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "optional": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "2.0.6", + "safe-buffer": "5.1.1" + } + }, + "raw-body": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", + "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", + "requires": { + "bytes": "2.4.0", + "iconv-lite": "0.4.13", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=" + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=" + } } }, - "grunt-legacy-log-utils": { + "read-cache": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz", - "integrity": "sha1-p7ji0Ps1taUPSvmG/BEnSevJbz0=", - "dev": true, + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", "requires": { - "chalk": "1.1.3", - "lodash": "4.3.0" + "pify": "2.3.0" }, "dependencies": { - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, - "grunt-legacy-util": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz", - "integrity": "sha1-OGqnjcbtUJhsKxiVcmWxtIq7m4Y=", - "dev": true, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "requires": { - "async": "1.5.2", - "exit": "0.1.2", - "getobject": "0.1.0", - "hooker": "0.2.3", - "lodash": "4.3.0", - "underscore.string": "3.2.3", - "which": "1.2.14" - }, - "dependencies": { - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - } + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" } }, - "grunt-postcss": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.8.0.tgz", - "integrity": "sha1-jzCor2B5A84MRfAfC+QsYOMc6w4=", - "dev": true, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "requires": { - "chalk": "1.1.3", - "diff": "2.2.3", - "postcss": "5.2.18" + "find-up": "2.1.0", + "read-pkg": "2.0.0" } }, - "grunt-sass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-sass/-/grunt-sass-2.1.0.tgz", - "integrity": "sha512-XkexnQt/9rhReNd+Y7T0n/2g5FqYOQKfi2iSlpwDqvgs7EgEaGTxNhnWzHnbW5oNRvzL9AHopBG3AgRxL0d+DA==", - "dev": true, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { - "each-async": "1.1.1", - "node-sass": "4.7.2", - "object-assign": "4.1.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" } }, - "grunt-wp-i18n": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/grunt-wp-i18n/-/grunt-wp-i18n-0.5.4.tgz", - "integrity": "sha1-hynlrU9LIxJpch8xcWVNLGKVVJI=", - "dev": true, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "requires": { - "async": "0.9.2", - "gettext-parser": "1.1.2", - "grunt": "0.4.5", - "underscore": "1.8.3", - "underscore.string": "3.0.3" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" }, "dependencies": { - "argparse": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", - "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", - "dev": true, - "requires": { - "underscore": "1.7.0", - "underscore.string": "2.4.0" - }, - "dependencies": { - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, - "underscore.string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", - "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", - "dev": true - } - } - }, - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true - }, - "coffee-script": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", - "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=", - "dev": true - }, - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", - "dev": true - }, - "dateformat": { - "version": "1.0.2-1.2.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", - "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=", - "dev": true - }, - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", - "dev": true - }, - "findup-sync": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", - "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", - "dev": true, - "requires": { - "glob": "3.2.11", - "lodash": "2.4.2" - }, - "dependencies": { - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "minimatch": "0.3.0" - } - }, - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "dev": true, - "requires": { - "lru-cache": "2.7.3", - "sigmund": "1.0.1" - } - } - } - }, - "glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", - "dev": true, - "requires": { - "graceful-fs": "1.2.3", - "inherits": "1.0.2", - "minimatch": "0.2.14" - }, - "dependencies": { - "inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", - "dev": true - } - } - }, "graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", - "dev": true - }, - "grunt": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", - "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=", - "dev": true, - "requires": { - "async": "0.1.22", - "coffee-script": "1.3.3", - "colors": "0.6.2", - "dateformat": "1.0.2-1.2.3", - "eventemitter2": "0.4.14", - "exit": "0.1.2", - "findup-sync": "0.1.3", - "getobject": "0.1.0", - "glob": "3.1.21", - "grunt-legacy-log": "0.1.3", - "grunt-legacy-util": "0.2.0", - "hooker": "0.2.3", - "iconv-lite": "0.2.11", - "js-yaml": "2.0.5", - "lodash": "0.9.2", - "minimatch": "0.2.14", - "nopt": "1.0.10", - "rimraf": "2.2.8", - "underscore.string": "2.2.1", - "which": "1.0.9" - }, - "dependencies": { - "async": { - "version": "0.1.22", - "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", - "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=", - "dev": true - }, - "underscore.string": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", - "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=", - "dev": true - } - } - }, - "grunt-legacy-log": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", - "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", - "dev": true, - "requires": { - "colors": "0.6.2", - "grunt-legacy-log-utils": "0.1.1", - "hooker": "0.2.3", - "lodash": "2.4.2", - "underscore.string": "2.3.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", - "dev": true - } - } - }, - "grunt-legacy-log-utils": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", - "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", - "dev": true, - "requires": { - "colors": "0.6.2", - "lodash": "2.4.2", - "underscore.string": "2.3.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", - "dev": true - } - } - }, - "grunt-legacy-util": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", - "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=", - "dev": true, - "requires": { - "async": "0.1.22", - "exit": "0.1.2", - "getobject": "0.1.0", - "hooker": "0.2.3", - "lodash": "0.9.2", - "underscore.string": "2.2.1", - "which": "1.0.9" - }, - "dependencies": { - "async": { - "version": "0.1.22", - "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", - "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=", - "dev": true - }, - "underscore.string": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", - "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", - "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=", - "dev": true - }, - "js-yaml": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", - "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=", - "dev": true, - "requires": { - "argparse": "0.1.16", - "esprima": "1.0.4" - } - }, - "lodash": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", - "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=", - "dev": true + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "lru-cache": "2.7.3", - "sigmund": "1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "dev": true, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "abbrev": "1.1.1" + "safe-buffer": "5.1.1" } - }, - "underscore.string": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.0.3.tgz", - "integrity": "sha1-Rhe4waJQz25QZPu7Nj0PqWzxRVI=", - "dev": true - }, - "which": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", - "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", - "dev": true } } }, - "gzip-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", - "integrity": "sha1-Zs+LEBBHInuVus5uodoMF37Vwi8=", - "dev": true, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "requires": { - "browserify-zlib": "0.1.4", - "concat-stream": "1.6.0" + "resolve": "1.7.1" } }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", "requires": { - "chalk": "1.1.3", - "commander": "2.14.1", - "is-my-json-valid": "2.17.1", - "pinkie-promise": "2.0.1" + "balanced-match": "0.4.2", + "math-expression-evaluator": "1.2.17", + "reduce-function-call": "1.0.2" }, "dependencies": { - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==", - "dev": true + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" } } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", "requires": { - "ansi-regex": "2.1.1" + "balanced-match": "0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + } } }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.8" } }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "optional": true, + "requires": { + "is-equal-shallow": "0.1.3" + } }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", - "dev": true + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true + "regexpp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==" }, - "http-errors": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", - "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", - "dev": true, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "requires": { - "inherits": "2.0.3", - "statuses": "1.4.0" + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, - "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", - "dev": true + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" + "jsesc": "0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + } } }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "2.0.1" - } + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "is-finite": "1.0.2" } }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" }, - "invert-kv": { + "require-dir": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true + "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.0.0.tgz", + "integrity": "sha512-PUJcQVTP4n6F8Un1GEEWhqnmBMfukVsL5gqwBxt7RF+nP+9hSOLJ/vSs5iUoXw1UWDgzqg9B/IIb15kfQKWsAQ==" }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "requires": { - "builtin-modules": "1.1.1" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" } }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "requires": { - "number-is-nan": "1.0.1" + "path-parse": "1.0.5" } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "requires": { - "number-is-nan": "1.0.1" + "expand-tilde": "2.0.2", + "global-modules": "1.0.0" } }, - "is-my-json-valid": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz", - "integrity": "sha512-Q2khNw+oBlWuaYvEEHtKSw/pCxD2L5Rc1C+UQme9X6JdRDh7m5D7HkozA0qa3DUkQ6VzCnEm8mVIQPyIRkI5sQ==", - "dev": true, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true + "rgb": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/rgb/-/rgb-0.1.0.tgz", + "integrity": "sha1-vieykej+/+rBvZlylyG/pA/AN7U=" }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "rgb-hex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rgb-hex/-/rgb-hex-2.1.0.tgz", + "integrity": "sha1-x3PF/iJoolV42SU5qCp6XOU77aY=" }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "0.1.4" + } }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + } + } }, - "js-base64": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", - "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==", - "dev": true + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } }, - "js-yaml": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", - "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", - "dev": true, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" + "is-promise": "2.1.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, + "run-sequence": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-2.2.1.tgz", + "integrity": "sha512-qkzZnQWMZjcKbh3CNly2srtrkaO/2H/SI5f2eliMCapdRD3UhMrwjfOAZJAnZ2H8Ju4aBzFZkBGXUqFs9V0yxw==", "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "chalk": "1.1.3", + "fancy-log": "1.3.2", + "plugin-error": "0.1.2" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "requires": { + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=" + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=" + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "requires": { + "kind-of": "1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "requires": { + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" + } } } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "requires": { - "invert-kv": "1.0.0" + "rx-lite": "4.0.8" } }, - "livereload-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.3.0.tgz", - "integrity": "sha512-j1R0/FeGa64Y+NmqfZhyoVRzcFlOZ8sNlKzHjh4VvLULFACZhn68XrX5DFg2FhMvSMJmROuFxRSa560ECWKBMg==", - "dev": true - }, - "load-grunt-tasks": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-3.5.2.tgz", - "integrity": "sha1-ByhWEYD9IP+KaSdQWFL8WKrqDIg=", - "dev": true, - "requires": { - "arrify": "1.0.1", - "multimatch": "2.1.0", - "pkg-up": "1.0.0", - "resolve-pkg": "0.1.0" - } + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, - "load-json-file": { + "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "ret": "0.1.15" } }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=" }, - "longest": { + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-immediate-shim": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "dev": true, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "maxmin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", - "integrity": "sha1-cTZehKmd2Piz99X94vANHn9zvmE=", - "dev": true, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { - "chalk": "1.1.3", - "figures": "1.7.0", - "gzip-size": "1.0.0", - "pretty-bytes": "1.0.4" + "shebang-regex": "1.0.0" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - } + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", - "dev": true + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "dev": true, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", "requires": { - "mime-db": "1.30.0" + "is-arrayish": "0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.1.tgz", + "integrity": "sha1-wt/DhquqDD4zxI2z/ocFnmkGXv0=" + } } }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "requires": { - "brace-expansion": "1.1.11" + "is-fullwidth-code-point": "2.0.0" } }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" }, "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } } } }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } } }, - "nan": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", - "dev": true - }, - "node-gyp": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", - "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", - "dev": true, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "fstream": "1.0.11", - "glob": "7.0.6", - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "npmlog": "4.1.2", - "osenv": "0.1.4", - "request": "2.79.0", - "rimraf": "2.2.8", - "semver": "5.3.0", - "tar": "2.2.1", - "which": "1.2.14" + "kind-of": "3.2.2" }, "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } } } }, - "node-sass": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", - "integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==", - "dev": true, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", "requires": { - "async-foreach": "0.1.3", - "chalk": "1.1.3", - "cross-spawn": "3.0.1", - "gaze": "1.1.2", - "get-stdin": "4.0.1", - "glob": "7.0.6", - "in-publish": "2.0.0", - "lodash.assign": "4.2.0", - "lodash.clonedeep": "4.5.0", - "lodash.mergewith": "4.6.1", - "meow": "3.7.0", - "mkdirp": "0.5.1", - "nan": "2.8.0", - "node-gyp": "3.6.2", - "npmlog": "4.1.2", - "request": "2.79.0", - "sass-graph": "2.2.4", - "stdout-stream": "1.4.0", - "true-case-path": "1.0.2" + "is-plain-obj": "1.1.0" } }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "abbrev": "1.1.1" + "atob": "2.1.0", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.1" + "source-map": "0.5.7" } }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=" + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", - "dev": true + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "requires": { - "define-properties": "1.1.2", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "object-keys": "1.0.11" + "through": "2.3.8" } }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "ee-first": "1.1.1" + "extend-shallow": "3.0.2" } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "wrappy": "1.0.2" + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + } } }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { - "lcid": "1.0.0" + "inherits": "2.0.3", + "readable-stream": "2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "dev": true, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "duplexer": "0.1.1" } }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true + "stream-consume": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==" }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, + "stream-http": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", + "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", "requires": { - "error-ex": "1.3.1" + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } } }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, + "streamfilter": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", "requires": { - "pinkie-promise": "2.0.1" + "readable-stream": "2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } + } } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-type": { + "strict-uri-encode": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "pinkie": "2.0.4" + "ansi-regex": "2.1.1" } }, - "pkg-up": { + "strip-bom": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz", - "integrity": "sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY=", - "dev": true, + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", "requires": { - "find-up": "1.1.2" + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "dev": true, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=" + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.3", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "has-flag": "3.0.0" } }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", - "dev": true - }, - "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", - "dev": true, + "svgo": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", "requires": { - "get-stdin": "4.0.1", - "meow": "3.7.0" + "coa": "1.0.4", + "colors": "1.1.2", + "csso": "2.3.2", + "js-yaml": "3.7.0", + "mkdirp": "0.5.1", + "sax": "1.2.4", + "whet.extend": "0.9.9" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "requires": { + "argparse": "1.0.10", + "esprima": "2.7.3" + } + } } }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "requires": { + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.0", + "lodash": "4.17.5", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } + } }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true + "tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" }, - "qs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.1.0.tgz", - "integrity": "sha1-TZMuXH6kEcynajEtOaYGIA/VDNk=", - "dev": true + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, - "raw-body": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", - "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", - "dev": true, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "bytes": "2.4.0", - "iconv-lite": "0.4.13", - "unpipe": "1.0.0" + "readable-stream": "2.3.6", + "xtend": "4.0.1" }, "dependencies": { - "bytes": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", - "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=", - "dev": true + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "iconv-lite": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", - "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", - "dev": true + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.1" + } } } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "os-homedir": "1.0.2" } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "setimmediate": "1.0.5" } }, - "readable-stream": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", - "integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==", - "dev": true, + "timers-ext": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.5.tgz", + "integrity": "sha512-tsEStd7kmACHENhsUPaxb8Jf8/+GZZxyNFQbZD07HQOyooOa6At1rQqjffgvg7n+dxscQa9cjjMdWhJtsP2sxg==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "es5-ext": "0.10.42", + "next-tick": "1.0.0" } }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "os-tmpdir": "1.0.2" } }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "1.0.2" - } + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.11.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "2.0.6", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "qs": "6.3.2", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.4.3", - "uuid": "3.2.1" + "kind-of": "3.2.2" }, "dependencies": { - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } } } }, - "require-directory": { + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + } }, - "require-main-filename": { + "trim-right": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", - "dev": true + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, - "resolve-pkg": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-0.1.0.tgz", - "integrity": "sha1-AsyZNBDik2livZcWahsHfalyVTE=", - "dev": true, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "resolve-from": "2.0.0" + "prelude-ls": "1.1.2" } }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "requires": { - "align-text": "0.1.4" + "media-typer": "0.3.0", + "mime-types": "2.1.18" } }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "requires": { - "glob": "7.0.6", - "lodash": "4.17.5", - "scss-tokenizer": "0.2.3", - "yargs": "7.1.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "5.0.0" + "window-size": "0.1.0" } } } }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "requires": { + "source-map": "0.5.7", + "uglify-js": "2.8.29", + "webpack-sources": "1.1.0" + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "js-base64": "2.4.3", - "source-map": "0.4.4" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "amdefine": "1.0.1" + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "sigmund": { + "uniq": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, + "uniqid": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-4.1.1.tgz", + "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", "requires": { - "hoek": "2.16.3" + "macaddress": "0.2.8" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=" }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=" + }, + "units-css": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/units-css/-/units-css-0.4.0.tgz", + "integrity": "sha1-1iKGU6UZg9fBb/KPi53Dsf/tOgc=", "requires": { - "spdx-license-ids": "1.2.2" + "isnumeric": "0.2.0", + "viewport-dimensions": "0.2.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "dev": true, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { - "assert-plus": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" } } }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true + "upath": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", + "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" }, - "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", - "dev": true, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", "requires": { - "readable-stream": "2.3.4" + "punycode": "2.1.0" } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "safe-buffer": "5.1.1" + "kind-of": "6.0.2" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", - "dev": true + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=" }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "requires": { - "ansi-regex": "2.1.1" + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "0.2.1" - } + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", "requires": { - "get-stdin": "4.0.1" + "user-home": "1.1.1" } }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "requires": { - "has-flag": "1.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } + "vendors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz", + "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==" }, - "tiny-lr": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-0.2.1.tgz", - "integrity": "sha1-s/26gC5dVqM8L28QeUsy5Hescp0=", - "dev": true, - "requires": { - "body-parser": "1.14.2", - "debug": "2.2.0", - "faye-websocket": "0.10.0", - "livereload-js": "2.3.0", - "parseurl": "1.3.2", - "qs": "5.1.0" - } + "viewport-dimensions": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz", + "integrity": "sha1-3nQHR9tTh/0XJfUXXpG6x2r982w=" }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", - "dev": true, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", "requires": { - "punycode": "1.4.1" + "clone": "1.0.4", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" } }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", - "dev": true, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", "requires": { - "glob": "6.0.4" + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" }, "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "inflight": "1.0.6", + "core-util-is": "1.0.2", "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" } } } }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", - "dev": true, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", "requires": { - "media-typer": "0.3.0", - "mime-types": "2.1.17" + "source-map": "0.5.7" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "indexof": "0.0.1" } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true - }, - "underscore.string": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz", - "integrity": "sha1-gGmSYzZl1eX8tNsfs6hi62jp5to=", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "watchpack": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", + "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", + "requires": { + "chokidar": "2.0.3", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + } + } }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true + "webpack": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.11.0.tgz", + "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", + "requires": { + "acorn": "5.5.3", + "acorn-dynamic-import": "2.0.2", + "ajv": "6.4.0", + "ajv-keywords": "3.1.0", + "async": "2.6.0", + "enhanced-resolve": "3.4.1", + "escope": "3.6.0", + "interpret": "1.1.0", + "json-loader": "0.5.7", + "json5": "0.5.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "mkdirp": "0.5.1", + "node-libs-browser": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.5.0", + "tapable": "0.2.8", + "uglifyjs-webpack-plugin": "0.4.6", + "watchpack": "1.5.0", + "webpack-sources": "1.1.0", + "yargs": "8.0.2" + }, + "dependencies": { + "ajv": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", + "requires": { + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1", + "uri-js": "3.0.2" + } + }, + "ajv-keywords": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=" + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "2.0.0" + } + } + } }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "source-list-map": "2.0.0", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "webpack-stream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/webpack-stream/-/webpack-stream-4.0.3.tgz", + "integrity": "sha512-Tx7ks7Of/JiPz7/tUM4WqSg4OcXF4m4OzNSaEzNA1TNXQaiTHIjiKqUoL79wGXbFt2q1IP8VG5DcEdaxifY5Ew==", + "requires": { + "fancy-log": "1.3.2", + "lodash.clone": "4.5.0", + "lodash.some": "4.6.0", + "memory-fs": "0.4.1", + "plugin-error": "1.0.1", + "supports-color": "5.4.0", + "through": "2.3.8", + "vinyl": "2.1.0", + "webpack": "3.11.0" }, "dependencies": { - "assert-plus": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, + "clone-stats": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, + "vinyl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "requires": { + "clone": "2.1.2", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.1.2", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" + } } } }, @@ -2782,122 +10265,170 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, "requires": { - "http-parser-js": "0.4.10", + "http-parser-js": "0.4.11", "websocket-extensions": "0.1.3" } }, "websocket-extensions": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=" }, "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", - "dev": true, + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "requires": { "isexe": "2.0.0" } }, "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "dev": true, - "requires": { - "string-width": "1.0.2" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" }, "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, "requires": { "string-width": "1.0.2", "strip-ansi": "3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "requires": { + "mkdirp": "0.5.1" + } }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", + "camelcase": "4.1.0", + "cliui": "3.2.0", "decamelize": "1.2.0", - "window-size": "0.1.0" + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" }, "dependencies": { "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } } } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "requires": { - "camelcase": "3.0.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" } } } diff --git a/package.json b/package.json index ba82afdeb..c3308c74c 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,12 @@ "makepot": "./node_modules/.bin/wpi18n makepot && echo '.pot file updated'" }, "dependencies": { + "babel-cli": "^6.26.0", "babel-core": "^6.26.0", "babel-eslint": "^8.2.1", "babel-loader": "^7.1.2", "babel-preset-env": "^1.6.1", - "babel-register": "^6.26.0", + "babel-preset-react": "^6.24.1", "eslint": "^4.17.0", "eslint-loader": "^1.9.0", "gulp": "^3.9.1", @@ -34,5 +35,8 @@ "run-sequence": "^2.2.1", "webpack": "^3.11.0", "webpack-stream": "^4.0.1" + }, + "devDependencies": { + "babel-register": "^6.26.0" } } diff --git a/webpack.config.babel.js b/webpack.config.babel.js index c5f3b992d..1039f1ad8 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -13,6 +13,7 @@ module.exports = { 'admin-distributed-post': './assets/js/admin-distributed-post.js', push: './assets/js/push.js', 'gutenberg-syndicated-post': './assets/js/gutenberg-syndicated-post.js', + 'gutenberg-status-plugin': './assets/js/gutenberg-status-plugin.js', }, output: { path: DIST_PATH, From ab7cd8f7b78586e9fd4635bc7328fc123d663af9 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 4 May 2018 09:56:19 -0400 Subject: [PATCH 09/18] Updates slotFill name to match changes in the Gutenberg PR --- assets/js/gutenberg-status-plugin.js | 26 +++++++++----------- dist/js/admin-distributed-post.min.js.map | 2 +- dist/js/admin-external-connection.min.js.map | 2 +- dist/js/admin-pull.min.js.map | 2 +- dist/js/gutenberg-status-plugin.min.js | 2 +- dist/js/gutenberg-status-plugin.min.js.map | 2 +- dist/js/gutenberg-syndicated-post.min.js.map | 2 +- dist/js/push.min.js.map | 2 +- 8 files changed, 19 insertions(+), 21 deletions(-) diff --git a/assets/js/gutenberg-status-plugin.js b/assets/js/gutenberg-status-plugin.js index e26887f16..4112b164b 100644 --- a/assets/js/gutenberg-status-plugin.js +++ b/assets/js/gutenberg-status-plugin.js @@ -1,34 +1,32 @@ import { wp, dtGutenberg } from 'window' const { registerPlugin } = wp.plugins; -const { PluginPostStatusVisibility } = wp.editPost; +const { PluginPostStatusInfo } = wp.editPost; const { __ } = wp.i18n; const { PanelRow } = wp.components; const renderDistributedFrom = () => { return( - +

{ __( 'Distributed on: ' ) } { dtGutenberg.syndicationTime }

-
+ ) } const renderDistributedTo = () => { return( - - -

- { wp.i18n.sprintf( - wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), - dtGutenberg.syndicationCount, - '1' === dtGutenberg.syndicationCount ? '' : 's' - ) } -

-
-
+ +

+ { wp.i18n.sprintf( + wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), + dtGutenberg.syndicationCount, + '1' === dtGutenberg.syndicationCount ? '' : 's' + ) } +

+
) } diff --git a/dist/js/admin-distributed-post.min.js.map b/dist/js/admin-distributed-post.min.js.map index 9cc69ee4a..dc081c627 100644 --- a/dist/js/admin-distributed-post.min.js.map +++ b/dist/js/admin-distributed-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js.map b/dist/js/admin-external-connection.min.js.map index 35239be04..7f62a6ef5 100644 --- a/dist/js/admin-external-connection.min.js.map +++ b/dist/js/admin-external-connection.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OA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AAQ6G,GAAoBrC,GAAI,QAAS,WAGxCsC,EAA8BL,OAG9BV,EAAcM,IAAK,KAGnB,EAAA7E,EAAAxB,SAAQ,iCAAkC8D,SAG1CmC,KAKF,IAAMc,GAAiBtE,SAAS0B,eAAgB,sBAC3C4C,KAGJ,EAAAvF,EAAAxB,SAAQ+G,GAAiBvC,GAAI,QAAS,SAAEC,GACvC,GAAMuC,IAAW,EAAAxF,EAAAxB,SAAQqE,GACxB4C,EAAQD,EAASX,KAGbF,GAAea,EAAUvC,MAG7B,EAAAjD,EAAAxB,SAAQ+G,GAAiBT,SAAU,YAGnCU,EAAST,YAAa,kBAGtB/E,EAAAxB,QAAOyB,MACNC,cACAC,OAAQ,OACRC,MACCC,MAAOlB,EAAAC,GAAGiB,MACVC,OAAQ,yBACRmF,MAAOA,EACPC,IAAI,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,YAAckC,SAEjDnE,KAAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKsF,GAAK,CAG3C,GAAMxF,GAAMf,EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFyEM,SAAUvB,EAAQD,GGzExBC,EAAAD,QAAAyB,QH+EM,SAAUxB,EAAQD,GI/ExBC,EAAAD,QAAA0B,GJqFM,SAAUzB,EAAQD,EAASH,GAEjC,YAaA,SAAS8B,GAAuBC,GAAO,MAAOA,IAAOA,EAAIX,WAAaW,GAAQC,QAASD,GKrFvF,QAASE,KAKR,IAJoB,IAAfC,GACJA,EAAWC,QAG8B,K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EAAAC,GAAGuG,UAAY,iBAAmBhF,EAASP,KAAKsF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B3F,IAGlD,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,oBAAsBkC,IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-pull.min.js.map b/dist/js/admin-pull.min.js.map index f28f0ad00..42ef15266 100644 --- a/dist/js/admin-pull.min.js.map +++ b/dist/js/admin-pull.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDKO,CAED,SAAUtB,EAAQD,GEpExBC,EAAAD,QAAAwB,QFyEO,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDKO,CAED,SAAUtB,EAAQD,GEpExBC,EAAAD,QAAAwB,QFyEO,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-status-plugin.min.js b/dist/js/gutenberg-status-plugin.min.js index 9ed013c60..1f5c942b6 100644 --- a/dist/js/gutenberg-status-plugin.min.js +++ b/dist/js/gutenberg-status-plugin.min.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}({0:function(t,e){t.exports=window},10:function(t,e,n){"use strict";var r=n(0),i=r.wp.plugins.registerPlugin,u=r.wp.editPost.PluginPostStatusVisibility,o=r.wp.i18n.__,l=r.wp.components.PanelRow,c=function(){return React.createElement(u.Fill,null,React.createElement("p",null,o("Distributed on: "),React.createElement("strong",null," ",r.dtGutenberg.syndicationTime," ")))},s=function(){return React.createElement(l,null,React.createElement(u.Fill,null,React.createElement("p",null,r.wp.i18n.sprintf(r.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),r.dtGutenberg.syndicationCount,"1"===r.dtGutenberg.syndicationCount?"":"s"))))};i("distributor-status-panel",{render:r.dtGutenberg.syndicationCount>0?s:c})}}); +!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=10)}({0:function(t,n){t.exports=window},10:function(t,n,e){"use strict";var r=e(0),o=r.wp.plugins.registerPlugin,u=r.wp.editPost.PluginPostStatusInfo,i=r.wp.i18n.__,c=(r.wp.components.PanelRow,function(){return React.createElement(u,null,React.createElement("p",null,i("Distributed on: "),React.createElement("strong",null," ",r.dtGutenberg.syndicationTime," ")))}),s=function(){return React.createElement(u,null,React.createElement("p",null,r.wp.i18n.sprintf(r.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),r.dtGutenberg.syndicationCount,"1"===r.dtGutenberg.syndicationCount?"":"s")))};o("distributor-status-panel",{render:r.dtGutenberg.syndicationCount>0?s:c})}}); //# sourceMappingURL=gutenberg-status-plugin.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-status-plugin.min.js.map b/dist/js/gutenberg-status-plugin.min.js.map index 8c40ff8d6..ebc491f10 100644 --- a/dist/js/gutenberg-status-plugin.min.js.map +++ b/dist/js/gutenberg-status-plugin.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///gutenberg-status-plugin.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-status-plugin.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","window","10","_window","registerPlugin","wp","plugins","PluginPostStatusVisibility","editPost","__","i18n","PanelRow","components","renderDistributedFrom","React","createElement","Fill","dtGutenberg","syndicationTime","renderDistributedTo","sprintf","syndicationCount","render"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,GACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GAEQ+B,EAAmBD,EAAAE,GAAGC,QAAtBF,eACAG,EAA+BJ,EAAAE,GAAGG,SAAlCD,2BACAE,EAAON,EAAAE,GAAGK,KAAVD,GACAE,EAAcR,EAAAE,GAAGO,WAAjBD,SAEFE,EAAwB,WAC7B,MACCC,OAAAC,cAACR,EAA2BS,KAA5B,KACEF,MAAAC,cAAA,SACGN,EAAI,oBACNK,MAAAC,cAAA,kBAAWZ,EAAAc,YAAYC,gBAAvB,QAMCC,EAAsB,WAC3B,MACCL,OAAAC,cAACJ,EAAD,KACCG,MAAAC,cAACR,EAA2BS,KAA5B,KACEF,MAAAC,cAAA,SACEZ,EAAAE,GAAGK,KAAKU,QACTjB,EAAAE,GAAGK,KAAKD,GAAI,sCAAuC,eACnDN,EAAAc,YAAYI,iBACZ,MAAQlB,EAAAc,YAAYI,iBAAmB,GAAK,QAUlDjB,GAAgB,4BAA8BkB,OAFrBnB,EAAAc,YAAYI,iBAAmB,EAAOF,EAAsBN","file":"gutenberg-status-plugin.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 10);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\nvar PluginPostStatusVisibility = _window.wp.editPost.PluginPostStatusVisibility;\nvar __ = _window.wp.i18n.__;\nvar PanelRow = _window.wp.components.PanelRow;\n\n\nvar renderDistributedFrom = function renderDistributedFrom() {\n\treturn React.createElement(\n\t\tPluginPostStatusVisibility.Fill,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t__('Distributed on: '),\n\t\t\tReact.createElement(\n\t\t\t\t'strong',\n\t\t\t\tnull,\n\t\t\t\t' ',\n\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderDistributedTo = function renderDistributedTo() {\n\treturn React.createElement(\n\t\tPanelRow,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginPostStatusVisibility.Fill,\n\t\t\tnull,\n\t\t\tReact.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderFunction = _window.dtGutenberg.syndicationCount > 0 ? renderDistributedTo : renderDistributedFrom;\n\nregisterPlugin('distributor-status-panel', { render: renderFunction });\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-status-plugin.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\n\nconst { registerPlugin } = wp.plugins;\nconst { PluginPostStatusVisibility } = wp.editPost;\nconst { __ } = wp.i18n;\nconst { PanelRow } = wp.components;\n\nconst renderDistributedFrom = () => {\n\treturn(\n\t\t\n\t\t\t\t

\n\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t

\n\t\t
\n\t)\n}\n\nconst renderDistributedTo = () => {\n\treturn(\n\t\t\n\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t\t) }\n\t\t\t\t\t

\n\t\t\t
\n\t\t
\n\t)\n}\n\nconst renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom\n\nregisterPlugin( 'distributor-status-panel', { render: renderFunction } );\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-status-plugin.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///gutenberg-status-plugin.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-status-plugin.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","window","10","_window","registerPlugin","wp","plugins","PluginPostStatusInfo","editPost","__","i18n","renderDistributedFrom","components","PanelRow","React","createElement","dtGutenberg","syndicationTime","renderDistributedTo","sprintf","syndicationCount","render"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,GACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GAEQ+B,EAAmBD,EAAAE,GAAGC,QAAtBF,eACAG,EAAyBJ,EAAAE,GAAGG,SAA5BD,qBACAE,EAAON,EAAAE,GAAGK,KAAVD,GAGFE,GAFgBR,EAAAE,GAAGO,WAAjBC,SAEsB,WAC7B,MACCC,OAAAC,cAACR,EAAD,KACEO,MAAAC,cAAA,SACGN,EAAI,oBACNK,MAAAC,cAAA,kBAAWZ,EAAAa,YAAYC,gBAAvB,SAMCC,EAAsB,WAC3B,MACCJ,OAAAC,cAACR,EAAD,KACEO,MAAAC,cAAA,SACEZ,EAAAE,GAAGK,KAAKS,QACThB,EAAAE,GAAGK,KAAKD,GAAI,sCAAuC,eACnDN,EAAAa,YAAYI,iBACZ,MAAQjB,EAAAa,YAAYI,iBAAmB,GAAK,OASjDhB,GAAgB,4BAA8BiB,OAFrBlB,EAAAa,YAAYI,iBAAmB,EAAOF,EAAsBP","file":"gutenberg-status-plugin.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 10);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\nvar PluginPostStatusInfo = _window.wp.editPost.PluginPostStatusInfo;\nvar __ = _window.wp.i18n.__;\nvar PanelRow = _window.wp.components.PanelRow;\n\n\nvar renderDistributedFrom = function renderDistributedFrom() {\n\treturn React.createElement(\n\t\tPluginPostStatusInfo,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t__('Distributed on: '),\n\t\t\tReact.createElement(\n\t\t\t\t'strong',\n\t\t\t\tnull,\n\t\t\t\t' ',\n\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderDistributedTo = function renderDistributedTo() {\n\treturn React.createElement(\n\t\tPluginPostStatusInfo,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t)\n\t);\n};\n\nvar renderFunction = _window.dtGutenberg.syndicationCount > 0 ? renderDistributedTo : renderDistributedFrom;\n\nregisterPlugin('distributor-status-panel', { render: renderFunction });\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-status-plugin.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\n\nconst { registerPlugin } = wp.plugins;\nconst { PluginPostStatusInfo } = wp.editPost;\nconst { __ } = wp.i18n;\nconst { PanelRow } = wp.components;\n\nconst renderDistributedFrom = () => {\n\treturn(\n\t\t\n\t\t\t\t

\n\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t

\n\t\t
\n\t)\n}\n\nconst renderDistributedTo = () => {\n\treturn(\n\t\t\n\t\t\t\t

\n\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t) }\n\t\t\t\t

\n\t\t
\n\t)\n}\n\nconst renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom\n\nregisterPlugin( 'distributor-status-panel', { render: renderFunction } );\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-status-plugin.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js.map b/dist/js/gutenberg-syndicated-post.min.js.map index 3e57a8ee8..3b6a0260e 100644 --- a/dist/js/gutenberg-syndicated-post.min.js.map +++ b/dist/js/gutenberg-syndicated-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js","webpack:///./assets/js/gutenberg-distributed-from-sidebar.js","webpack:///./assets/js/gutenberg-distributed-to-sidebar.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","_window","_gutenbergDistributedFromSidebar","_gutenbergDistributedToSidebar","registerPlugin","wp","plugins","i18n","setLocaleData","dtGutenberg","console","log","syndicationCount","render","originalSourceId","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible","value","DistributedFromSidebar","undefined","_wp$components","components","PanelBody","Button","Fragment","_wp$editPost","editPost","PluginSidebar","PluginSidebarMoreMenuItem","React","title","syndicationTime","target","DistributedToSidebar"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC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berg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar _gutenbergDistributedFromSidebar = __webpack_require__(8);\n\nvar _gutenbergDistributedToSidebar = __webpack_require__(9);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\n\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\nconsole.log('dtGutenberg.syndicationCount', _window.dtGutenberg.syndicationCount);\nif (_window.dtGutenberg.syndicationCount > 0) {\n\tregisterPlugin('distributor-sidebar', {\n\t\trender: _gutenbergDistributedToSidebar.DistributedToSidebar\n\t});\n}\n\nif ('0' !== _window.dtGutenberg.originalSourceId) {\n\n\tvar messages = [];\n\n\tif (parseInt(_window.dtGutenberg.originalDeleted)) {\n\t\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\t\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n\t} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\t\tregisterPlugin('distributor-sidebar', {\n\t\t\trender: _gutenbergDistributedFromSidebar.DistributedFromSidebar\n\t\t});\n\t\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n\t} else {\n\t\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.linkNonceUrl\n\t\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n\t}\n\n\tvar messageElement = _window.wp.element.createElement('p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages);\n\n\t_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\t\tisDismissible: false\n\t});\n}\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedFromSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedFromSidebar = exports.DistributedFromSidebar = function DistributedFromSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t__('Distributed on: '),\n\t\t\t\t\tReact.createElement(\n\t\t\t\t\t\t\"strong\",\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\" \",\n\t\t\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t\t\t\" \"\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedToSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedToSidebar = exports.DistributedToSidebar = function DistributedToSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\nimport { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js'\nimport { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js'\nconst { registerPlugin } = wp.plugins;\n\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\nconsole.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount );\nif ( dtGutenberg.syndicationCount > 0 ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedToSidebar,\n\t\t} )\n\n}\n\nif ( '0' !== dtGutenberg.originalSourceId ) {\n\n\tconst messages = []\n\n\tif ( parseInt( dtGutenberg.originalDeleted ) ) {\n\t\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\t\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n\t} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedFromSidebar,\n\t\t} )\n\t\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t} else {\n\t\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t}\n\n\tconst messageElement = wp.element.createElement( 'p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages )\n\n\twp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\t\tisDismissible: false\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedFromSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-from-sidebar.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedToSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t\t\t) }\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-to-sidebar.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js","webpack:///./assets/js/gutenberg-distributed-from-sidebar.js","webpack:///./assets/js/gutenberg-distributed-to-sidebar.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","_window","_gutenbergDistributedFromSidebar","_gutenbergDistributedToSidebar","registerPlugin","wp","plugins","i18n","setLocaleData","dtGutenberg","console","log","syndicationCount","render","originalSourceId","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible","value","DistributedFromSidebar","undefined","_wp$components","components","PanelBody","Button","Fragment","_wp$editPost","editPost","PluginSidebar","PluginSidebarMoreMenuItem","React","title","syndicationTime","target","DistributedToSidebar"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,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,GACAI,OAAO,uBAELhC,EAAI,2BJ2LJ,SAAU3C,EAAQD,EAASH,GAEjC,YAGAc,QAAOC,eAAeZ,EAAS,cAC9B6D,OAAO,IAER7D,EAAQ6E,yBAAuBd,EK5N/B,IAAAtC,GAAA5B,EAAA,GLgOImE,EK/N0BvC,EAAAI,GAAGoC,WAAjBC,GLgOHF,EKhOLG,OLiOQH,EKjOAE,WAERE,GADa3C,EAAAI,GAAG4B,KAAhBC,SACajC,EAAAI,GAAGiB,QAAhBsB,UACAxB,EAAOnB,EAAAI,GAAGE,KAAVa,GLkOJyB,EKjOiD5C,EAAAI,GAAGyC,SAAhDC,ELkOYF,EKlOZE,cAAeC,ELmOSH,EKnOTG,yBAEVK,wBAAuB,WAEnC,MACCJ,OAAA1B,cAACqB,EAAD,KACCK,MAAA1B,cAACwB,GACA/D,KAAK,sBACLkE,MAAM,uBAEND,MAAA1B,cAACmB,EAAD,KACCO,MAAA1B,cAAA,SACGtB,EAAAI,GAAGE,KAAKY,QACTlB,EAAAI,GAAGE,KAAKa,GAAI,sCAAuC,eACnDnB,EAAAQ,YAAYG,iBACZ,MAAQX,EAAAQ,YAAYG,iBAAmB,GAAK,QAKhDqC,MAAA1B,cAACyB,GACAI,OAAO,uBAELhC,EAAI","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar _gutenbergDistributedFromSidebar = __webpack_require__(8);\n\nvar _gutenbergDistributedToSidebar = __webpack_require__(9);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\n\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\nconsole.log('dtGutenberg.syndicationCount', _window.dtGutenberg.syndicationCount);\nif (_window.dtGutenberg.syndicationCount > 0) {\n\tregisterPlugin('distributor-sidebar', {\n\t\trender: _gutenbergDistributedToSidebar.DistributedToSidebar\n\t});\n}\n\nif ('0' !== _window.dtGutenberg.originalSourceId) {\n\n\tvar messages = [];\n\n\tif (parseInt(_window.dtGutenberg.originalDeleted)) {\n\t\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\t\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n\t} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\t\tregisterPlugin('distributor-sidebar', {\n\t\t\trender: _gutenbergDistributedFromSidebar.DistributedFromSidebar\n\t\t});\n\t\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n\t} else {\n\t\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.linkNonceUrl\n\t\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n\t}\n\n\tvar messageElement = _window.wp.element.createElement('p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages);\n\n\t_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\t\tisDismissible: false\n\t});\n}\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedFromSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedFromSidebar = exports.DistributedFromSidebar = function DistributedFromSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t__('Distributed on: '),\n\t\t\t\t\tReact.createElement(\n\t\t\t\t\t\t\"strong\",\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\" \",\n\t\t\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t\t\t\" \"\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedToSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedToSidebar = exports.DistributedToSidebar = function DistributedToSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\nimport { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js'\nimport { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js'\nconst { registerPlugin } = wp.plugins;\n\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\nconsole.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount );\nif ( dtGutenberg.syndicationCount > 0 ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedToSidebar,\n\t\t} )\n\n}\n\nif ( '0' !== dtGutenberg.originalSourceId ) {\n\n\tconst messages = []\n\n\tif ( parseInt( dtGutenberg.originalDeleted ) ) {\n\t\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\t\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n\t} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedFromSidebar,\n\t\t} )\n\t\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t} else {\n\t\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t}\n\n\tconst messageElement = wp.element.createElement( 'p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages )\n\n\twp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\t\tisDismissible: false\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedFromSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-from-sidebar.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedToSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t\t\t) }\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-to-sidebar.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/push.min.js.map b/dist/js/push.min.js.map index e1b0ca941..bd69eb322 100644 --- a/dist/js/push.min.js.map +++ b/dist/js/push.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 6eba10de8b3a3f978167","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFyEM,SAAUvB,EAAQD,GGzExBC,EAAAD,QAAAyB,QH+EM,SAAUxB,EAAQD,GI/ExBC,EAAAD,QAAA0B,GJoFO,CACA,CACA,CAED,SAAUzB,EAAQD,EAASH,GAEjC,YAaA,SAAS8B,GAAuBC,GAAO,MAAOA,IAAOA,EAAIX,WAAaW,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MI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgB7D,EAAAJ,QAAEmG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,mBAGDnC,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6eba10de8b3a3f978167","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAA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CxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,QACM,CAEN,GAAM+C,GAAOL,EAAMI,cAAcE,aAAc,wBACzChF,EAAO0E,EAAMI,cAAcE,aAAc,qBAE/CpF,GAAoBmF,EAAO/E,GAAML,EAAA8B,cAAcsD,EAAO/E,GAEtD6B,EAAoBhB,UAAUG,OAAQ,QAEtC,IAAMf,GAAgByE,EAAMI,cAAcQ,WAC1CrF,GAAQ8B,UAAY2C,EAAMI,cAAc/C,SAExC,IAAMwD,GAAarF,SAASsF,cAAe,OAC3CD,GAAW1E,UAAUC,IAAK,qBAE1Bb,EAAQoD,YAAakC,GACrBtF,EAAQY,UAAY,mBAEpBiB,EAAwBuB,YAAapD,GAErC+B,QAOF,EAAAxC,EAAAF,SAAQsB,GAAyB2C,GAAI,QAAS,qBAAsB,SAAEmB,GACrEA,EAAMI,cAAcI,WAAWA,WAAWC,YAAaT,EAAMI,cAAcI,WAC3E,IAAMH,GAAOL,EAAMI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgB7D,EAAAJ,QAAEmG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,mBAGDnC,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file From ac93cfed7a35b5fd9670333e7448aec425cc3197 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 09:52:42 -0400 Subject: [PATCH 10/18] remove DistributedToSidebar --- assets/js/gutenberg-distributed-to-sidebar.js | 33 ------------------- assets/js/gutenberg-syndicated-post.js | 8 ----- 2 files changed, 41 deletions(-) delete mode 100644 assets/js/gutenberg-distributed-to-sidebar.js diff --git a/assets/js/gutenberg-distributed-to-sidebar.js b/assets/js/gutenberg-distributed-to-sidebar.js deleted file mode 100644 index 5474fe5e2..000000000 --- a/assets/js/gutenberg-distributed-to-sidebar.js +++ /dev/null @@ -1,33 +0,0 @@ -import { wp, dtGutenberg } from 'window' -const { Button, PanelBody } = wp.components -const { dispatch } = wp.data -const { Fragment } = wp.element -const { __ } = wp.i18n -const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost; - -export const DistributedToSidebar = () => { - - return ( - - - -

- { wp.i18n.sprintf( - wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), - dtGutenberg.syndicationCount, - '1' === dtGutenberg.syndicationCount ? '' : 's' - ) } -

-
-
- - { __( 'Distributor Details' ) } - -
- ) -} diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index eac6c8ac1..c6e30f418 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -1,17 +1,9 @@ import { wp, dtGutenberg } from 'window' import { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js' -import { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js' const { registerPlugin } = wp.plugins; wp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' ) -console.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount ); -if ( dtGutenberg.syndicationCount > 0 ) { - registerPlugin( 'distributor-sidebar', { - render: DistributedToSidebar, - } ) - -} if ( '0' !== dtGutenberg.originalSourceId ) { From d17ef453ee995f74a59273c09581a747e2b856b5 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 09:54:04 -0400 Subject: [PATCH 11/18] Remove DistributedFromSidebar --- .../js/gutenberg-distributed-from-sidebar.js | 30 ------------------- assets/js/gutenberg-syndicated-post.js | 4 --- 2 files changed, 34 deletions(-) delete mode 100644 assets/js/gutenberg-distributed-from-sidebar.js diff --git a/assets/js/gutenberg-distributed-from-sidebar.js b/assets/js/gutenberg-distributed-from-sidebar.js deleted file mode 100644 index 712fb75ed..000000000 --- a/assets/js/gutenberg-distributed-from-sidebar.js +++ /dev/null @@ -1,30 +0,0 @@ -import { wp, dtGutenberg } from 'window' -const { Button, PanelBody } = wp.components -const { dispatch } = wp.data -const { Fragment } = wp.element -const { __ } = wp.i18n -const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost; - -export const DistributedFromSidebar = () => { - - return ( - - - -

- { __( 'Distributed on: ' ) } - { dtGutenberg.syndicationTime } -

-
-
- - { __( 'Distributor Details' ) } - -
- ) -} diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index c6e30f418..990d7b92d 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -1,5 +1,4 @@ import { wp, dtGutenberg } from 'window' -import { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js' const { registerPlugin } = wp.plugins; @@ -18,9 +17,6 @@ if ( '0' !== dtGutenberg.originalSourceId ) { ] ) ) messages.push( wp.i18n.__( '. However, the original has been deleted.' ) ) } else if ( ! parseInt( dtGutenberg.unlinked ) ) { - registerPlugin( 'distributor-sidebar', { - render: DistributedFromSidebar, - } ) messages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) ) messages.push( wp.element.createElement( 'a', { From 67e66caf6da28eb033da2391e83343e47404eff7 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 10:34:27 -0400 Subject: [PATCH 12/18] Add some keys to clean up console warnings --- assets/js/gutenberg-status-plugin.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/assets/js/gutenberg-status-plugin.js b/assets/js/gutenberg-status-plugin.js index 4112b164b..63e33e1df 100644 --- a/assets/js/gutenberg-status-plugin.js +++ b/assets/js/gutenberg-status-plugin.js @@ -1,4 +1,4 @@ -import { wp, dtGutenberg } from 'window' +import { wp, dtGutenberg } from 'window'; const { registerPlugin } = wp.plugins; const { PluginPostStatusInfo } = wp.editPost; @@ -8,10 +8,11 @@ const { PanelRow } = wp.components; const renderDistributedFrom = () => { return( -

+ { __( 'Distributed on: ' ) } { dtGutenberg.syndicationTime } -

+ (?) +
) } @@ -19,17 +20,18 @@ const renderDistributedFrom = () => { const renderDistributedTo = () => { return( -

+ { wp.i18n.sprintf( wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), dtGutenberg.syndicationCount, '1' === dtGutenberg.syndicationCount ? '' : 's' ) } -

+
) } const renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom -registerPlugin( 'distributor-status-panel', { render: renderFunction } ); \ No newline at end of file +//registerPlugin( 'distributor-status-panel', { render: renderFunction } ); + From d77128de0a683b53c847b83f95acc70c76a4ae33 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 11:15:15 -0400 Subject: [PATCH 13/18] finish up formatting cleanup --- assets/js/gutenberg-status-plugin.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/js/gutenberg-status-plugin.js b/assets/js/gutenberg-status-plugin.js index 63e33e1df..f6e3d960b 100644 --- a/assets/js/gutenberg-status-plugin.js +++ b/assets/js/gutenberg-status-plugin.js @@ -11,7 +11,6 @@ const renderDistributedFrom = () => { { __( 'Distributed on: ' ) } { dtGutenberg.syndicationTime } - (?) ) @@ -20,18 +19,18 @@ const renderDistributedFrom = () => { const renderDistributedTo = () => { return( - + { wp.i18n.sprintf( wp.i18n.__( "Distributed to %1$s connection%2$s.", 'distributor' ), dtGutenberg.syndicationCount, '1' === dtGutenberg.syndicationCount ? '' : 's' ) } - + ) } const renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom -//registerPlugin( 'distributor-status-panel', { render: renderFunction } ); +registerPlugin( 'distributor-status-panel', { render: renderFunction } ); From 0c5ac886a7e5d51ac277954b8fc904bf310bc460 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 11:15:50 -0400 Subject: [PATCH 14/18] Add some keys to avoid React warning --- assets/js/gutenberg-syndicated-post.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index 990d7b92d..616b2e00e 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -20,17 +20,22 @@ if ( '0' !== dtGutenberg.originalSourceId ) { messages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) ) messages.push( wp.element.createElement( 'a', { - href: dtGutenberg.postUrl + href: dtGutenberg.postUrl, + key: 'original-location-link' }, [ dtGutenberg.originalLocationName ] ) ) messages.push( '.' ) - messages.push( wp.element.createElement( 'span', {}, [ + messages.push( + wp.element.createElement( 'span', { + key: 'message-span' + }, [ wp.i18n.sprintf( wp.i18n.__( " The original %1$s will update this version unless you ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), wp.element.createElement( 'a', { - href: dtGutenberg.unlinkNonceUrl + href: dtGutenberg.unlinkNonceUrl, + key: 'original-unlink' }, [ wp.i18n.__( 'unlink from the original.', 'distributor' ) ] ) From 6947e97c2d8316c5516ae7e9f31785fe955ba344 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 11:32:49 -0400 Subject: [PATCH 15/18] Add more static element keys to avoid react errors --- assets/js/gutenberg-syndicated-post.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index 616b2e00e..a86973b7c 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -44,17 +44,21 @@ if ( '0' !== dtGutenberg.originalSourceId ) { messages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) ) messages.push( wp.element.createElement( 'a', { - href: dtGutenberg.postUrl + href: dtGutenberg.postUrl, + key: 'original-location-link' }, [ dtGutenberg.originalLocationName ] ) ) messages.push( '.' ) - messages.push( wp.element.createElement( 'span', {}, [ + messages.push( wp.element.createElement( 'span', { + key: 'message-span' + }, [ wp.i18n.sprintf( wp.i18n.__( " This %1$s has been unlinked from the original. However, you can always ", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), wp.element.createElement( 'a', { - href: dtGutenberg.linkNonceUrl + href: dtGutenberg.linkNonceUrl, + key: 'original-restore-link' }, [ wp.i18n.__( 'restore it.', 'distributor' ) ] ) From 229aa0c9b1e88e0b0b1b3dc36f36665db68a762a Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 14:53:03 -0400 Subject: [PATCH 16/18] Add one more missing key --- assets/js/gutenberg-syndicated-post.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index a86973b7c..4f9ff8a97 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -12,6 +12,7 @@ if ( '0' !== dtGutenberg.originalSourceId ) { messages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) ) messages.push( wp.element.createElement( 'a', { href: dtGutenberg.postUrl + key: 'original-location-link' }, [ dtGutenberg.originalLocationName ] ) ) From 44214ffa7be406c53570834b3c29f705346c596d Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 14:58:47 -0400 Subject: [PATCH 17/18] comma --- assets/js/gutenberg-syndicated-post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index 4f9ff8a97..b973242ec 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -11,7 +11,7 @@ if ( '0' !== dtGutenberg.originalSourceId ) { if ( parseInt( dtGutenberg.originalDeleted ) ) { messages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) ) messages.push( wp.element.createElement( 'a', { - href: dtGutenberg.postUrl + href: dtGutenberg.postUrl, key: 'original-location-link' }, [ dtGutenberg.originalLocationName From cd687e7c7d046b466513c99b3974fd40e398e400 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Mon, 7 May 2018 14:58:52 -0400 Subject: [PATCH 18/18] build --- dist/js/admin-distributed-post.min.js | 2 +- dist/js/admin-distributed-post.min.js.map | 2 +- dist/js/admin-external-connection.min.js | 2 +- dist/js/admin-external-connection.min.js.map | 2 +- dist/js/admin-pull.min.js | 2 +- dist/js/admin-pull.min.js.map | 2 +- dist/js/gutenberg-status-plugin.min.js | 2 +- dist/js/gutenberg-status-plugin.min.js.map | 2 +- dist/js/gutenberg-syndicated-post.min.js | 2 +- dist/js/gutenberg-syndicated-post.min.js.map | 2 +- dist/js/push.min.js | 2 +- dist/js/push.min.js.map | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/js/admin-distributed-post.min.js b/dist/js/admin-distributed-post.min.js index 8655f2338..3be0aaddb 100644 --- a/dist/js/admin-distributed-post.min.js +++ b/dist/js/admin-distributed-post.min.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}({1:function(e,t){e.exports=jQuery},5:function(e,t,n){"use strict";for(var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r),u=document.querySelectorAll(".open-distributor-help"),c=document.getElementById("contextual-help-link"),l=document.querySelector("#tab-link-distributer a"),i=0;i {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-distributed-post.min.js","webpack:///webpack/bootstrap 77e1eb38af8b7d6f4701","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-distributed-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","jQuery","5","_jquery","_jquery2","obj","default","openLinks","document","querySelectorAll","helpLink","getElementById","distributorTab","querySelector","length","on","click"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YGvEA,KAAM,GANN8B,GAAA9B,EAAA,GHkFI+B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIZ,WAAaY,GAAQC,QAASD,IAFjDF,GGhFhCI,EAAiBC,SAASC,iBAAkB,0BAC5CC,EAAiBF,SAASG,eAAgB,wBAC1CC,EAAiBJ,SAASK,cAAe,2BAErCnC,EAAI,EAAGA,EAAI6B,EAAUO,OAAQpC,KACtC,EAAA0B,EAAAE,SAAQC,EAAU7B,IAAKqC,GAAI,QAAS,WACnCL,EAASM,QACTJ,EAAeI","file":"admin-distributed-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar openLinks = document.querySelectorAll('.open-distributor-help');\nvar helpLink = document.getElementById('contextual-help-link');\nvar distributorTab = document.querySelector('#tab-link-distributer a');\n\nfor (var i = 0; i < openLinks.length; i++) {\n\t(0, _jquery2.default)(openLinks[i]).on('click', function () {\n\t\thelpLink.click();\n\t\tdistributorTab.click();\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// admin-distributed-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 77e1eb38af8b7d6f4701","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 4 5","import jQuery from 'jquery'\n\nconst openLinks = document.querySelectorAll( '.open-distributor-help' )\nconst helpLink = document.getElementById( 'contextual-help-link' )\nconst distributorTab = document.querySelector( '#tab-link-distributer a' )\n\nfor ( let i = 0; i < openLinks.length; i++ ) {\n\tjQuery( openLinks[i] ).on( 'click', () => {\n\t\thelpLink.click()\n\t\tdistributorTab.click()\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-distributed-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js b/dist/js/admin-external-connection.min.js index b84402f8a..40a1b296f 100644 --- a/dist/js/admin-external-connection.min.js +++ b/dist/js/admin-external-connection.min.js @@ -1,2 +1,2 @@ -!function(e){function t(a){if(n[a])return n[a].exports;var d=n[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,t),d.l=!0,d.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=window},function(e,t){e.exports=jQuery},function(e,t){e.exports=_},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function d(){if(!1!==b&&b.abort(),""===c.value)return v.innerText="",h.innerText="",void h.removeAttribute("data-endpoint-state");h.setAttribute("data-endpoint-state","loading"),h.innerText=l.dt.endpoint_checking_message,v.innerText="";var e={};i.default.each(m,function(t){if(!t.disabled){var n=t.getAttribute("data-auth-field");n&&(e[n]=t.value)}});var t=0;_&&_.value&&(t=_.value),b=r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_verify_external_connection",auth:e,url:c.value,type:f.value,endpoint_id:t}}).done(function(e){if(e.success)if(e.data.errors.no_external_connection)if(h.setAttribute("data-endpoint-state","error"),e.data.endpoint_suggestion){h.innerText=l.dt.endpoint_suggestion+" ";var t=document.createElement("a");t.classList.add("suggest"),t.innerText=e.data.endpoint_suggestion,h.appendChild(t)}else h.innerText=l.dt.bad_connection;else if(e.data.errors.no_distributor||!e.data.can_post.length){h.setAttribute("data-endpoint-state","warning"),h.innerText=l.dt.limited_connection;var n=[];e.data.errors.no_distributor?h.innerText+=" "+l.dt.no_distributor:h.innerText+=" "+l.dt.bad_auth,n.push(l.dt.no_push),n.push(l.dt.pull_limited),n.forEach(function(e){var t=document.createElement("li");t.innerText=e,v.append(t)})}else h.setAttribute("data-endpoint-state","valid"),h.innerText=l.dt.good_connection;else h.setAttribute("data-endpoint-state","error")}).complete(function(){h.classList.remove("loading")})}var o=n(1),r=a(o),u=n(2),i=a(u),l=n(0),c=document.getElementsByClassName("external-connection-url-field")[0],s=document.getElementById("dt_external_connection_details"),f=document.getElementsByClassName("external-connection-type-field")[0],m=document.getElementsByClassName("auth-field"),p=document.getElementsByClassName("dt-roles-allowed"),g=document.getElementById("title"),h=document.querySelector(".endpoint-result"),v=document.querySelector(".endpoint-errors"),_=document.getElementById("post_ID"),b=!1;setTimeout(function(){d()},300),(0,r.default)(s).on("click",".suggest",function(e){c.value=e.currentTarget.innerText,(0,r.default)(c).trigger("input")}),(0,r.default)(s).on("keyup input",".auth-field, .external-connection-url-field",i.default.debounce(d,250)),(0,r.default)(c).on("blur",function(e){""===g.value&&""!==e.currentTarget.value&&(g.value=e.currentTarget.value.replace(/https?:\/\//i,""),g.focus(),g.blur())});var x=document.getElementById("dt_password"),y=document.getElementById("dt_username"),E=document.querySelector(".change-password");(0,r.default)(y).on("keyup change",i.default.debounce(function(){E&&(x.disabled=!1,x.value="",E.style.display="none")},250)),(0,r.default)(E).on("click",function(e){e.preventDefault(),x.disabled?(x.disabled=!1,x.value="",e.currentTarget.innerText=l.dt.cancel):(x.disabled=!0,x.value="sdfdsfsdfdsfdsfsd",e.currentTarget.innerText=l.dt.change),d()}),(0,r.default)(p).on("click",".dt-role-checkbox",function(e){e.target.classList.contains("dt-role-checkbox")&&e.target.checked&&"administrator"!==e.target.value&&"editor"!==e.target.value&&alert(l.dt.roles_warning)});var T=(0,r.default)(".hide-until-authed"),B=(0,r.default)(".auth-credentials"),w=(0,r.default)(document.getElementById("dt_client_secret")),I=(0,r.default)(document.getElementById("dt_client_id")),k=function(){0===document.getElementsByClassName("oauth-connection-established").length&&T.hide()},C=function(e,t){return""===e.val()?(t.preventDefault(),e.addClass("error-required"),!1):(e.removeClass("error-required"),!0)};(0,r.default)(f).on("change",function(){var e=f.value;B.hide(),(0,r.default)(".auth-credentials."+e).show(),"wpdotcom"===e?k():T.show()}),"wpdotcom"===f.value&&k();var A=document.getElementById("create-oauth-connection");A&&(0,r.default)(A).on("click",function(e){var t=C(w,e),n=C(I,e);if(!t||!n)return e.preventDefault(),!1});var j=document.getElementById("oauth-authentication-change-credentials"),q=(0,r.default)(".oauth-authentication-details-wrapper");j&&(0,r.default)(j).on("click",function(){q.show(),w.val(""),(0,r.default)(".oauth-connection-established").remove(),k()});var D=document.getElementById("begin-authorization");D&&(0,r.default)(D).on("click",function(e){var t=(0,r.default)(g),n=t.val();C(t,e)&&((0,r.default)(D).addClass("disabled"),t.removeClass("error-required"),r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_begin_authorization",title:n,id:(0,r.default)(document.getElementById("post_ID")).val()}}).done(function(e){if(e.success&&e.data.id){var t=l.dt.admin_url+"post.php?post="+e.data.id+"&action=edit";history.pushState({},"Oauth Authorize Details",t),(0,r.default)(document.getElementById("dt_redirect_uri")).val(t),(0,r.default)(document.getElementById("dt_created_post_id")).val(e.data.id),(0,r.default)(document.getElementById("original_post_status")).val("publish"),(0,r.default)(".oauth-begin-authentication-wrapper").hide(),q.show()}}).complete(function(){(0,r.default)(D).removeClass("disabled")}))})}]); +!function(e){function t(a){if(n[a])return n[a].exports;var d=n[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,t),d.l=!0,d.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},function(e,t){e.exports=_},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function d(){if(!1!==b&&b.abort(),""===c.value)return v.innerText="",h.innerText="",void h.removeAttribute("data-endpoint-state");h.setAttribute("data-endpoint-state","loading"),h.innerText=l.dt.endpoint_checking_message,v.innerText="";var e={};i.default.each(m,function(t){if(!t.disabled){var n=t.getAttribute("data-auth-field");n&&(e[n]=t.value)}});var t=0;_&&_.value&&(t=_.value),b=r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_verify_external_connection",auth:e,url:c.value,type:f.value,endpoint_id:t}}).done(function(e){if(e.success)if(e.data.errors.no_external_connection)if(h.setAttribute("data-endpoint-state","error"),e.data.endpoint_suggestion){h.innerText=l.dt.endpoint_suggestion+" ";var t=document.createElement("a");t.classList.add("suggest"),t.innerText=e.data.endpoint_suggestion,h.appendChild(t)}else h.innerText=l.dt.bad_connection;else if(e.data.errors.no_distributor||!e.data.can_post.length){h.setAttribute("data-endpoint-state","warning"),h.innerText=l.dt.limited_connection;var n=[];e.data.errors.no_distributor?h.innerText+=" "+l.dt.no_distributor:h.innerText+=" "+l.dt.bad_auth,n.push(l.dt.no_push),n.push(l.dt.pull_limited),n.forEach(function(e){var t=document.createElement("li");t.innerText=e,v.append(t)})}else h.setAttribute("data-endpoint-state","valid"),h.innerText=l.dt.good_connection;else h.setAttribute("data-endpoint-state","error")}).complete(function(){h.classList.remove("loading")})}var o=n(0),r=a(o),u=n(2),i=a(u),l=n(1),c=document.getElementsByClassName("external-connection-url-field")[0],s=document.getElementById("dt_external_connection_details"),f=document.getElementsByClassName("external-connection-type-field")[0],m=document.getElementsByClassName("auth-field"),p=document.getElementsByClassName("dt-roles-allowed"),g=document.getElementById("title"),h=document.querySelector(".endpoint-result"),v=document.querySelector(".endpoint-errors"),_=document.getElementById("post_ID"),b=!1;setTimeout(function(){d()},300),(0,r.default)(s).on("click",".suggest",function(e){c.value=e.currentTarget.innerText,(0,r.default)(c).trigger("input")}),(0,r.default)(s).on("keyup input",".auth-field, .external-connection-url-field",i.default.debounce(d,250)),(0,r.default)(c).on("blur",function(e){""===g.value&&""!==e.currentTarget.value&&(g.value=e.currentTarget.value.replace(/https?:\/\//i,""),g.focus(),g.blur())});var x=document.getElementById("dt_password"),y=document.getElementById("dt_username"),E=document.querySelector(".change-password");(0,r.default)(y).on("keyup change",i.default.debounce(function(){E&&(x.disabled=!1,x.value="",E.style.display="none")},250)),(0,r.default)(E).on("click",function(e){e.preventDefault(),x.disabled?(x.disabled=!1,x.value="",e.currentTarget.innerText=l.dt.cancel):(x.disabled=!0,x.value="sdfdsfsdfdsfdsfsd",e.currentTarget.innerText=l.dt.change),d()}),(0,r.default)(p).on("click",".dt-role-checkbox",function(e){e.target.classList.contains("dt-role-checkbox")&&e.target.checked&&"administrator"!==e.target.value&&"editor"!==e.target.value&&alert(l.dt.roles_warning)});var T=(0,r.default)(".hide-until-authed"),B=(0,r.default)(".auth-credentials"),w=(0,r.default)(document.getElementById("dt_client_secret")),I=(0,r.default)(document.getElementById("dt_client_id")),k=function(){0===document.getElementsByClassName("oauth-connection-established").length&&T.hide()},C=function(e,t){return""===e.val()?(t.preventDefault(),e.addClass("error-required"),!1):(e.removeClass("error-required"),!0)};(0,r.default)(f).on("change",function(){var e=f.value;B.hide(),(0,r.default)(".auth-credentials."+e).show(),"wpdotcom"===e?k():T.show()}),"wpdotcom"===f.value&&k();var A=document.getElementById("create-oauth-connection");A&&(0,r.default)(A).on("click",function(e){var t=C(w,e),n=C(I,e);if(!t||!n)return e.preventDefault(),!1});var j=document.getElementById("oauth-authentication-change-credentials"),q=(0,r.default)(".oauth-authentication-details-wrapper");j&&(0,r.default)(j).on("click",function(){q.show(),w.val(""),(0,r.default)(".oauth-connection-established").remove(),k()});var D=document.getElementById("begin-authorization");D&&(0,r.default)(D).on("click",function(e){var t=(0,r.default)(g),n=t.val();C(t,e)&&((0,r.default)(D).addClass("disabled"),t.removeClass("error-required"),r.default.ajax({url:l.ajaxurl,method:"post",data:{nonce:l.dt.nonce,action:"dt_begin_authorization",title:n,id:(0,r.default)(document.getElementById("post_ID")).val()}}).done(function(e){if(e.success&&e.data.id){var t=l.dt.admin_url+"post.php?post="+e.data.id+"&action=edit";history.pushState({},"Oauth Authorize Details",t),(0,r.default)(document.getElementById("dt_redirect_uri")).val(t),(0,r.default)(document.getElementById("dt_created_post_id")).val(e.data.id),(0,r.default)(document.getElementById("original_post_status")).val("publish"),(0,r.default)(".oauth-begin-authentication-wrapper").hide(),q.show()}}).complete(function(){(0,r.default)(D).removeClass("disabled")}))})}]); //# sourceMappingURL=admin-external-connection.min.js.map \ No newline at end of file diff --git a/dist/js/admin-external-connection.min.js.map b/dist/js/admin-external-connection.min.js.map index 7f62a6ef5..21acf45a2 100644 --- a/dist/js/admin-external-connection.min.js.map +++ b/dist/js/admin-external-connection.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","_window","dt","endpoint_checking_message","auth","_underscores2","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","_jquery2","ajax","url","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_underscores","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authentication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IAAK3E,IAC5D,EAAAF,EAAAxB,SAAQyC,SAAS0B,eAAgB,uBAAyBkC,IAAKlE,EAASP,KAAKsF,KAC7E,EAAA1F,EAAAxB,SAAQyC,SAAS0B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAA7E,EAAAxB,SAAQ,uCAAwCkG,OAChDY,EAA8BL,UAI5B5C,SAAU,YAGb,EAAArC,EAAAxB,SAAQ+G,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-external-connection.min.js","webpack:///webpack/bootstrap 77e1eb38af8b7d6f4701","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/admin-external-connection.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","checkConnections","$apiVerify","abort","externalConnectionUrlField","value","endpointErrors","innerText","endpointResult","removeAttribute","setAttribute","dt","endpoint_checking_message","auth","each","authFields","authField","disabled","key","getAttribute","postId","postIdField","ajax","url","ajaxurl","method","data","nonce","action","type","externalConnectionTypeField","endpoint_id","done","response","success","errors","no_external_connection","endpoint_suggestion","suggestion","document","createElement","classList","add","appendChild","bad_connection","no_distributor","can_post","length","limited_connection","warnings","bad_auth","push","no_push","pull_limited","forEach","warning","warningNode","append","good_connection","complete","remove","_jquery","_jquery2","_underscores","_underscores2","_window","getElementsByClassName","externalConnectionMetaBox","getElementById","rolesAllowed","titleField","querySelector","setTimeout","on","event","currentTarget","trigger","debounce","replace","focus","blur","passwordField","usernameField","changePassword","style","display","preventDefault","cancel","change","target","contains","checked","alert","roles_warning","$hideUntilAuthed","$authCredentials","$clientSecret","$clientId","hideItemsRequiringAuth","hide","validateField","$field","val","addClass","removeClass","slug","show","createConnectionButton","validateClientSecret","validateClientId","changeCredentials","$authenticationDetailsWrapper","beginAuthorize","$titleEl","title","id","admin_url","history","pushState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,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AAA9D,SAAQgH,GAAiBT,SAAU,YAGnCU,EAAST,YAAa,kBAGtB7G,UAAO2B,MACNC,IAAKC,UACLC,OAAQ,OACRC,MACCC,MAAOhB,KAAGgB,MACVC,OAAQ,yBACRsF,MAAOA,EACPC,IAAI,EAAArD,EAAA9D,SAAQuC,SAAS6B,eAAgB,YAAckC,SAEjDtE,KAAM,SAAEC,GACX,GAAKA,EAASC,SAAWD,EAASP,KAAKyF,GAAK,CAG3C,GAAM5F,GAAMZ,KAAGyG,UAAY,iBAAmBnF,EAASP,KAAKyF,GAAM,cAClEE,SAAQC,aAAe,0BAA2B/F,IAGlD,EAAAuC,EAAA9D,SAAQuC,SAAS6B,eAAgB,oBAAsBkC,IAAK/E,IAC5D,EAAAuC,EAAA9D,SAAQuC,SAAS6B,eAAgB,uBAAyBkC,IAAKrE,EAASP,KAAKyF,KAC7E,EAAArD,EAAA9D,SAAQuC,SAAS6B,eAAgB,yBAA2BkC,IAAK,YAGjE,EAAAxC,EAAA9D,SAAQ,uCAAwCmG,OAChDY,EAA8BL,UAI5B/C,SAAU,YAGb,EAAAG,EAAA9D,SAAQgH,GAAiBR,YAAa","file":"admin-external-connection.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar externalConnectionUrlField = document.getElementsByClassName('external-connection-url-field')[0];\nvar externalConnectionMetaBox = document.getElementById('dt_external_connection_details');\nvar externalConnectionTypeField = document.getElementsByClassName('external-connection-type-field')[0];\nvar authFields = document.getElementsByClassName('auth-field');\nvar rolesAllowed = document.getElementsByClassName('dt-roles-allowed');\nvar titleField = document.getElementById('title');\nvar endpointResult = document.querySelector('.endpoint-result');\nvar endpointErrors = document.querySelector('.endpoint-errors');\nvar postIdField = document.getElementById('post_ID');\nvar $apiVerify = false;\n\nfunction checkConnections() {\n\tif ($apiVerify !== false) {\n\t\t$apiVerify.abort();\n\t}\n\n\tif (externalConnectionUrlField.value === '') {\n\t\tendpointErrors.innerText = '';\n\t\tendpointResult.innerText = '';\n\n\t\tendpointResult.removeAttribute('data-endpoint-state');\n\t\treturn;\n\t}\n\n\tendpointResult.setAttribute('data-endpoint-state', 'loading');\n\tendpointResult.innerText = _window.dt.endpoint_checking_message;\n\n\tendpointErrors.innerText = '';\n\n\tvar auth = {};\n\n\t_underscores2.default.each(authFields, function (authField) {\n\t\tif (authField.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key = authField.getAttribute('data-auth-field');\n\n\t\tif (key) {\n\t\t\tauth[key] = authField.value;\n\t\t}\n\t});\n\n\tvar postId = 0;\n\tif (postIdField && postIdField.value) {\n\t\tpostId = postIdField.value;\n\t}\n\n\t$apiVerify = _jquery2.default.ajax({\n\t\turl: _window.ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: _window.dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t}).done(function (response) {\n\t\tif (!response.success) {\n\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\t\t} else {\n\t\t\tif (response.data.errors.no_external_connection) {\n\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'error');\n\n\t\t\t\tif (response.data.endpoint_suggestion) {\n\t\t\t\t\tendpointResult.innerText = _window.dt.endpoint_suggestion + ' ';\n\n\t\t\t\t\tvar suggestion = document.createElement('a');\n\t\t\t\t\tsuggestion.classList.add('suggest');\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion;\n\n\t\t\t\t\tendpointResult.appendChild(suggestion);\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = _window.dt.bad_connection;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (response.data.errors.no_distributor || !response.data.can_post.length) {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'warning');\n\t\t\t\t\tendpointResult.innerText = _window.dt.limited_connection;\n\n\t\t\t\t\tvar warnings = [];\n\n\t\t\t\t\tif (response.data.errors.no_distributor) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.no_distributor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + _window.dt.bad_auth;\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push(_window.dt.no_push);\n\t\t\t\t\twarnings.push(_window.dt.pull_limited);\n\n\t\t\t\t\twarnings.forEach(function (warning) {\n\t\t\t\t\t\tvar warningNode = document.createElement('li');\n\t\t\t\t\t\twarningNode.innerText = warning;\n\n\t\t\t\t\t\tendpointErrors.append(warningNode);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute('data-endpoint-state', 'valid');\n\t\t\t\t\tendpointResult.innerText = _window.dt.good_connection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}).complete(function () {\n\t\tendpointResult.classList.remove('loading');\n\t});\n}\n\nsetTimeout(function () {\n\tcheckConnections();\n}, 300);\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('click', '.suggest', function (event) {\n\texternalConnectionUrlField.value = event.currentTarget.innerText;\n\t(0, _jquery2.default)(externalConnectionUrlField).trigger('input');\n});\n\n(0, _jquery2.default)(externalConnectionMetaBox).on('keyup input', '.auth-field, .external-connection-url-field', _underscores2.default.debounce(checkConnections, 250));\n\n(0, _jquery2.default)(externalConnectionUrlField).on('blur', function (event) {\n\tif (titleField.value === '' && event.currentTarget.value !== '') {\n\t\ttitleField.value = event.currentTarget.value.replace(/https?:\\/\\//i, '');\n\t\ttitleField.focus();\n\t\ttitleField.blur();\n\t}\n});\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nvar passwordField = document.getElementById('dt_password');\nvar usernameField = document.getElementById('dt_username');\nvar changePassword = document.querySelector('.change-password');\n\n(0, _jquery2.default)(usernameField).on('keyup change', _underscores2.default.debounce(function () {\n\tif (changePassword) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tchangePassword.style.display = 'none';\n\t}\n}, 250));\n\n(0, _jquery2.default)(changePassword).on('click', function (event) {\n\tevent.preventDefault();\n\n\tif (passwordField.disabled) {\n\t\tpasswordField.disabled = false;\n\t\tpasswordField.value = '';\n\t\tevent.currentTarget.innerText = _window.dt.cancel;\n\t} else {\n\t\tpasswordField.disabled = true;\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd'; // filler password\n\t\tevent.currentTarget.innerText = _window.dt.change;\n\t}\n\n\tcheckConnections();\n});\n\n(0, _jquery2.default)(rolesAllowed).on('click', '.dt-role-checkbox', function (event) {\n\tif (!event.target.classList.contains('dt-role-checkbox')) {\n\t\treturn;\n\t}\n\n\tif (!event.target.checked) {\n\t\treturn;\n\t}\n\n\tif (event.target.value !== 'administrator' && event.target.value !== 'editor') {\n\t\talert(_window.dt.roles_warning);\n\t}\n});\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nvar $hideUntilAuthed = (0, _jquery2.default)('.hide-until-authed'),\n $authCredentials = (0, _jquery2.default)('.auth-credentials'),\n $clientSecret = (0, _jquery2.default)(document.getElementById('dt_client_secret')),\n $clientId = (0, _jquery2.default)(document.getElementById('dt_client_id')),\n hideItemsRequiringAuth = function hideItemsRequiringAuth() {\n\tvar oauthconnectionestablished = document.getElementsByClassName('oauth-connection-established');\n\tif (oauthconnectionestablished.length === 0) {\n\t\t$hideUntilAuthed.hide();\n\t}\n},\n\n\n/**\n * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n *\n * @param {jQuery DomElement} $field The field to check.\n */\nvalidateField = function validateField($field, event) {\n\tif ($field.val() === '') {\n\t\tevent.preventDefault();\n\t\t$field.addClass('error-required');\n\t\treturn false;\n\t} else {\n\t\t$field.removeClass('error-required');\n\t}\n\treturn true;\n};\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\n(0, _jquery2.default)(externalConnectionTypeField).on('change', function () {\n\tvar slug = externalConnectionTypeField.value;\n\n\t$authCredentials.hide();\n\t(0, _jquery2.default)('.auth-credentials.' + slug).show();\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif (slug === 'wpdotcom') {\n\t\thideItemsRequiringAuth();\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show();\n\t}\n});\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif (externalConnectionTypeField.value === 'wpdotcom') {\n\thideItemsRequiringAuth();\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nvar createConnectionButton = document.getElementById('create-oauth-connection');\nif (createConnectionButton) {\n\t(0, _jquery2.default)(createConnectionButton).on('click', function (event) {\n\t\tvar validateClientSecret = validateField($clientSecret, event),\n\t\t validateClientId = validateField($clientId, event);\n\t\tif (!validateClientSecret || !validateClientId) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n// Handle the changeCredentials link.\nvar changeCredentials = document.getElementById('oauth-authentication-change-credentials'),\n $authenticationDetailsWrapper = (0, _jquery2.default)('.oauth-authentication-details-wrapper');\n\nif (changeCredentials) {\n\n\t(0, _jquery2.default)(changeCredentials).on('click', function () {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show();\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val('');\n\n\t\t// Remove the authorized message.\n\t\t(0, _jquery2.default)('.oauth-connection-established').remove();\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth();\n\t});\n}\n\n// Handle the Authorize Connection button.\nvar beginAuthorize = document.getElementById('begin-authorization');\nif (beginAuthorize) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\t(0, _jquery2.default)(beginAuthorize).on('click', function (event) {\n\t\tvar $titleEl = (0, _jquery2.default)(titleField),\n\t\t title = $titleEl.val();\n\n\t\t// Ensure the connection title is not blank.\n\t\tif (validateField($titleEl, event)) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\t(0, _jquery2.default)(beginAuthorize).addClass('disabled');\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass('error-required');\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\t_jquery2.default.ajax({\n\t\t\t\turl: _window.ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: _window.dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: (0, _jquery2.default)(document.getElementById('post_ID')).val()\n\t\t\t\t}\n\t\t\t}).done(function (response) {\n\t\t\t\tif (response.success && response.data.id) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tvar url = _window.dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit';\n\t\t\t\t\thistory.pushState({}, 'Oauth Authorize Details', url);\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_redirect_uri')).val(url);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('dt_created_post_id')).val(response.data.id);\n\t\t\t\t\t(0, _jquery2.default)(document.getElementById('original_post_status')).val('publish');\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\t(0, _jquery2.default)('.oauth-begin-authentication-wrapper').hide();\n\t\t\t\t\t$authenticationDetailsWrapper.show();\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t}).complete(function () {\n\n\t\t\t\t// Ensure the\n\t\t\t\t(0, _jquery2.default)(beginAuthorize).removeClass('disabled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-external-connection.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 77e1eb38af8b7d6f4701","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 4 5","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2 3","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, ajaxurl } from 'window'\n\nconst externalConnectionUrlField = document.getElementsByClassName( 'external-connection-url-field' )[0]\nconst externalConnectionMetaBox = document.getElementById( 'dt_external_connection_details' )\nconst externalConnectionTypeField = document.getElementsByClassName( 'external-connection-type-field' )[0]\nconst authFields = document.getElementsByClassName( 'auth-field' )\nconst rolesAllowed = document.getElementsByClassName( 'dt-roles-allowed' )\nconst titleField = document.getElementById( 'title' )\nconst endpointResult = document.querySelector( '.endpoint-result' )\nconst endpointErrors = document.querySelector( '.endpoint-errors' )\nconst postIdField = document.getElementById( 'post_ID' )\nlet $apiVerify = false\n\nfunction checkConnections() {\n\tif ( $apiVerify !== false ) {\n\t\t$apiVerify.abort()\n\t}\n\n\tif ( externalConnectionUrlField.value === '' ) {\n\t\tendpointErrors.innerText = ''\n\t\tendpointResult.innerText = ''\n\n\t\tendpointResult.removeAttribute( 'data-endpoint-state' )\n\t\treturn\n\t}\n\n\tendpointResult.setAttribute( 'data-endpoint-state', 'loading' )\n\tendpointResult.innerText = dt.endpoint_checking_message\n\n\tendpointErrors.innerText = ''\n\n\tconst auth = {}\n\n\t_.each( authFields, ( authField ) => {\n\t\tif ( authField.disabled ) {\n\t\t\treturn\n\t\t}\n\n\t\tvar key = authField.getAttribute( 'data-auth-field' )\n\n\t\tif ( key ) {\n\t\t\tauth[key] = authField.value\n\t\t}\n\t} )\n\n\tlet postId = 0\n\tif ( postIdField && postIdField.value ) {\n\t\tpostId = postIdField.value\n\t}\n\n\t$apiVerify = jQuery.ajax( {\n\t\turl: ajaxurl,\n\t\tmethod: 'post',\n\t\tdata: {\n\t\t\tnonce: dt.nonce,\n\t\t\taction: 'dt_verify_external_connection',\n\t\t\tauth: auth,\n\t\t\turl: externalConnectionUrlField.value,\n\t\t\ttype: externalConnectionTypeField.value,\n\t\t\tendpoint_id: postId\n\t\t}\n\t} ).done( ( response ) => {\n\t\tif ( ! response.success ) {\n\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\t\t} else {\n\t\t\tif ( response.data.errors.no_external_connection ) {\n\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'error' )\n\n\t\t\t\tif ( response.data.endpoint_suggestion ) {\n\t\t\t\t\tendpointResult.innerText = dt.endpoint_suggestion + ' '\n\n\t\t\t\t\tconst suggestion = document.createElement( 'a' )\n\t\t\t\t\tsuggestion.classList.add( 'suggest' )\n\t\t\t\t\tsuggestion.innerText = response.data.endpoint_suggestion\n\n\t\t\t\t\tendpointResult.appendChild( suggestion )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.innerText = dt.bad_connection\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( response.data.errors.no_distributor || ! response.data.can_post.length ) {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'warning' )\n\t\t\t\t\tendpointResult.innerText = dt.limited_connection\n\n\t\t\t\t\tconst warnings = []\n\n\t\t\t\t\tif ( response.data.errors.no_distributor ) {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.no_distributor\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendpointResult.innerText += ' ' + dt.bad_auth\n\t\t\t\t\t}\n\n\t\t\t\t\twarnings.push( dt.no_push )\n\t\t\t\t\twarnings.push( dt.pull_limited )\n\n\t\t\t\t\twarnings.forEach( ( warning ) => {\n\t\t\t\t\t\tconst warningNode = document.createElement( 'li' )\n\t\t\t\t\t\twarningNode.innerText = warning\n\n\t\t\t\t\t\tendpointErrors.append( warningNode )\n\t\t\t\t\t} )\n\t\t\t\t} else {\n\t\t\t\t\tendpointResult.setAttribute( 'data-endpoint-state', 'valid' )\n\t\t\t\t\tendpointResult.innerText = dt.good_connection\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} ).complete( () => {\n\t\tendpointResult.classList.remove( 'loading' )\n\t} )\n}\n\nsetTimeout( () => {\n\tcheckConnections()\n}, 300 )\n\njQuery( externalConnectionMetaBox ).on( 'click', '.suggest', ( event ) => {\n\texternalConnectionUrlField.value = event.currentTarget.innerText\n\tjQuery( externalConnectionUrlField ).trigger( 'input' )\n} )\n\njQuery( externalConnectionMetaBox ).on( 'keyup input', '.auth-field, .external-connection-url-field', _.debounce( checkConnections, 250 ) )\n\njQuery( externalConnectionUrlField ).on( 'blur', ( event ) => {\n\tif ( titleField.value === '' && event.currentTarget.value !== '' ) {\n\t\ttitleField.value = event.currentTarget.value.replace( /https?:\\/\\//i, '' )\n\t\ttitleField.focus()\n\t\ttitleField.blur()\n\t}\n} )\n/**\n * JS for basic auth\n *\n * @todo separate\n */\nconst passwordField = document.getElementById( 'dt_password' )\nconst usernameField = document.getElementById( 'dt_username' )\nconst changePassword = document.querySelector( '.change-password' )\n\njQuery( usernameField ).on( 'keyup change', _.debounce( () => {\n\tif ( changePassword ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tchangePassword.style.display = 'none'\n\t}\n}, 250 ) )\n\njQuery( changePassword ).on( 'click', ( event ) => {\n\tevent.preventDefault()\n\n\tif ( passwordField.disabled ) {\n\t\tpasswordField.disabled = false\n\t\tpasswordField.value = ''\n\t\tevent.currentTarget.innerText = dt.cancel\n\t} else {\n\t\tpasswordField.disabled = true\n\t\tpasswordField.value = 'sdfdsfsdfdsfdsfsd' // filler password\n\t\tevent.currentTarget.innerText = dt.change\n\t}\n\n\tcheckConnections()\n} )\n\njQuery( rolesAllowed ).on( 'click', '.dt-role-checkbox', ( event ) => {\n\tif ( ! event.target.classList.contains( 'dt-role-checkbox' ) ) {\n\t\treturn\n\t}\n\n\tif ( ! event.target.checked ) {\n\t\treturn\n\t}\n\n\tif ( event.target.value !== 'administrator' && event.target.value !== 'editor' ) {\n\t\talert( dt.roles_warning )\n\t}\n} )\n\n/**\n * Code for WordPress.com Oauth2 Authentication.\n *\n * @todo separate out code.\n */\n\n/**\n * If the client id and secret are unavailable, hide all '.hide-until-authed' areas.\n *\n * For Oauth authentication, simplify the interface by hiding certain elements until the user has\n * completed the authorization process.\n *\n * Creates a cleaner flow for authorization by separating the authorization steps.\n */\nconst $hideUntilAuthed = jQuery( '.hide-until-authed' ),\n\t$authCredentials = jQuery( '.auth-credentials' ),\n\t$clientSecret = jQuery( document.getElementById( 'dt_client_secret' ) ),\n\t$clientId = jQuery( document.getElementById( 'dt_client_id' ) ),\n\thideItemsRequiringAuth = () => {\n\t\tconst oauthconnectionestablished = document.getElementsByClassName( 'oauth-connection-established' )\n\t\tif ( oauthconnectionestablished.length === 0 ) {\n\t\t\t$hideUntilAuthed.hide()\n\t\t}\n\t},\n\n\t/**\n\t * Validate a form field, ensuring it is non-empty. Add an error class if empty.\n\t *\n\t * @param {jQuery DomElement} $field The field to check.\n\t */\n\tvalidateField = ( $field, event ) => {\n\t\tif ( $field.val() === '' ) {\n\t\t\tevent.preventDefault()\n\t\t\t$field.addClass( 'error-required' )\n\t\t\treturn false\n\t\t} else {\n\t\t\t$field.removeClass( 'error-required' )\n\t\t}\n\t\treturn true\n\t}\n\n/**\n * When the External connection type drop-down is changed, show the corresponding authorization fields.\n */\njQuery( externalConnectionTypeField ).on( 'change', () => {\n\tconst slug = externalConnectionTypeField.value\n\n\t$authCredentials.hide()\n\tjQuery( '.auth-credentials.' + slug ).show()\n\n\t// For WordPress.com Oauth authentication, hide fields until authentication is complete.\n\tif ( slug === 'wpdotcom' ) {\n\t\thideItemsRequiringAuth()\n\t} else {\n\n\t\t// Otherwise, ensure all areas are showing.\n\t\t$hideUntilAuthed.show()\n\t}\n} )\n\n\n// On load for WordPress.com Oauth authentication, hide fields until authentication is complete.\nif ( externalConnectionTypeField.value === 'wpdotcom' ) {\n\thideItemsRequiringAuth()\n}\n\n// When authorization is initiated, ensure fields are non-empty.\nconst createConnectionButton = document.getElementById( 'create-oauth-connection' )\nif ( createConnectionButton ) {\n\tjQuery( createConnectionButton ).on( 'click', ( event ) => {\n\t\tconst validateClientSecret = validateField( $clientSecret, event ),\n\t\t\tvalidateClientId = validateField( $clientId, event )\n\t\tif (\n\t\t\t! validateClientSecret ||\n\t\t\t! validateClientId\n\t\t) {\n\t\t\tevent.preventDefault()\n\t\t\treturn false\n\t\t}\n\t} )\n}\n\n// Handle the changeCredentials link.\nconst changeCredentials = document.getElementById( 'oauth-authentication-change-credentials' ),\n\t$authenticationDetailsWrapper = jQuery( '.oauth-authentication-details-wrapper' )\n\nif ( changeCredentials ) {\n\n\tjQuery( changeCredentials ).on( 'click', function() {\n\n\t\t// Show the credentials fields.\n\t\t$authenticationDetailsWrapper.show()\n\n\t\t// Clear the secret field.\n\t\t$clientSecret.val( '' )\n\n\t\t// Remove the authorized message.\n\t\tjQuery( '.oauth-connection-established' ).remove()\n\n\t\t// Hide the remaining fields that only show after authorization is complete.\n\t\thideItemsRequiringAuth()\n\t} )\n}\n\n// Handle the Authorize Connection button.\nconst beginAuthorize = document.getElementById( 'begin-authorization' )\nif ( beginAuthorize ) {\n\n\t// Handle click to the wpdotcom begin-authorization button.\n\tjQuery( beginAuthorize ).on( 'click', ( event ) => {\n\t\tconst $titleEl = jQuery( titleField ),\n\t\t\ttitle = $titleEl.val()\n\n\t\t// Ensure the connection title is not blank.\n\t\tif ( validateField( $titleEl, event ) ) {\n\n\t\t\t// Disable the button during the ajax request.\n\t\t\tjQuery( beginAuthorize ).addClass( 'disabled' )\n\n\t\t\t// Remove any error highlighting.\n\t\t\t$titleEl.removeClass( 'error-required' )\n\n\t\t\t// Make an ajax request to save the connection and retrieve the resulting post id.\n\t\t\tjQuery.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: 'post',\n\t\t\t\tdata: {\n\t\t\t\t\tnonce: dt.nonce,\n\t\t\t\t\taction: 'dt_begin_authorization',\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tid: jQuery( document.getElementById( 'post_ID' ) ).val()\n\t\t\t\t}\n\t\t\t} ).done( ( response ) => {\n\t\t\t\tif ( response.success && response.data.id ) {\n\n\t\t\t\t\t// The post has been saved, update the url in case the user refreshes.\n\t\t\t\t\tconst url = dt.admin_url + 'post.php?post=' + response.data.id + '&action=edit'\n\t\t\t\t\thistory.pushState( {}, 'Oauth Authorize Details', url )\n\n\t\t\t\t\t// Update the form field for dt_redirect_uri and post id.\n\t\t\t\t\tjQuery( document.getElementById( 'dt_redirect_uri' ) ).val( url )\n\t\t\t\t\tjQuery( document.getElementById( 'dt_created_post_id' ) ).val( response.data.id )\n\t\t\t\t\tjQuery( document.getElementById( 'original_post_status' ) ).val( 'publish' )\n\n\t\t\t\t\t// Hide the first step and show the authentication details.\n\t\t\t\t\tjQuery( '.oauth-begin-authentication-wrapper' ).hide()\n\t\t\t\t\t$authenticationDetailsWrapper.show()\n\t\t\t\t} else {\n\t\t\t\t\t// @todo handle errors.\n\t\t\t\t}\n\t\t\t} ).complete( () => {\n\n\t\t\t\t// Ensure the\n\t\t\t\tjQuery( beginAuthorize ).removeClass( 'disabled' )\n\t\t\t} )\n\t\t}\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-external-connection.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/admin-pull.min.js b/dist/js/admin-pull.min.js index 16892e62b..ed4fd6da9 100644 --- a/dist/js/admin-pull.min.js +++ b/dist/js/admin-pull.min.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([,function(t,e){t.exports=jQuery},,,function(t,e,n){"use strict";var r=n(1),o=function(t){return t&&t.__esModule?t:{default:t}}(r),u=document.getElementById("pull_connections");(0,o.default)(u).on("change",function(t){document.location=t.currentTarget.options[t.currentTarget.selectedIndex].getAttribute("data-pull-url")})}]); +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e){t.exports=jQuery},,,,function(t,e,n){"use strict";var r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r),u=document.getElementById("pull_connections");(0,o.default)(u).on("change",function(t){document.location=t.currentTarget.options[t.currentTarget.selectedIndex].getAttribute("data-pull-url")})}]); //# sourceMappingURL=admin-pull.min.js.map \ No newline at end of file diff --git a/dist/js/admin-pull.min.js.map b/dist/js/admin-pull.min.js.map index 42ef15266..e6dcb1372 100644 --- a/dist/js/admin-pull.min.js.map +++ b/dist/js/admin-pull.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDKO,CAED,SAAUtB,EAAQD,GEpExBC,EAAAD,QAAAwB,QFyEO,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///admin-pull.min.js","webpack:///webpack/bootstrap 77e1eb38af8b7d6f4701","webpack:///external \"jQuery\"","webpack:///./assets/js/admin-pull.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","_jquery","_jquery2","obj","default","chooseConnection","document","getElementById","on","event","location","currentTarget","options","selectedIndex","getAttribute"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFwEO,CACA,CACA,CAED,SAAUvB,EAAQD,EAASH,GAEjC,YG9EA,IAAA4B,GAAA5B,EAAA,GHmFI6B,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIV,WAAaU,GAAQC,QAASD,IAFjDF,GGjFhCI,EAAmBC,SAASC,eAAgB,qBAElD,EAAAL,EAAAE,SAAQC,GAAmBG,GAAI,SAAU,SAAEC,GAC1CH,SAASI,SAAWD,EAAME,cAAcC,QAAQH,EAAME,cAAcE,eAAeC,aAAc","file":"admin-pull.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar chooseConnection = document.getElementById('pull_connections');\n\n(0, _jquery2.default)(chooseConnection).on('change', function (event) {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute('data-pull-url');\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// admin-pull.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 77e1eb38af8b7d6f4701","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 4 5","import jQuery from 'jquery'\n\nconst chooseConnection = document.getElementById( 'pull_connections' )\n\njQuery( chooseConnection ).on( 'change', ( event ) => {\n\tdocument.location = event.currentTarget.options[event.currentTarget.selectedIndex].getAttribute( 'data-pull-url' )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/admin-pull.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-status-plugin.min.js b/dist/js/gutenberg-status-plugin.min.js index 1f5c942b6..b1488097b 100644 --- a/dist/js/gutenberg-status-plugin.min.js +++ b/dist/js/gutenberg-status-plugin.min.js @@ -1,2 +1,2 @@ -!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=10)}({0:function(t,n){t.exports=window},10:function(t,n,e){"use strict";var r=e(0),o=r.wp.plugins.registerPlugin,u=r.wp.editPost.PluginPostStatusInfo,i=r.wp.i18n.__,c=(r.wp.components.PanelRow,function(){return React.createElement(u,null,React.createElement("p",null,i("Distributed on: "),React.createElement("strong",null," ",r.dtGutenberg.syndicationTime," ")))}),s=function(){return React.createElement(u,null,React.createElement("p",null,r.wp.i18n.sprintf(r.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),r.dtGutenberg.syndicationCount,"1"===r.dtGutenberg.syndicationCount?"":"s")))};o("distributor-status-panel",{render:r.dtGutenberg.syndicationCount>0?s:c})}}); +!function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=8)}({1:function(t,n){t.exports=window},8:function(t,n,e){"use strict";var r=e(1),i=r.wp.plugins.registerPlugin,o=r.wp.editPost.PluginPostStatusInfo,u=r.wp.i18n.__,s=(r.wp.components.PanelRow,function(){return React.createElement(o,null,React.createElement("span",{id:"distributed-from"},u("Distributed on: "),React.createElement("strong",null," ",r.dtGutenberg.syndicationTime," ")))}),c=function(){return React.createElement(o,null,React.createElement("span",{id:"distributed-to"},r.wp.i18n.sprintf(r.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),r.dtGutenberg.syndicationCount,"1"===r.dtGutenberg.syndicationCount?"":"s")))};i("distributor-status-panel",{render:r.dtGutenberg.syndicationCount>0?c:s})}}); //# sourceMappingURL=gutenberg-status-plugin.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-status-plugin.min.js.map b/dist/js/gutenberg-status-plugin.min.js.map index ebc491f10..491df229a 100644 --- a/dist/js/gutenberg-status-plugin.min.js.map +++ b/dist/js/gutenberg-status-plugin.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///gutenberg-status-plugin.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-status-plugin.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","window","10","_window","registerPlugin","wp","plugins","PluginPostStatusInfo","editPost","__","i18n","renderDistributedFrom","components","PanelRow","React","createElement","dtGutenberg","syndicationTime","renderDistributedTo","sprintf","syndicationCount","render"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,GACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GAEQ+B,EAAmBD,EAAAE,GAAGC,QAAtBF,eACAG,EAAyBJ,EAAAE,GAAGG,SAA5BD,qBACAE,EAAON,EAAAE,GAAGK,KAAVD,GAGFE,GAFgBR,EAAAE,GAAGO,WAAjBC,SAEsB,WAC7B,MACCC,OAAAC,cAACR,EAAD,KACEO,MAAAC,cAAA,SACGN,EAAI,oBACNK,MAAAC,cAAA,kBAAWZ,EAAAa,YAAYC,gBAAvB,SAMCC,EAAsB,WAC3B,MACCJ,OAAAC,cAACR,EAAD,KACEO,MAAAC,cAAA,SACEZ,EAAAE,GAAGK,KAAKS,QACThB,EAAAE,GAAGK,KAAKD,GAAI,sCAAuC,eACnDN,EAAAa,YAAYI,iBACZ,MAAQjB,EAAAa,YAAYI,iBAAmB,GAAK,OASjDhB,GAAgB,4BAA8BiB,OAFrBlB,EAAAa,YAAYI,iBAAmB,EAAOF,EAAsBP","file":"gutenberg-status-plugin.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 10);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\nvar PluginPostStatusInfo = _window.wp.editPost.PluginPostStatusInfo;\nvar __ = _window.wp.i18n.__;\nvar PanelRow = _window.wp.components.PanelRow;\n\n\nvar renderDistributedFrom = function renderDistributedFrom() {\n\treturn React.createElement(\n\t\tPluginPostStatusInfo,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t__('Distributed on: '),\n\t\t\tReact.createElement(\n\t\t\t\t'strong',\n\t\t\t\tnull,\n\t\t\t\t' ',\n\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderDistributedTo = function renderDistributedTo() {\n\treturn React.createElement(\n\t\tPluginPostStatusInfo,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'p',\n\t\t\tnull,\n\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t)\n\t);\n};\n\nvar renderFunction = _window.dtGutenberg.syndicationCount > 0 ? renderDistributedTo : renderDistributedFrom;\n\nregisterPlugin('distributor-status-panel', { render: renderFunction });\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-status-plugin.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\n\nconst { registerPlugin } = wp.plugins;\nconst { PluginPostStatusInfo } = wp.editPost;\nconst { __ } = wp.i18n;\nconst { PanelRow } = wp.components;\n\nconst renderDistributedFrom = () => {\n\treturn(\n\t\t\n\t\t\t\t

\n\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t

\n\t\t
\n\t)\n}\n\nconst renderDistributedTo = () => {\n\treturn(\n\t\t\n\t\t\t\t

\n\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t) }\n\t\t\t\t

\n\t\t
\n\t)\n}\n\nconst renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom\n\nregisterPlugin( 'distributor-status-panel', { render: renderFunction } );\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-status-plugin.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///gutenberg-status-plugin.min.js","webpack:///webpack/bootstrap 77e1eb38af8b7d6f4701","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-status-plugin.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","window","8","_window","registerPlugin","wp","plugins","PluginPostStatusInfo","editPost","__","i18n","renderDistributedFrom","components","PanelRow","React","createElement","id","dtGutenberg","syndicationTime","renderDistributedTo","sprintf","syndicationCount","render"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAUvB,EAAQD,GEpExBC,EAAAD,QAAAyB,QF0EMC,EACA,SAAUzB,EAAQD,EAASH,GAEjC,YG7EA,IAAA8B,GAAA9B,EAAA,GAEQ+B,EAAmBC,KAAGC,QAAtBF,eACAG,EAAyBF,KAAGG,SAA5BD,qBACAE,EAAOJ,KAAGK,KAAVD,GAGFE,GAFgBN,KAAGO,WAAjBC,SAEsB,WAC7B,MACCC,OAAAC,cAACR,EAAD,KACEO,MAAAC,cAAA,QAAMC,GAAG,oBACNP,EAAI,oBACNK,MAAAC,cAAA,kBAAWE,cAAYC,gBAAvB,SAMCC,EAAsB,WAC3B,MACCL,OAAAC,cAACR,EAAD,KACCO,MAAAC,cAAA,QAAMC,GAAG,kBACNX,KAAGK,KAAKU,QACTf,KAAGK,KAAKD,GAAI,sCAAuC,eACnDQ,cAAYI,iBACZ,MAAQJ,cAAYI,iBAAmB,GAAK,OASjDjB,GAAgB,4BAA8BkB,OAFrBL,cAAYI,iBAAmB,EAAOF,EAAsBR","file":"gutenberg-status-plugin.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 8);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\nvar PluginPostStatusInfo = _window.wp.editPost.PluginPostStatusInfo;\nvar __ = _window.wp.i18n.__;\nvar PanelRow = _window.wp.components.PanelRow;\n\n\nvar renderDistributedFrom = function renderDistributedFrom() {\n\treturn React.createElement(\n\t\tPluginPostStatusInfo,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'span',\n\t\t\t{ id: 'distributed-from' },\n\t\t\t__('Distributed on: '),\n\t\t\tReact.createElement(\n\t\t\t\t'strong',\n\t\t\t\tnull,\n\t\t\t\t' ',\n\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t);\n};\n\nvar renderDistributedTo = function renderDistributedTo() {\n\treturn React.createElement(\n\t\tPluginPostStatusInfo,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\t'span',\n\t\t\t{ id: 'distributed-to' },\n\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t)\n\t);\n};\n\nvar renderFunction = _window.dtGutenberg.syndicationCount > 0 ? renderDistributedTo : renderDistributedFrom;\n\nregisterPlugin('distributor-status-panel', { render: renderFunction });\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-status-plugin.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 77e1eb38af8b7d6f4701","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window';\n\nconst { registerPlugin } = wp.plugins;\nconst { PluginPostStatusInfo } = wp.editPost;\nconst { __ } = wp.i18n;\nconst { PanelRow } = wp.components;\n\nconst renderDistributedFrom = () => {\n\treturn(\n\t\t\n\t\t\t\t\n\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t\n\t\t\n\t)\n}\n\nconst renderDistributedTo = () => {\n\treturn(\n\t\t\n\t\t\t\n\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t) }\n\t\t\t\n\t\t\n\t)\n}\n\nconst renderFunction = ( dtGutenberg.syndicationCount > 0 ) ? renderDistributedTo : renderDistributedFrom\n\nregisterPlugin( 'distributor-status-panel', { render: renderFunction } );\n\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-status-plugin.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js b/dist/js/gutenberg-syndicated-post.min.js index 7b8d58a7a..d2ede03ff 100644 --- a/dist/js/gutenberg-syndicated-post.min.js +++ b/dist/js/gutenberg-syndicated-post.min.js @@ -1,2 +1,2 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){e.exports=window},,,,,,,function(e,t,r){"use strict";var n=r(0),i=r(8),a=r(9),o=n.wp.plugins.registerPlugin;if(n.wp.i18n.setLocaleData(n.dtGutenberg.i18n,"distributor"),console.log("dtGutenberg.syndicationCount",n.dtGutenberg.syndicationCount),n.dtGutenberg.syndicationCount>0&&o("distributor-sidebar",{render:a.DistributedToSidebar}),"0"!==n.dtGutenberg.originalSourceId){var u=[];parseInt(n.dtGutenberg.originalDeleted)?(u.push(n.wp.i18n.sprintf(n.wp.i18n.__("This %s was distributed from "),n.dtGutenberg.postTypeSingular)),u.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),u.push(n.wp.i18n.__(". However, the original has been deleted."))):parseInt(n.dtGutenberg.unlinked)?(u.push(n.wp.i18n.__("Originally distributed from ","distributor")),u.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),u.push("."),u.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.linkNonceUrl},[n.wp.i18n.__("restore it.","distributor")])]))):(o("distributor-sidebar",{render:i.DistributedFromSidebar}),u.push(n.wp.i18n.__("Distributed from ","distributor")),u.push(n.wp.element.createElement("a",{href:n.dtGutenberg.postUrl},[n.dtGutenberg.originalLocationName])),u.push("."),u.push(n.wp.element.createElement("span",{},[n.wp.i18n.sprintf(n.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),n.dtGutenberg.postTypeSingular.toLowerCase()),n.wp.element.createElement("a",{href:n.dtGutenberg.unlinkNonceUrl},[n.wp.i18n.__("unlink from the original.","distributor")])])));var s=n.wp.element.createElement("p",{className:"dt-message-wrapper"},u);n.wp.data.dispatch("core/editor").createWarningNotice(s,{isDismissible:!1})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedFromSidebar=void 0;var n=r(0),i=n.wp.components,a=(i.Button,i.PanelBody),o=(n.wp.data.dispatch,n.wp.element.Fragment),u=n.wp.i18n.__,s=n.wp.editPost,l=s.PluginSidebar,d=s.PluginSidebarMoreMenuItem;t.DistributedFromSidebar=function(){return React.createElement(o,null,React.createElement(l,{name:"distributor-sidebar",title:"Distributor Details"},React.createElement(a,null,React.createElement("p",null,u("Distributed on: "),React.createElement("strong",null," ",n.dtGutenberg.syndicationTime," ")))),React.createElement(d,{target:"distributor-sidebar"},u("Distributor Details")))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedToSidebar=void 0;var n=r(0),i=n.wp.components,a=(i.Button,i.PanelBody),o=(n.wp.data.dispatch,n.wp.element.Fragment),u=n.wp.i18n.__,s=n.wp.editPost,l=s.PluginSidebar,d=s.PluginSidebarMoreMenuItem;t.DistributedToSidebar=function(){return React.createElement(o,null,React.createElement(l,{name:"distributor-sidebar",title:"Distributor Details"},React.createElement(a,null,React.createElement("p",null,n.wp.i18n.sprintf(n.wp.i18n.__("Distributed to %1$s connection%2$s.","distributor"),n.dtGutenberg.syndicationCount,"1"===n.dtGutenberg.syndicationCount?"":"s")))),React.createElement(d,{target:"distributor-sidebar"},u("Distributor Details")))}}]); +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}({1:function(e,t){e.exports=window},7:function(e,t,n){"use strict";var r=n(1);r.wp.plugins.registerPlugin;if(r.wp.i18n.setLocaleData(r.dtGutenberg.i18n,"distributor"),"0"!==r.dtGutenberg.originalSourceId){var i=[];parseInt(r.dtGutenberg.originalDeleted)?(i.push(r.wp.i18n.sprintf(r.wp.i18n.__("This %s was distributed from "),r.dtGutenberg.postTypeSingular)),i.push(r.wp.element.createElement("a",{href:r.dtGutenberg.postUrl,key:"original-location-link"},[r.dtGutenberg.originalLocationName])),i.push(r.wp.i18n.__(". However, the original has been deleted."))):parseInt(r.dtGutenberg.unlinked)?(i.push(r.wp.i18n.__("Originally distributed from ","distributor")),i.push(r.wp.element.createElement("a",{href:r.dtGutenberg.postUrl,key:"original-location-link"},[r.dtGutenberg.originalLocationName])),i.push("."),i.push(r.wp.element.createElement("span",{key:"message-span"},[r.wp.i18n.sprintf(r.wp.i18n.__(" This %1$s has been unlinked from the original. However, you can always ","distributor"),r.dtGutenberg.postTypeSingular.toLowerCase()),r.wp.element.createElement("a",{href:r.dtGutenberg.linkNonceUrl,key:"original-restore-link"},[r.wp.i18n.__("restore it.","distributor")])]))):(i.push(r.wp.i18n.__("Distributed from ","distributor")),i.push(r.wp.element.createElement("a",{href:r.dtGutenberg.postUrl,key:"original-location-link"},[r.dtGutenberg.originalLocationName])),i.push("."),i.push(r.wp.element.createElement("span",{key:"message-span"},[r.wp.i18n.sprintf(r.wp.i18n.__(" The original %1$s will update this version unless you ","distributor"),r.dtGutenberg.postTypeSingular.toLowerCase()),r.wp.element.createElement("a",{href:r.dtGutenberg.unlinkNonceUrl,key:"original-unlink"},[r.wp.i18n.__("unlink from the original.","distributor")])])));var o=r.wp.element.createElement("p",{className:"dt-message-wrapper"},i);r.wp.data.dispatch("core/editor").createWarningNotice(o,{isDismissible:!1})}}}); //# sourceMappingURL=gutenberg-syndicated-post.min.js.map \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post.min.js.map b/dist/js/gutenberg-syndicated-post.min.js.map index 3b6a0260e..0710f5654 100644 --- a/dist/js/gutenberg-syndicated-post.min.js.map +++ b/dist/js/gutenberg-syndicated-post.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js","webpack:///./assets/js/gutenberg-distributed-from-sidebar.js","webpack:///./assets/js/gutenberg-distributed-to-sidebar.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","_window","_gutenbergDistributedFromSidebar","_gutenbergDistributedToSidebar","registerPlugin","wp","plugins","i18n","setLocaleData","dtGutenberg","console","log","syndicationCount","render","originalSourceId","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible","value","DistributedFromSidebar","undefined","_wp$components","components","PanelBody","Button","Fragment","_wp$editPost","editPost","PluginSidebar","PluginSidebarMoreMenuItem","React","title","syndicationTime","target","DistributedToSidebar"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAA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D,KAAK,sBACLkE,MAAM,uBAEND,MAAA1B,cAACmB,EAAD,KACCO,MAAA1B,cAAA,SACGtB,EAAAI,GAAGE,KAAKY,QACTlB,EAAAI,GAAGE,KAAKa,GAAI,sCAAuC,eACnDnB,EAAAQ,YAAYG,iBACZ,MAAQX,EAAAQ,YAAYG,iBAAmB,GAAK,QAKhDqC,MAAA1B,cAACyB,GACAI,OAAO,uBAELhC,EAAI","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(0);\n\nvar _gutenbergDistributedFromSidebar = __webpack_require__(8);\n\nvar _gutenbergDistributedToSidebar = __webpack_require__(9);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\n\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\nconsole.log('dtGutenberg.syndicationCount', _window.dtGutenberg.syndicationCount);\nif (_window.dtGutenberg.syndicationCount > 0) {\n\tregisterPlugin('distributor-sidebar', {\n\t\trender: _gutenbergDistributedToSidebar.DistributedToSidebar\n\t});\n}\n\nif ('0' !== _window.dtGutenberg.originalSourceId) {\n\n\tvar messages = [];\n\n\tif (parseInt(_window.dtGutenberg.originalDeleted)) {\n\t\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\t\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n\t} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\t\tregisterPlugin('distributor-sidebar', {\n\t\t\trender: _gutenbergDistributedFromSidebar.DistributedFromSidebar\n\t\t});\n\t\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.unlinkNonceUrl\n\t\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n\t} else {\n\t\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.linkNonceUrl\n\t\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n\t}\n\n\tvar messageElement = _window.wp.element.createElement('p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages);\n\n\t_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\t\tisDismissible: false\n\t});\n}\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedFromSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedFromSidebar = exports.DistributedFromSidebar = function DistributedFromSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t__('Distributed on: '),\n\t\t\t\t\tReact.createElement(\n\t\t\t\t\t\t\"strong\",\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\" \",\n\t\t\t\t\t\t_window.dtGutenberg.syndicationTime,\n\t\t\t\t\t\t\" \"\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.DistributedToSidebar = undefined;\n\nvar _window = __webpack_require__(0);\n\nvar _wp$components = _window.wp.components,\n Button = _wp$components.Button,\n PanelBody = _wp$components.PanelBody;\nvar dispatch = _window.wp.data.dispatch;\nvar Fragment = _window.wp.element.Fragment;\nvar __ = _window.wp.i18n.__;\nvar _wp$editPost = _window.wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar DistributedToSidebar = exports.DistributedToSidebar = function DistributedToSidebar() {\n\n\treturn React.createElement(\n\t\tFragment,\n\t\tnull,\n\t\tReact.createElement(\n\t\t\tPluginSidebar,\n\t\t\t{\n\t\t\t\tname: \"distributor-sidebar\",\n\t\t\t\ttitle: \"Distributor Details\"\n\t\t\t},\n\t\t\tReact.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\tnull,\n\t\t\t\tReact.createElement(\n\t\t\t\t\t\"p\",\n\t\t\t\t\tnull,\n\t\t\t\t\t_window.wp.i18n.sprintf(_window.wp.i18n.__(\"Distributed to %1$s connection%2$s.\", 'distributor'), _window.dtGutenberg.syndicationCount, '1' === _window.dtGutenberg.syndicationCount ? '' : 's')\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tReact.createElement(\n\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t{\n\t\t\t\ttarget: \"distributor-sidebar\"\n\t\t\t},\n\t\t\t__('Distributor Details')\n\t\t)\n\t);\n};\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\nimport { DistributedFromSidebar } from './gutenberg-distributed-from-sidebar.js'\nimport { DistributedToSidebar } from './gutenberg-distributed-to-sidebar.js'\nconst { registerPlugin } = wp.plugins;\n\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\nconsole.log( 'dtGutenberg.syndicationCount', dtGutenberg.syndicationCount );\nif ( dtGutenberg.syndicationCount > 0 ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedToSidebar,\n\t\t} )\n\n}\n\nif ( '0' !== dtGutenberg.originalSourceId ) {\n\n\tconst messages = []\n\n\tif ( parseInt( dtGutenberg.originalDeleted ) ) {\n\t\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\t\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n\t} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\t\tregisterPlugin( 'distributor-sidebar', {\n\t\t\trender: DistributedFromSidebar,\n\t\t} )\n\t\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.unlinkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t} else {\n\t\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.linkNonceUrl\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t}\n\n\tconst messageElement = wp.element.createElement( 'p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages )\n\n\twp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\t\tisDismissible: false\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedFromSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ __( 'Distributed on: ' ) }\n\t\t\t\t\t\t { dtGutenberg.syndicationTime } \n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-from-sidebar.js","import { wp, dtGutenberg } from 'window'\nconst { Button, PanelBody } = wp.components\nconst { dispatch } = wp.data\nconst { Fragment } = wp.element\nconst { __ } = wp.i18n\nconst { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;\n\nexport const DistributedToSidebar = () => {\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\t{ wp.i18n.sprintf(\n\t\t\t\t\t\t\twp.i18n.__( \"Distributed to %1$s connection%2$s.\", 'distributor' ),\n\t\t\t\t\t\t\tdtGutenberg.syndicationCount,\n\t\t\t\t\t\t\t'1' === dtGutenberg.syndicationCount ? '' : 's'\n\t\t\t\t\t\t) }\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ __( 'Distributor Details' ) }\n\t\t\t\n\t\t
\n\t)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-distributed-to-sidebar.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///gutenberg-syndicated-post.min.js","webpack:///webpack/bootstrap 77e1eb38af8b7d6f4701","webpack:///external \"window\"","webpack:///./assets/js/gutenberg-syndicated-post.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","1","window","7","_window","wp","plugins","registerPlugin","i18n","setLocaleData","dtGutenberg","originalSourceId","messages","parseInt","originalDeleted","push","sprintf","__","postTypeSingular","element","createElement","href","postUrl","key","originalLocationName","unlinked","toLowerCase","linkNonceUrl","unlinkNonceUrl","messageElement","className","data","dispatch","createWarningNotice","isDismissible"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMMC,EACA,SAAU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KACzBC,KAAMX,cAAYkB,eAClBL,IAAK,oBAELlB,KAAGG,KAAKS,GAAI,4BAA6B,oBA4B5C,IAAMY,GAAiBxB,KAAGc,QAAQC,cAAe,KAChDU,UAAW,sBACTlB,EAEHP,MAAG0B,KAAKC,SAAU,eAAgBC,oBAAqBJ,GACtDK,eAAe","file":"gutenberg-syndicated-post.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _window = __webpack_require__(1);\n\nvar registerPlugin = _window.wp.plugins.registerPlugin;\n\n\n_window.wp.i18n.setLocaleData(_window.dtGutenberg.i18n, 'distributor');\n\nif ('0' !== _window.dtGutenberg.originalSourceId) {\n\n\tvar messages = [];\n\n\tif (parseInt(_window.dtGutenberg.originalDeleted)) {\n\t\tmessages.push(_window.wp.i18n.sprintf(_window.wp.i18n.__('This %s was distributed from '), _window.dtGutenberg.postTypeSingular));\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl,\n\t\t\tkey: 'original-location-link'\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\t\tmessages.push(_window.wp.i18n.__('. However, the original has been deleted.'));\n\t} else if (!parseInt(_window.dtGutenberg.unlinked)) {\n\t\tmessages.push(_window.wp.i18n.__('Distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl,\n\t\t\tkey: 'original-location-link'\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {\n\t\t\tkey: 'message-span'\n\t\t}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" The original %1$s will update this version unless you \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.unlinkNonceUrl,\n\t\t\tkey: 'original-unlink'\n\t\t}, [_window.wp.i18n.__('unlink from the original.', 'distributor')])]));\n\t} else {\n\t\tmessages.push(_window.wp.i18n.__('Originally distributed from ', 'distributor'));\n\n\t\tmessages.push(_window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.postUrl,\n\t\t\tkey: 'original-location-link'\n\t\t}, [_window.dtGutenberg.originalLocationName]));\n\n\t\tmessages.push('.');\n\n\t\tmessages.push(_window.wp.element.createElement('span', {\n\t\t\tkey: 'message-span'\n\t\t}, [_window.wp.i18n.sprintf(_window.wp.i18n.__(\" This %1$s has been unlinked from the original. However, you can always \", 'distributor'), _window.dtGutenberg.postTypeSingular.toLowerCase()), _window.wp.element.createElement('a', {\n\t\t\thref: _window.dtGutenberg.linkNonceUrl,\n\t\t\tkey: 'original-restore-link'\n\t\t}, [_window.wp.i18n.__('restore it.', 'distributor')])]));\n\t}\n\n\tvar messageElement = _window.wp.element.createElement('p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages);\n\n\t_window.wp.data.dispatch('core/editor').createWarningNotice(messageElement, {\n\t\tisDismissible: false\n\t});\n}\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// gutenberg-syndicated-post.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 77e1eb38af8b7d6f4701","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2 3","import { wp, dtGutenberg } from 'window'\nconst { registerPlugin } = wp.plugins;\n\n\nwp.i18n.setLocaleData( dtGutenberg.i18n, 'distributor' )\n\nif ( '0' !== dtGutenberg.originalSourceId ) {\n\n\tconst messages = []\n\n\tif ( parseInt( dtGutenberg.originalDeleted ) ) {\n\t\tmessages.push( wp.i18n.sprintf( wp.i18n.__( 'This %s was distributed from ' ), dtGutenberg.postTypeSingular ) )\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl,\n\t\t\tkey: 'original-location-link'\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\t\tmessages.push( wp.i18n.__( '. However, the original has been deleted.' ) )\n\t} else if ( ! parseInt( dtGutenberg.unlinked ) ) {\n\t\tmessages.push( wp.i18n.__( 'Distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl,\n\t\t\tkey: 'original-location-link'\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push(\n\t\t\twp.element.createElement( 'span', {\n\t\t\t\tkey: 'message-span'\n\t\t\t}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" The original %1$s will update this version unless you \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.unlinkNonceUrl,\n\t\t\t\tkey: 'original-unlink'\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'unlink from the original.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t} else {\n\t\tmessages.push( wp.i18n.__( 'Originally distributed from ', 'distributor' ) )\n\n\t\tmessages.push( wp.element.createElement( 'a', {\n\t\t\thref: dtGutenberg.postUrl,\n\t\t\tkey: 'original-location-link'\n\t\t}, [\n\t\t\tdtGutenberg.originalLocationName\n\t\t] ) )\n\n\t\tmessages.push( '.' )\n\n\t\tmessages.push( wp.element.createElement( 'span', {\n\t\t\t\tkey: 'message-span'\n\t\t}, [\n\t\t\twp.i18n.sprintf( wp.i18n.__( \" This %1$s has been unlinked from the original. However, you can always \", 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ),\n\t\t\twp.element.createElement( 'a', {\n\t\t\t\thref: dtGutenberg.linkNonceUrl,\n\t\t\t\tkey: 'original-restore-link'\n\t\t\t}, [\n\t\t\t\twp.i18n.__( 'restore it.', 'distributor' )\n\t\t\t] )\n\t\t] ) )\n\t}\n\n\tconst messageElement = wp.element.createElement( 'p', {\n\t\tclassName: 'dt-message-wrapper'\n\t}, messages )\n\n\twp.data.dispatch( 'core/editor' ).createWarningNotice( messageElement, {\n\t\tisDismissible: false\n\t} )\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/gutenberg-syndicated-post.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/push.min.js b/dist/js/push.min.js index faf308d71..4a8e05220 100644 --- a/dist/js/push.min.js +++ b/dist/js/push.min.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){e.exports=window},function(e,t){e.exports=jQuery},function(e,t){e.exports=_},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),a=r(o),c=n(2),i=r(c),s=n(0),d={},u="",l=i.default.memoize(function(e){var t=document.getElementById(e);if(!t)return!1;var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g};return i.default.template(t.innerHTML,null,n)});(0,a.default)(window).load(function(){function e(){f.classList.add("message-error"),setTimeout(function(){f.classList.remove("message-error")},6e3)}function t(t){var r=!1;i.default.each(t.internal,function(e,t){"fail"===e.status?r=!0:s.dtConnections["internal"+t].syndicated=e.url}),i.default.each(t.external,function(e,t){"fail"===e.status?r=!0:s.dtConnections["external"+t].syndicated=!0}),r?e():(f.classList.add("message-success"),p.classList.add("empty"),g.innerText="",setTimeout(function(){f.classList.remove("message-success")},6e3)),d={},n()}function n(){m.innerText="",i.default.each(s.dtConnections,function(e){if(""!==u){var t=e.name.replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase()),n=e.url.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase());if(!t&&!n)return}var r=l("dt-add-connection")({connection:e,selectedConnections:d});m.innerHTML+=r})}function r(){c.focus(),document.body.classList.toggle("distributor-show")}function o(){c.blur(),document.body.classList.toggle("distributor-show")}var c=document.querySelector("#wp-admin-bar-distributor"),f=document.querySelector("#distributor-push-wrapper");if(c&&f){var p=f.querySelector(".connections-selected"),g=f.querySelector(".selected-connections-list"),m=f.querySelector(".new-connections-list"),v=document.getElementById("dt-connection-search"),y=f.querySelector(".syndicate-button"),h=f.querySelector(".action-wrapper"),L=document.getElementById("dt-as-draft");c.appendChild(f),(0,a.default)(c).hoverIntent(r,300,o),(0,a.default)(y).on("click",function(){if(!h.classList.contains("loading")){h.classList.add("loading");var n={action:"dt_push",nonce:s.dt.nonce,connections:d,post_id:s.dt.post_id};L.checked&&(n.draft=!0);var r=!!s.dt.usexhr&&{withCredentials:!0};a.default.ajax({url:s.dt.ajaxurl,xhrFields:r,method:"post",data:n}).done(function(n){setTimeout(function(){if(h.classList.remove("loading"),!n.data||!n.data.results)return void e();t(n.data.results)},500)}).error(function(){setTimeout(function(){h.classList.remove("loading"),e()},500)})}}),(0,a.default)(f).on("click",".add-connection",function(e){if("A"!==e.target.nodeName&&(e.preventDefault(),!e.currentTarget.classList.contains("syndicated")))if(e.currentTarget.classList.contains("added")){var t=e.currentTarget.getAttribute("data-connection-type"),r=e.currentTarget.getAttribute("data-connection-id"),o=g.querySelector('[data-connection-id="'+r+'"][data-connection-type="'+t+'"]');o.parentNode.removeChild(o),delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}else{var a=e.currentTarget.getAttribute("data-connection-type"),c=e.currentTarget.getAttribute("data-connection-id");d[a+c]=s.dtConnections[a+c],p.classList.remove("empty");var i=e.currentTarget.cloneNode();i.innerText=e.currentTarget.innerText;var u=document.createElement("span");u.classList.add("remove-connection"),i.appendChild(u),i.classList="added-connection",g.appendChild(i),n()}}),(0,a.default)(f).on("click",".remove-connection",function(e){e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);var t=e.currentTarget.parentNode.getAttribute("data-connection-type"),r=e.currentTarget.parentNode.getAttribute("data-connection-id");delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}),(0,a.default)(v).on("keyup change",i.default.debounce(function(e){""===e.currentTarget.value&&n(s.dtConnections),u=e.currentTarget.value.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,""),n()},300))}})}]); +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=window},function(e,t){e.exports=_},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(0),a=r(o),c=n(2),i=r(c),s=n(1),d={},u="",l=i.default.memoize(function(e){var t=document.getElementById(e);if(!t)return!1;var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g};return i.default.template(t.innerHTML,null,n)});(0,a.default)(window).load(function(){function e(){f.classList.add("message-error"),setTimeout(function(){f.classList.remove("message-error")},6e3)}function t(t){var r=!1;i.default.each(t.internal,function(e,t){"fail"===e.status?r=!0:s.dtConnections["internal"+t].syndicated=e.url}),i.default.each(t.external,function(e,t){"fail"===e.status?r=!0:s.dtConnections["external"+t].syndicated=!0}),r?e():(f.classList.add("message-success"),p.classList.add("empty"),g.innerText="",setTimeout(function(){f.classList.remove("message-success")},6e3)),d={},n()}function n(){m.innerText="",i.default.each(s.dtConnections,function(e){if(""!==u){var t=e.name.replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase()),n=e.url.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,"").toLowerCase().match(u.toLowerCase());if(!t&&!n)return}var r=l("dt-add-connection")({connection:e,selectedConnections:d});m.innerHTML+=r})}function r(){c.focus(),document.body.classList.toggle("distributor-show")}function o(){c.blur(),document.body.classList.toggle("distributor-show")}var c=document.querySelector("#wp-admin-bar-distributor"),f=document.querySelector("#distributor-push-wrapper");if(c&&f){var p=f.querySelector(".connections-selected"),g=f.querySelector(".selected-connections-list"),m=f.querySelector(".new-connections-list"),v=document.getElementById("dt-connection-search"),y=f.querySelector(".syndicate-button"),h=f.querySelector(".action-wrapper"),L=document.getElementById("dt-as-draft");c.appendChild(f),(0,a.default)(c).hoverIntent(r,300,o),(0,a.default)(y).on("click",function(){if(!h.classList.contains("loading")){h.classList.add("loading");var n={action:"dt_push",nonce:s.dt.nonce,connections:d,post_id:s.dt.post_id};L.checked&&(n.draft=!0);var r=!!s.dt.usexhr&&{withCredentials:!0};a.default.ajax({url:s.dt.ajaxurl,xhrFields:r,method:"post",data:n}).done(function(n){setTimeout(function(){if(h.classList.remove("loading"),!n.data||!n.data.results)return void e();t(n.data.results)},500)}).error(function(){setTimeout(function(){h.classList.remove("loading"),e()},500)})}}),(0,a.default)(f).on("click",".add-connection",function(e){if("A"!==e.target.nodeName&&(e.preventDefault(),!e.currentTarget.classList.contains("syndicated")))if(e.currentTarget.classList.contains("added")){var t=e.currentTarget.getAttribute("data-connection-type"),r=e.currentTarget.getAttribute("data-connection-id"),o=g.querySelector('[data-connection-id="'+r+'"][data-connection-type="'+t+'"]');o.parentNode.removeChild(o),delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}else{var a=e.currentTarget.getAttribute("data-connection-type"),c=e.currentTarget.getAttribute("data-connection-id");d[a+c]=s.dtConnections[a+c],p.classList.remove("empty");var i=e.currentTarget.cloneNode();i.innerText=e.currentTarget.innerText;var u=document.createElement("span");u.classList.add("remove-connection"),i.appendChild(u),i.classList="added-connection",g.appendChild(i),n()}}),(0,a.default)(f).on("click",".remove-connection",function(e){e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);var t=e.currentTarget.parentNode.getAttribute("data-connection-type"),r=e.currentTarget.parentNode.getAttribute("data-connection-id");delete d[t+r],Object.keys(d).length||p.classList.add("empty"),n()}),(0,a.default)(v).on("keyup change",i.default.debounce(function(e){""===e.currentTarget.value&&n(s.dtConnections),u=e.currentTarget.value.replace(/https?:\/\//i,"").replace(/www/i,"").replace(/[^0-9a-zA-Z ]+/,""),n()},300))}})}]); //# sourceMappingURL=push.min.js.map \ No newline at end of file diff --git a/dist/js/push.min.js.map b/dist/js/push.min.js.map index bd69eb322..6fba9ae44 100644 --- a/dist/js/push.min.js.map +++ b/dist/js/push.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 55a20c3935ed0e183fb9","webpack:///external \"window\"","webpack:///external \"jQuery\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","window","jQuery","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,KDMM,SAAUtB,EAAQD,GEnExBC,EAAAD,QAAAwB,QFyEM,SAAUvB,EAAQD,GGzExBC,EAAAD,QAAAyB,QH+EM,SAAUxB,EAAQD,GI/ExBC,EAAAD,QAAA0B,GJoFO,CACA,CACA,CAED,SAAUzB,EAAQD,EAASH,GAEjC,YAaA,SAAS8B,GAAuBC,GAAO,MA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,WAC3E,IAAMH,GAAOL,EAAMI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgB7D,EAAAJ,QAAEmG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,mBAGDnC,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(1);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a20c3935ed0e183fb9","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 0 2 4 5","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 2","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///push.min.js","webpack:///webpack/bootstrap 77e1eb38af8b7d6f4701","webpack:///external \"jQuery\"","webpack:///external \"window\"","webpack:///external \"_\"","webpack:///./assets/js/push.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","jQuery","window","_","_interopRequireDefault","obj","default","_jquery","_jquery2","_underscores","_underscores2","_window","selectedConnections","searchString","processTemplate","memoize","id","element","document","getElementById","options","evaluate","interpolate","escape","template","innerHTML","load","doError","distributorPushWrapper","classList","add","setTimeout","remove","doSuccess","results","error","each","internal","result","connectionId","status","dtConnections","syndicated","url","external","connectionsSelected","connectionsSelectedList","innerText","showConnections","connectionsNewList","connection","nameMatch","replace","toLowerCase","match","urlMatch","showConnection","distributorMenuEntered","distributorMenuItem","focus","body","toggle","distributorMenuExited","blur","querySelector","connectionsSearchInput","syndicateButton","actionWrapper","asDraftInput","appendChild","hoverIntent","on","contains","data","action","nonce","dt","connections","post_id","checked","draft","xhr","usexhr","withCredentials","ajax","ajaxurl","xhrFields","method","done","response","event","target","nodeName","preventDefault","currentTarget","type","getAttribute","deleteNode","parentNode","removeChild","keys","length","cloneNode","removeLink","createElement","debounce","value"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAA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,wBACzChF,EAAO0E,EAAMI,cAAcE,aAAc,qBAE/CpF,GAAoBmF,EAAO/E,GAAMyB,gBAAcsD,EAAO/E,GAEtD6B,EAAoBhB,UAAUG,OAAQ,QAEtC,IAAMf,GAAgByE,EAAMI,cAAcQ,WAC1CrF,GAAQ8B,UAAY2C,EAAMI,cAAc/C,SAExC,IAAMwD,GAAarF,SAASsF,cAAe,OAC3CD,GAAW1E,UAAUC,IAAK,qBAE1Bb,EAAQoD,YAAakC,GACrBtF,EAAQY,UAAY,mBAEpBiB,EAAwBuB,YAAapD,GAErC+B,QAOF,EAAAxC,EAAAF,SAAQsB,GAAyB2C,GAAI,QAAS,qBAAsB,SAAEmB,GACrEA,EAAMI,cAAcI,WAAWA,WAAWC,YAAaT,EAAMI,cAAcI,WAC3E,IAAMH,GAAOL,EAAMI,cAAcI,WAAWF,aAAc,wBACpDhF,EAAO0E,EAAMI,cAAcI,WAAWF,aAAc,4BAEnDpF,GAAoBmF,EAAO/E,GAE3B5B,OAAOgH,KAAMxF,GAAsByF,QACzCxD,EAAoBhB,UAAUC,IAAK,SAGpCkB,OAMD,EAAAxC,EAAAF,SAAQ2D,GAAyBM,GAAI,eAAgBpE,UAAEsG,SAAU,SAAEf,GAC/B,KAA9BA,EAAMI,cAAcY,OACxB1D,EAAiBP,iBAGlB5B,EAAe6E,EAAMI,cAAcY,MAAMtD,QAAS,eAAgB,IAAKA,QAAS,OAAQ,IAAKA,QAAS,iBAAkB,IAExHJ,KACE","file":"push.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = window;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = _;\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _underscores = __webpack_require__(2);\n\nvar _underscores2 = _interopRequireDefault(_underscores);\n\nvar _window = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selectedConnections = {},\n searchString = '';\n\nvar processTemplate = _underscores2.default.memoize(function (id) {\n\tvar element = document.getElementById(id);\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tvar options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t};\n\n\treturn _underscores2.default.template(element.innerHTML, null, options);\n});\n\n(0, _jquery2.default)(window).load(function () {\n\tvar distributorMenuItem = document.querySelector('#wp-admin-bar-distributor');\n\tvar distributorPushWrapper = document.querySelector('#distributor-push-wrapper');\n\n\tif (!distributorMenuItem || !distributorPushWrapper) {\n\t\treturn;\n\t}\n\n\tvar connectionsSelected = distributorPushWrapper.querySelector('.connections-selected');\n\tvar connectionsSelectedList = distributorPushWrapper.querySelector('.selected-connections-list');\n\tvar connectionsNewList = distributorPushWrapper.querySelector('.new-connections-list');\n\tvar connectionsSearchInput = document.getElementById('dt-connection-search');\n\tvar syndicateButton = distributorPushWrapper.querySelector('.syndicate-button');\n\tvar actionWrapper = distributorPushWrapper.querySelector('.action-wrapper');\n\tvar asDraftInput = document.getElementById('dt-as-draft');\n\n\tdistributorMenuItem.appendChild(distributorPushWrapper);\n\n\t/**\n \t * Handle UI error changes\n \t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add('message-error');\n\n\t\tsetTimeout(function () {\n\t\t\tdistributorPushWrapper.classList.remove('message-error');\n\t\t}, 6000);\n\t}\n\n\t/**\n \t * Handle UI success changes\n \t */\n\tfunction doSuccess(results) {\n\t\tvar error = false;\n\n\t\t_underscores2.default.each(results.internal, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['internal' + connectionId].syndicated = result.url;\n\t\t\t}\n\t\t});\n\n\t\t_underscores2.default.each(results.external, function (result, connectionId) {\n\t\t\tif (result.status === 'fail') {\n\t\t\t\terror = true;\n\t\t\t} else {\n\t\t\t\t_window.dtConnections['external' + connectionId].syndicated = true;\n\t\t\t}\n\t\t});\n\n\t\tif (error) {\n\t\t\tdoError();\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add('message-success');\n\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\tconnectionsSelectedList.innerText = '';\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tdistributorPushWrapper.classList.remove('message-success');\n\t\t\t}, 6000);\n\t\t}\n\n\t\tselectedConnections = {};\n\n\t\tshowConnections();\n\t}\n\n\t/**\n \t * Show connections. If there is a search string, then filter by it\n \t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = '';\n\n\t\t_underscores2.default.each(_window.dtConnections, function (connection) {\n\t\t\tif (searchString !== '') {\n\t\t\t\tvar nameMatch = connection.name.replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\t\t\t\tvar urlMatch = connection.url.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '').toLowerCase().match(searchString.toLowerCase());\n\n\t\t\t\tif (!nameMatch && !urlMatch) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar showConnection = processTemplate('dt-add-connection')({\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t});\n\n\t\t\tconnectionsNewList.innerHTML += showConnection;\n\t\t});\n\t}\n\n\t/**\n * Handle distributor push dropdown menu hover using hoverIntent.\n */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur();\n\t\tdocument.body.classList.toggle('distributor-show');\n\t}\n\n\t(0, _jquery2.default)(distributorMenuItem).hoverIntent(distributorMenuEntered, 300, distributorMenuExited);\n\n\t/**\n * Do syndication ajax\n */\n\t(0, _jquery2.default)(syndicateButton).on('click', function () {\n\t\tif (actionWrapper.classList.contains('loading')) {\n\t\t\treturn;\n\t\t}\n\n\t\tactionWrapper.classList.add('loading');\n\n\t\tvar data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: _window.dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: _window.dt.post_id\n\t\t};\n\n\t\tif (asDraftInput.checked) {\n\t\t\tdata.draft = true;\n\t\t}\n\n\t\tvar xhr = _window.dt.usexhr ? { withCredentials: true } : false;\n\n\t\t_jquery2.default.ajax({\n\t\t\turl: _window.dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t}).done(function (response) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tif (!response.data || !response.data.results) {\n\t\t\t\t\tdoError();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdoSuccess(response.data.results);\n\t\t\t}, 500);\n\t\t}).error(function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tactionWrapper.classList.remove('loading');\n\n\t\t\t\tdoError();\n\t\t\t}, 500);\n\t\t});\n\t});\n\n\t/**\n * Add a connection to selected connections for ajax and to the UI list.\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.add-connection', function (event) {\n\t\tif (event.target.nodeName === 'A') {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tif (event.currentTarget.classList.contains('syndicated')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.currentTarget.classList.contains('added')) {\n\n\t\t\tvar type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tvar deleteNode = connectionsSelectedList.querySelector('[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]');\n\n\t\t\tdeleteNode.parentNode.removeChild(deleteNode);\n\n\t\t\tdelete selectedConnections[type + id];\n\n\t\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\t\tconnectionsSelected.classList.add('empty');\n\t\t\t}\n\n\t\t\tshowConnections();\n\t\t} else {\n\n\t\t\tvar _type = event.currentTarget.getAttribute('data-connection-type');\n\t\t\tvar _id = event.currentTarget.getAttribute('data-connection-id');\n\n\t\t\tselectedConnections[_type + _id] = _window.dtConnections[_type + _id];\n\n\t\t\tconnectionsSelected.classList.remove('empty');\n\n\t\t\tvar element = event.currentTarget.cloneNode();\n\t\t\telement.innerText = event.currentTarget.innerText;\n\n\t\t\tvar removeLink = document.createElement('span');\n\t\t\tremoveLink.classList.add('remove-connection');\n\n\t\t\telement.appendChild(removeLink);\n\t\t\telement.classList = 'added-connection';\n\n\t\t\tconnectionsSelectedList.appendChild(element);\n\n\t\t\tshowConnections();\n\t\t}\n\t});\n\n\t/**\n * Remove a connection from selected connections and the UI list\n */\n\t(0, _jquery2.default)(distributorPushWrapper).on('click', '.remove-connection', function (event) {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild(event.currentTarget.parentNode);\n\t\tvar type = event.currentTarget.parentNode.getAttribute('data-connection-type');\n\t\tvar id = event.currentTarget.parentNode.getAttribute('data-connection-id');\n\n\t\tdelete selectedConnections[type + id];\n\n\t\tif (!Object.keys(selectedConnections).length) {\n\t\t\tconnectionsSelected.classList.add('empty');\n\t\t}\n\n\t\tshowConnections();\n\t});\n\n\t/**\n * List for connection filtering\n */\n\t(0, _jquery2.default)(connectionsSearchInput).on('keyup change', _underscores2.default.debounce(function (event) {\n\t\tif (event.currentTarget.value === '') {\n\t\t\tshowConnections(_window.dtConnections);\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace(/https?:\\/\\//i, '').replace(/www/i, '').replace(/[^0-9a-zA-Z ]+/, '');\n\n\t\tshowConnections();\n\t}, 300));\n});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// push.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 77e1eb38af8b7d6f4701","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1 4 5","module.exports = window;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"window\"\n// module id = 1\n// module chunks = 0 1 2 3","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 2\n// module chunks = 0 1","import jQuery from 'jquery'\nimport _ from 'underscores'\nimport { dt, dtConnections } from 'window'\n\nlet selectedConnections = {},\n\tsearchString = ''\n\nconst processTemplate = _.memoize( ( id ) => {\n\tconst element = document.getElementById( id )\n\tif ( ! element ) {\n\t\treturn false\n\t}\n\n\t// Use WordPress style Backbone template syntax\n\tconst options = {\n\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\tescape: /{{([^}]+?)}}(?!})/g\n\t}\n\n\treturn _.template( element.innerHTML, null, options )\n} )\n\njQuery( window ).load( () => {\n\tconst distributorMenuItem = document.querySelector( '#wp-admin-bar-distributor' )\n\tconst distributorPushWrapper = document.querySelector( '#distributor-push-wrapper' )\n\n\tif ( ! distributorMenuItem || ! distributorPushWrapper ) {\n\t\treturn\n\t}\n\n\tconst connectionsSelected = distributorPushWrapper.querySelector( '.connections-selected' )\n\tconst connectionsSelectedList = distributorPushWrapper.querySelector( '.selected-connections-list' )\n\tconst connectionsNewList = distributorPushWrapper.querySelector( '.new-connections-list' )\n\tconst connectionsSearchInput = document.getElementById( 'dt-connection-search' )\n\tconst syndicateButton = distributorPushWrapper.querySelector( '.syndicate-button' )\n\tconst actionWrapper = distributorPushWrapper.querySelector( '.action-wrapper' )\n\tconst asDraftInput = document.getElementById( 'dt-as-draft' )\n\n\tdistributorMenuItem.appendChild( distributorPushWrapper )\n\n\t/**\n\t\t * Handle UI error changes\n\t\t */\n\tfunction doError() {\n\t\tdistributorPushWrapper.classList.add( 'message-error' )\n\n\t\tsetTimeout( () => {\n\t\t\tdistributorPushWrapper.classList.remove( 'message-error' )\n\t\t}, 6000 )\n\t}\n\n\t/**\n\t\t * Handle UI success changes\n\t\t */\n\tfunction doSuccess( results ) {\n\t\tlet error = false\n\n\t\t_.each( results.internal, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['internal' + connectionId].syndicated = result.url\n\t\t\t}\n\t\t} )\n\n\t\t_.each( results.external, ( result, connectionId ) => {\n\t\t\tif ( result.status === 'fail' ) {\n\t\t\t\terror = true\n\t\t\t} else {\n\t\t\t\tdtConnections['external' + connectionId].syndicated = true\n\t\t\t}\n\t\t} )\n\n\t\tif ( error ) {\n\t\t\tdoError()\n\t\t} else {\n\t\t\tdistributorPushWrapper.classList.add( 'message-success' )\n\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\tconnectionsSelectedList.innerText = ''\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tdistributorPushWrapper.classList.remove( 'message-success' )\n\t\t\t}, 6000 )\n\t\t}\n\n\t\tselectedConnections = {}\n\n\t\tshowConnections()\n\t}\n\n\t/**\n\t\t * Show connections. If there is a search string, then filter by it\n\t\t */\n\tfunction showConnections() {\n\t\tconnectionsNewList.innerText = ''\n\n\t\t_.each( dtConnections, ( connection ) => {\n\t\t\tif ( searchString !== '' ) {\n\t\t\t\tlet nameMatch = connection.name.replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\t\t\t\tlet urlMatch = connection.url.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' ).toLowerCase().match( searchString.toLowerCase() )\n\n\t\t\t\tif ( ! nameMatch && ! urlMatch ) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst showConnection = processTemplate( 'dt-add-connection' )( {\n\t\t\t\tconnection: connection,\n\t\t\t\tselectedConnections: selectedConnections\n\t\t\t} )\n\n\t\t\tconnectionsNewList.innerHTML += showConnection\n\t\t} )\n\t}\n\n\t/**\n\t * Handle distributor push dropdown menu hover using hoverIntent.\n\t */\n\tfunction distributorMenuEntered() {\n\t\tdistributorMenuItem.focus()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tfunction distributorMenuExited() {\n\t\tdistributorMenuItem.blur()\n\t\tdocument.body.classList.toggle( 'distributor-show' )\n\t}\n\n\tjQuery( distributorMenuItem ).hoverIntent( distributorMenuEntered, 300, distributorMenuExited )\n\n\t/**\n\t * Do syndication ajax\n\t */\n\tjQuery( syndicateButton ).on( 'click', () => {\n\t\tif ( actionWrapper.classList.contains( 'loading' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tactionWrapper.classList.add( 'loading' )\n\n\t\tconst data = {\n\t\t\taction: 'dt_push',\n\t\t\tnonce: dt.nonce,\n\t\t\tconnections: selectedConnections,\n\t\t\tpost_id: dt.post_id\n\t\t}\n\n\t\tif ( asDraftInput.checked ) {\n\t\t\tdata.draft = true\n\t\t}\n\n\t\tconst xhr = dt.usexhr ? { withCredentials: true } : false\n\n\t\tjQuery.ajax( {\n\t\t\turl: dt.ajaxurl,\n\t\t\txhrFields: xhr,\n\t\t\tmethod: 'post',\n\t\t\tdata: data\n\t\t} ).done( ( response ) => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tif ( ! response.data || ! response.data.results ) {\n\t\t\t\t\tdoError()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tdoSuccess( response.data.results )\n\t\t\t}, 500 )\n\t\t} ).error( () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tactionWrapper.classList.remove( 'loading' )\n\n\t\t\t\tdoError()\n\t\t\t}, 500 )\n\t\t} )\n\t} )\n\n\t/**\n\t * Add a connection to selected connections for ajax and to the UI list.\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.add-connection', ( event ) => {\n\t\tif ( event.target.nodeName === 'A' ) {\n\t\t\treturn\n\t\t}\n\n\t\tevent.preventDefault()\n\n\t\tif ( event.currentTarget.classList.contains( 'syndicated' ) ) {\n\t\t\treturn\n\t\t}\n\n\t\tif ( event.currentTarget.classList.contains( 'added' ) ) {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tconst deleteNode = connectionsSelectedList.querySelector( '[data-connection-id=\"' + id + '\"][data-connection-type=\"' + type + '\"]' )\n\n\t\t\tdeleteNode.parentNode.removeChild( deleteNode )\n\n\t\t\tdelete selectedConnections[type + id]\n\n\t\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t\t}\n\n\t\t\tshowConnections()\n\t\t} else {\n\n\t\t\tconst type = event.currentTarget.getAttribute( 'data-connection-type' )\n\t\t\tconst id = event.currentTarget.getAttribute( 'data-connection-id' )\n\n\t\t\tselectedConnections[type + id] = dtConnections[type + id]\n\n\t\t\tconnectionsSelected.classList.remove( 'empty' )\n\n\t\t\tconst element = event.currentTarget.cloneNode()\n\t\t\telement.innerText = event.currentTarget.innerText\n\n\t\t\tconst removeLink = document.createElement( 'span' )\n\t\t\tremoveLink.classList.add( 'remove-connection' )\n\n\t\t\telement.appendChild( removeLink )\n\t\t\telement.classList = 'added-connection'\n\n\t\t\tconnectionsSelectedList.appendChild( element )\n\n\t\t\tshowConnections()\n\t\t}\n\t} )\n\n\t/**\n\t * Remove a connection from selected connections and the UI list\n\t */\n\tjQuery( distributorPushWrapper ).on( 'click', '.remove-connection', ( event ) => {\n\t\tevent.currentTarget.parentNode.parentNode.removeChild( event.currentTarget.parentNode )\n\t\tconst type = event.currentTarget.parentNode.getAttribute( 'data-connection-type' )\n\t\tconst id = event.currentTarget.parentNode.getAttribute( 'data-connection-id' )\n\n\t\tdelete selectedConnections[type + id]\n\n\t\tif ( ! Object.keys( selectedConnections ).length ) {\n\t\t\tconnectionsSelected.classList.add( 'empty' )\n\t\t}\n\n\t\tshowConnections()\n\t} )\n\n\t/**\n\t * List for connection filtering\n\t */\n\tjQuery( connectionsSearchInput ).on( 'keyup change', _.debounce( ( event ) => {\n\t\tif ( event.currentTarget.value === '' ) {\n\t\t\tshowConnections( dtConnections )\n\t\t}\n\n\t\tsearchString = event.currentTarget.value.replace( /https?:\\/\\//i, '' ).replace( /www/i, '' ).replace( /[^0-9a-zA-Z ]+/, '' )\n\n\t\tshowConnections()\n\t}, 300 ) )\n} )\n\n\n\n// WEBPACK FOOTER //\n// ./assets/js/push.js"],"sourceRoot":""} \ No newline at end of file