Version Description
Download this release
Release Info
Developer | oskosk |
Plugin | Jetpack by WordPress.com |
Version | 6.1 |
Comparing to | |
See all releases |
Code changes from version 6.1-beta to 6.1
- _inc/build/admin.js +3 -3
- _inc/build/infinite-scroll/infinity.min.js +1 -1
- _inc/build/lazy-images/js/lazy-images.min.js +2 -2
- class.jetpack.php +8 -11
- css/jetpack-rtl.css +0 -3
- css/jetpack.css +0 -3
- jetpack.php +1 -0
- modules/infinite-scroll/infinity.js +9 -8
- modules/infinite-scroll/infinity.php +17 -26
- modules/lazy-images/js/lazy-images.js +29 -13
- modules/markdown/easy-markdown.php +0 -48
- modules/shortcodes/wordads.php +3 -6
- modules/theme-tools/compat/twentysixteen.php +16 -0
- modules/wordads/php/widgets.php +1 -2
- modules/wordads/wordads.php +21 -10
- readme.txt +5 -5
- sal/class.json-api-site-jetpack.php +1 -2
_inc/build/admin.js
CHANGED
@@ -31,7 +31,7 @@ m=c(m,_,M,p,h,e[3],1548603684,15),M=a(M,10),h=c(h,m,_,M,p,e[7],1548603684,7),_=a
|
|
31 |
}),m.default.createElement(g.default,{module_slug:"protect"}),m.default.createElement(g.default,{module_slug:"vaultpress"}))}}]),t}(m.default.Component);t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function a(e){return e?e.nodeType===P?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(z)||""}function o(e,t,n,r,a){var i;if(y.logTopLevelRenders){var o=e._currentElement.props.child,s=o.type;i="React mount: "+("string"==typeof s?s:s.displayName||s.name),console.time(i)}var c=w.mountComponent(e,n,null,g(e,t),a,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,I._mountImageIntoNode(c,t,e,r,n)}function s(e,t,n,r){var a=T.ReactReconcileTransaction.getPooled(!n&&v.useCreateElement);a.perform(o,null,e,t,a,n,r),T.ReactReconcileTransaction.release(a)}function c(e,t,n){for(w.unmountComponent(e,n),t.nodeType===P&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function u(e){var t=a(e);if(t){var n=b.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function l(e){return!(!e||e.nodeType!==D&&e.nodeType!==P&&e.nodeType!==x)}function d(e){var t=a(e),n=t&&b.getInstanceFromNode(t);return n&&!n._hostParent?n:null}function f(e){var t=d(e);return t?t._hostContainerInfo._topLevelWrapper:null}var p=n(12),h=n(97),m=n(92),_=n(85),M=n(152),b=(n(66),n(22)),g=n(598),v=n(923),y=n(478),A=n(133),E=(n(43),n(599)),w=n(95),k=n(215),T=n(53),L=n(132),S=n(256),C=(n(9),n(151)),O=n(214),z=(n(13),m.ID_ATTRIBUTE_NAME),N=m.ROOT_ATTRIBUTE_NAME,D=1,P=9,x=11,j={},R=1,Y=function(){this.rootID=R++};Y.prototype.isReactComponent={},Y.prototype.render=function(){return this.props.child},Y.isReactTopLevelWrapper=!0;var I={TopLevelWrapper:Y,_instancesByReactRootID:j,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,a){return I.scrollMonitor(r,function(){k.enqueueElementInternal(e,t,n),a&&k.enqueueCallbackInternal(e,a)}),e},_renderNewRootComponent:function(e,t,n,r){l(t)||p("37"),M.ensureScrollValueMonitoring();var a=S(e,!1);T.batchedUpdates(s,a,t,n,r);var i=a._instance.rootID;return j[i]=a,a},renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&A.has(e)||p("38"),I._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){k.validateCallback(r,"ReactDOM.render"),_.isValidElement(t)||p("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var o,s=_.createElement(Y,{child:t});if(e){var c=A.get(e);o=c._processChildContext(c._context)}else o=L;var l=f(n);if(l){var d=l._currentElement,h=d.props.child;if(O(h,t)){var m=l._renderedComponent.getPublicInstance(),M=r&&function(){r.call(m)};return I._updateRootComponent(l,s,o,n,M),m}I.unmountComponentAtNode(n)}var b=a(n),g=b&&!!i(b),v=u(n),y=g&&!l&&!v,E=I._renderNewRootComponent(s,n,y,o)._renderedComponent.getPublicInstance();return r&&r.call(E),E},render:function(e,t,n){return I._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)||p("40");var t=f(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(N);return!1}return delete j[t._instance.rootID],T.batchedUpdates(c,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,o){if(l(t)||p("41"),i){var s=a(t);if(E.canReuseMarkup(e,s))return void b.precacheNode(n,s);var c=s.getAttribute(E.CHECKSUM_ATTR_NAME);s.removeAttribute(E.CHECKSUM_ATTR_NAME);var u=s.outerHTML;s.setAttribute(E.CHECKSUM_ATTR_NAME,c);var d=e,f=r(d,u),m=" (client) "+d.substring(f-20,f+20)+"\n (server) "+u.substring(f-20,f+20);t.nodeType===P&&p("42",m)}if(t.nodeType===P&&p("43"),o.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else C(t,e),b.precacheNode(n,t.firstChild)}};e.exports=I},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===a.COMPOSITE;)e=e._renderedComponent;return t===a.HOST?e._renderedComponent:t===a.EMPTY?null:void 0}var a=n(479);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Navigation=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(862),v=r(g),y=n(804),A=r(y),E=n(809),w=r(E),k=n(8),T=n(15),L=r(T),S=n(23),C=n(28),O=t.Navigation=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.trackNavClick=function(e){L.default.tracks.recordJetpackClick({target:"nav_item",path:e})},r.trackDashboardClick=function(){r.trackNavClick("dashboard")},r.trackPlansClick=function(){r.trackNavClick("dashboard")},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=void 0;return e=this.props.userCanManageModules?M.default.createElement(A.default,{selectedText:this.props.route.name},M.default.createElement(w.default,{path:"#/dashboard",onClick:this.trackDashboardClick,selected:"/dashboard"===this.props.route.path||"/"===this.props.route.path},(0,k.translate)("At a Glance",{context:"Navigation item."})),M.default.createElement(w.default,{path:"#/plans",onClick:this.trackPlansClick,selected:"/plans"===this.props.route.path},(0,k.translate)("Plans",{context:"Navigation item."}))):M.default.createElement(A.default,{selectedText:this.props.route.name},M.default.createElement(w.default,{path:"#/dashboard",selected:"/dashboard"===this.props.route.path||"/"===this.props.route.path},(0,k.translate)("At a Glance",{context:"Navigation item."}))),M.default.createElement("div",{id:"jp-navigation",className:"dops-navigation"},M.default.createElement(v.default,{selectedText:this.props.route.name},e))}}]),t}(M.default.Component);O.propTypes={route:m.default.object.isRequired},t.default=(0,b.connect)(function(e){return{userCanManageModules:(0,C.userCanManageModules)(e),userCanViewStats:(0,C.userCanViewStats)(e),isModuleActivated:function(t){return(0,S.isModuleActivated)(e,t)}}})(O)},function(e,t,n){"use strict";var r=n(7),a=n(1),i=n(935),o=n(14),s=n(32),c=n(804),u=n(809),l=n(866);n(945);var d=s({displayName:"SectionNav",propTypes:{children:r.node,selectedText:r.node,selectedCount:r.number,hasPinnedItems:r.bool,onMobileNavPanelOpen:r.func},getInitialState:function(){return{mobileOpen:!1}},getDefaultProps:function(){return{onMobileNavPanelOpen:function(){}}},componentWillMount:function(){this.checkForSiblingControls(this.props.children)},componentWillReceiveProps:function(e){i(this.props,e)||(this.checkForSiblingControls(e.children),this.hasSiblingControls||this.closeMobilePanel())},render:function(){var e=this.getChildren(),t=void 0;return e?(t=o({"dops-section-nav":!0,"is-open":this.state.mobileOpen,"has-pinned-items":this.hasPinnedSearch||this.props.hasPinnedItems}),a.createElement("div",{className:t},a.createElement("div",{className:"dops-section-nav__mobile-header",onTouchTap:this.toggleMobileOpenState},a.createElement("span",{className:"dops-section-nav__mobile-header-text"},this.props.selectedText)),a.createElement("div",{className:"dops-section-nav__panel"},e))):(t=o({"dops-section-nav":!0,"is-empty":!0}),a.createElement("div",{className:t},a.createElement("div",{className:"dops-section-nav__panel"},a.createElement(u,null))))},getChildren:function(){return a.Children.map(this.props.children,function(e){var t={hasSiblingControls:this.hasSiblingControls,closeSectionNavMobilePanel:this.closeMobilePanel};return e?(e.type!==c||e.props.selectedText||"string"!=typeof this.props.selectedText||(t.selectedText=this.props.selectedText),e.type===c&&this.props.selectedCount&&(t.selectedCount=this.props.selectedCount),e.type===l&&(e.props.pinned&&(this.hasPinnedSearch=!0),t.onSearch=this.generateOnSearch(e.props.onSearch)),a.cloneElement(e,t)):null}.bind(this))},closeMobilePanel:function(){window.innerWidth<480&&this.state.mobileOpen&&this.setState({mobileOpen:!1})},toggleMobileOpenState:function(){var e=!this.state.mobileOpen;this.setState({mobileOpen:e}),e&&this.props.onMobileNavPanelOpen()},generateOnSearch:function(e){return function(){e.apply(this,arguments),this.closeMobilePanel()}.bind(this)},checkForSiblingControls:function(e){this.hasSiblingControls=!1,a.Children.forEach(e,function(e,t){t&&e&&e.type!==l&&(this.hasSiblingControls=!0)}.bind(this))}});e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(149),M=r(_),b=n(1),g=r(b),v=n(503),y=r(v),A=n(459),E=r(A),w=n(504),k=r(w),T=n(864),L=r(T),S=n(938),C=r(S),O=n(14),z=r(O),N=n(865),D=r(N),P=n(940),x=r(P),j=n(941),R=r(j),Y=n(805),I=r(Y);n(942);var q=g.default.Component,B=function(){},W=function(e){function t(e){(0,s.default)(this,t);var n=(0,d.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e));n.navigateItem=n.navigateItem.bind(n),n.toggleDropdown=n.toggleDropdown.bind(n),n.handleOutsideClick=n.handleOutsideClick.bind(n),n._onClick=n._onClick.bind(n);var r={isOpen:!1};return e.options.length&&(r.selected=n.getInitialSelectedItem(e)),n.state=r,n}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.setState({instanceId:++t.instances})}},{key:"componentWillReceiveProps",value:function(e){this.state.isOpen&&this.closeDropdown(),void 0!==this.state.selected&&this.props.initialSelected!==e.initialSelected&&this.setState({selected:e.initialSelected})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.handleOutsideClick)}},{key:"componentDidUpdate",value:function(e,t){this.state.isOpen?window.addEventListener("click",this.handleOutsideClick):window.removeEventListener("click",this.handleOutsideClick),this.state.isOpen!==t.isOpen&&this.props.onToggle({target:this,open:this.state.isOpen})}},{key:"getInitialSelectedItem",value:function(e){if(e=e||this.props,e.initialSelected)return e.initialSelected;if(e.options.length){var t=(0,y.default)(e.options,function(e){return!e.isLabel});return t&&t.value}}},{key:"dropdownOptions",value:function(){var e=0,t=this;return this.props.children?g.default.Children.map(this.props.children,function(n,r){if(!n)return null;var a=g.default.cloneElement(n,{ref:n.type===D.default?"item-"+e:null,key:"item-"+r,onClick:function(e){t.refs.dropdownContainer.focus(),"function"==typeof n.props.onClick&&n.props.onClick(e)}});return n.type===D.default&&e++,a},this):this.props.options.map(function(t,n){if(!t)return g.default.createElement(x.default,{key:"dropdown-separator-"+this.state.instanceId+"-"+n});if(t.isLabel)return g.default.createElement(R.default,{key:"dropdown-label-"+this.state.instanceId+"-"+n},t.label);var r=g.default.createElement(D.default,{key:"dropdown-item-"+this.state.instanceId+"-"+t.value,ref:"item-"+e,selected:this.state.selected===t.value,onClick:this.onSelectItem(t),path:t.path},t.label);return e++,r},this)}},{key:"render",value:function(){var e={"dops-select-dropdown":!0,"is-compact":this.props.compact,"is-open":this.state.isOpen,"is-disabled":this.props.disabled};this.props.className&&this.props.className.split(" ").forEach(function(t){e[t]=!0});var t=(0,z.default)(e),n=this.props.selectedText?this.props.selectedText:(0,C.default)((0,y.default)(this.props.options,{value:this.state.selected}),"label");return g.default.createElement("div",{style:this.props.style,className:t},g.default.createElement("div",{ref:"dropdownContainer",className:"dops-select-dropdown__container",valueLink:this.props.valueLink,tabIndex:this.props.tabIndex||0,role:"listbox","aria-labelledby":"select-dropdown-"+this.state.instanceId,"aria-haspopup":"true","aria-owns":"select-submenu-"+this.state.instanceId,"aria-controls":"select-submenu-"+this.state.instanceId,"aria-expanded":this.state.isOpen,onClick:this._onClick,onKeyDown:this.navigateItem},g.default.createElement("div",{id:"select-dropdown-"+this.state.instanceId,className:"dops-select-dropdown__header"},g.default.createElement("span",{className:"dops-select-dropdown__header-text"},n,"number"==typeof this.props.selectedCount&&g.default.createElement(I.default,{count:this.props.selectedCount}))),g.default.createElement("ul",{id:"select-submenu-"+this.state.instanceId,className:"dops-select-dropdown__options"},this.dropdownOptions())))}},{key:"_onClick",value:function(){this.props.disabled||this.toggleDropdown()}},{key:"toggleDropdown",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"openDropdown",value:function(){this.setState({isOpen:!0})}},{key:"closeDropdown",value:function(){this.state.isOpen&&(delete this.focused,this.setState({isOpen:!1}))}},{key:"onSelectItem",value:function(e){return this.selectItem.bind(this,e)}},{key:"selectItem",value:function(e){e&&(this.props.onSelect&&this.props.onSelect(e),this.setState({selected:e.value}),this.refs.dropdownContainer.focus())}},{key:"navigateItem",value:function(e){switch(e.keyCode){case 9:this.navigateItemByTabKey(e);break;case 32:case 13:e.preventDefault(),this.activateItem();break;case 38:e.preventDefault(),this.focusSibling("previous"),this.openDropdown();break;case 40:e.preventDefault(),this.focusSibling("next"),this.openDropdown();break;case 27:e.preventDefault(),this.closeDropdown(),this.refs.dropdownContainer.focus()}}},{key:"navigateItemByTabKey",value:function(e){if(this.state.isOpen){e.preventDefault();var t=e.shiftKey?"previous":"next";this.focusSibling(t)}}},{key:"activateItem",value:function(){if(!this.state.isOpen)return this.openDropdown();document.activeElement.click()}},{key:"focusSibling",value:function(e){var t=void 0,n=void 0;if(this.state.isOpen){this.props.options.length?(t=(0,L.default)((0,E.default)(this.props.options,function(e){return e&&!e.isLabel}),"value"),n="number"==typeof this.focused?this.focused:t.indexOf(this.state.selected)):(t=(0,E.default)(this.props.children,function(e){return e.type===D.default}),n="number"==typeof this.focused?this.focused:(0,k.default)(t,function(e){return e.props.selected}));var r="previous"===e?-1:1,a=n+r;a>=t.length||a<0||(M.default.findDOMNode(this.refs["item-"+a].refs.itemLink).focus(),this.focused=a)}}},{key:"handleOutsideClick",value:function(e){M.default.findDOMNode(this.refs.dropdownContainer).contains(e.target)||this.closeDropdown()}}]),t}(q);W.defaultProps={options:[],onSelect:B,onToggle:B,disabled:!1,style:{}},W.propTypes={selectedText:m.default.string,selectedCount:m.default.number,initialSelected:m.default.string,className:m.default.string,style:m.default.object,onSelect:m.default.func,onToggle:m.default.func,focusSibling:m.default.func,tabIndex:m.default.number,disabled:m.default.bool,options:m.default.arrayOf(m.default.shape({value:m.default.string.isRequired,label:m.default.string.isRequired,path:m.default.string}))},W.instances=0,t.default=W,e.exports=t.default},function(e,t,n){function r(e,t){return(s(e)?a:o)(e,i(t,3))}var a=n(125),i=n(91),o=n(937),s=n(26);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14),M=n(805),b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=_(this.props.className,{"dops-select-dropdown__item":!0,"is-selected":this.props.selected,"is-disabled":this.props.disabled});return m.createElement("li",{className:"dops-select-dropdown__option"},m.createElement("a",{ref:"itemLink",href:this.props.path,className:e,onClick:this.props.disabled?null:this.props.onClick,"data-bold-text":this.props.value||this.props.children,role:"option",tabIndex:0,"aria-selected":this.props.selected},m.createElement("span",{className:"dops-select-dropdown__item-text"},this.props.children,"number"==typeof this.props.count&&m.createElement(M,{count:this.props.count}))))}}]),t}(m.Component);b.propTypes={children:h.string.isRequired,path:h.string,selected:h.bool,onClick:h.func,count:h.number},b.defaultProps={selected:!1},e.exports=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){switch(t.key){case" ":case"Enter":this[e](t)}}var i=n(11),o=r(i),s=n(2),c=r(s),u=n(3),l=r(u),d=n(6),f=r(d),p=n(4),h=r(p),m=n(5),_=r(m),M=n(149),b=r(M),g=n(7),v=r(g),y=n(1),A=r(y),E=n(14),w=r(E),k=n(505),T=r(k),L=n(64),S=r(L),C=n(15),O=r(C),z=n(867),N=r(z),D=n(65),P=r(D),x=n(808);n(944);var j=function(e){function t(){var e,n,r,a;(0,l.default)(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=(0,h.default)(this,(e=t.__proto__||(0,c.default)(t)).call.apply(e,[this].concat(o))),r.state={keyword:r.props.initialValue||"",isOpen:!!r.props.isOpen,hasFocus:!1},r.scrollOverlay=function(){r.refs.overlay&&window.requestAnimationFrame(function(){r.refs.overlay&&r.refs.searchInput&&(r.refs.overlay.scrollLeft=r.getScrollLeft(r.refs.searchInput))})},r.getScrollLeft=function(e){if(!e.createTextRange)return e.scrollLeft;var t=e.createTextRange(),n=window.getComputedStyle(e,void 0),r=parseFloat(n.paddingLeft),a=t.getBoundingClientRect();return e.getBoundingClientRect().left+e.clientLeft+r-a.left},r.focus=function(){setTimeout(function(){return r.refs.searchInput&&b.default.findDOMNode(r.refs.searchInput).focus()},0)},r.blur=function(){b.default.findDOMNode(r.refs.searchInput).blur()},r.getCurrentSearchValue=function(){return b.default.findDOMNode(r.refs.searchInput).value},r.clear=function(){r.setState({keyword:""})},r.onBlur=function(e){r.props.onBlur&&r.props.onBlur(e),r.setState({hasFocus:!1})},r.onChange=function(){r.setState({keyword:r.getCurrentSearchValue()})},r.openSearch=function(e){r.props.onClick(),e.preventDefault(),r.setState({keyword:"",isOpen:!0}),O.default.ga.recordEvent(r.props.analyticsGroup,"Clicked Open Search")},r.closeSearch=function(e){if(e.preventDefault(),!r.props.disabled){var t=b.default.findDOMNode(r.refs.searchInput);r.setState({keyword:"",isOpen:r.props.isOpen||!1}),t.value="",t.blur(),r.props.pinned&&b.default.findDOMNode(r.refs.openIcon).focus(),r.props.onSearchClose(e),O.default.ga.recordEvent(r.props.analyticsGroup,"Clicked Close Search")}},r.keyUp=function(e){"Enter"===e.key&&(0,x.isMobile)()&&r.blur(),r.props.pinned&&("Escape"===e.key&&r.closeSearch(e),r.scrollOverlay())},r.keyDown=function(e){r.scrollOverlay(),"Escape"===e.key&&""===e.target.value&&r.closeSearch(e),r.props.onKeyDown(e)},r.onFocus=function(){var e=b.default.findDOMNode(r.refs.searchInput),t=e.value;t&&(e.value="",e.value=t),r.setState({hasFocus:!0}),r.props.onSearchOpen()},r.renderStylingDiv=function(){return A.default.createElement("div",{className:"dops-search__text-overlay",ref:"overlay"},r.props.overlayStyling(r.state.keyword))},r.closeButton=function(){return r.props.hideClose||!r.state.keyword&&!r.state.isOpen?null:A.default.createElement("div",{role:"button",className:"dops-search__icon-navigation",onClick:r.closeSearch,tabIndex:"0",onKeyDown:r.closeListener,"aria-controls":"dops-search-component-"+r.state.instanceId,"aria-label":"Close Search"},A.default.createElement(P.default,{icon:"cross",className:"dops-search__close-icon"}))},a=n,(0,h.default)(r,a)}return(0,_.default)(t,e),(0,f.default)(t,[{key:"componentWillMount",value:function(){this.setState({instanceId:++t.instances}),this.closeListener=a.bind(this,"closeSearch"),this.openListener=a.bind(this,"openSearch")}},{key:"componentWillReceiveProps",value:function(e){e.onSearch===this.props.onSearch&&e.delaySearch===this.props.delaySearch||(this.onSearch=this.props.delaySearch?(0,T.default)(this.props.onSearch,this.props.delayTimeout):this.props.onSearch),e.isOpen&&this.setState({isOpen:e.isOpen}),e.initialValue===this.props.initialValue||this.state.keyword!==this.props.initialValue&&""!==this.state.keyword||this.setState({keyword:e.initialValue||""})}},{key:"componentDidUpdate",value:function(e,t){this.scrollOverlay(),(this.state.isOpen&&!t.isOpen||this.props.autoFocus&&!e.autoFocus)&&this.focus(),this.state.keyword!==t.keyword&&(this.state.keyword?this.onSearch(this.state.keyword):(this.props.delaySearch&&this.onSearch.cancel(),this.props.onSearch(this.state.keyword)),this.props.onSearchChange(this.state.keyword))}},{key:"componentDidMount",value:function(){var e=this;this.onSearch=this.props.delaySearch?(0,T.default)(this.props.onSearch,this.props.delayTimeout):this.props.onSearch,this.props.autoFocus&&setTimeout(function(){return e.focus()},0)}},{key:"render",value:function(){var e=this.state.keyword,t=this.props.placeholder||"Search…",n=this.props.pinned&&!this.state.isOpen,r=this.state.isOpen||!this.props.pinned||this.props.initialValue,a=this.props.disableAutocorrect&&{autoComplete:"off",autoCorrect:"off",spellCheck:"false"},i=(0,w.default)(this.props.additionalClasses,this.props.dir,{"is-expanded-to-container":this.props.fitsContainer,"is-open":r,"is-searching":this.props.searching,"has-focus":this.state.hasFocus,"dops-search":!0}),s=(0,w.default)("dops-search__input-fade",this.props.dir),c=(0,w.default)("dops-search__input",this.props.dir);return A.default.createElement("div",{dir:this.props.dir||null,className:i,role:"search"},A.default.createElement(N.default,null),A.default.createElement("div",{role:"button",className:"dops-search__icon-navigation",ref:"openIcon",onClick:n?this.openSearch:this.focus,tabIndex:n?"0":null,onKeyDown:n?this.openListener:null,"aria-controls":"dops-search-component-"+this.state.instanceId,"aria-label":"Open Search"},A.default.createElement(P.default,{icon:"search",className:"dops-search__open-icon"})),A.default.createElement("div",{className:s},A.default.createElement("input",(0,o.default)({type:"search",id:"dops-search-component-"+this.state.instanceId,className:c,placeholder:t,role:"search",value:e,ref:"searchInput",onInput:this.onChange,onKeyUp:this.keyUp,onKeyDown:this.keyDown,onMouseUp:this.props.onClick,onFocus:this.onFocus,onBlur:this.onBlur,disabled:this.props.disabled,"aria-hidden":!r,autoCapitalize:"none",dir:this.props.dir,maxLength:this.props.maxLength},a)),this.props.overlayStyling&&this.renderStylingDiv()),this.closeButton())}}]),t}(A.default.Component);j.displayName="Search",j.instances=0,j.propTypes={additionalClasses:v.default.string,initialValue:v.default.string,placeholder:v.default.string,pinned:v.default.bool,delaySearch:v.default.bool,delayTimeout:v.default.number,onSearch:v.default.func.isRequired,onSearchChange:v.default.func,onSearchOpen:v.default.func,onSearchClose:v.default.func,analyticsGroup:v.default.string,overlayStyling:v.default.func,autoFocus:v.default.bool,disabled:v.default.bool,onKeyDown:v.default.func,onClick:v.default.func,disableAutocorrect:v.default.bool,onBlur:v.default.func,searching:v.default.bool,isOpen:v.default.bool,dir:v.default.oneOf(["ltr","rtl"]),fitsContainer:v.default.bool,maxLength:v.default.number,hideClose:v.default.bool},j.defaultProps={pinned:!1,delaySearch:!1,delayTimeout:300,autoFocus:!1,disabled:!1,onSearchChange:S.default,onSearchOpen:S.default,onSearchClose:S.default,onKeyDown:S.default,onClick:S.default,overlayStyling:void 0,disableAutocorrect:!1,searching:!1,isOpen:!1,dir:void 0,fitsContainer:!1,hideClose:!1},e.exports=j},function(e,t,n){"use strict";(function(t){function r(e){return e&&e.__esModule?e:{default:e}}var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14);n(943);var M=function(e){function n(){var e,r,a,o;(0,s.default)(this,n);for(var c=arguments.length,u=Array(c),l=0;l<c;l++)u[l]=arguments[l];return r=a=(0,d.default)(this,(e=n.__proto__||(0,i.default)(n)).call.apply(e,[this].concat(u))),a.isSVGCSSAnimationSupported=function(){return!/(MSIE |Trident\/)/.test(t.window?t.window.navigator.userAgent:"")},a.getClassName=function(){return _("dops-spinner",a.props.className,{"is-fallback":!a.isSVGCSSAnimationSupported()})},a.renderFallback=function(){var e={width:a.props.size,height:a.props.size};return m.createElement("div",{className:a.getClassName(),style:e},m.createElement("span",{className:"dops-spinner__progress is-left"}),m.createElement("span",{className:"dops-spinner__progress is-right"}))},o=r,(0,d.default)(a,o)}return(0,p.default)(n,e),(0,u.default)(n,[{key:"componentWillMount",value:function(){this.setState({instanceId:++n.instances})}},{key:"render",value:function(){var e=parseInt(this.state.instanceId,10);return this.isSVGCSSAnimationSupported()?m.createElement("div",{className:this.getClassName()},m.createElement("svg",{className:"dops-spinner__image",width:this.props.size,height:this.props.size,viewBox:"0 0 100 100",dangerouslySetInnerHTML:{__html:'\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<mask id="maskBorder'+e+'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="100%" height="100%" fill="white" />\n\t\t\t\t\t\t\t<circle r="46%" cx="50%" cy="50%" fill="black" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskDonut'+e+'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="100%" height="100%" fill="black" />\n\t\t\t\t\t\t\t<circle r="46%" cx="50%" cy="50%" fill="white" />\n\t\t\t\t\t\t\t<circle r="30%" cx="50%" cy="50%" fill="black" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskLeft'+e+'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="50%" height="100%" fill="white" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskRight'+e+'">\n\t\t\t\t\t\t\t<rect x="50%" y="0" width="50%" height="100%" fill="white" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<circle class="dops-spinner__border" r="50%" cx="50%" cy="50%" mask="url( #maskBorder'+e+' )" />\n\t\t\t\t\t<g mask="url( #maskDonut'+e+' )">\n\t\t\t\t\t\t<g mask="url( #maskLeft'+e+' )">\n\t\t\t\t\t\t\t<rect class="dops-spinner__progress is-left" x="0" y="0" width="50%" height="100%" />\n\t\t\t\t\t\t</g>\n\t\t\t\t\t\t<g mask="url( #maskRight'+e+' )">\n\t\t\t\t\t\t\t<rect class="dops-spinner__progress is-right" x="50%" y="0" width="50%" height="100%" />\n\t\t\t\t\t\t</g>\n\t\t\t\t\t</g>\n\t\t\t\t'}})):this.renderFallback()}}]),n}(m.Component);M.propTypes={className:h.string,size:h.number,duration:h.number},M.instances=0,M.defaultProps={size:20,duration:3e3},e.exports=M}).call(t,n(45))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationSettings=void 0;var a=n(113),i=r(a),o=n(7),s=r(o),c=n(1),u=r(c),l=n(32),d=r(l),f=n(10),p=n(862),h=r(p),m=n(804),_=r(m),M=n(809),b=r(M),g=n(866),v=r(g),y=n(8),A=n(64),E=r(A),w=n(946),k=r(w),T=n(15),L=r(T),S=n(960),C=r(S),O=n(74),z=n(28),N=n(21),D=n(23),P=n(210),x=n(507),j=r(x),R=t.NavigationSettings=(0,d.default)({displayName:"NavigationSettings",mixins:[k.default],moduleList:[],componentWillMount:function(){this.context.router.listen(this.onRouteChange),this.moduleList=(0,i.default)(this.props.moduleList)},onRouteChange:function(e){var t=e.search||"",n=t.substr(1).split("&"),r=n.filter(function(e){return 0===e.indexOf("term=")}),a="";r.length>0&&(a=r[0].split("=")[1]),this.props.searchForTerm(decodeURIComponent(a))},maybeShowSearch:function(){if(this.props.userCanManageModules)return u.default.createElement(v.default,{onClick:this.handleClickForTracking("search"),pinned:!0,fitsContainer:!0,placeholder:(0,y.translate)("Search for a Jetpack feature."),delaySearch:!0,delayTimeout:500,onSearch:this.doSearch,isOpen:!!this.props.searchTerm,initialValue:this.props.searchTerm})},trackNavClick:function(e){L.default.tracks.recordJetpackClick({target:"nav_item",path:e})},buildUrl:function(e,t){var n=e.split("#"),r=n[1].split("?");return this.props.searchForTerm(t),"#"+r[0]+(t?"?term="+t:"")},hasAnyOfThese:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return 0<(0,C.default)(this.moduleList,e).length},handleClickForTracking:function(e){var t=this;return function(){return t.trackNavClick(e)}},render:function(){var e=void 0,t=void 0;return this.props.userCanManageModules?e=u.default.createElement(_.default,{selectedText:this.props.route.name},this.hasAnyOfThese(["masterbar","markdown","after-the-deadline","custom-content-types","photon","carousel","post-by-email","infinite-scroll","minileven"])&&u.default.createElement(b.default,{path:"#writing",onClick:this.handleClickForTracking("writing"),selected:"/writing"===this.props.route.path||"/settings"===this.props.route.path},(0,y.translate)("Writing",{context:"Navigation item."})),this.hasAnyOfThese(["publicize","sharedaddy","likes"])&&u.default.createElement(b.default,{path:"#sharing",onClick:this.handleClickForTracking("sharing"),selected:"/sharing"===this.props.route.path},(0,y.translate)("Sharing",{context:"Navigation item."})),this.hasAnyOfThese(["comments","gravatar-hovercards","markdown","subscriptions"])&&u.default.createElement(b.default,{path:"#discussion",onClick:this.handleClickForTracking("discussion"),selected:"/discussion"===this.props.route.path},(0,y.translate)("Discussion",{context:"Navigation item."})),this.hasAnyOfThese(["seo-tools","wordads","stats","related-posts","verification-tools","sitemaps","google-analytics"])&&u.default.createElement(b.default,{path:"#traffic",onClick:this.handleClickForTracking("traffic"),selected:"/traffic"===this.props.route.path},(0,y.translate)("Traffic",{context:"Navigation item."})),(this.hasAnyOfThese(["protect","sso","vaultpress"])||this.props.isPluginActive("akismet/akismet.php"))&&u.default.createElement(b.default,{path:"#security",onClick:this.handleClickForTracking("security"),selected:"/security"===this.props.route.path},(0,y.translate)("Security",{context:"Navigation item."}))):this.props.isSubscriber?e=!1:(t=this.props.isModuleActivated("publicize")&&this.props.userCanPublish?this.hasAnyOfThese(["publicize"])&&u.default.createElement(b.default,{path:"#sharing",onClick:this.handleClickForTracking("sharing"),selected:"/sharing"===this.props.route.path},(0,y.translate)("Sharing",{context:"Navigation item."})):"",e=u.default.createElement(_.default,{selectedText:this.props.route.name},this.hasAnyOfThese(["after-the-deadline","post-by-email"])&&u.default.createElement(b.default,{path:"#writing",onClick:this.handleClickForTracking("writing"),selected:"/writing"===this.props.route.path||"/settings"===this.props.route.path},(0,y.translate)("Writing",{context:"Navigation item."})),t)),u.default.createElement("div",{id:"jp-navigation",className:"dops-navigation"},u.default.createElement(j.default,null),u.default.createElement(h.default,{selectedText:this.props.route.name},e,this.maybeShowSearch()))}});R.contextTypes={router:s.default.object.isRequired},R.propTypes={userCanManageModules:s.default.bool.isRequired,isSubscriber:s.default.bool.isRequired,userCanPublish:s.default.bool.isRequired,isLinked:s.default.bool.isRequired,isSiteConnected:s.default.bool.isRequired,isModuleActivated:s.default.func.isRequired,searchHasFocus:s.default.bool.isRequired},R.defaultProps={userCanManageModules:!1,isSubscriber:!1,userCanPublish:!1,isLinked:!1,isSiteConnected:!1,isModuleActivated:E.default,searchHasFocus:!1},t.default=(0,f.connect)(function(e){return{userCanManageModules:(0,z.userCanManageModules)(e),isSubscriber:(0,z.userIsSubscriber)(e),userCanPublish:(0,z.userCanPublish)(e),isLinked:(0,N.isCurrentUserLinked)(e),isSiteConnected:(0,N.isSiteConnected)(e),isModuleActivated:function(t){return(0,D.isModuleActivated)(e,t)},moduleList:(0,D.getModules)(e),isPluginActive:function(t){return(0,P.isPluginActive)(e,t)},searchTerm:(0,O.getSearchTerm)(e)}},function(e){return{searchForTerm:function(t){return e((0,O.filterSearch)(t))}}})(R)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}
|
32 |
Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(967),v=r(g),y=n(1105),A=r(y),E=n(1124),w=r(E),k=n(1133),T=r(k),L=n(1154),S=r(L),C=n(1158),O=r(C),z=n(1159),N=r(z),D=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={route:this.props.route,searchTerm:this.props.searchTerm,rewindStatus:this.props.rewindStatus};return M.default.createElement("div",{className:"jp-settings-container"},M.default.createElement("div",{className:"jp-no-results"},e.searchTerm?(0,b.translate)("No search results found for %(term)s",{args:{term:e.searchTerm}}):(0,b.translate)("Enter a search term to find settings or close search.")),M.default.createElement(v.default,(0,i.default)({siteRawUrl:this.props.siteRawUrl,active:"/discussion"===this.props.route.path},e)),M.default.createElement(A.default,(0,i.default)({siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl,active:"/security"===this.props.route.path},e)),M.default.createElement(w.default,(0,i.default)({siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,active:"/traffic"===this.props.route.path},e)),M.default.createElement(T.default,(0,i.default)({siteAdminUrl:this.props.siteAdminUrl,active:"/writing"===this.props.route.path||"/settings"===this.props.route.path},e)),M.default.createElement(S.default,(0,i.default)({siteAdminUrl:this.props.siteAdminUrl,active:"/sharing"===this.props.route.path},e)),M.default.createElement(N.default,(0,i.default)({active:"/privacy"===this.props.route.path},e)),M.default.createElement(O.default,{searchTerm:this.props.searchTerm}))}}]),t}(M.default.Component);D.displayName="SearchableSettings",t.default=D,e.exports=t.default},function(e,t,n){"use strict";var r=n(49).f,a=n(159),i=n(449),o=n(72),s=n(444),c=n(206),u=n(220),l=n(486),d=n(493),f=n(60),p=n(222).fastKey,h=n(834),m=f?"_s":"size",_=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var l=e(function(e,r){s(e,l,t,"_i"),e._t=t,e._i=a(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&c(r,n,e[u],e)});return i(l.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=h(this,t),r=_(n,e);if(r){var a=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=a),a&&(a.p=i),n._f==r&&(n._f=a),n._l==r&&(n._l=i),n[m]--}return!!r},forEach:function(e){h(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!_(h(this,t),e)}}),f&&r(l.prototype,"size",{get:function(){return h(this,t)[m]}}),l},def:function(e,t,n){var r,a,i=_(e,t);return i?i.v=n:(e._l=i={i:a=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[m]++,"F"!==a&&(e._i[a]=i)),e},getEntry:_,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=h(e,t),this._k=n,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?l(0,n.k):"values"==t?l(0,n.v):l(0,[n.k,n.v]):(e._t=void 0,l(1))},n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){"use strict";var r=n(37),a=n(33),i=n(222),o=n(82),s=n(73),c=n(449),u=n(206),l=n(444),d=n(50),f=n(123),p=n(49).f,h=n(976)(0),m=n(60);e.exports=function(e,t,n,_,M,b){var g=r[e],v=g,y=M?"set":"add",A=v&&v.prototype,E={};return m&&"function"==typeof v&&(b||A.forEach&&!o(function(){(new v).entries().next()}))?(v=t(function(t,n){l(t,v,e,"_c"),t._c=new g,void 0!=n&&u(n,M,t[y],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&s(v.prototype,e,function(n,r){if(l(this,v,e),!t&&b&&!d(n))return"get"==e&&void 0;var a=this._c[e](0===n?0:n,r);return t?this:a})}),b||p(v.prototype,"size",{get:function(){return this._c.size}})):(v=_.getConstructor(t,e,M,y),c(v.prototype,n),i.NEED=!0),f(v,e),E[e]=v,a(a.G+a.W+a.F,E),b||_.setStrong(v,e,M),v}},function(e,t,n){var r=n(200),a=n(980);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return a(this)}}},function(e,t,n){"use strict";var r=n(33);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(33),a=n(122),i=n(72),o=n(206);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,c=arguments[1];return a(this),t=void 0!==c,t&&a(c),void 0==e?new this:(n=[],t?(r=0,s=i(c,arguments[2],2),o(e,!1,function(e){n.push(s(e,r++))})):o(e,!1,n.push,n),new this(n))}})}},function(e,t,n){"use strict";(function(t){function r(e){a.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var a=n(836).Transform;n(19)(r,a),r.prototype._transform=function(e,n,r){var a=null;try{"buffer"!==n&&(e=new t(e,n)),this.update(e)}catch(e){a=e}r(a)},r.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},r.prototype.update=function(e,n){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,n||"binary"));for(var r=this._block,a=0;this._blockOffset+e.length-a>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[a++];this._update(),this._blockOffset=0}for(;a<e.length;)r[this._blockOffset++]=e[a++];for(var o=0,s=8*e.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},r.prototype._update=function(e){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=r}).call(t,n(39).Buffer)},function(e,t,n){"use strict";(function(t,r){function a(e){return R.from(e)}function i(e){return R.isBuffer(e)||e instanceof Y}function o(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?P(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function s(e,t){D=D||n(212),e=e||{};var r=t instanceof D;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var a=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:r&&(i||0===i)?i:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new U,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(W||(W=n(839).StringDecoder),this.decoder=new W(e.encoding),this.encoding=e.encoding)}function c(e){if(D=D||n(212),!(this instanceof c))return new c(e);this._readableState=new s(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),j.call(this)}function u(e,t,n,r,i){var o=e._readableState;if(null===t)o.reading=!1,m(e,o);else{var s;i||(s=d(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===R.prototype||(t=a(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):l(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?l(e,o,t,!1):b(e,o)):l(e,o,t,!1))):r||(o.reading=!1)}return f(o)}function l(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&_(e)),b(e,t)}function d(e,t){var n;return i(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function p(e){return e>=X?e=X:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function h(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=p(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function m(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,_(e)}}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(B("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?N.nextTick(M,e):M(e))}function M(e){B("emit readable"),e.emit("readable"),w(e)}function b(e,t){t.readingMore||(t.readingMore=!0,N.nextTick(g,e,t))}function g(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(B("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function v(e){return function(){var t=e._readableState;B("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&x(e,"data")&&(t.flowing=!0,w(e))}}function y(e){B("readable nexttick read 0"),e.read(0)}function A(e,t){t.resumeScheduled||(t.resumeScheduled=!0,N.nextTick(E,e,t))}function E(e,t){t.reading||(B("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;for(B("flow",t.flowing);t.flowing&&null!==e.read(););}function k(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=T(e,t.buffer,t.decoder),n}function T(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?L(e,t):S(e,t),r}function L(e,t){var n=t.head,r=1,a=n.data;for(e-=a.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(o===i.length?a+=i:a+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++r}return t.length-=r,a}function S(e,t){var n=R.allocUnsafe(e),r=t.head,a=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,o),0===(e-=o)){o===i.length?(++a,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(o));break}++a}return t.length-=a,n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,N.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function z(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}var N=n(509);e.exports=c;var D,P=n(440);c.ReadableState=s;var x=(n(147).EventEmitter,function(e,t){return e.listeners(t).length}),j=n(877),R=n(35).Buffer,Y=t.Uint8Array||function(){},I=n(468);I.inherits=n(19);var q=n(994),B=void 0;B=q&&q.debuglog?q.debuglog("stream"):function(){};var W,U=n(995),H=n(878);I.inherits(c,j);var F=["error","close","destroy","pause","resume"];Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),c.prototype.destroy=H.destroy,c.prototype._undestroy=H.undestroy,c.prototype._destroy=function(e,t){this.push(null),t(e)},c.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=R.from(e,t),t=""),n=!0),u(this,e,t,!1,n)},c.prototype.unshift=function(e){return u(this,e,null,!0,!1)},c.prototype.isPaused=function(){return!1===this._readableState.flowing},c.prototype.setEncoding=function(e){return W||(W=n(839).StringDecoder),this._readableState.decoder=new W(e),this._readableState.encoding=e,this};var X=8388608;c.prototype.read=function(e){B("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return B("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):_(this),null;if(0===(e=h(e,t))&&t.ended)return 0===t.length&&C(this),null;var r=t.needReadable;B("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,B("length less than watermark",r)),t.ended||t.reading?(r=!1,B("reading or ended",r)):r&&(B("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=h(n,t)));var a;return a=e>0?k(e,t):null,null===a?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==a&&this.emit("data",a),a},c.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},c.prototype.pipe=function(e,t){function n(e,t){B("onunpipe"),e===f&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,i())}function a(){B("onend"),e.end()}function i(){B("cleanup"),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("drain",_),e.removeListener("error",c),e.removeListener("unpipe",n),f.removeListener("end",a),f.removeListener("end",d),f.removeListener("data",s),M=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||_()}function s(t){B("ondata"),b=!1,!1!==e.write(t)||b||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&-1!==z(p.pipes,e))&&!M&&(B("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,b=!0),f.pause())}function c(t){B("onerror",t),d(),e.removeListener("error",c),0===x(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",l),d()}function l(){B("onfinish"),e.removeListener("close",u),d()}function d(){B("unpipe"),f.unpipe(e)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,B("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,m=h?a:d;p.endEmitted?N.nextTick(m):f.once("end",m),e.on("unpipe",n);var _=v(f);e.on("drain",_);var M=!1,b=!1;return f.on("data",s),o(e,"error",c),e.once("close",u),e.once("finish",l),e.emit("pipe",f),p.flowing||(B("pipe resume"),f.resume()),e},c.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<a;i++)r[i].emit("unpipe",this,n);return this}var o=z(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},c.prototype.on=function(e,t){var n=j.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&_(this):N.nextTick(y,this))}return n},c.prototype.addListener=c.prototype.on,c.prototype.resume=function(){var e=this._readableState;return e.flowing||(B("resume"),e.flowing=!0,A(this,e)),this},c.prototype.pause=function(){return B("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(B("pause"),this._readableState.flowing=!1,this.emit("pause")),this},c.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;e.on("end",function(){if(B("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){if(B("wrapped data"),n.decoder&&(a=n.decoder.write(a)),(!n.objectMode||null!==a&&void 0!==a)&&(n.objectMode||a&&a.length)){t.push(a)||(r=!0,e.pause())}});for(var a in e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var i=0;i<F.length;i++)e.on(F[i],this.emit.bind(this,F[i]));return this._read=function(t){B("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(c.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),c._fromList=k}).call(t,n(45),n(63))},function(e,t,n){e.exports=n(147).EventEmitter},function(e,t,n){"use strict";function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return r||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(e,t){e.emit("error",t)}var o=n(509);e.exports={destroy:r,undestroy:a}},function(e,t,n){"use strict";function r(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){o(e,t,n)}):o(this,null,null)}function o(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}e.exports=a;var s=n(212),c=n(468);c.inherits=n(19),c.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;s.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){function r(){this.init(),this._w=h,d.call(this,64,56)}function a(e,t,n){return n^e&(t^n)}function i(e,t,n){return e&t|n&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var l=n(19),d=n(236),f=n(35).Buffer,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=new Array(64);l(r,d),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,l=0|this._c,d=0|this._d,f=0|this._e,h=0|this._f,m=0|this._g,_=0|this._h,M=0;M<16;++M)t[M]=e.readInt32BE(4*M);for(;M<64;++M)t[M]=u(t[M-2])+t[M-7]+c(t[M-15])+t[M-16]|0;for(var b=0;b<64;++b){var g=_+s(f)+a(f,h,m)+p[b]+t[b]|0,v=o(n)+i(n,r,l)|0;_=m,m=h,h=f,f=d+g|0,d=l,l=r,r=n,n=g+v|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=l+this._c|0,this._d=d+this._d|0,this._e=f+this._e|0,this._f=h+this._f|0,this._g=m+this._g|0,this._h=_+this._h|0},r.prototype._hash=function(){var e=f.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=M,h.call(this,128,112)}function a(e,t,n){return n^e&(t^n)}function i(e,t,n){return e&t|n&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function f(e,t){return e>>>0<t>>>0?1:0}var p=n(19),h=n(236),m=n(35).Buffer,_=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],M=new Array(160);p(r,h),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,p=0|this._ch,h=0|this._dh,m=0|this._eh,M=0|this._fh,b=0|this._gh,g=0|this._hh,v=0|this._al,y=0|this._bl,A=0|this._cl,E=0|this._dl,w=0|this._el,k=0|this._fl,T=0|this._gl,L=0|this._hl,S=0;S<32;S+=2)t[S]=e.readInt32BE(4*S),t[S+1]=e.readInt32BE(4*S+4);for(;S<160;S+=2){var C=t[S-30],O=t[S-30+1],z=c(C,O),N=u(O,C);C=t[S-4],O=t[S-4+1];var D=l(C,O),P=d(O,C),x=t[S-14],j=t[S-14+1],R=t[S-32],Y=t[S-32+1],I=N+j|0,q=z+x+f(I,N)|0;I=I+P|0,q=q+D+f(I,P)|0,I=I+Y|0,q=q+R+f(I,Y)|0,t[S]=q,t[S+1]=I}for(var B=0;B<160;B+=2){q=t[B],I=t[B+1];var W=i(n,r,p),U=i(v,y,A),H=o(n,v),F=o(v,n),X=s(m,w),V=s(w,m),K=_[B],J=_[B+1],G=a(m,M,b),Q=a(w,k,T),Z=L+V|0,$=g+X+f(Z,L)|0;Z=Z+Q|0,$=$+G+f(Z,Q)|0,Z=Z+J|0,$=$+K+f(Z,J)|0,Z=Z+I|0,$=$+q+f(Z,I)|0;var ee=F+U|0,te=H+W+f(ee,F)|0;g=b,L=T,b=M,T=k,M=m,k=w,w=E+Z|0,m=h+$+f(w,E)|0,h=p,E=A,p=r,A=y,r=n,y=v,v=Z+ee|0,n=$+te+f(v,Z)|0}this._al=this._al+v|0,this._bl=this._bl+y|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+w|0,this._fl=this._fl+k|0,this._gl=this._gl+T|0,this._hl=this._hl+L|0,this._ah=this._ah+n+f(this._al,v)|0,this._bh=this._bh+r+f(this._bl,y)|0,this._ch=this._ch+p+f(this._cl,A)|0,this._dh=this._dh+h+f(this._dl,E)|0,this._eh=this._eh+m+f(this._el,w)|0,this._fh=this._fh+M+f(this._fl,k)|0,this._gh=this._gh+b+f(this._gl,T)|0,this._hh=this._hh+g+f(this._hl,L)|0},r.prototype._hash=function(){function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}var t=m.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},e.exports=r},function(e,t,n){"use strict";function r(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>n){t=("rmd160"===e?new u:l(e)).update(t).digest()}else t.length<n&&(t=s.concat([t,d],n));for(var r=this._ipad=s.allocUnsafe(n),a=this._opad=s.allocUnsafe(n),i=0;i<n;i++)r[i]=54^t[i],a[i]=92^t[i];this._hash="rmd160"===e?new u:l(e),this._hash.update(r)}var a=n(19),i=n(1009),o=n(162),s=n(35).Buffer,c=n(883),u=n(840),l=n(841),d=s.alloc(128);a(r,o),r.prototype._update=function(e){this._hash.update(e)},r.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:l(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return e=e.toLowerCase(),"rmd160"===e||"ripemd160"===e?new r("rmd160",t):"md5"===e?new i(c,t):new r(e,t)}},function(e,t,n){var r=n(835);e.exports=function(e){return(new r).update(e).digest()}},function(e,t){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},function(e,t,n){t.pbkdf2=n(1011),t.pbkdf2Sync=n(888)},function(e,t){var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!==t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t){var n;if(t.browser)n="utf-8";else{n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}e.exports=n}).call(t,n(63))},function(e,t,n){function r(e,t,n){var r=a(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=r(t):t.length<i&&(t=d.concat([t,f],i));for(var o=d.allocUnsafe(i+p[e]),s=d.allocUnsafe(i+p[e]),c=0;c<i;c++)o[c]=54^t[c],s[c]=92^t[c];var u=d.allocUnsafe(i+n+4);o.copy(u,0,0,i),this.ipad1=u,this.ipad2=o,this.opad=s,this.alg=e,this.blocksize=i,this.hash=r,this.size=p[e]}function a(e){function t(t){return c(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?s:"md5"===e?o:t}function i(e,t,n,a,i){d.isBuffer(e)||(e=d.from(e,l)),d.isBuffer(t)||(t=d.from(t,l)),u(n,a),i=i||"sha1";var o=new r(i,e,t.length),s=d.allocUnsafe(a),c=d.allocUnsafe(t.length+4);t.copy(c,0,0,t.length);for(var f=0,h=p[i],m=Math.ceil(a/h),_=1;_<=m;_++){c.writeUInt32BE(_,t.length);for(var M=o.run(c,o.ipad1),b=M,g=1;g<n;g++){b=o.run(b,o.ipad2);for(var v=0;v<h;v++)M[v]^=b[v]}M.copy(s,f),f+=h}return s}var o=n(883),s=n(840),c=n(841),u=n(886),l=n(887),d=n(35).Buffer,f=d.alloc(128),p={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};r.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=i},function(e,t,n){function r(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}var a=n(469),i=n(35).Buffer,o=n(890);t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;s<n;s++){var c=r(e),u=o+16*s;e._cache.writeUInt32BE(c[0],u+0),e._cache.writeUInt32BE(c[1],u+4),e._cache.writeUInt32BE(c[2],u+8),e._cache.writeUInt32BE(c[3],u+12)}var l=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),a(t,l)}},function(e,t){function n(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}e.exports=n},function(e,t){e.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,
|
33 |
mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(e,t,n){function r(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),a=0;a<r;++a)n+=e[a]^t[a];return n}function a(e,t,n){if(12===t.length)return e._finID=s.concat([t,s.from([0,0,0,1])]),s.concat([t,s.from([0,0,0,2])]);var r=new l(n),a=t.length,i=a%16;r.update(t),i&&(i=16-i,r.update(s.alloc(i,0))),r.update(s.alloc(8,0));var o=8*a,c=s.alloc(8);c.writeUIntBE(o,0,8),r.update(c),e._finID=r.state;var u=s.from(e._finID);return f(u),u}function i(e,t,n,r){c.call(this);var i=s.alloc(4,0);this._cipher=new o.AES(t);var u=this._cipher.encryptBlock(i);this._ghash=new l(u),n=a(this,n,u),this._prev=s.from(n),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}var o=n(510),s=n(35).Buffer,c=n(162),u=n(19),l=n(1026),d=n(469),f=n(890);u(i,c),i.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=s.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=d(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&r(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},i.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},i.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},i.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=i},function(e,t,n){function r(e,t,n,r){o.call(this),this._cipher=new a.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=r,this._mode=e}var a=n(510),i=n(35).Buffer,o=n(162);n(19)(r,o),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},e.exports=r},function(e,t,n){function r(){if(null!==g)return g;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),a=0;a<t&&e[a]<=r&&n%e[a]!=0;a++);t!==a&&e[a]<=r||(e[t++]=n)}return g=e,e}function a(e){for(var t=r(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function i(e){var t=c.mont(e);return 0===p.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function o(e,t){if(e<16)return new c(2===t||5===t?[140,123]:[140,39]);t=new c(t);for(var n,r;;){for(n=new c(s(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(f),n.testn(1)||n.iadd(p),t.cmp(p)){if(!t.cmp(h))for(;n.mod(m).cmp(_);)n.iadd(b)}else for(;n.mod(u).cmp(M);)n.iadd(b);if(r=n.shrn(1),a(r)&&a(n)&&i(r)&&i(n)&&d.test(r)&&d.test(n))return n}}var s=n(235);e.exports=o,o.simpleSieve=a,o.fermatTest=i;var c=n(57),u=new c(24),l=n(895),d=new l,f=new c(1),p=new c(2),h=new c(5),m=(new c(16),new c(8),new c(10)),_=new c(3),M=(new c(7),new c(11)),b=new c(4),g=(new c(12),null)},function(e,t,n){function r(e){this.rand=e||new i.Rand}var a=n(57),i=n(896);e.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var r=new a(this.rand.generate(n))}while(r.cmp(e)>=0);return r},r.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},r.prototype.test=function(e,t,n){var r=e.bitLength(),i=a.mont(e),o=new a(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),l=s.toRed(i);t>0;t--){var d=this._randrange(new a(2),s);n&&n(d);var f=d.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(l)){for(var p=1;p<c;p++){if(f=f.redSqr(),0===f.cmp(o))return!1;if(0===f.cmp(l))break}if(p===c)return!1}}return!0},r.prototype.getDivisor=function(e,t){var n=e.bitLength(),r=a.mont(e),i=new a(1).toRed(r);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var c=e.shrn(s),u=o.toRed(r);t>0;t--){var l=this._randrange(new a(2),o),d=e.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(r).redPow(c);if(0!==f.cmp(i)&&0!==f.cmp(u)){for(var p=1;p<s;p++){if(f=f.redSqr(),0===f.cmp(i))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(u))break}if(p===s)return f=f.redSqr(),f.fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){function r(e){this.rand=e}var a;if(e.exports=function(e){return a||(a=new r(null)),a.generate(e)},e.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=n(1031);if("function"!=typeof i.randomBytes)throw new Error("Not supported");r.prototype._rand=function(e){return i.randomBytes(e)}}catch(e){}},function(e,t,n){"use strict";function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(var r=0;r<e.length;r++){var a=e.charCodeAt(r),i=a>>8,o=255&a;i?n.push(i,o):n.push(o)}return n}function a(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t}var o=t;o.toArray=r,o.zero2=a,o.toHex=i,o.encode=function(e,t){return"hex"===t?i(e):e}},function(e,t,n){"use strict";function r(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?o(t,n,r):2===e?i(t,n,r):void 0}function a(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function o(e,t,n){return e^t^n}function s(e){return f(e,2)^f(e,13)^f(e,22)}function c(e){return f(e,6)^f(e,11)^f(e,25)}function u(e){return f(e,7)^f(e,18)^e>>>3}function l(e){return f(e,17)^f(e,19)^e>>>10}var d=n(126),f=d.rotr32;t.ft_1=r,t.ch32=a,t.maj32=i,t.p32=o,t.s0_256=s,t.s1_256=c,t.g0_256=u,t.g1_256=l},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;M.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}var a=n(126),i=n(470),o=n(898),s=n(105),c=a.sum32,u=a.sum32_4,l=a.sum32_5,d=o.ch32,f=o.maj32,p=o.s0_256,h=o.s1_256,m=o.g0_256,_=o.g1_256,M=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];a.inherits(r,M),e.exports=r,r.blockSize=512,r.outSize=256,r.hmacStrength=192,r.padLength=64,r.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(_(n[r-2]),n[r-7],m(n[r-15]),n[r-16]);var a=this.h[0],i=this.h[1],o=this.h[2],M=this.h[3],b=this.h[4],g=this.h[5],v=this.h[6],y=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var A=l(y,h(b),d(b,g,v),this.k[r],n[r]),E=c(p(a),f(a,i,o));y=v,v=g,g=b,b=c(M,A),M=o,o=i,i=a,a=c(A,E)}this.h[0]=c(this.h[0],a),this.h[1]=c(this.h[1],i),this.h[2]=c(this.h[2],o),this.h[3]=c(this.h[3],M),this.h[4]=c(this.h[4],b),this.h[5]=c(this.h[5],g),this.h[6]=c(this.h[6],v),this.h[7]=c(this.h[7],y)},r.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;O.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=z,this.W=new Array(160)}function a(e,t,n,r,a){var i=e&n^~e&a;return i<0&&(i+=4294967296),i}function i(e,t,n,r,a,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function o(e,t,n,r,a){var i=e&n^e&a^n&a;return i<0&&(i+=4294967296),i}function s(e,t,n,r,a,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function c(e,t){var n=g(e,t,28),r=g(t,e,2),a=g(t,e,7),i=n^r^a;return i<0&&(i+=4294967296),i}function u(e,t){var n=v(e,t,28),r=v(t,e,2),a=v(t,e,7),i=n^r^a;return i<0&&(i+=4294967296),i}function l(e,t){var n=g(e,t,14),r=g(e,t,18),a=g(t,e,9),i=n^r^a;return i<0&&(i+=4294967296),i}function d(e,t){var n=v(e,t,14),r=v(e,t,18),a=v(t,e,9),i=n^r^a;return i<0&&(i+=4294967296),i}function f(e,t){var n=g(e,t,1),r=g(e,t,8),a=y(e,t,7),i=n^r^a;return i<0&&(i+=4294967296),i}function p(e,t){var n=v(e,t,1),r=v(e,t,8),a=A(e,t,7),i=n^r^a;return i<0&&(i+=4294967296),i}function h(e,t){var n=g(e,t,19),r=g(t,e,29),a=y(e,t,6),i=n^r^a;return i<0&&(i+=4294967296),i}function m(e,t){var n=v(e,t,19),r=v(t,e,29),a=A(e,t,6),i=n^r^a;return i<0&&(i+=4294967296),i}var _=n(126),M=n(470),b=n(105),g=_.rotr64_hi,v=_.rotr64_lo,y=_.shr64_hi,A=_.shr64_lo,E=_.sum64,w=_.sum64_hi,k=_.sum64_lo,T=_.sum64_4_hi,L=_.sum64_4_lo,S=_.sum64_5_hi,C=_.sum64_5_lo,O=M.BlockHash,z=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];_.inherits(r,O),e.exports=r,r.blockSize=1024,r.outSize=512,r.hmacStrength=192,r.padLength=128,r.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var a=h(n[r-4],n[r-3]),i=m(n[r-4],n[r-3]),o=n[r-14],s=n[r-13],c=f(n[r-30],n[r-29]),u=p(n[r-30],n[r-29]),l=n[r-32],d=n[r-31];n[r]=T(a,i,o,s,c,u,l,d),n[r+1]=L(a,i,o,s,c,u,l,d)}},r.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],f=this.h[1],p=this.h[2],h=this.h[3],m=this.h[4],_=this.h[5],M=this.h[6],g=this.h[7],v=this.h[8],y=this.h[9],A=this.h[10],T=this.h[11],L=this.h[12],O=this.h[13],z=this.h[14],N=this.h[15];b(this.k.length===n.length);for(var D=0;D<n.length;D+=2){var P=z,x=N,j=l(v,y),R=d(v,y),Y=a(v,y,A,T,L),I=i(v,y,A,T,L,O),q=this.k[D],B=this.k[D+1],W=n[D],U=n[D+1],H=S(P,x,j,R,Y,I,q,B,W,U),F=C(P,x,j,R,Y,I,q,B,W,U);P=c(r,f),x=u(r,f),j=o(r,f,p,h,m),R=s(r,f,p,h,m,_);var X=w(P,x,j,R),V=k(P,x,j,R);z=L,N=O,L=A,O=T,A=v,T=y,v=w(M,g,H,F),y=k(g,g,H,F),M=m,g=_,m=p,_=h,p=r,h=f,r=w(H,F,X,V),f=k(H,F,X,V)}E(this.h,0,r,f),E(this.h,2,p,h),E(this.h,4,m,_),E(this.h,6,M,g),E(this.h,8,v,y),E(this.h,10,A,T),E(this.h,12,L,O),E(this.h,14,z,N)},r.prototype._digest=function(e){return"hex"===e?_.toHex32(this.h,"big"):_.split32(this.h,"big")}},function(e,t,n){function r(e,t){if(o.call(this,t),!s.isBuffer(e))return void this.error("Input not Buffer");this.base=e,this.offset=0,this.length=e.length}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var i=n(19),o=n(472).Reporter,s=n(39).Buffer;i(r,o),t.DecoderBuffer=r,r.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},r.prototype.restore=function(e){var t=new r(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},r.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new r(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},r.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,t),t+=n.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,n){var r=t;r._reverse=function(e){var t={};return Object.keys(e).forEach(function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n}),t},r.der=n(1063)},function(e,t,n){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){u.Node.call(this,"der",e)}function i(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=d.tagClass[n>>6],a=0==(32&n);if(31==(31&n)){var i=n;for(n=0;128==(128&i);){if(i=e.readUInt8(t),e.isError(i))return i;n<<=7,n|=127&i}}else n&=31;return{cls:r,primitive:a,tag:n,tagStr:d.tag[n]}}function o(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var a=127&r;if(a>4)return e.error("length octect is too long");r=0;for(var i=0;i<a;i++){r<<=8;var o=e.readUInt8(n);if(e.isError(o))return o;r|=o}return r}var s=n(19),c=n(471),u=c.base,l=c.bignum,d=c.constants.der;e.exports=r,r.prototype.decode=function(e,t){return e instanceof u.DecoderBuffer||(e=new u.DecoderBuffer(e,t)),this.tree._decode(e,t)},s(a,u.Node),a.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;var r=e.save(),a=i(e,'Failed to peek tag: "'+t+'"');return e.isError(a)?a:(e.restore(r),a.tag===t||a.tagStr===t||a.tagStr+"of"===t||n)},a.prototype._decodeTag=function(e,t,n){var r=i(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;var a=o(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(a))return a;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==a)return e.skip(a,'Failed to match body of: "'+t+'"');var s=e.save(),c=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(c)?c:(a=e.offset-s.offset,e.restore(s),e.skip(a,'Failed to match body of: "'+t+'"'))},a.prototype._skipUntilEnd=function(e,t){for(;;){var n=i(e,t);if(e.isError(n))return n;var r=o(e,n.primitive,t);if(e.isError(r))return r;var a;if(a=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(a))return a;if("end"===n.tagStr)break}},a.prototype._decodeList=function(e,t,n,r){for(var a=[];!e.isEmpty();){var i=this._peekTag(e,"end");if(e.isError(i))return i;var o=n.decode(e,"der",r);if(e.isError(o)&&i)break;a.push(o)}return a},a.prototype._decodeStr=function(e,t){if("bitstr"===t){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}if("bmpstr"===t){var r=e.raw();if(r.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",i=0;i<r.length/2;i++)a+=String.fromCharCode(r.readUInt16BE(2*i));return a}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},a.prototype._decodeObjid=function(e,t,n){for(var r,a=[],i=0;!e.isEmpty();){var o=e.readUInt8();i<<=7,i|=127&o,0==(128&o)&&(a.push(i),i=0)}128&o&&a.push(i);var s=a[0]/40|0,c=a[0]%40;if(r=n?a:[s,c].concat(a.slice(1)),t){var u=t[r.join(" ")];void 0===u&&(u=t[r.join(".")]),void 0!==u&&(r=u)}return r},a.prototype._decodeTime=function(e,t){var n=e.raw().toString();if("gentime"===t)var r=0|n.slice(0,4),a=0|n.slice(4,6),i=0|n.slice(6,8),o=0|n.slice(8,10),s=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");var r=0|n.slice(0,2),a=0|n.slice(2,4),i=0|n.slice(4,6),o=0|n.slice(6,8),s=0|n.slice(8,10),c=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,a-1,i,o,s,c,0)},a.prototype._decodeNull=function(e){return null},a.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},a.prototype._decodeInt=function(e,t){var n=e.raw(),r=new l(n);return t&&(r=t[r.toString(10)]||r),r},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,n){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){l.Node.call(this,"der",e)}function i(e){return e<10?"0"+e:e}function o(e,t,n,r){var a;if("seqof"===e?e="seq":"setof"===e&&(e="set"),d.tagByName.hasOwnProperty(e))a=d.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);a=e}return a>=31?r.error("Multi-octet tag encoding unsupported"):(t||(a|=32),a|=d.tagClassByName[n||"universal"]<<6)}var s=n(19),c=n(39).Buffer,u=n(471),l=u.base,d=u.constants.der;e.exports=r,r.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(a,l.Node),a.prototype._encodeComposite=function(e,t,n,r){var a=o(e,t,n,this.reporter);if(r.length<128){var i=new c(2);return i[0]=a,i[1]=r.length,this._createEncoderBuffer([i,r])}for(var s=1,u=r.length;u>=256;u>>=8)s++;var i=new c(2+s);i[0]=a,i[1]=128|s;for(var u=1+s,l=r.length;l>0;u--,l>>=8)i[u]=255&l;return this._createEncoderBuffer([i,r])},a.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new c(2*e.length),r=0;r<e.length;r++)n.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},a.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var r=0;r<e.length;r++)e[r]|=0}else if(Array.isArray(e)){e=e.slice();for(var r=0;r<e.length;r++)e[r]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,r=0;r<e.length;r++){var i=e[r];for(a++;i>=128;i>>=7)a++}for(var o=new c(a),s=o.length-1,r=e.length-1;r>=0;r--){var i=e[r];for(o[s--]=127&i;(i>>=7)>0;)o[s--]=128|127&i}return this._createEncoderBuffer(o)},a.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[i(r.getFullYear()),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[i(r.getFullYear()%100),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new c(n)}if(c.isBuffer(e)){var r=e.length;0===e.length&&r++;var a=new c(r);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var r=1,i=e;i>=256;i>>=8)r++;for(var a=new Array(r),i=a.length-1;i>=0;i--)a[i]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new c(a))},a.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},a.prototype._skipDefault=function(e,t,n){var r,a=this._baseState;if(null===a.default)return!1;var i=e.join();if(void 0===a.defaultBuffer&&(a.defaultBuffer=this._encodeValue(a.default,t,n).join()),i.length!==a.defaultBuffer.length)return!1;for(r=0;r<i.length;r++)if(i[r]!==a.defaultBuffer[r])return!1;return!0}},function(e,t){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},function(e,t,n){(function(t){function r(e){var n=new t(4);return n.writeUInt32BE(e,0),n}var a=n(467);e.exports=function(e,n){for(var i,o=new t(""),s=0;o.length<n;)i=r(s++),o=t.concat([o,a("sha1").update(e).update(i).digest()]);return o.slice(0,n)}}).call(t,n(39).Buffer)},function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},function(e,t,n){(function(t){function r(e,n){return new t(e.toRed(a.mont(n.modulus)).redPow(new a(n.publicExponent)).fromRed().toArray())}var a=n(57);e.exports=r}).call(t,n(39).Buffer)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(1079),i=r(a),o=n(1082),s=r(o);t.default=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=(0,s.default)(e);!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,i.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(25),y=r(v);n(1091);var A=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=(0,g.default)(this.props.className,"dops-section-header"),t=""!==this.props.cardBadge?M.default.createElement("span",{className:"dops-section-header__card-badge"},this.props.cardBadge):"";return M.default.createElement(y.default,{compact:!0,className:(0,g.default)(e,{"has-card-badge":""!==this.props.cardBadge})},M.default.createElement("div",{className:"dops-section-header__label"},M.default.createElement("span",{className:"dops-section-header__label-text"},this.props.label),t),M.default.createElement("div",{className:"dops-section-header__actions"},this.props.children))}}]),t}(M.default.Component);A.displayName="SectionHeader",A.propTypes={label:m.default.string,cardBadge:m.default.oneOfType([m.default.string,m.default.element,m.default.object])},A.defaultProps={label:"",cardBadge:""},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(41),y=r(v),A=n(163),E=r(A),w=n(15),k=r(w),T=n(27),L=r(T),S=n(28),C=n(507),O=r(C),z=n(849),N=r(z),D=n(912),P=r(D),x=n(21),j=n(210),R=n(62),Y=n(61),I=function(e,t){return k.default.tracks.recordJetpackClick({target:"pro-status",type:e,feature:t})},q=function(e,t){return function(){return I(e,t)}},B=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.getProActions=function(e,t){var n="",a=!1,i=!1,o="";switch(e){case"threats":n="is-error",r.props.isCompact?i=(0,g.translate)("Threats",{context:"A caption for a small button to fix security issues."}):(a=(0,g.translate)("Threats found!",{context:"Short warning message about new threats found."}),i=(0,g.translate)("FIX",{context:"A caption for a small button to fix security issues."})),o="https://dashboard.vaultpress.com/";break;case"free":case"personal":e="upgrade",n="is-warning",r.props.isCompact||(a=(0,g.translate)("No scanning",{context:"Short warning message about site having no security scan."})),i=(0,g.translate)("Upgrade",{context:"Caption for a button to purchase a paid feature."}),o="https://jetpack.com/redirect/?source=upgrade&site="+r.props.siteRawUrl;break;case"pro":e="upgrade",n="is-warning",i=(0,g.translate)("Upgrade",{context:"Caption for a button to purchase a pro plan."}),o="https://jetpack.com/redirect/?source=plans-business&site="+r.props.siteRawUrl;break;case"secure":n="is-success",a=(0,g.translate)("Secure",{context:"Short message informing user that the site is secure."});break;case"invalid_key":n="is-warning",i=(0,g.translate)("Invalid key",{context:"Short warning message about an invalid key being used for Akismet."}),o=r.props.siteAdminUrl+"admin.php?page=akismet-key-config";break;case"rewind_connected":return M.default.createElement(E.default,{showDismiss:!1,status:"is-success",isCompact:!0},(0,g.translate)("Connected"));case"active":return M.default.createElement("span",{className:"jp-dash-item__active-label"},(0,g.translate)("ACTIVE"))}return M.default.createElement(E.default,{showDismiss:!1,status:n,isCompact:!0},a,i&&M.default.createElement("a",{className:"dops-notice__text-no-underline",onClick:q(e,t),href:o},i))},r.getSetUpButton=function(e){return M.default.createElement(y.default,{onClick:q("set_up",e),compact:!0,primary:!0,href:"https://wordpress.com/plugins/setup/"+r.props.siteRawUrl+"?only="+e},(0,g.translate)("Set up",{context:"Caption for a button to set up a feature."}))},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props.sitePlan(),n=this.props.getVaultPressData(),r="";"scan"!==this.props.proFeature&&"backups"!==this.props.proFeature&&"vaultpress"!==this.props.proFeature||(r="vaultpress/vaultpress.php"),"akismet"===this.props.proFeature&&(r="akismet/akismet.php");var a=/jetpack_personal*/.test(t.product_slug),i=/jetpack_free*/.test(t.product_slug),o=/jetpack_premium*/.test(t.product_slug),s=(0,L.default)(n,["data","features","backups"],!1),c=(0,L.default)(n,["data","features","security"],!1);return M.default.createElement("div",null,M.default.createElement(O.default,null),M.default.createElement(P.default,null),M.default.createElement(N.default,null),!this.props.isDevMode&&function(u,l,d){switch(u){case"rewind":return e.getProActions("rewind_connected","rewind");case"backups":if(i&&!s&&e.props.isCompact)return e.getProActions("free","backups");break;case"scan":if(e.props.fetchingSiteData||e.props.isFetchingVaultPressData)return"";if((i||a)&&!c)return e.props.isCompact?e.getProActions("free","scan"):a&&!s?e.getSetUpButton("backups"):"";if("N/A"!==n)return c?e.getProActions(0===e.props.getScanThreats()?"secure":"threats","scan"):e.getSetUpButton("scan");break;case"search":return i||a||o?e.getProActions("pro"):"";case"akismet":if(i&&(!l||!d))return e.props.isCompact?e.getProActions("free","anti-spam"):"";if(!e.props.isAkismetKeyValid&&!e.props.fetchingAkismetData&&l&&d)return e.getProActions("invalid_key","anti-spam")}return t.product_slug&&r&&!i?l&&d?e.getProActions("active"):e.getSetUpButton(u):""}(this.props.proFeature,this.props.pluginActive(r),this.props.pluginInstalled(r)))}}]),t}(M.default.Component);B.propTypes={isCompact:m.default.bool,proFeature:m.default.string},B.defaultProps={isCompact:!0,proFeature:""},t.default=(0,b.connect)(function(e){return{siteRawUrl:(0,S.getSiteRawUrl)(e),siteAdminUrl:(0,S.getSiteAdminUrl)(e),getScanThreats:function(){return(0,
|
34 |
-
R.getVaultPressScanThreatCount)(e)},getVaultPressData:function(){return(0,R.getVaultPressData)(e)},getAkismetData:function(){return(0,R.getAkismetData)(e)},isFetchingVaultPressData:(0,R.isFetchingVaultPressData)(e),sitePlan:function(){return(0,Y.getSitePlan)(e)},fetchingPluginsData:(0,j.isFetchingPluginsData)(e),pluginActive:function(t){return(0,j.isPluginActive)(e,t)},pluginInstalled:function(t){return(0,j.isPluginInstalled)(e,t)},isDevMode:(0,x.isDevMode)(e),fetchingSiteData:(0,Y.isFetchingSiteData)(e),isAkismetKeyValid:(0,R.isAkismetKeyValid)(e),fetchingAkismetData:(0,R.isFetchingAkismetData)(e)}})(B),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(10),_=n(18),M=n(62),b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.props.isCheckingAkismetKey||this.props.checkAkismetKey()}},{key:"render",value:function(){return null}}]),t}(h.Component);b.defaultProps={checkAkismetKey:function(){}},t.default=(0,m.connect)(function(e){return{checkAkismetKey:(0,M.checkAkismetKey)(),isCheckingAkismetKey:(0,M.isCheckingAkismetKey)(e)}},function(e){return(0,_.bindActionCreators)({checkAkismetKey:M.checkAkismetKey},e)})(b),e.exports=t.default},function(e,t){function n(e){return r.test(e)}var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(8),g=n(15),v=r(g),y=n(1100),A=r(y),E=n(474),w=r(E);n(1103);var k=function(e){function t(){(0,s.default)(this,t);var e=(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments));return e.getModule=e.getModule.bind(e),e.trackInfoClick=e.trackInfoClick.bind(e),e.trackLearnMoreClick=e.trackLearnMoreClick.bind(e),e.trackPrivacyInfoClick=e.trackPrivacyInfoClick.bind(e),e}return(0,p.default)(t,e),(0,u.default)(t,[{key:"getModule",value:function(){return this.props.module||{}}},{key:"trackInfoClick",value:function(){v.default.tracks.recordJetpackClick({target:"info-icon",feature:this.getModule().module})}},{key:"trackLearnMoreClick",value:function(){v.default.tracks.recordJetpackClick({target:"learn-more",feature:this.getModule().module})}},{key:"trackPrivacyInfoClick",value:function(){v.default.tracks.recordJetpackClick({target:"privacy-info",feature:this.getModule().module})}},{key:"render",value:function(){var e=this.getModule(),t=this.props,n=t.text,r=t.link,a=t.privacyLink;return n=n||e.long_description||"",r=r||e.learn_more_button||"",!a&&r&&(a=r+"#privacy"),M.default.createElement("div",{className:"jp-support-info"},M.default.createElement(A.default,{position:"left",onClick:this.trackInfoClick,screenReaderText:(0,b.translate)("Learn more")},n+" ",M.default.createElement("span",{className:"jp-support-info__learn-more"},M.default.createElement(w.default,{href:r,onClick:this.trackLearnMoreClick,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more"))),M.default.createElement("span",{className:"jp-support-info__privacy"},M.default.createElement(w.default,{href:a,onClick:this.trackPrivacyInfoClick,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information")))))}}]),t}(_.Component);k.propTypes={module:m.default.object,text:m.default.string,link:m.default.string,privacyLink:m.default.string},k.defaultProps={module:void 0,text:"",link:"",privacyLink:""},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectButton=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(41),v=r(g),y=n(8),A=n(15),E=r(A),w=n(21),k=n(28),T=n(127),L=r(T),S=n(1162),C=r(S);n(1167);var O=t.ConnectButton=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={showModal:!1},r.handleOpenModal=function(e){E.default.tracks.recordJetpackClick("manage_site_connection"),e.preventDefault(),r.toggleVisibility()},r.disconnectSite=function(){r.toggleVisibility(),r.props.disconnectSite()},r.toggleVisibility=function(){r.setState({showModal:!r.state.showModal})},r.renderUserButton=function(){if(r.props.isLinked)return M.default.createElement("div",null,M.default.createElement("a",{role:"button",tabIndex:"0",className:"jp-jetpack-unlink__button",onKeyDown:(0,L.default)(r.props.unlinkUser),onClick:r.props.unlinkUser,disabled:r.props.isUnlinking},(0,y.translate)("Unlink me from WordPress.com")));var e=r.props.connectUrl;r.props.from&&(e+="&from="+r.props.from,e+="&additional-user");var t={className:"is-primary jp-jetpack-connect__button",href:e,disabled:r.props.fetchingConnectUrl},n=(0,y.translate)("Link to WordPress.com");return r.props.asLink?M.default.createElement("a",t,n):M.default.createElement(v.default,t,n)},r.renderContent=function(){if(r.props.connectUser)return r.renderUserButton();if(r.props.isSiteConnected)return M.default.createElement("a",{role:"button",tabIndex:"0",onKeyDown:(0,L.default)(r.handleOpenModal),onClick:r.handleOpenModal,disabled:r.props.isDisconnecting},(0,y.translate)("Manage site connection"));var e=r.props.connectUrl;r.props.from&&(e+="&from="+r.props.from);var t={className:"jp-jetpack-connect__button",href:e,disabled:r.props.fetchingConnectUrl},n=(0,y.translate)("Set up Jetpack");return r.props.asLink?M.default.createElement("a",t,n):M.default.createElement(v.default,t,n)},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return M.default.createElement("div",null,!this.props.isSiteConnected&&M.default.createElement("p",{className:"jp-banner__tos-blurb"},(0,y.translate)("By clicking the button below, you agree to our fascinating {{tosLink}}Terms of Service{{/tosLink}} and to {{shareDetailsLink}}share details{{/shareDetailsLink}} with WordPress.com",{components:{tosLink:M.default.createElement("a",{href:"https://wordpress.com/tos",rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:M.default.createElement("a",{href:"https://jetpack.com/support/what-data-does-jetpack-sync",rel:"noopener noreferrer",target:"_blank"})}})),this.renderContent(),this.props.children,M.default.createElement(C.default,{show:this.state.showModal,toggleModal:this.toggleVisibility,disconnectSite:this.disconnectSite}))}}]),t}(M.default.Component);O.displayName="ConnectButton",O.propTypes={connectUser:m.default.bool,from:m.default.string,asLink:m.default.bool},O.defaultProps={connectUser:!1,from:"",asLink:!1},t.default=(0,b.connect)(function(e){return{siteRawUrl:(0,k.getSiteRawUrl)(e),isSiteConnected:(0,w.getSiteConnectionStatus)(e),isDisconnecting:(0,w.isDisconnectingSite)(e),fetchingConnectUrl:(0,w.isFetchingConnectUrl)(e),connectUrl:(0,w.getConnectUrl)(e),isLinked:(0,w.isCurrentUserLinked)(e),isUnlinking:(0,w.isUnlinkingUser)(e)}},function(e){return{disconnectSite:function(){return e((0,w.disconnectSite)())},unlinkUser:function(){return e((0,w.unlinkUser)())}}})(O)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=function(e){return e&&e.__esModule?e:{default:e}}(a),o=n(499),s=r(o),c=n(1169),u=r(c),l=(0,i.default)({},s,u);t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(909),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(15),E=r(A),w=n(1170),k=r(w),T=n(27),L=r(T),S=n(30),C=n(918),O=r(C),z=n(1171),N=r(z),D=n(1172),P=r(D),x=n(1184),j=r(x),R=n(1186),Y=r(R),I=n(1187),q=r(I),B=n(1188),W=r(B),U=n(1190),H=r(U),F=n(1191),X=r(F),V=n(1193),K=r(V),J=n(1194),G=r(J),Q=n(1195),Z=r(Q),$=n(507),ee=r($),te=n(211),ne=r(te),re=n(28),ae=n(21),ie=n(23),oe=function(e){return e.map(function(e){return[e.header,(0,k.default)(e.cards,2).map(function(e){var t=(0,M.default)(e,2),n=t[0],r=t[1];return g.default.createElement("div",{className:"jp-at-a-glance__item-grid"},g.default.createElement("div",{className:"jp-at-a-glance__left"},n),g.default.createElement("div",{className:"jp-at-a-glance__right"},r))})]})},se=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={updateOptions:this.props.updateOptions,getOptionValue:this.props.getOptionValue,isUpdating:this.props.isUpdating},t={siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl},n=function(){return E.default.tracks.recordJetpackClick("aag_manage_security_wpcom")},r=g.default.createElement(O.default,{label:(0,y.translate)("Security"),settingsPath:this.props.userCanManageModules?"#security":void 0,externalLink:this.props.isDevMode||!this.props.userCanManageModules?"":(0,y.translate)("Manage security on WordPress.com"),externalLinkPath:this.props.isDevMode?"":"https://wordpress.com/settings/security/"+this.props.siteRawUrl,externalLinkClick:n}),a=g.default.createElement("div",null,g.default.createElement(O.default,{label:(0,y.translate)("Connections")}),g.default.createElement(Z.default,null)),o="active"===(0,L.default)(this.props.rewindStatus,["state"],!1),s=[g.default.createElement(q.default,(0,i.default)({},e,{siteRawUrl:this.props.siteRawUrl,isRewindActive:o})),g.default.createElement(H.default,(0,i.default)({},e,{siteRawUrl:this.props.siteRawUrl,isRewindActive:o})),g.default.createElement(W.default,t),g.default.createElement(X.default,(0,i.default)({},e,t))];if("inactive"!==this.props.getModuleOverride("protect")&&s.push(g.default.createElement(j.default,e)),"inactive"!==this.props.getModuleOverride("monitor")&&s.push(g.default.createElement(Y.default,e)),o&&s.unshift(g.default.createElement(N.default,(0,i.default)({},e,{siteRawUrl:this.props.siteRawUrl}))),this.props.userCanManageModules){var c=[{header:r,cards:s}],u=[];return"inactive"!==this.props.getModuleOverride("photon")&&u.push(g.default.createElement(K.default,e)),"inactive"!==this.props.getModuleOverride("search")&&u.push(g.default.createElement(G.default,e)),u.length&&c.push({header:g.default.createElement(O.default,{label:(0,y.translate)("Performance")}),cards:u}),g.default.createElement("div",{className:"jp-at-a-glance"},g.default.createElement(ee.default,null),g.default.createElement(ne.default,null),g.default.createElement(P.default,(0,i.default)({},e,t)),oe(c),a)}var l="";this.props.userCanViewStats&&(l=g.default.createElement(P.default,(0,i.default)({},e,t)));var d="";return this.props.getOptionValue("protect")&&(d=g.default.createElement(j.default,e)),this.props.userIsSubscriber?g.default.createElement("div",null,l,a):g.default.createElement("div",null,l,this.props.getOptionValue("protect")&&r,d,a)}}]),t}(b.Component);t.default=(0,v.connect)(function(e){return{userCanManageModules:(0,re.userCanManageModules)(e),userCanViewStats:(0,re.userCanViewStats)(e),userIsSubscriber:(0,re.userIsSubscriber)(e),isDevMode:(0,ae.isDevMode)(e),getModuleOverride:function(t){return(0,ie.getModuleOverride)(e,t)}}})((0,S.ModuleSettingsForm)(se)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DashSectionHeader=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(65),y=r(v),A=n(8),E=n(15),w=r(E),k=t.DashSectionHeader=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.trackCogClick=function(){w.default.tracks.recordJetpackClick({target:"settings-cog",group:"security",page:"aag"})},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=void 0,t=void 0,n=void 0,r=(0,g.default)(this.props.className,"jp-dash-section-header");return this.props.settingsPath&&(e=M.default.createElement("a",{className:"jp-dash-section-header__settings",href:this.props.settingsPath},M.default.createElement("span",{className:"screen-reader-text"},(0,A.translate)("Settings",{context:"Noun. Displayed to screen readers."})),M.default.createElement(y.default,{onClick:this.trackCogClick,icon:"cog",size:16}))),this.props.externalLink&&(t=M.default.createElement("a",{className:"jp-dash-section-header__external-link",href:this.props.externalLinkPath,onClick:this.props.externalLinkClick},this.props.externalLink)),this.props.children&&(n=M.default.createElement("div",{className:"jp-dash-section-header__children"},this.props.children)),M.default.createElement("div",{className:r},M.default.createElement("div",{className:"jp-dash-section-header__label"},M.default.createElement("h2",{className:"jp-dash-section-header__name"},this.props.label),e),t,n)}}]),t}(M.default.Component);k.displayName="DashSectionHeader",k.propTypes={label:m.default.string.isRequired,settingsPath:m.default.string,externalLinkPath:m.default.string,externalLink:m.default.string,externalLinkClick:m.default.func},k.defaultProps={label:"",settingsPath:"",externalLinkPath:"",externalLink:""},t.default=k},function(e,t,n){function r(e,t,n){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError(o);return i(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),a(e,t,{leading:r,maxWait:t,trailing:s})}var a=n(505),i=n(42),o="Expected a function";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(8),M=n(518),b=r(M),g=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement("div",null,m.default.createElement("p",null,(0,_.translate)("VideoPress allows you to upload videos from your computer to be hosted on WordPress.com, rather than on your host’s servers. You can then insert these on your self-hosted Jetpack site. ")),m.default.createElement(b.default,{module_slug:"videopress"}))}}]),t}(m.default.Component);t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(149),i=r(a),o=n(1),s=r(o),c=n(10),u=n(274),l=n(218),d=n(646),f=n(24),p=(r(f),n(927)),h=r(p),m=n(933),_=r(m),M=n(660),b=r(M),g=n(8),v=r(g),y=n(934),A=r(y),E=n(16);!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(E);(0,h.default)(),(0,_.default)();var w=window.Initial_State;w.locale=JSON.parse(w.locale),void 0!==w.locale[""]?(w.locale[""].localeSlug=w.localeSlug,Number.prototype.realToLocaleString=Number.prototype.toLocaleString,Number.prototype.toLocaleString=function(e,t){return e=e||w.localeSlug,t=t||{},this.realToLocaleString(e,t)}):w.locale={"":{localeSlug:w.localeSlug}},v.default.setLocale(w.locale);var k=(0,u.useRouterHistory)(d.createHashHistory)(),T=(0,l.syncHistoryWithStore)(k,b.default);!function(){var e=document.getElementById("jp-plugin-container");null!==e&&i.default.render(s.default.createElement("div",null,s.default.createElement(c.Provider,{store:b.default},s.default.createElement(u.Router,{history:T},s.default.createElement(u.Route,{path:"/",name:v.default.translate("At A Glance",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/jumpstart",component:A.default}),s.default.createElement(u.Route,{path:"/dashboard",name:v.default.translate("At A Glance"),component:A.default}),s.default.createElement(u.Route,{path:"/plans",name:v.default.translate("Plans",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/settings",name:v.default.translate("Settings",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/discussion",name:v.default.translate("Discussion",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/security",name:v.default.translate("Security",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/traffic",name:v.default.translate("Traffic",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/writing",name:v.default.translate("Writing",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/sharing",name:v.default.translate("Sharing",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/wpbody-content",component:A.default}),s.default.createElement(u.Route,{path:"/wp-toolbar",component:A.default}),s.default.createElement(u.Route,{path:"/privacy",component:A.default}),s.default.createElement(u.Route,{path:"*",component:A.default})))),e)}()},function(e,t,n){"use strict";var r=n(22),a=n(519),i=n(859),o=n(95),s=n(53),c=n(601),u=n(924),l=n(860),d=n(925);n(13);a.inject();var f={findDOMNode:u,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:c,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:d};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=l(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:o});e.exports=f},function(e,t,n){"use strict";var r={useCreateElement:!0,useFiber:!1};e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=o.get(e);if(t)return t=s(t),t?i.getNodeFromInstance(t):null;"function"==typeof e.render?a("44"):a("45",Object.keys(e))}var a=n(12),i=(n(66),n(22)),o=n(133),s=n(860);n(9),n(13);e.exports=r},function(e,t,n){"use strict";var r=n(859);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(29),i=function(e){return e&&e.__esModule?e:{default:e}}(a),o=n(118),s=n(153),c=function(e){var t=function(t){var n=e();if("string"==typeof n)return(t||window.event).returnValue=n,n};return(0,o.addEventListener)(window,"beforeunload",t),function(){return(0,o.removeEventListener)(window,"beforeunload",t)}},u=function(e){return s.canUseDOM||(0,i.default)(!1),function(t){var n=e(t),a=[],i=void 0,o=function(){for(var e=void 0,t=0,n=a.length;null==e&&t<n;++t)e=a[t].call();return e};return r({},n,{listenBeforeUnload:function(e){return 1===a.push(e)&&(i=c(o)),function(){a=a.filter(function(t){return t!==e}),0===a.length&&i&&(i(),i=null)}}})}};t.default=u},function(e,t,n){var r=(n(9),n(928)),a=!1;e.exports=function(e){e=e||{};var t=e.shouldRejectClick||r;a=!0,n(94).injection.injectEventPluginsByName({TapEventPlugin:n(929)(t)})}},function(e,t){e.exports=function(e,t){if(e&&t-e<750)return!0}},function(e,t,n){"use strict";function r(e,t){var n=l.extractSingleTouch(t);return n?n[e.page]:e.page in t?t[e.page]:t[e.client]+d[e.envScroll]}function a(e,t){var n=r(v.x,t),a=r(v.y,t);return Math.pow(Math.pow(n-e.x,2)+Math.pow(a-e.y,2),.5)}function i(e){return{tapMoveThreshold:_,ignoreMouseThreshold:M,eventTypes:E,extractEvents:function(t,n,i,o){if(!p(t)&&!h(t))return null;if(m(t))g=w();else if(e(g,w()))return null;var s=null,l=a(b,i);return h(t)&&l<_&&(s=u.getPooled(E.touchTap,n,i,o)),p(t)?(b.x=r(v.x,i),b.y=r(v.y,i)):h(t)&&(b.x=0,b.y=0),c.accumulateTwoPhaseDispatches(s),s}}}var o=n(930),s=n(150),c=n(93),u=n(96),l=n(931),d=n(213),f=n(932),p=(o.topLevelTypes,s.isStartish),h=s.isEndish,m=function(e){return["topTouchCancel","topTouchEnd","topTouchStart","topTouchMove"].indexOf(e)>=0},_=10,M=750,b={x:null,y:null},g=null,v={x:{page:"pageX",client:"clientX",envScroll:"currentPageScrollLeft"},y:{page:"pageY",client:"clientY",envScroll:"currentPageScrollTop"}},y=["topTouchStart","topTouchCancel","topTouchEnd","topTouchMove"],A=["topMouseDown","topMouseMove","topMouseUp"].concat(y),E={touchTap:{phasedRegistrationNames:{bubbled:f({onTouchTap:null}),captured:f({onTouchTapCapture:null})},dependencies:A}},w=function(){return Date.now?Date.now:function(){return+new Date}}();e.exports=i},function(e,t,n){"use strict";var r={topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null},a={topLevelTypes:r};e.exports=a},function(e,t){var n={extractSingleTouch:function(e){var t=e.touches,n=e.changedTouches,r=t&&t.length>0,a=n&&n.length>0;return!r&&a?n[0]:r?t[0]:e}};e.exports=n},function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=r},function(e,t,n){"use strict";function r(){document.addEventListener("keydown",function(e){i||-1!==a.indexOf(e.keyCode)&&(i=!0,document.documentElement.classList.add("dops-accessible-focus"))}),document.addEventListener("mouseup",function(){i&&(i=!1,document.documentElement.classList.remove("dops-accessible-focus"))})}var a=[9,32,37,38,39,40],i=!1;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(44),b=r(M),g=n(646),v=n(274),y=n(8),A=n(797),E=r(A),w=n(861),k=r(w),T=n(868),L=r(T),S=n(869),C=r(S),O=n(1161),z=r(O),N=n(1168),D=r(N),P=n(916),x=n(21),j=n(28),R=n(103),Y=n(74),I=n(917),q=r(I),B=n(1197),W=r(B),U=n(852),H=r(U),F=n(1209),X=r(F),V=n(1210),K=r(V),J=n(1211),G=r(J),Q=n(1212),Z=r(Q),$=n(1224),ee=r($),te=n(1225),ne=r(te),re=n(15),ae=r(re),ie=n(56),oe=r(ie),se=n(1226),ce=r(se),ue=n(1230),le=r(ue),de=n(477),fe=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.onBeforeUnload=function(){if(r.props.areThereUnsavedSettings){if(!confirm((0,y.translate)("There are unsaved settings in this tab that will be lost if you leave it. Proceed?")))return!1;r.props.clearUnsavedSettingsFlag()}},r.routerWillLeave=function(){if(r.props.areThereUnsavedSettings){if(!confirm((0,y.translate)("There are unsaved settings in this tab that will be lost if you leave it. Proceed?")))return!1;window.setTimeout(r.props.clearUnsavedSettingsFlag,10)}},r.initializeAnalyitics=function(){var e=r.props.tracksUserData;e&&ae.default.initialize(e.userid,e.username)},r.handleJumpstart=function(e){var t=(0,g.createHistory)(),n=e.jumpStartStatus,a=e.isJumpstarting;!r.props.jumpStartStatus&&n&&(window.location.hash="jumpstart",t.push(window.location.pathname+"?page=jetpack#/jumpstart")),!r.props.jumpStartStatus||n||a||(window.location.hash="dashboard",t.push(window.location.pathname+"?page=jetpack#/dashboard"))},r.renderMainContent=function(e){if(r.props.isSiteConnected&&ae.default.tracks.recordEvent("jetpack_wpa_page_view",{path:e}),!r.props.userCanManageModules||!r.props.userCanConnectSite)return!!r.props.siteConnectionStatus&&m.default.createElement("div",{"aria-live":"assertive"},m.default.createElement(G.default,r.props));if(!r.props.siteConnectionStatus)return m.default.createElement("div",{"aria-live":"assertive"},m.default.createElement(z.default,null));if(r.props.isSiteConnected&&r.props.jumpStartStatus)if((0,b.default)(["/","/dashboard"],e)){window.location.hash="jumpstart";var t=(0,g.createHistory)();t.push(window.location.pathname+"?page=jetpack#/jumpstart")}else if("/jumpstart"===e)return m.default.createElement("div",{"aria-live":"assertive"},m.default.createElement(D.default,null));var n=m.default.createElement(L.default,{route:r.props.route,siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl}),a=void 0,i=m.default.createElement(k.default,{route:r.props.route});switch(e){case"/dashboard":a=m.default.createElement(q.default,{siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl,rewindStatus:r.props.rewindStatus});break;case"/plans":a=m.default.createElement(W.default,{siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl,rewindStatus:r.props.rewindStatus});break;case"/settings":case"/general":case"/engagement":case"/security":case"/traffic":case"/discussion":case"/writing":case"/sharing":case"/privacy":i=n,a=m.default.createElement(C.default,{route:r.props.route,siteAdminUrl:r.props.siteAdminUrl,siteRawUrl:r.props.siteRawUrl,searchTerm:r.props.searchTerm,rewindStatus:r.props.rewindStatus});break;default:(0,g.createHistory)().replace(window.location.pathname+"?page=jetpack#/dashboard"),a=m.default.createElement(q.default,{siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl,rewindStatus:r.props.rewindStatus})}return window.wpNavMenuClassChange(),m.default.createElement("div",{"aria-live":"assertive"},i,a,m.default.createElement(ce.default,{siteRawUrl:r.props.siteRawUrl,newPlanActivated:r.props.newPlanActivated,userCanManageModules:r.props.userCanManageModules}))},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.props.setInitialState(),oe.default.setApiRoot(this.props.apiRoot),oe.default.setApiNonce(this.props.apiNonce),this.initializeAnalyitics(),window.addEventListener("beforeunload",this.onBeforeUnload),this.props.router.listenBefore(this.routerWillLeave)}},{key:"shouldComponentUpdate",value:function(e){return!(0,b.default)(["/wpbody-content","/wp-toolbar"],e.route.path)&&(e.siteConnectionStatus!==this.props.siteConnectionStatus||e.jumpStartStatus!==this.props.jumpStartStatus||e.isLinked!==this.props.isLinked||e.route.path!==this.props.route.path||e.searchTerm!==this.props.searchTerm||e.newPlanActivated!==this.props.newPlanActivated||e.rewindStatus!==this.props.rewindStatus)}},{key:"componentDidUpdate",value:function(e){if(e.siteConnectionStatus!==this.props.siteConnectionStatus){var t=jQuery("#toplevel_page_jetpack").find("ul.wp-submenu li");t.find('a[href$="#/settings"]').hide(),t.find('a[href$="admin.php?page=stats"]').hide()}}},{key:"componentWillReceiveProps",value:function(e){e.jumpStartStatus===this.props.jumpStartStatus&&e.isJumpstarting===this.props.isJumpstarting||this.handleJumpstart(e)}},{key:"render",value:function(){return m.default.createElement("div",null,m.default.createElement(E.default,{route:this.props.route}),m.default.createElement("div",{className:"jp-lower"},this.props.isSiteConnected&&m.default.createElement(le.default,null),m.default.createElement(ee.default,null),m.default.createElement(Z.default,null),this.renderMainContent(this.props.route.path),!this.props.jumpStartStatus&&m.default.createElement(X.default,{path:this.props.route.path}),!this.props.jumpStartStatus&&m.default.createElement(K.default,null)),m.default.createElement(H.default,{siteAdminUrl:this.props.siteAdminUrl}),m.default.createElement(ne.default,{analytics:ae.default}))}}]),t}(m.default.Component);t.default=(0,_.connect)(function(e){return{jumpStartStatus:(0,P.getJumpStartStatus)(e),isJumpstarting:(0,P.isJumpstarting)(e),siteConnectionStatus:(0,x.getSiteConnectionStatus)(e),isLinked:(0,x.isCurrentUserLinked)(e),siteRawUrl:(0,j.getSiteRawUrl)(e),siteAdminUrl:(0,j.getSiteAdminUrl)(e),searchTerm:(0,Y.getSearchTerm)(e),apiRoot:(0,j.getApiRootUrl)(e),apiNonce:(0,j.getApiNonce)(e),tracksUserData:(0,j.getTracksUserData)(e),areThereUnsavedSettings:(0,R.areThereUnsavedSettings)(e),userCanManageModules:(0,j.userCanManageModules)(e),userCanConnectSite:(0,j.userCanConnectSite)(e),isSiteConnected:(0,x.isSiteConnected)(e),newPlanActivated:(0,R.showWelcomeForNewPlan)(e),rewindStatus:(0,de.getRewindStatus)(e)}},function(e){return{setInitialState:function(){return e((0,j.setInitialState)())},clearUnsavedSettingsFlag:function(){return e((0,R.clearUnsavedSettingsFlag)())}}})((0,v.withRouter)(fe)),window.wpNavMenuClassChange=function(){var e=window.location.hash,t=["#/settings","#/general","#/discussion","#/security","#/traffic","#/writing","#/sharing","#/privacy"],n=["#/","#/dashboard","#/plans"];if(jQuery(".current").each(function(e,t){jQuery(t).removeClass("current")}),e=e.split("?")[0],(0,b.default)(n,e)){jQuery("#toplevel_page_jetpack").find("li").filter(function(e){return 1===e})[0].classList.add("current")}else if((0,b.default)(t,e)){var r=jQuery("#toplevel_page_jetpack").find("li").filter(function(e){return 2===e});r[0].classList.add("current")}var a=jQuery("body");a.on("click",'a[href$="#/dashboard"], a[href$="#/settings"], .jp-dash-section-header__settings[href="#/security"], .dops-button[href="#/plans"]',function(){window.scrollTo(0,0)}),a.on("click",".jetpack-js-stop-propagation",function(e){e.stopPropagation()})},e.exports=t.default},function(e,t,n){function r(e,t){return a(e,t)}var a=n(231);e.exports=r},function(e,t,n){var r=n(46),a=function(){return r.Date.now()};e.exports=a},function(e,t,n){function r(e,t){var n=-1,r=i(e)?Array(e.length):[];return a(e,function(e,a,i){r[++n]=t(e,a,i)}),r}var a=n(148),i=n(54);e.exports=r},function(e,t,n){function r(e,t,n){t=a(t,e);var r=-1,s=t.length;for(s||(s=1,e=void 0);++r<s;){var c=null==e?void 0:e[o(t[r])];void 0===c&&(r=s,c=n),e=i(c)?c.call(e):c}return e}var a=n(101),i=n(155),o=n(90);e.exports=r},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return h.createElement("li",{className:"dops-select-dropdown__separator"})}}]),t}(h.Component);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0})
|
35 |
;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=m.default.Component,M=function(e){return e.stopPropagation()},b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement("li",{onClick:M,className:"dops-select-dropdown__label"},m.default.createElement("label",null,this.props.children))}}]),t}(_);t.default=b,e.exports=t.default},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(102)("calypso:url-search"),a=n(947),i=n(949);e.exports={getInitialState:function(){return{searchOpen:!1}},componentWillReceiveProps:function(e){e.search||this.setState({searchOpen:!1})},doSearch:function(e){var t=void 0;if(this.setState({searchOpen:!1!==e}),this.onSearch)return void this.onSearch(e);t=this.buildUrl&&"function"==typeof this.buildUrl?this.buildUrl(window.location.href,e):i(window.location.href,e),r("search posts for:",e),this.props.search&&e?(r("replacing URL: "+t),a.replace(t)):(r("setting URL: "+t),a(t))},getSearchOpen:function(){return!1!==this.state.searchOpen||this.props.search}}},function(e,t,n){"use strict";(function(t){function r(e,t){if("function"==typeof e)return r("*",e);if("function"==typeof t)for(var n=new s(e),a=1;a<arguments.length;++a)r.callbacks.push(n.middleware(arguments[a]));else"string"==typeof e?r["string"==typeof t?"redirect":"show"](e,t):r.start(e)}function a(e){if(!e.handled){var t;t=g?b+m.hash.replace("#!",""):m.pathname+m.search,t!==e.canonicalPath&&(r.stop(),e.handled=!1,m.href=e.canonicalPath)}}function i(e){return"string"!=typeof e?e:M?decodeURIComponent(e.replace(/\+/g," ")):e}function o(e,t){"/"===e[0]&&0!==e.indexOf(b)&&(e=b+(g?"#!":"")+e);var n=e.indexOf("?");if(this.canonicalPath=e,this.path=e.replace(b,"")||"/",g&&(this.path=this.path.replace("#!","")||"/"),this.title=document.title,this.state=t||{},this.state.path=e,this.querystring=~n?i(e.slice(n+1)):"",this.pathname=i(~n?e.slice(0,n):e),this.params={},this.hash="",!g){if(!~this.path.indexOf("#"))return;var r=this.path.split("#");this.path=r[0],this.hash=i(r[1])||"",this.querystring=this.querystring.split("#")[0]}}function s(e,t){t=t||{},this.path="*"===e?"(.*)":e,this.method="GET",this.regexp=d(this.path,this.keys=[],t)}function c(e){if(1===u(e)&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var n=e.path?e.path[0]:e.target;n&&"A"!==n.nodeName;)n=n.parentNode;if(n&&"A"===n.nodeName&&!n.hasAttribute("download")&&"external"!==n.getAttribute("rel")){var a=n.getAttribute("href");if((g||n.pathname!==m.pathname||!n.hash&&"#"!==a)&&!(a&&a.indexOf("mailto:")>-1)&&!n.target&&l(n.href)){var i=n.pathname+n.search+(n.hash||"");void 0!==t&&i.match(/^\/[a-zA-Z]:\//)&&(i=i.replace(/^\/[a-zA-Z]:\//,"/"));var o=i;0===i.indexOf(b)&&(i=i.substr(b.length)),g&&(i=i.replace("#!","")),b&&o===i||(e.preventDefault(),r.show(o))}}}}function u(e){return e=e||window.event,null===e.which?e.button:e.which}function l(e){var t=m.protocol+"//"+m.hostname;return m.port&&(t+=":"+m.port),e&&0===e.indexOf(t)}var d=n(948);e.exports=r;var f,p,h="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",m="undefined"!=typeof window&&(window.history.location||window.location),_=!0,M=!0,b="",g=!1;r.callbacks=[],r.exits=[],r.current="",r.len=0,r.base=function(e){if(0===arguments.length)return b;b=e},r.start=function(e){if(e=e||{},!f&&(f=!0,!1===e.dispatch&&(_=!1),!1===e.decodeURLComponents&&(M=!1),!1!==e.popstate&&window.addEventListener("popstate",v,!1),!1!==e.click&&document.addEventListener(h,c,!1),!0===e.hashbang&&(g=!0),_)){var t=g&&~m.hash.indexOf("#!")?m.hash.substr(2)+m.search:m.pathname+m.search+m.hash;r.replace(t,null,!0,_)}},r.stop=function(){f&&(r.current="",r.len=0,f=!1,document.removeEventListener(h,c,!1),window.removeEventListener("popstate",v,!1))},r.show=function(e,t,n,a){var i=new o(e,t);return r.current=i.path,!1!==n&&r.dispatch(i),!1!==i.handled&&!1!==a&&i.pushState(),i},r.back=function(e,t){r.len>0?(history.back(),r.len--):e?setTimeout(function(){r.show(e,t)}):setTimeout(function(){r.show(b,t)})},r.redirect=function(e,t){"string"==typeof e&&"string"==typeof t&&r(e,function(e){setTimeout(function(){r.replace(t)},0)}),"string"==typeof e&&void 0===t&&setTimeout(function(){r.replace(e)},0)},r.replace=function(e,t,n,a){var i=new o(e,t);return r.current=i.path,i.init=n,i.save(),!1!==a&&r.dispatch(i),i},r.dispatch=function(e){function t(){var e=r.exits[s++];if(!e)return n();e(i,t)}function n(){var t=r.callbacks[o++];return e.path!==r.current?void(e.handled=!1):t?void t(e,n):a(e)}var i=p,o=0,s=0;p=e,i?t():n()},r.exit=function(e,t){if("function"==typeof e)return r.exit("*",e);for(var n=new s(e),a=1;a<arguments.length;++a)r.exits.push(n.middleware(arguments[a]))},r.Context=o,o.prototype.pushState=function(){r.len++,history.pushState(this.state,this.title,g&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},o.prototype.save=function(){history.replaceState(this.state,this.title,g&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},r.Route=s,s.prototype.middleware=function(e){var t=this;return function(n,r){if(t.match(n.path,n.params))return e(n,r);r()}},s.prototype.match=function(e,t){var n=this.keys,r=e.indexOf("?"),a=~r?e.slice(0,r):e,o=this.regexp.exec(decodeURIComponent(a));if(!o)return!1;for(var s=1,c=o.length;s<c;++s){var u=n[s-1],l=i(o[s]);void 0===l&&hasOwnProperty.call(t,u.name)||(t[u.name]=l)}return!0};var v=function(){var e=!1;if("undefined"!=typeof window)return"complete"===document.readyState?e=!0:window.addEventListener("load",function(){setTimeout(function(){e=!0},0)}),function(t){if(e)if(t.state){var n=t.state.path;r.replace(n,t.state)}else r.show(m.pathname+m.hash,void 0,void 0,!1)}}();r.sameOrigin=l}).call(t,n(63))},function(e,t,n){function r(e){for(var t,n=[],r=0,a=0,i="";null!=(t=_.exec(e));){var o=t[0],c=t[1],u=t.index;if(i+=e.slice(a,u),a=u+o.length,c)i+=c[1];else{i&&(n.push(i),i="");var l=t[2],d=t[3],f=t[4],p=t[5],h=t[6],m=t[7],M="+"===h||"*"===h,b="?"===h||"*"===h,g=l||"/",v=f||p||(m?".*":"[^"+g+"]+?");n.push({name:d||r++,prefix:l||"",delimiter:g,optional:b,repeat:M,pattern:s(v)})}}return a<e.length&&(i+=e.substr(a)),i&&n.push(i),n}function a(e){return i(r(e))}function i(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"==typeof e[n]&&(t[n]=new RegExp("^"+e[n].pattern+"$"));return function(n){for(var r="",a=n||{},i=0;i<e.length;i++){var o=e[i];if("string"!=typeof o){var s,c=a[o.name];if(null==c){if(o.optional)continue;throw new TypeError('Expected "'+o.name+'" to be defined')}if(m(c)){if(!o.repeat)throw new TypeError('Expected "'+o.name+'" to not repeat, but received "'+c+'"');if(0===c.length){if(o.optional)continue;throw new TypeError('Expected "'+o.name+'" to not be empty')}for(var u=0;u<c.length;u++){if(s=encodeURIComponent(c[u]),!t[i].test(s))throw new TypeError('Expected all "'+o.name+'" to match "'+o.pattern+'", but received "'+s+'"');r+=(0===u?o.prefix:o.delimiter)+s}}else{if(s=encodeURIComponent(c),!t[i].test(s))throw new TypeError('Expected "'+o.name+'" to match "'+o.pattern+'", but received "'+s+'"');r+=o.prefix+s}}else r+=o}return r}}function o(e){return e.replace(/([.+*?=^!:${}()[\]|\/])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function u(e){return e.sensitive?"":"i"}function l(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return c(e,t)}function d(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(h(e[a],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",u(n)),t)}function f(e,t,n){for(var a=r(e),i=p(a,n),o=0;o<a.length;o++)"string"!=typeof a[o]&&t.push(a[o]);return c(i,t)}function p(e,t){t=t||{};for(var n=t.strict,r=!1!==t.end,a="",i=e[e.length-1],s="string"==typeof i&&/\/$/.test(i),c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=o(l);else{var d=o(l.prefix),f=l.pattern;l.repeat&&(f+="(?:"+d+f+")*"),f=l.optional?d?"(?:"+d+"("+f+"))?":"("+f+")?":d+"("+f+")",a+=f}}return n||(a=(s?a.slice(0,-2):a)+"(?:\\/(?=$))?"),a+=r?"$":n&&s?"":"(?=\\/|$)",new RegExp("^"+a,u(t))}function h(e,t,n){return t=t||[],m(t)?n||(n={}):(n=t,t=[]),e instanceof RegExp?l(e,t,n):m(e)?d(e,t,n):f(e,t,n)}var m=n(440);e.exports=h,e.exports.parse=r,e.exports.compile=a,e.exports.tokensToFunction=i,e.exports.tokensToRegExp=p;var _=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(e,t,n){"use strict";var r=n(950),a=n(956);e.exports=function(e,t){var n=r.parse(e,!0);return t?n.query.s=t:delete n.query.s,n=a(n,"pathname","hash","query"),r.format(n).replace(/\%20/g,"+")}},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function a(e,t,n){if(e&&u.isObject(e)&&e instanceof r)return e;var a=new r;return a.parse(e,t,n),a}function i(e){return u.isString(e)&&(e=a(e)),e instanceof r?e.format():r.prototype.format.call(e)}function o(e,t){return a(e,!1,!0).resolve(t)}function s(e,t){return e?a(e,!1,!0).resolveObject(t):t}var c=n(951),u=n(952);t.parse=a,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(h),_=["%","/","?",";","#"].concat(m),M=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=n(953);r.prototype.parse=function(e,t,n){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),a=-1!==r&&r<e.indexOf("#")?"?":"#",i=e.split(a),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(a);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var d=f.exec(s);if(d)return this.path=s,this.href=s,this.pathname=d[1],d[2]?(this.search=d[2],this.query=t?E.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=l.exec(s);if(p){p=p[0];var h=p.toLowerCase();this.protocol=h,s=s.substr(p.length)}if(n||p||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===s.substr(0,2);!w||p&&y[p]||(s=s.substr(2),this.slashes=!0)}if(!y[p]&&(w||p&&!A[p])){for(var k=-1,T=0;T<M.length;T++){var L=s.indexOf(M[T]);-1!==L&&(-1===k||L<k)&&(k=L)}var S,C;C=-1===k?s.lastIndexOf("@"):s.lastIndexOf("@",k),-1!==C&&(S=s.slice(0,C),s=s.slice(C+1),this.auth=decodeURIComponent(S)),k=-1;for(var T=0;T<_.length;T++){var L=s.indexOf(_[T]);-1!==L&&(-1===k||L<k)&&(k=L)}-1===k&&(k=s.length),this.host=s.slice(0,k),s=s.slice(k),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var z=this.hostname.split(/\./),T=0,N=z.length;T<N;T++){var D=z[T];if(D&&!D.match(b)){for(var P="",x=0,j=D.length;x<j;x++)D.charCodeAt(x)>127?P+="x":P+=D[x];if(!P.match(b)){var R=z.slice(0,T),Y=z.slice(T+1),I=D.match(g);I&&(R.push(I[1]),Y.unshift(I[2])),Y.length&&(s="/"+Y.join(".")+s),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=c.toASCII(this.hostname));var q=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+q,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!v[h])for(var T=0,N=m.length;T<N;T++){var W=m[T];if(-1!==s.indexOf(W)){var U=encodeURIComponent(W);U===W&&(U=escape(W)),s=s.split(W).join(U)}}var H=s.indexOf("#");-1!==H&&(this.hash=s.substr(H),s=s.slice(0,H));var F=s.indexOf("?");if(-1!==F?(this.search=s.substr(F),this.query=s.substr(F+1),t&&(this.query=E.parse(this.query)),s=s.slice(0,F)):t&&(this.search="",this.query={}),s&&(this.pathname=s),A[h]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",X=this.search||"";this.path=q+X}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,i="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&u.isObject(this.query)&&Object.keys(this.query).length&&(i=E.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||A[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+a+n+o+r},r.prototype.resolve=function(e){return this.resolveObject(a(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(u.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,a=Object.keys(this),i=0;i<a.length;i++){var o=a[i];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=e[l])}return A[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!A[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var p=d[f];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",_=n.search||"";n.path=m+_}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var M=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=b||M||n.host&&e.pathname,v=g,E=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],w=n.protocol&&!A[n.protocol];if(w&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),g=g&&(""===h[0]||""===E[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=h;else if(h.length)E||(E=[]),E.pop(),E=E.concat(h),n.search=e.search,n.query=e.query;else if(!u.isNullOrUndefined(e.search)){if(w){n.hostname=n.host=E.shift();var k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return n.search=e.search,n.query=e.query,u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=E.slice(-1)[0],L=(n.host||e.host||E.length>1)&&("."===T||".."===T)||""===T,S=0,C=E.length;C>=0;C--)T=E[C],"."===T?E.splice(C,1):".."===T?(E.splice(C,1),S++):S&&(E.splice(C,1),S--);if(!g&&!v)for(;S--;S)E.unshift("..");!g||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),L&&"/"!==E.join("/").substr(-1)&&E.push("");var O=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(w){n.hostname=n.host=O?"":E.length?E.shift():"";var k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return g=g||n.host&&E.length,g&&!O&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=d.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var a;!function(i){function o(e){throw new RangeError(N[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function c(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(z,"."),r+s(e.split("."),t).join(".")}function u(e){for(var t,n,r=[],a=0,i=e.length;a<i;)t=e.charCodeAt(a++),t>=55296&&t<=56319&&a<i?(n=e.charCodeAt(a++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),a--)):r.push(t);return r}function l(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=x(e>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:y}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){var r=0;for(e=n?P(e/k):e>>1,e+=P(e/t);e>D*E>>1;r+=y)e=P(e/D);return P(r+(D+1)*e/(e+w))}function h(e){var t,n,r,a,i,s,c,u,f,h,m=[],_=e.length,M=0,b=L,g=T;for(n=e.lastIndexOf(S),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&o("not-basic"),m.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<_;){for(i=M,s=1,c=y;a>=_&&o("invalid-input"),u=d(e.charCodeAt(a++)),(u>=y||u>P((v-M)/s))&&o("overflow"),M+=u*s,f=c<=g?A:c>=g+E?E:c-g,!(u<f);c+=y)h=y-f,s>P(v/h)&&o("overflow"),s*=h;t=m.length+1,g=p(M-i,t,0==i),P(M/t)>v-b&&o("overflow"),b+=P(M/t),M%=t,m.splice(M++,0,b)}return l(m)}function m(e){var t,n,r,a,i,s,c,l,d,h,m,_,M,b,g,w=[];for(e=u(e),_=e.length,t=L,n=0,i=T,s=0;s<_;++s)(m=e[s])<128&&w.push(x(m));for(r=a=w.length,a&&w.push(S);r<_;){for(c=v,s=0;s<_;++s)(m=e[s])>=t&&m<c&&(c=m);for(M=r+1,c-t>P((v-n)/M)&&o("overflow"),n+=(c-t)*M,t=c,s=0;s<_;++s)if(m=e[s],m<t&&++n>v&&o("overflow"),m==t){for(l=n,d=y;h=d<=i?A:d>=i+E?E:d-i,!(l<h);d+=y)g=l-h,b=y-h,w.push(x(f(h+g%b,0))),l=P(g/b);w.push(x(f(l,0))),i=p(n,M,r==a),n=0,++r}++n,++t}return w.join("")}function _(e){return c(e,function(e){return C.test(e)?h(e.slice(4).toLowerCase()):e})}function M(e){return c(e,function(e){return O.test(e)?"xn--"+m(e):e})}var b=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,"object"==typeof r&&r);var g,v=2147483647,y=36,A=1,E=26,w=38,k=700,T=72,L=128,S="-",C=/^xn--/,O=/[^\x20-\x7E]/,z=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=y-A,P=Math.floor,x=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:u,encode:l},decode:h,encode:m,toASCII:M,toUnicode:_},void 0!==(a=function(){return g}.call(t,n,t,e))&&(e.exports=a)}()}).call(t,n(109)(e),n(45))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(954),t.encode=t.stringify=n(955)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var d,f,p,h,m=e[l].replace(s,"%20"),_=m.indexOf(n);_>=0?(d=m.substr(0,_),f=m.substr(_+1)):(d=m,f=""),p=decodeURIComponent(d),h=decodeURIComponent(f),r(o,p)?a(o[p])?o[p].push(h):o[p]=[o[p],h]:o[p]=h}return o};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),function(o){var s=encodeURIComponent(a(o))+n;return i(e[o])?r(e[o],function(e){return s+encodeURIComponent(a(e))}).join(t):s+encodeURIComponent(a(e[o]))}).join(t):s?encodeURIComponent(a(s))+n+encodeURIComponent(a(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r=n(957),a=n(506),i=a(function(e,t){return null==e?{}:r(e,t)});e.exports=i},function(e,t,n){function r(e,t){return a(e,t,function(t,n){return i(e,n)})}var a=n(958),i=n(496);e.exports=r},function(e,t,n){function r(e,t,n){for(var r=-1,s=t.length,c={};++r<s;){var u=t[r],l=a(e,u);n(l,u)&&i(c,o(u,e),l)}return c}var a=n(161),i=n(959),o=n(101);e.exports=r},function(e,t,n){function r(e,t,n,r){if(!s(e))return e;t=i(t,e);for(var u=-1,l=t.length,d=l-1,f=e;null!=f&&++u<l;){var p=c(t[u]),h=n;if(u!=d){var m=f[p];h=r?r(m,p,f):void 0,void 0===h&&(h=s(m)?m:o(t[u+1])?[]:{})}a(f,p,h),f=f[p]}return e}var a=n(154),i=n(101),o=n(156),s=n(42),c=n(90);e.exports=r},function(e,t,n){var r=n(125),a=n(961),i=n(485),o=n(964),s=i(function(e){var t=r(e,o);return t.length&&t[0]===e[0]?a(t):[]});e.exports=s},function(e,t,n){function r(e,t,n){for(var r=n?o:i,d=e[0].length,f=e.length,p=f,h=Array(f),m=1/0,_=[];p--;){var M=e[p];p&&t&&(M=s(M,c(t))),m=l(M.length,m),h[p]=!n&&(t||d>=120&&M.length>=120)?new a(p&&M):void 0}M=e[0];var b=-1,g=h[0];e:for(;++b<d&&_.length<m;){var v=M[b],y=t?t(v):v;if(v=n||0!==v?v:0,!(g?u(g,y):r(_,y,n))){for(p=f;--p;){var A=h[p];if(!(A?u(A,y):r(e[p],y,n)))continue e}g&&g.push(y),_.push(v)}}return _}var a=n(494),i=n(962),o=n(963),s=n(125),c=n(158),u=n(495),l=Math.min;e.exports=r},function(e,t,n){function r(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}var a=n(226);e.exports=r},function(e,t){function n(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}e.exports=n},function(e,t,n){function r(e){return a(e)?e:[]}var a=n(488);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterSearch=void 0;var r=n(16);t.filterSearch=function(e){return function(t){t({type:r.JETPACK_SEARCH_TERM,term:e})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPluginsData=void 0;var r=n(16),a=n(56),i=function(e){return e&&e.__esModule?e:{default:e}}(a);t.fetchPluginsData=function(){return function(e){return e({type:r.JETPACK_PLUGINS_DATA_FETCH}),i.default.fetchPluginsData().then(function(t){return e({type:r.JETPACK_PLUGINS_DATA_FETCH_RECEIVE,pluginsData:t}),t}).catch(function(t){e({type:r.JETPACK_PLUGINS_DATA_FETCH_FAIL,error:t})})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Discussion=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(23),v=n(103),y=n(21),A=n(74),E=n(211),w=r(E),k=n(969),T=n(1104),L=t.Discussion=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode},t=this.props.isModuleFound("comments"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("gravatar-hovercards"),a=this.props.isModuleFound("subscriptions"),o=this.props.isModuleFound("comment-likes");return(this.props.searchTerm||this.props.active)&&(t||a||n||r||o)?M.default.createElement("div",null,M.default.createElement(w.default,null),M.default.createElement(k.Comments,(0,i.default)({},e,{isModuleFound:this.props.isModuleFound,getModuleOverride:this.props.getModuleOverride})),a&&M.default.createElement(T.Subscriptions,(0,i.default)({},e,{isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl}))):null}}]),t}(M.default.Component);L.displayName="DiscussionSettings",t.default=(0,b.connect)(function(e){return{module:function(t){return(0,g.getModule)(e,t)},settings:(0,v.getSettings)(e),isDevMode:(0,y.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,y.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,A.isModuleFound)(e,t)},connectUrl:(0,y.getConnectUrl)(e),isLinked:(0,y.isCurrentUserLinked)(e),getModuleOverride:function(t){return(0,g.getModuleOverride)(e,t)}}})(L)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateSettings=t.updateSetting=t.fetchSettings=t.clearUnsavedSettingsFlag=t.setUnsavedSettingsFlag=void 0;var a=n(59),i=r(a),o=n(114),s=n(8),c=n(230),u=r(c),l=n(16),d=n(23),f=n(56),p=r(f);t.setUnsavedSettingsFlag=function(){return{type:l.JETPACK_SETTINGS_SET_UNSAVED_FLAG}},t.clearUnsavedSettingsFlag=function(){return{type:l.JETPACK_SETTINGS_CLEAR_UNSAVED_FLAG}},t.fetchSettings=function(){return function(e){return e({type:l.JETPACK_SETTINGS_FETCH}),p.default.fetchSettings().then(function(t){return e({type:l.JETPACK_SETTINGS_FETCH_RECEIVE,settings:t}),t}).catch(function(t){e({type:l.JETPACK_SETTINGS_FETCH_FAIL,error:t})})}},t.updateSetting=function(e){return function(t){return t({type:l.JETPACK_SETTING_UPDATE,updatedOption:e}),p.default.updateSetting(e).then(function(n){t({type:l.JETPACK_SETTING_UPDATE_SUCCESS,updatedOption:e,success:n})}).catch(function(n){t({type:l.JETPACK_SETTING_UPDATE_FAIL,success:!1,error:n,updatedOption:e})})}},t.updateSettings=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(n){var r={progress:(0,s.translate)("Updating settings…"),success:(0,s.translate)("Updated settings."),error:function(e){return(0,s.translate)("Error updating settings. %(error)s",{args:{error:e.message||e.code||e.name||e}})}},a=function(){return e};"regeneratePbE"===t&&(r={progress:(0,s.translate)("Updating Post by Email address…"),success:(0,s.translate)("Regenerated Post by Email address."),error:function(e){return(0,s.translate)("Error regenerating Post by Email address. %(error)s",{args:{error:e}})}},a=function(e){return{post_by_email_address:e.post_by_email_address}},e={post_by_email_address:"regenerate"});var c=["masterbar","jetpack_testimonial","jetpack_portfolio"];"object"===(void 0===e?"undefined":(0,i.default)(e))&&(0,u.default)(c,function(t){return t in e})&&(r.success=(0,s.translate)("Updated settings. Refreshing page…")),n((0,o.removeNotice)("module-setting-update")),n((0,o.removeNotice)("module-setting-update-success"));var f=["dismiss_dash_app_card","dismiss_empty_stats_card","show_welcome_for_new_plan"];return"object"!==(void 0===e?"undefined":(0,i.default)(e))||(0,u.default)(f,function(t){return t in e})||n((0,o.createNotice)("is-info",r.progress,{id:"module-setting-update"})),n({type:l.JETPACK_SETTINGS_UPDATE,updatedOptions:e}),p.default.updateSettings(e).then(function(t){n({type:l.JETPACK_SETTINGS_UPDATE_SUCCESS,updatedOptions:a(t),success:t}),(0,d.maybeHideNavMenuItem)(e),(0,d.maybeReloadAfterAction)(e),n((0,o.removeNotice)("module-setting-update")),n((0,o.removeNotice)("module-setting-update-success")),"object"!==(void 0===e?"undefined":(0,i.default)(e))||(0,u.default)(f,function(t){return t in e})||n((0,o.createNotice)("is-success",r.success,{id:"module-setting-update-success",duration:2e3}))}).catch(function(t){n({type:l.JETPACK_SETTINGS_UPDATE_FAIL,success:!1,error:t,updatedOptions:e}),n((0,o.removeNotice)("module-setting-update")),n((0,o.createNotice)("is-error",r.error(t),{id:"module-setting-update"}))})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Comments=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(508),v=r(g),y=n(71),A=n(52),E=n(30),w=n(40),k=r(w),T=n(36),L=r(T),S=n(104),C=r(S),O=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.updateFormStateByMarkdown=function(e){return r.props.getSettingCurrentValue("wpcom_publish_posts_with_markdown",e)?r.props.updateFormStateModuleOption(e,"wpcom_publish_comments_with_markdown"):r.props.updateFormStateModuleOption(e,"wpcom_publish_comments_with_markdown",!0)},r.handleMarkdownCommentsToggle=function(){r.props.updateFormStateModuleOption("markdown","wpcom_publish_comments_with_markdown")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("comments"),t=this.props.isModuleFound("gravatar-hovercards"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("comment-likes");if(!(e||t||n||r))return null;var a=this.props,o=a.isUnavailableInDevMode,s=a.getOptionValue,c=this.props.getModule("comments"),u=this.props.getOptionValue("comments"),l=this.props.isUnavailableInDevMode("comments"),d=this.props.getModule("gravatar-hovercards"),f=this.props.getModule("markdown"),p=o("comment-likes"),h=s("comment-likes");return M.default.createElement(k.default,(0,i.default)({},this.props,{header:(0,b.translate)("Comments"),module:"comments",saveDisabled:this.props.isSavingAnyOption(["highlander_comment_form_prompt","jetpack_comment_form_color_scheme"])}),e&&M.default.createElement(L.default,{hasChild:!0,disableInDevMode:!0,module:c,support:{text:(0,b.translate)("Replaces the standard WordPress comment form with a new comment system that includes social media login options."),link:"https://jetpack.com/support/comments"}},M.default.createElement(A.ModuleToggle,{slug:"comments",compact:!0,disabled:l,activated:this.props.getOptionValue("comments"),toggling:this.props.isSavingAnyOption("comments"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},c.description)),M.default.createElement(y.FormFieldset,null,M.default.createElement(y.FormLabel,null,M.default.createElement("span",{className:"jp-form-label-wide"},(0,b.translate)("Comments headline")),M.default.createElement(v.default,{name:"highlander_comment_form_prompt",value:this.props.getOptionValue("highlander_comment_form_prompt"),disabled:!u||l||this.props.isSavingAnyOption("highlander_comment_form_prompt"),onChange:this.props.onOptionChange})),M.default.createElement("span",{className:"jp-form-setting-explanation"},(0,b.translate)("A few catchy words to motivate your readers to comment.")),M.default.createElement(y.FormLabel,null,M.default.createElement("span",{className:"jp-form-label-wide"},(0,b.translate)("Color scheme")),M.default.createElement(y.FormSelect,(0,i.default)({name:"jetpack_comment_form_color_scheme",value:this.props.getOptionValue("jetpack_comment_form_color_scheme"),disabled:!u||l||this.props.isSavingAnyOption("jetpack_comment_form_color_scheme"),onChange:this.props.onOptionChange},this.props,{validValues:this.props.validValues("jetpack_comment_form_color_scheme","comments")}))))),(t||n||r)&&M.default.createElement(L.default,null,t&&M.default.createElement(y.FormFieldset,null,M.default.createElement(A.ModuleToggle,{slug:"gravatar-hovercards",compact:!0,activated:this.props.getOptionValue("gravatar-hovercards"),toggling:this.props.isSavingAnyOption("gravatar-hovercards"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},d.description+" ",M.default.createElement("a",{href:d.learn_more_button,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more")),M.default.createElement("span",{
|
36 |
className:"jp-form-toggle-privacy-info"},M.default.createElement("a",{href:d.learn_more_button+"#privacy",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information")))))),n&&M.default.createElement(y.FormFieldset,null,M.default.createElement(C.default,{checked:!!this.props.getOptionValue("wpcom_publish_comments_with_markdown","markdown"),disabled:this.props.isSavingAnyOption(["markdown","wpcom_publish_comments_with_markdown"])||"inactive"===this.props.getModuleOverride("markdown"),toggling:this.props.isSavingAnyOption(["markdown","wpcom_publish_comments_with_markdown"]),onChange:this.handleMarkdownCommentsToggle},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Enable Markdown use for comments.")+" ",M.default.createElement("a",{href:f.learn_more_button,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more")),M.default.createElement("span",{className:"jp-form-toggle-privacy-info"},M.default.createElement("a",{href:f.learn_more_button+"#privacy",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information")))))),r&&M.default.createElement(y.FormFieldset,null,M.default.createElement(A.ModuleToggle,{slug:"comment-likes",compact:!0,disabled:p,activated:h,toggling:this.props.isSavingAnyOption("comment-likes"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},"Enable comment likes. ",M.default.createElement("a",{href:"https://jetpack.com/support/comment-likes/",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more")),M.default.createElement("span",{className:"jp-form-toggle-privacy-info"},M.default.createElement("a",{href:"https://jetpack.com/support/comment-likes/#privacy",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information"))))))))}}]),t}(M.default.Component);t.Comments=(0,E.ModuleSettingsForm)(O)},function(e,t){},function(e,t,n){function r(e,t){return e&&a(e,i(t))}var a=n(229),i=n(492);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(833),y=r(v);n(1088);var A=function(e){function t(){(0,s.default)(this,t);var e=(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments));return e.state={showPopover:!1},e.togglePopover=function(){e.setState({showPopover:!e.state.showPopover})},e._onPopoverClose=function(){e.setState({showPopover:!1})},e.renderPopover=function(){return M.default.createElement(y.default,{isVisible:e.state.showPopover,context:e.refs&&e.refs.toggleSwitch,position:e.props.disabledPopoverPosition,onClose:e._onPopoverClose,className:"dops-info-popover__tooltip"},e.props.disabledReason)},e.onKeyDown=e.onKeyDown.bind(e),e.onClick=e.onClick.bind(e),e.onLabelClick=e.onLabelClick.bind(e),e}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.id=this.constructor.idNum++}},{key:"onKeyDown",value:function(e){this.props.disabled||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.props.onChange()),this.props.onKeyDown(e))}},{key:"onClick",value:function(){this.props.disabled?this.props.disabledReason&&this.togglePopover():this.props.onChange()}},{key:"onLabelClick",value:function(e){if(!this.props.disabled){var t=e.target.nodeName.toLowerCase();"a"!==t&&"input"!==t&&"select"!==t&&(e.preventDefault(),this.props.onChange())}}},{key:"render",value:function(){var e=this.props.id||"toggle-"+this.id,t=(0,g.default)("form-toggle",this.props.className,{"is-toggling":this.props.toggling});return M.default.createElement("span",null,M.default.createElement("input",{className:t,type:"checkbox",checked:this.props.checked,readOnly:!0,disabled:this.props.disabled}),M.default.createElement("label",{className:"form-toggle__label",htmlFor:e},M.default.createElement("span",{className:"form-toggle__switch",disabled:this.props.disabled,id:e,onClick:this.onClick,onKeyDown:this.onKeyDown,role:"checkbox","aria-checked":this.props.checked,"aria-label":this.props["aria-label"],tabIndex:this.props.disabled?-1:0,ref:"toggleSwitch"}),M.default.createElement("span",{className:"form-toggle__label-content",onClick:this.onLabelClick},this.props.children)),this.renderPopover())}}]),t}(_.Component);A.propTypes={onChange:m.default.func,onKeyDown:m.default.func,checked:m.default.bool,disabled:m.default.bool,id:m.default.string,className:m.default.string,toggling:m.default.bool,"aria-label":m.default.string,children:m.default.node,disabledReason:m.default.node},A.defaultProps={checked:!1,disabled:!1,onKeyDown:function(){},onChange:function(){},disabledPopoverPosition:"bottom",disabledReason:""},A.idNum=0,t.default=A,e.exports=t.default},function(e,t,n){e.exports={default:n(974),__esModule:!0}},function(e,t,n){n(199),n(110),n(138),n(975),n(979),n(981),n(982),e.exports=n(20).Set},function(e,t,n){"use strict";var r=n(870),a=n(834);e.exports=n(871)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(a(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){var r=n(72),a=n(221),i=n(100),o=n(160),s=n(977);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,l=4==e,d=6==e,f=5==e||d,p=t||s;return function(t,s,h){for(var m,_,M=i(t),b=a(M),g=r(s,h,3),v=o(b.length),y=0,A=n?p(t,v):c?p(t,0):void 0;v>y;y++)if((f||y in b)&&(m=b[y],_=g(m,y,M),e))if(n)A[y]=_;else if(_)switch(e){case 3:return!0;case 5:return m;case 6:return y;case 2:A.push(m)}else if(l)return!1;return d?-1:u||l?l:A}}},function(e,t,n){var r=n(978);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(50),a=n(487),i=n(34)("species");e.exports=function(e){var t;return a(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!a(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(33);r(r.P+r.R,"Set",{toJSON:n(872)("Set")})},function(e,t,n){var r=n(206);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){n(873)("Set")},function(e,t,n){n(874)("Set")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return p.set(e,t),function(){p.delete(e)}}function i(e){p.forEach(function(t,n){(0,f.default)(n,e.target)||t.call(n,e)})}function o(e){e||(e=document),l.default.bind(e,"click",i)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(984),c=r(s);t.default=a;var u=n(990),l=r(u),d=n(991),f=r(d),p=new c.default;a.globalClick=i,a.install=o,"undefined"!=typeof document&&o(document),e.exports=t.default},function(e,t,n){e.exports={default:n(985),__esModule:!0}},function(e,t,n){n(199),n(110),n(138),n(986),n(987),n(988),n(989),e.exports=n(20).Map},function(e,t,n){"use strict";var r=n(870),a=n(834);e.exports=n(871)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(a(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(a(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(33);r(r.P+r.R,"Map",{toJSON:n(872)("Map")})},function(e,t,n){n(873)("Map")},function(e,t,n){n(874)("Map")},function(e,t){var n=window.addEventListener?"addEventListener":"attachEvent",r=window.removeEventListener?"removeEventListener":"detachEvent",a="addEventListener"!==n?"on":"";t.bind=function(e,t,r,i){return e[n](a+t,r,i||!1),r},t.unbind=function(e,t,n,i){return e[r](a+t,n,i||!1),n}},function(e,t){function n(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}e.exports=n},function(e,t,n){function r(e){var t,n;for(t=[],n=0;n<e.length;n++)t.push(i[e[n]%64]);return t.join("")}function a(e){if("undefined"!=typeof window){if(void 0!==window.crypto)return r(window.crypto.getRandomValues(new Uint8Array(e)));for(var t=new Array(e),a=0;a<e;a++)t[a]=Math.floor(256*Math.random());return r(t)}var i=n(993);try{return r(i.randomBytes(e))}catch(t){return r(i.pseudoRandomBytes(e))}}var i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";e.exports=a},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(235),t.createHash=t.Hash=n(467),t.createHmac=t.Hmac=n(882);var r=n(1010),a=Object.keys(r),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(a);t.getHashes=function(){return i};var o=n(885);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var s=n(1012);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=n(1029);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=n(1034);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=n(1072);var l=n(1073);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var d=n(1076);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){e.copy(t,n)}var i=n(35).Buffer,o=n(996);e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)a(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var a=Function.prototype.apply;t.setTimeout=function(){return new r(a.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(a.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(998),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(45))},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[c]=r,s(c),c++}function a(e){delete u[e]}function i(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function o(e){if(l)setTimeout(o,0,e);else{var t=u[e];if(t){l=!0;try{i(t)}finally{a(e),l=!1}}}}if(!e.setImmediate){var s,c=1,u={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){o(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&o(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){o(e.data)},s=function(t){e.port2.postMessage(t)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var e=d.documentElement;s=function(t){var n=d.createElement("script");n.onreadystatechange=function(){o(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(o,0,e)}}(),f.setImmediate=r,f.clearImmediate=a}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(45),n(63))},function(e,t,n){(function(t){function n(e,t){function n(){if(!a){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),a=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var a=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(t,n(45))},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);a.call(this,e)}e.exports=r;var a=n(879),i=n(468);i.inherits=n(19),i.inherits(r,a),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(838)},function(e,t,n){e.exports=n(212)},function(e,t,n){e.exports=n(837).Transform},function(e,t,n){e.exports=n(837).PassThrough},function(e,t,n){function r(){this.init(),this._w=d,c.call(this,64,56)}function a(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}var s=n(19),c=n(236),u=n(35).Buffer,l=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);s(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,s=0|this._c,c=0|this._d,u=0|this._e,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<80;++d)t[d]=t[d-3]^t[d-8]^t[d-14]^t[d-16];for(var f=0;f<80;++f){var p=~~(f/20),h=a(n)+o(p,r,s,c)+u+t[f]+l[p]|0;u=c,c=s,s=i(r),r=n,n=h}this._a=n+this._a|0,this._b=r+this._b|0,this._c=s+this._c|0,this._d=c+this._d|0,this._e=u+this._e|0},r.prototype._hash=function(){var e=u.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=f,u.call(this,64,56)}function a(e){return e<<1|e>>>31}function i(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}var c=n(19),u=n(236),l=n(35).Buffer,d=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);c(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,c=0|this._c,u=0|this._d,l=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=a(t[f-3]^t[f-8]^t[f-14]^t[f-16]);for(var p=0;p<80;++p){var h=~~(p/20),m=i(n)+s(h,r,c,u)+l+t[p]+d[h]|0;l=u,u=c,c=o(r),r=n,n=m}this._a=n+this._a|0,this._b=r+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},r.prototype._hash=function(){var e=l.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=c,o.call(this,64,56)}var a=n(19),i=n(880),o=n(236),s=n(35).Buffer,c=new Array(64);a(r,i),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=c,o.call(this,128,112)}var a=n(19),i=n(881),o=n(236),s=n(35).Buffer,c=new Array(160);a(r,i),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}var t=s.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},e.exports=r},function(e,t,n){"use strict";function r(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>c?t=e(t):t.length<c&&(t=i.concat([t,s],c));for(var n=this._ipad=i.allocUnsafe(c),r=this._opad=i.allocUnsafe(c),a=0;a<c;a++)n[a]=54^t[a],r[a]=92^t[a];this._hash=[n]}var a=n(19),i=n(35).Buffer,o=n(162),s=i.alloc(128),c=64;a(r,o),r.prototype._update=function(e){this._hash.push(e)},r.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=r},function(e,t,n){e.exports=n(884)},function(e,t,n){(function(t,r){function a(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];s=s||d.alloc(8);var n=i(s,s,10,128,e).then(function(){return!0}).catch(function(){return!1});return h[e]=n,n}function i(e,t,n,r,a){return f.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return f.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:a}},e,r<<3)}).then(function(e){return d.from(e)})}function o(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}var s,c=n(886),u=n(887),l=n(888),d=n(35).Buffer,f=t.crypto&&t.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];e.exports=function(e,n,s,f,h,m){if(d.isBuffer(e)||(e=d.from(e,u)),d.isBuffer(n)||(n=d.from(n,u)),c(s,f),"function"==typeof h&&(m=h,h=void 0),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");h=h||"sha1";var _=p[h.toLowerCase()];if(!_||"function"!=typeof t.Promise)return r.nextTick(function(){var t;try{t=l(e,n,s,f,h)}catch(e){return m(e)}m(null,t)});o(a(_).then(function(t){return t?i(e,n,s,f,_):l(e,n,s,f,h)}),m)}}).call(t,n(45),n(63))},function(e,t,n){function r(e,t){e=e.toLowerCase();var n,r;if(l[e])n=l[e].key,r=l[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");n=8*d[e].key,r=d[e].iv}var a=f(t,!1,n,r);return i(e,a.key,a.iv)}function a(e,t){e=e.toLowerCase();var n,r;if(l[e])n=l[e].key,r=l[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");n=8*d[e].key,r=d[e].iv}var a=f(t,!1,n,r);return o(e,a.key,a.iv)}function i(e,t,n){if(e=e.toLowerCase(),l[e])return u.createCipheriv(e,t,n);if(d[e])return new c({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function o(e,t,n){if(e=e.toLowerCase(),l[e])return u.createDecipheriv(e,t,n);if(d[e])return new c({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function s(){return Object.keys(d).concat(u.getCiphers())}var c=n(1013),u=n(843),l=n(844),d=n(1028),f=n(511);t.createCipher=t.Cipher=r,t.createCipheriv=t.Cipheriv=i,t.createDecipher=t.Decipher=a,t.createDecipheriv=t.Decipheriv=o,t.listCiphers=t.getCiphers=s},function(e,t,n){(function(t){function r(e){a.call(this);var n,r=e.mode.toLowerCase(),i=s[r];n=e.decrypt?"decrypt":"encrypt";var o=e.key;"des-ede"!==r&&"des-ede-cbc"!==r||(o=t.concat([o,o.slice(0,8)]));var c=e.iv;this._des=i.create({key:o,iv:c,type:n})}var a=n(162),i=n(842),o=n(19),s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=r,o(r,a),r.prototype._update=function(e){return new t(this._des.update(e))},r.prototype._final=function(){return new t(this._des.final())}}).call(t,n(39).Buffer)},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var a=0,i=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)i<<=1,i|=t>>>s+o&1;for(var s=1;s<=25;s+=8)i<<=1,i|=e>>>s+o&1}n[r+0]=a>>>0,n[r+1]=i>>>0},t.rip=function(e,t,n,r){for(var a=0,i=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;n[r+0]=a>>>0,n[r+1]=i>>>0},t.pc1=function(e,t,n,r){for(var a=0,i=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;n[r+0]=a>>>0,n[r+1]=i>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,a){for(var i=0,o=0,s=r.length>>>1,c=0;c<s;c++)i<<=1,i|=e>>>r[c]&1;for(var c=s;c<r.length;c++)o<<=1,o|=t>>>r[c]&1;n[a+0]=i>>>0,n[a+1]=o>>>0},t.expand=function(e,t,n){var r=0,a=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(var i=11;i>=3;i-=4)a|=e>>>i&63,a<<=6;a|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=a>>>0};var a=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){var i=e>>>18-6*r&63,o=a[64*r+i];n<<=4,n|=o}for(var r=0;r<4;r++){var i=t>>>18-6*r&63,o=a[256+64*r+i];n<<=4,n|=o}return n>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<i.length;n++)t<<=1,t|=e>>>i[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var a=[],i=0;i<t;i+=n)a.push(r.slice(i,i+n));return a.join(" ")}},function(e,t,n){"use strict";function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var a=n(105);e.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(a,n)));for(var i=e.length-(e.length-t)%this.blockSize;t<i;t+=this.blockSize)this._update(e,t,a,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return a},r.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(a,n);return t+=this._buffer(e,t),a},r.prototype.final=function(e){var t;e&&(t=this.update(e));var n;return n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},r.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){a.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){"use strict";function r(){this.tmp=new Array(2),this.keys=null}function a(e){u.call(this,e);var t=new r;this._desState=t,this.deriveKeys(t,e.key)}var i=n(105),o=n(19),s=n(842),c=s.utils,u=s.Cipher;o(a,u),e.exports=a,a.create=function(e){return new a(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];a.prototype.deriveKeys=function(e,t){e.keys=new Array(32),i.equal(t.length,this.blockSize,"Invalid key length");var n=c.readUInt32BE(t,0),r=c.readUInt32BE(t,4);c.pc1(n,r,e.tmp,0),n=e.tmp[0],r=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var o=l[a>>>1];n=c.r28shl(n,o),r=c.r28shl(r,o),c.pc2(n,r,e.keys,a)}},a.prototype._update=function(e,t,n,r){var a=this._desState,i=c.readUInt32BE(e,t),o=c.readUInt32BE(e,t+4);c.ip(i,o,a.tmp,0),i=a.tmp[0],o=a.tmp[1],"encrypt"===this.type?this._encrypt(a,i,o,a.tmp,0):this._decrypt(a,i,o,a.tmp,0),i=a.tmp[0],o=a.tmp[1],c.writeUInt32BE(n,i,r),c.writeUInt32BE(n,o,r+4)},a.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},a.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)i.equal(e[n],t);return e.slice(0,e.length-t)},a.prototype._encrypt=function(e,t,n,r,a){for(var i=t,o=n,s=0;s<e.keys.length;s+=2){var u=e.keys[s],l=e.keys[s+1];c.expand(o,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var d=c.substitute(u,l),f=c.permute(d),p=o;o=(i^f)>>>0,i=p}c.rip(o,i,r,a)},a.prototype._decrypt=function(e,t,n,r,a){for(var i=n,o=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],l=e.keys[s+1];c.expand(i,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var d=c.substitute(u,l),f=c.permute(d),p=i;i=(o^f)>>>0,o=p}c.rip(i,o,r,a)}},function(e,t,n){"use strict";function r(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function a(e){function t(t){e.call(this,t),this._cbcInit()}o(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var a=n[r];t.prototype[a]=s[a]}return t.create=function(e){return new t(e)},t}var i=n(105),o=n(19),s={};t.instantiate=a,s._cbcInit=function(){var e=new r(this.options.iv);this._cbcState=e},s._update=function(e,t,n,r){var a=this._cbcState,i=this.constructor.super_.prototype,o=a.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];i._update.call(this,o,0,n,r);for(var s=0;s<this.blockSize;s++)o[s]=n[r+s]}else{i._update.call(this,e,t,n,r);for(var s=0;s<this.blockSize;s++)n[r+s]^=o[s];for(var s=0;s<this.blockSize;s++)o[s]=e[t+s]}}},function(e,t,n){"use strict";function r(e,t){i.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),r=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:r}),u.create({type:"encrypt",key:a})]:[u.create({type:"decrypt",key:a}),u.create({type:"encrypt",key:r}),u.create({type:"decrypt",key:n})]}function a(e){c.call(this,e);var t=new r(this.type,this.options.key);this._edeState=t}var i=n(105),o=n(19),s=n(842),c=s.Cipher,u=s.DES;o(a,c),e.exports=a,a.create=function(e){return new a(e)},a.prototype._update=function(e,t,n,r){var a=this._edeState;a.ciphers[0]._update(e,t,n,r),a.ciphers[1]._update(n,r,n,r),a.ciphers[2]._update(n,r,n,r)},a.prototype._pad=u.prototype._pad,a.prototype._unpad=u.prototype._unpad},function(e,t,n){function r(e,t,n){d.call(this),this._cache=new a,this._cipher=new f.AES(t),this._prev=u.from(n),this._mode=e,this._autopadding=!0}function a(){this.cache=u.allocUnsafe(0)}function i(e,t,n){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=u.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=u.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new l(a.module,t,n):"auth"===a.type?new c(a.module,t,n):new r(a.module,t,n)}function o(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=p(t,!1,n.key,n.iv);return i(e,r.key,r.iv)}var s=n(844),c=n(892),u=n(35).Buffer,l=n(893),d=n(162),f=n(510),p=n(511);n(19)(r,d),r.prototype._update=function(e){this._cache.add(e);for(var t,n,r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return u.concat(r)};var h=u.alloc(16,16);r.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},r.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},a.prototype.add=function(e){this.cache=u.concat([this.cache,e])},a.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},a.prototype.flush=function(){for(var e=16-this.cache.length,t=u.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return u.concat([this.cache,t])},t.createCipheriv=i,t.createCipher=o},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){
|
37 |
var r=n(469);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var a=e._cipher.decryptBlock(t);return r(a,n)}},function(e,t,n){function r(e,t,n){var r=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(r),e._prev=a.concat([e._prev,n?t:o]),o}var a=n(35).Buffer,i=n(469);t.encrypt=function(e,t,n){for(var i,o=a.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=a.allocUnsafe(0)),!(e._cache.length<=t.length)){o=a.concat([o,r(e,t,n)]);break}i=e._cache.length,o=a.concat([o,r(e,t.slice(0,i),n)]),t=t.slice(i)}return o}},function(e,t,n){function r(e,t,n){var r=e._cipher.encryptBlock(e._prev),i=r[0]^t;return e._prev=a.concat([e._prev.slice(1),a.from([n?t:i])]),i}var a=n(35).Buffer;t.encrypt=function(e,t,n){for(var i=t.length,o=a.allocUnsafe(i),s=-1;++s<i;)o[s]=r(e,t[s],n);return o}},function(e,t,n){function r(e,t,n){for(var r,i,o,s=-1,c=0;++s<8;)r=e._cipher.encryptBlock(e._prev),i=t&1<<7-s?128:0,o=r[0]^i,c+=(128&o)>>s%8,e._prev=a(e._prev,n?i:o);return c}function a(e,t){var n=e.length,r=-1,a=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++r<n;)a[r]=e[r]<<1|e[r+1]>>7;return a}var i=n(35).Buffer;t.encrypt=function(e,t,n){for(var a=t.length,o=i.allocUnsafe(a),s=-1;++s<a;)o[s]=r(e,t[s],n);return o}},function(e,t,n){(function(e){function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var a=n(469);t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,r(t)]);var i=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),a(n,i)}}).call(t,n(39).Buffer)},function(e,t,n){function r(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function a(e){var t=o.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function i(e){this.h=e,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}var o=n(35).Buffer,s=o.alloc(16,0);i.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},i.prototype._multiply=function(){for(var e,t,n,i=r(this.h),o=[0,0,0,0],s=-1;++s<128;){for(t=0!=(this.state[~~(s/8)]&1<<7-s%8),t&&(o[0]^=i[0],o[1]^=i[1],o[2]^=i[2],o[3]^=i[3]),n=0!=(1&i[3]),e=3;e>0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,n&&(i[0]=i[0]^225<<24)}this.state=a(o)},i.prototype.update=function(e){this.cache=o.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},i.prototype.final=function(e,t){return this.cache.length&&this.ghash(o.concat([this.cache,s],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=i},function(e,t,n){function r(e,t,n){f.call(this),this._cache=new a,this._last=void 0,this._cipher=new p.AES(t),this._prev=u.from(n),this._mode=e,this._autopadding=!0}function a(){this.cache=u.allocUnsafe(0)}function i(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function o(e,t,n){var a=l[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=u.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=u.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new d(a.module,t,n,!0):"auth"===a.type?new c(a.module,t,n,!0):new r(a.module,t,n)}function s(e,t){var n=l[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=h(t,!1,n.key,n.iv);return o(e,r.key,r.iv)}var c=n(892),u=n(35).Buffer,l=n(844),d=n(893),f=n(162),p=n(510),h=n(511);n(19)(r,f),r.prototype._update=function(e){this._cache.add(e);for(var t,n,r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return u.concat(r)},r.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return i(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},r.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},a.prototype.add=function(e){this.cache=u.concat([this.cache,e])},a.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},a.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=s,t.createDecipheriv=o},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){function r(t){var n=new e(o[t].prime,"hex"),r=new e(o[t].gen,"hex");return new s(n,r)}function a(t,n,r,o){return e.isBuffer(n)||void 0===c[n]?a(t,"binary",n,r):(n=n||"binary",o=o||"binary",r=r||new e([2]),e.isBuffer(r)||(r=new e(r,o)),"number"==typeof t?new s(i(t,r),r,!0):(e.isBuffer(t)||(t=new e(t,n)),new s(t,r,!0)))}var i=n(894),o=n(1032),s=n(1033),c={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=r,t.createDiffieHellman=t.DiffieHellman=a}).call(t,n(39).Buffer)},function(e,t){},function(e,t){},function(e,t){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(e,t,n){(function(t){function r(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new c(e),this}function a(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new c(e),this}function i(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in b)return b[r];var a=0;if(e.isEven()||!_.simpleSieve||!_.fermatTest(e)||!l.test(e))return a+=1,a+="02"===n||"05"===n?8:4,b[r]=a,a;l.test(e.shrn(1))||(a+=2);var i;switch(n){case"02":e.mod(d).cmp(f)&&(a+=8);break;case"05":i=e.mod(p),i.cmp(h)&&i.cmp(m)&&(a+=8);break;default:a+=4}return b[r]=a,a}function o(e,t,n){this.setGenerator(t),this.__prime=new c(e),this._prime=c.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=r,this.setPrivateKey=a):this._primeCode=8}function s(e,n){var r=new t(e.toArray());return n?r.toString(n):r}var c=n(57),u=n(895),l=new u,d=new c(24),f=new c(11),p=new c(10),h=new c(3),m=new c(7),_=n(894),M=n(235);e.exports=o;var b={};Object.defineProperty(o.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=i(this.__prime,this.__gen)),this._primeCode}}),o.prototype.generateKeys=function(){return this._priv||(this._priv=new c(M(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},o.prototype.computeSecret=function(e){e=new c(e),e=e.toRed(this._prime);var n=e.redPow(this._priv).fromRed(),r=new t(n.toArray()),a=this.getPrime();if(r.length<a.length){var i=new t(a.length-r.length);i.fill(0),r=t.concat([i,r])}return r},o.prototype.getPublicKey=function(e){return s(this._pub,e)},o.prototype.getPrivateKey=function(e){return s(this._priv,e)},o.prototype.getPrime=function(e){return s(this.__prime,e)},o.prototype.getGenerator=function(e){return s(this._gen,e)},o.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new c(e),this}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e){c.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function a(e){c.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){return new r(e)}function o(e){return new a(e)}var s=n(467),c=n(836),u=n(19),l=n(1035),d=n(1071),f=n(884);Object.keys(f).forEach(function(e){f[e].id=new t(f[e].id,"hex"),f[e.toLowerCase()]=f[e]}),u(r,c.Writable),r.prototype._write=function(e,t,n){this._hash.update(e),n()},r.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},r.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=l(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},u(a,c.Writable),a.prototype._write=function(e,t,n){this._hash.update(e),n()},a.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},a.prototype.verify=function(e,n,r){"string"==typeof n&&(n=new t(n,r)),this.end();var a=this._hash.digest();return d(n,a,e,this._signType,this._tag)},e.exports={Sign:i,Verify:o,createSign:i,createVerify:o}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e,n,r,o,s){var c=_(n);if(c.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return a(e,c)}if("dsa"===c.type){if("dsa"!==o)throw new Error("wrong private key type");return i(e,c,r)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");e=t.concat([s,e]);for(var u=c.modulus.byteLength(),l=[0,1];e.length+l.length+1<u;)l.push(255);l.push(0);for(var d=-1;++d<e.length;)l.push(e[d]);return p(l,c)}function a(e,n){var r=M[n.curve.join(".")];if(!r)throw new Error("unknown curve "+n.curve.join("."));var a=new h(r),i=a.keyFromPrivate(n.privateKey),o=i.sign(e);return new t(o.toDER())}function i(e,t,n){for(var r,a=t.params.priv_key,i=t.params.p,u=t.params.q,f=t.params.g,p=new m(0),h=c(e,u).mod(u),_=!1,M=s(a,u,e,n);!1===_;)r=l(u,M,n),p=d(f,r,i,u),_=r.invm(u).imul(h.add(a.mul(p))).mod(u),0===_.cmpn(0)&&(_=!1,p=new m(0));return o(p,_)}function o(e,n){e=e.toArray(),n=n.toArray(),128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n));var r=e.length+n.length+4,a=[48,r,2,e.length];return a=a.concat(e,[2,n.length],n),new t(a)}function s(e,n,r,a){if(e=new t(e.toArray()),e.length<n.byteLength()){var i=new t(n.byteLength()-e.length);i.fill(0),e=t.concat([i,e])}var o=r.length,s=u(r,n),c=new t(o);c.fill(1);var l=new t(o);return l.fill(0),l=f(a,l).update(c).update(new t([0])).update(e).update(s).digest(),c=f(a,l).update(c).digest(),l=f(a,l).update(c).update(new t([1])).update(e).update(s).digest(),c=f(a,l).update(c).digest(),{k:l,v:c}}function c(e,t){var n=new m(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function u(e,n){e=c(e,n),e=e.mod(n);var r=new t(e.toArray());if(r.length<n.byteLength()){var a=new t(n.byteLength()-r.length);a.fill(0),r=t.concat([a,r])}return r}function l(e,n,r){var a,i;do{for(a=new t(0);8*a.length<e.bitLength();)n.v=f(r,n.k).update(n.v).digest(),a=t.concat([a,n.v]);i=c(a,e),n.k=f(r,n.k).update(n.v).update(new t([0])).digest(),n.v=f(r,n.k).update(n.v).digest()}while(-1!==i.cmp(e));return i}function d(e,t,n,r){return e.toRed(m.mont(n)).redPow(t).fromRed().mod(r)}var f=n(882),p=n(845),h=n(84).ec,m=n(57),_=n(513),M=n(905);e.exports=r,e.exports.getKey=s,e.exports.makeKey=l}).call(t,n(39).Buffer)},function(e,t){e.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(e,t,n){"use strict";function r(e,t){for(var n=[],r=1<<t+1,a=e.clone();a.cmpn(1)>=0;){var i;if(a.isOdd()){var o=a.andln(r-1);i=o>(r>>1)-1?(r>>1)-o:o,a.isubn(i)}else i=0;n.push(i);for(var s=0!==a.cmpn(0)&&0===a.andln(r-1)?t+1:1,c=1;c<s;c++)n.push(0);a.iushrn(s)}return n}function a(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,a=0;e.cmpn(-r)>0||t.cmpn(-a)>0;){var i=e.andln(3)+r&3,o=t.andln(3)+a&3;3===i&&(i=-1),3===o&&(o=-1);var s;if(0==(1&i))s=0;else{var c=e.andln(7)+r&7;s=3!==c&&5!==c||2!==o?i:-i}n[0].push(s);var u;if(0==(1&o))u=0;else{var c=t.andln(7)+a&7;u=3!==c&&5!==c||2!==i?o:-o}n[1].push(u),2*r===s+1&&(r=1-r),2*a===u+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return n}function i(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}}function o(e){return"string"==typeof e?c.toArray(e,"hex"):e}function s(e){return new u(e,"hex","le")}var c=t,u=n(57),l=n(105),d=n(897);c.assert=l,c.toArray=d.toArray,c.zero2=d.zero2,c.toHex=d.toHex,c.encode=d.encode,c.getNAF=r,c.getJSF=a,c.cachedProperty=i,c.parseBytes=o,c.intFromLE=s},function(e,t,n){"use strict";function r(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}var i=n(57),o=n(84),s=o.utils,c=s.getNAF,u=s.getJSF,l=s.assert;e.exports=r,r.prototype.point=function(){throw new Error("Not implemented")},r.prototype.validate=function(){throw new Error("Not implemented")},r.prototype._fixedNafMul=function(e,t){l(e.precomputed);var n=e._getDoubles(),r=c(t,1),a=(1<<n.step+1)-(n.step%2==0?2:1);a/=3;for(var i=[],o=0;o<r.length;o+=n.step){for(var s=0,t=o+n.step-1;t>=o;t--)s=(s<<1)+r[t];i.push(s)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=a;f>0;f--){for(var o=0;o<i.length;o++){var s=i[o];s===f?d=d.mixedAdd(n.points[o]):s===-f&&(d=d.mixedAdd(n.points[o].neg()))}u=u.add(d)}return u.toP()},r.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var a=r.points,i=c(t,n),o=this.jpoint(null,null,null),s=i.length-1;s>=0;s--){for(var t=0;s>=0&&0===i[s];s--)t++;if(s>=0&&t++,o=o.dblp(t),s<0)break;var u=i[s];l(0!==u),o="affine"===e.type?u>0?o.mixedAdd(a[u-1>>1]):o.mixedAdd(a[-u-1>>1].neg()):u>0?o.add(a[u-1>>1]):o.add(a[-u-1>>1].neg())}return"affine"===e.type?o.toP():o},r.prototype._wnafMulAdd=function(e,t,n,r,a){for(var i=this._wnafT1,o=this._wnafT2,s=this._wnafT3,l=0,d=0;d<r;d++){var f=t[d],p=f._getNAFPoints(e);i[d]=p.wnd,o[d]=p.points}for(var d=r-1;d>=1;d-=2){var h=d-1,m=d;if(1===i[h]&&1===i[m]){var _=[t[h],null,null,t[m]];0===t[h].y.cmp(t[m].y)?(_[1]=t[h].add(t[m]),_[2]=t[h].toJ().mixedAdd(t[m].neg())):0===t[h].y.cmp(t[m].y.redNeg())?(_[1]=t[h].toJ().mixedAdd(t[m]),_[2]=t[h].add(t[m].neg())):(_[1]=t[h].toJ().mixedAdd(t[m]),_[2]=t[h].toJ().mixedAdd(t[m].neg()));var M=[-3,-1,-5,-7,0,7,5,1,3],b=u(n[h],n[m]);l=Math.max(b[0].length,l),s[h]=new Array(l),s[m]=new Array(l);for(var g=0;g<l;g++){var v=0|b[0][g],y=0|b[1][g];s[h][g]=M[3*(v+1)+(y+1)],s[m][g]=0,o[h]=_}}else s[h]=c(n[h],i[h]),s[m]=c(n[m],i[m]),l=Math.max(s[h].length,l),l=Math.max(s[m].length,l)}for(var A=this.jpoint(null,null,null),E=this._wnafT4,d=l;d>=0;d--){for(var w=0;d>=0;){for(var k=!0,g=0;g<r;g++)E[g]=0|s[g][d],0!==E[g]&&(k=!1);if(!k)break;w++,d--}if(d>=0&&w++,A=A.dblp(w),d<0)break;for(var g=0;g<r;g++){var f,T=E[g];0!==T&&(T>0?f=o[g][T-1>>1]:T<0&&(f=o[g][-T-1>>1].neg()),A="affine"===f.type?A.mixedAdd(f):A.add(f))}}for(var d=0;d<r;d++)o[d]=null;return a?A:A.toP()},r.BasePoint=a,a.prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},r.prototype.decodePoint=function(e,t){e=s.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n){6===e[0]?l(e[e.length-1]%2==0):7===e[0]&&l(e[e.length-1]%2==1);return this.point(e.slice(1,1+n),e.slice(1+n,1+2*n))}if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},a.prototype.encode=function(e,t){return s.encode(this._encode(t),e)},a.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},a.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a<t;a+=e){for(var i=0;i<e;i++)r=r.dbl();n.push(r)}return{step:e,points:n}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),a=1;a<n;a++)t[a]=t[a-1].add(r);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){"use strict";function r(e){l.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function a(e,t,n,r){l.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function i(e,t,n,r){l.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(n,16),this.z=new c(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=n(512),s=n(84),c=n(57),u=n(19),l=o.base,d=s.utils.assert;u(r,l),e.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=r[0].cmp(r[1])<0?r[0]:r[1],t=t.toRed(this.red)}if(e.lambda)n=new c(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?n=a[0]:(n=a[1],d(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}var i;return i=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(n),{beta:t,lambda:n,basis:i}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),n=new c(2).toRed(t).redInvm(),r=n.redNeg(),a=new c(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},r.prototype._getEndoBasis=function(e){for(var t,n,r,a,i,o,s,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,p=this.n.clone(),h=new c(1),m=new c(0),_=new c(0),M=new c(1),b=0;0!==f.cmpn(0);){var g=p.div(f);u=p.sub(g.mul(f)),l=_.sub(g.mul(h));var v=M.sub(g.mul(m));if(!r&&u.cmp(d)<0)t=s.neg(),n=h,r=u.neg(),a=l;else if(r&&2==++b)break;s=u,p=f,f=u,_=h,h=l,M=m,m=v}i=u.neg(),o=l;var y=r.sqr().add(a.sqr());return i.sqr().add(o.sqr()).cmp(y)>=0&&(i=t,o=n),r.negative&&(r=r.neg(),a=a.neg()),i.negative&&(i=i.neg(),o=o.neg()),[{a:r,b:a},{a:i,b:o}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),s=i.mul(r.a),c=a.mul(n.b),u=i.mul(r.b);return{k1:e.sub(o).sub(s),k2:c.add(u).neg()}},r.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(a).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,i=0;i<e.length;i++){var o=this._endoSplit(t[i]),s=e[i],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*i]=s,r[2*i+1]=c,a[2*i]=o.k1,a[2*i+1]=o.k2}for(var u=this._wnafMulAdd(1,r,a,2*i,n),l=0;l<2*i;l++)r[l]=null,a[l]=null;return u},u(a,l.BasePoint),r.prototype.point=function(e,t,n){return new a(this,e,t,n)},r.prototype.pointFromJSON=function(e,t){return a.fromJSON(this,e,t)},a.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},a.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},a.fromJSON=function(e,t,n){function r(t){return e.point(t[0],t[1],n)}"string"==typeof t&&(t=JSON.parse(t));var a=e.point(t[0],t[1],n);if(!t[2])return a;var i=t[2];return a.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[a].concat(i.doubles.points.map(r))},naf:i.naf&&{wnd:i.naf.wnd,points:[a].concat(i.naf.points.map(r))}},a},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),i=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)},a.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},a.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(i,l.BasePoint),r.prototype.jpoint=function(e,t,n){return new i(this,e,t,n)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null)
|
@@ -39,8 +39,8 @@ var r=n(469);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher
|
|
39 |
points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);"string"==typeof e&&(c(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var a=n(57),i=n(1051),o=n(84),s=o.utils,c=s.assert,u=n(1052),l=n(1053);e.exports=r,r.prototype.keyPair=function(e){return new u(this,e)},r.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new a(2));;){var s=new a(t.generate(n));if(!(s.cmp(r)>0))return s.iaddn(1),this.keyFromPrivate(s)}},r.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},r.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new a(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new i({hash:this.hash,entropy:s,nonce:c,pers:r.pers,persEnc:r.persEnc||"utf8"}),d=this.n.sub(new a(1)),f=0;!0;f++){var p=r.k?r.k(f):new a(u.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(d)>=0)){var h=this.g.mul(p);if(!h.isInfinity()){var m=h.getX(),_=m.umod(this.n);if(0!==_.cmpn(0)){var M=p.invm(this.n).mul(_.mul(t.getPrivate()).iadd(e));if(M=M.umod(this.n),0!==M.cmpn(0)){var b=(h.getY().isOdd()?1:0)|(0!==m.cmp(_)?2:0);return r.canonical&&M.cmp(this.nh)>0&&(M=this.n.sub(M),b^=1),new l({r:_,s:M,recoveryParam:b})}}}}}},r.prototype.verify=function(e,t,n,r){e=this._truncateToN(new a(e,16)),n=this.keyFromPublic(n,r),t=new l(t,"hex");var i=t.r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(i).umod(this.n);if(!this.curve._maxwellTrick){var d=this.g.mulAdd(c,n.getPublic(),u);return!d.isInfinity()&&0===d.getX().umod(this.n).cmp(i)}var d=this.g.jmulAdd(c,n.getPublic(),u);return!d.isInfinity()&&d.eqXToP(i)},r.prototype.recoverPubKey=function(e,t,n,r){c((3&n)===n,"The recovery param is more than two bits"),t=new l(t,r);var i=this.n,o=new a(e),s=t.r,u=t.s,d=1&n,f=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var p=t.r.invm(i),h=i.sub(o).mul(p).umod(i),m=u.mul(p).umod(i);return this.g.mulAdd(h,s,m)},r.prototype.getKeyRecoveryParam=function(e,t,n,r){if(t=new l(t,r),null!==t.recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(n))return a}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),a=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,a)}var a=n(846),i=n(897),o=n(105);e.exports=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new a.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},r.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,e);return this._update(n),this._reseed++,i.encode(o,t)}},function(e,t,n){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var a=n(57),i=n(84),o=i.utils,s=o.assert;e.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new a(e,t||16),
|
40 |
this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";function r(e,t){if(e instanceof r)return e;this._importDER(e,t)||(d(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function i(e,t){var n=e[t.place++];if(!(128&n))return n;for(var r=15&n,a=0,i=0,o=t.place;i<r;i++,o++)a<<=8,a|=e[o];return t.place=o,a}function o(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function s(e,t){if(t<128)return void e.push(t);var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}var c=n(57),u=n(84),l=u.utils,d=l.assert;e.exports=r,r.prototype._importDER=function(e,t){e=l.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;if(i(e,n)+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var r=i(e,n),o=e.slice(n.place,r+n.place);if(n.place+=r,2!==e[n.place++])return!1;var s=i(e,n);if(e.length!==s+n.place)return!1;var u=e.slice(n.place,s+n.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new c(o),this.s=new c(u),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=o(t),n=o(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];s(r,t.length),r=r.concat(t),r.push(2),s(r,n.length);var a=r.concat(n),i=[48];return s(i,a.length),i=i.concat(a),l.encode(i,e)}},function(e,t,n){"use strict";function r(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof r))return new r(e);var e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=a.sha512}var a=n(846),i=n(84),o=i.utils,s=o.assert,c=o.parseBytes,u=n(1055),l=n(1056);e.exports=r,r.prototype.sign=function(e,t){e=c(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),a=this.g.mul(r),i=this.encodePoint(a),o=this.hashInt(i,n.pubBytes(),e).mul(n.priv()),s=r.add(o).umod(this.curve.n);return this.makeSignature({R:a,S:s,Rencoded:i})},r.prototype.verify=function(e,t,n){e=c(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),a=this.hashInt(t.Rencoded(),r.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(r.pub().mul(a)).eq(i)},r.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},r.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},r.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},r.prototype.makeSignature=function(e){return e instanceof l?e:new l(this,e)},r.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},r.prototype.decodePoint=function(e){e=o.parseBytes(e);var t=e.length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),a=o.intFromLE(n);return this.curve.pointFromY(a,r)},r.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},r.prototype.decodeInt=function(e){return o.intFromLE(e)},r.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";function r(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}var a=n(84),i=a.utils,o=i.assert,s=i.parseBytes,c=i.cachedProperty;r.fromPublic=function(e,t){return t instanceof r?t:new r(e,{pub:t})},r.fromSecret=function(e,t){return t instanceof r?t:new r(e,{secret:t})},r.prototype.secret=function(){return this._secret},c(r,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),c(r,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),c(r,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),c(r,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),c(r,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),c(r,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),r.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},r.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},r.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},r.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},e.exports=r},function(e,t,n){"use strict";function r(e,t){this.eddsa=e,"object"!=typeof t&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof a&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var a=n(57),i=n(84),o=i.utils,s=o.assert,c=o.cachedProperty,u=o.parseBytes;c(r,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),c(r,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),c(r,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),c(r,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),r.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},r.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=r},function(e,t,n){"use strict";var r=n(471);t.certificate=n(1068);var a=r.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});t.RSAPrivateKey=a;var i=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.RSAPublicKey=i;var o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});t.PublicKey=o;var s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});t.PrivateKey=c;var u=r.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});t.EncryptedPrivateKey=u;var l=r.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});t.DSAPrivateKey=l,t.DSAparam=r.define("DSAparam",function(){this.int()});var d=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});t.ECPrivateKey=d;var f=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(e,t,n){function r(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var a=n(471),i=n(19);t.define=function(e,t){return new r(e,t)},r.prototype._createNamed=function(e){var t;try{t=n(1059).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(a.decoders[e])),this.decoders[e]},r.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(a.encoders[e])),this.encoders[e]},r.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(module,exports,__webpack_require__){function Context(){}var indexOf=__webpack_require__(1060),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,a=n.execScript;!r&&a&&(a.call(n,"null"),r=n.eval),forEach(Object_keys(e),function(t){n[t]=e[t]}),forEach(globals,function(t){e[t]&&(n[t]=e[t])});var i=Object_keys(n),o=r.call(n,this.code);return forEach(Object_keys(n),function(t){(t in e||-1===indexOf(i,t))&&(e[t]=n[t])}),forEach(globals,function(t){t in e||defineProp(e,t,n[t])}),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return forEach(Object_keys(t),function(n){e[n]=t[n]}),n},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(n){t[n]=e[n]}),t}},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){function r(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}var i=n(19);t.Reporter=r,r.prototype.isError=function(e){return e instanceof a},r.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},r.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},r.prototype.enterKey=function(e){return this._reporterState.path.push(e)},r.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},r.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},r.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},r.prototype.error=function(e){var t,n=this._reporterState,r=e instanceof a;if(t=r?e:new a(n.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},r.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){function r(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}var a=n(472).Reporter,i=n(472).EncoderBuffer,o=n(472).DecoderBuffer,s=n(105),c=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(c),l=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];e.exports=r;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];r.prototype.clone=function(){var e=this._baseState,t={};d.forEach(function(n){t[n]=e[n]});var n=new this.constructor(t.parent);return n._baseState=t,n},r.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}},this)},r.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},r.prototype._useArgs=function(e){var t=this._baseState,n=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==n.length&&(s(null===t.children),t.children=n,n.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n}),t}))},l.forEach(function(e){r.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),c.forEach(function(e){r.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}}),r.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},r.prototype.optional=function(){return this._baseState.optional=!0,this},r.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},r.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},r.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},r.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},r.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},r.prototype.any=function(){return this._baseState.any=!0,this},r.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},r.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},r.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r=n.default,a=!0,i=null;if(null!==n.key&&(i=e.enterKey(n.key)),n.optional){var s=null;if(null!==n.explicit?s=n.explicit:null!==n.implicit?s=n.implicit:null!==n.tag&&(s=n.tag),null!==s||n.any){if(a=this._peekTag(e,s,n.any),e.isError(a))return a}else{var c=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}var u;if(n.obj&&a&&(u=e.enterObject()),a){if(null!==n.explicit){var l=this._decodeTag(e,n.explicit);if(e.isError(l))return l;e=l}var d=e.offset;if(null===n.use&&null===n.choice){if(n.any)var c=e.save();var f=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(f))return f;n.any?r=e.raw(c):e=f}if(t&&t.track&&null!==n.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),r=n.any?r:null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),e.isError(r))return r;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(n){n._decode(e,t)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var p=new o(r);r=this._getUse(n.contains,e._reporterState.obj)._decode(p,t)}}return n.obj&&a&&(r=e.leaveObject(u)),null===n.key||null===r&&!0!==a?null!==i&&e.exitKey(i):e.leaveKey(i,n.key,r),r},r.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},r.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},r.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,a=!1;return Object.keys(n.choice).some(function(i){var o=e.save(),s=n.choice[i];try{var c=s._decode(e,t);if(e.isError(c))return!1;r={type:i,value:c},a=!0}catch(t){return e.restore(o),!1}return!0},this),a?r:e.error("Choice not matched")},r.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},r.prototype._encode=function(e,t,n){var r=this._baseState;if(null===r.default||r.default!==e){var a=this._encodeValue(e,t,n);if(void 0!==a&&!this._skipDefault(a,t,n))return a}},r.prototype._encodeValue=function(e,t,n){var r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new a);var i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}var o=null,s=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,n)._encode(e,t),s=!0;else if(r.children)o=r.children.map(function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var a=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),a},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)},c))}else null!==r.use?i=this._getUse(r.use,n)._encode(e,t):(o=this._encodePrimitive(r.tag,e),s=!0);var i;if(!r.any&&null===r.choice){var u=null!==r.implicit?r.implicit:r.tag,l=null===r.implicit?"universal":"context";null===u?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(u,s,l,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},r.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},r.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},r.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},r.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},function(e,t,n){var r=n(902);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r._reverse(t.tag)},function(e,t,n){var r=t;r.der=n(903),r.pem=n(1065)},function(e,t,n){function r(e){o.call(this,e),this.enc="pem"}var a=n(19),i=n(39).Buffer,o=n(903);a(r,o),e.exports=r,r.prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u<n.length;u++){var l=n[u].match(a);if(null!==l&&l[2]===r){if(-1!==s){if("END"!==l[1])break;c=u;break}if("BEGIN"!==l[1])break;s=u}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+r);var d=n.slice(s+1,c).join("");d.replace(/[^a-z0-9\+\/=]+/gi,"");var f=new i(d,"base64");return o.prototype.decode.call(this,f,t)}},function(e,t,n){var r=t;r.der=n(904),r.pem=n(1067)},function(e,t,n){function r(e){i.call(this,e),this.enc="pem"}var a=n(19),i=n(904);a(r,i),e.exports=r,r.prototype.encode=function(e,t){for(var n=i.prototype.encode.call(this,e),r=n.toString("base64"),a=["-----BEGIN "+t.label+"-----"],o=0;o<r.length;o+=64)a.push(r.slice(o,o+64));return a.push("-----END "+t.label+"-----"),a.join("\n")}},function(e,t,n){"use strict";var r=n(471),a=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),i=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),c=r.define("RelativeDistinguishedName",function(){this.setof(i)}),u=r.define("RDNSequence",function(){this.seqof(c)}),l=r.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),d=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(a),this.key("notAfter").use(a))}),f=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),p=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(l),this.key("validity").use(d),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())}),h=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});e.exports=h},function(e,t){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},function(e,t,n){(function(t){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,a=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=n(511),s=n(843);e.exports=function(e,n){var c,u=e.toString(),l=u.match(r);if(l){var d="aes"+l[1],f=new t(l[2],"hex"),p=new t(l[3].replace(/[\r\n]/g,""),"base64"),h=o(n,f.slice(0,8),parseInt(l[1],10)).key,m=[],_=s.createDecipheriv(d,h,f);m.push(_.update(p)),m.push(_.final()),c=t.concat(m)}else{var M=u.match(i);c=new t(M[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(a)[1],data:c}}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e,n,r,o,c){var l=u(r);if("ec"===l.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return a(e,n,l)}if("dsa"===l.type){if("dsa"!==o)throw new Error("wrong public key type");return i(e,n,l)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");n=t.concat([c,n]);for(var d=l.modulus.byteLength(),f=[1],p=0;n.length+f.length+2<d;)f.push(255),p++;f.push(0);for(var h=-1;++h<n.length;)f.push(n[h]);f=new t(f);var m=s.mont(l.modulus);e=new s(e).toRed(m),e=e.redPow(new s(l.publicExponent)),e=new t(e.fromRed().toArray());var _=p<8?1:0;for(d=Math.min(e.length,f.length),e.length!==f.length&&(_=1),h=-1;++h<d;)_|=e[h]^f[h];return 0===_}function a(e,t,n){var r=l[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var a=new c(r),i=n.data.subjectPrivateKey.data;return a.verify(t,e,i)}function i(e,t,n){var r=n.data.p,a=n.data.q,i=n.data.g,c=n.data.pub_key,l=u.signature.decode(e,"der"),d=l.s,f=l.r;o(d,a),o(f,a);var p=s.mont(r),h=d.invm(a);return 0===i.toRed(p).redPow(new s(t).mul(h).mod(a)).fromRed().mul(c.toRed(p).redPow(f.mul(h).mod(a)).fromRed()).mod(r).mod(a).cmp(f)}function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var s=n(57),c=n(84).ec,u=n(513),l=n(905);e.exports=r}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function a(e,n,r){Array.isArray(e)||(e=e.toArray());var a=new t(e);if(r&&a.length<r){var i=new t(r-a.length);i.fill(0),a=t.concat([i,a])}return n?a.toString(n):a}var i=n(84),o=n(57);e.exports=function(e){return new r(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,r.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},r.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},r.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),a(n,e)},r.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},r.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},r.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new o(e);return r=r.toString(16),this.keys._importPrivate(r),this}}).call(t,n(39).Buffer)},function(e,t,n){t.publicEncrypt=n(1074),t.privateDecrypt=n(1075),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){(function(t){function r(e,n){var r=e.modulus.byteLength(),a=n.length,i=c("sha1").update(new t("")).digest(),o=i.length,f=2*o;if(a>r-f-2)throw new Error("message too long");var p=new t(r-a-f-2);p.fill(0);var h=r-o-1,m=s(o),_=l(t.concat([i,p,new t([1]),n],h),u(m,h)),M=l(m,u(_,o));return new d(t.concat([new t([0]),M,_],r))}function a(e,n,r){var a=n.length,o=e.modulus.byteLength();if(a>o-11)throw new Error("message too long");var s;return r?(s=new t(o-a-3),s.fill(255)):s=i(o-a-3),new d(t.concat([new t([0,r?1:2]),s,new t([0]),n],o))}function i(e,n){for(var r,a=new t(e),i=0,o=s(2*e),c=0;i<e;)c===o.length&&(o=s(2*e),c=0),(r=o[c++])&&(a[i++]=r);return a}var o=n(513),s=n(235),c=n(467),u=n(906),l=n(907),d=n(57),f=n(908),p=n(845);e.exports=function(e,t,n){var i;i=e.padding?e.padding:n?1:4;var s,c=o(e);if(4===i)s=r(c,t);else if(1===i)s=a(c,t,n);else{if(3!==i)throw new Error("unknown padding");if(s=new d(t),s.cmp(c.modulus)>=0)throw new Error("data too long for modulus")}return n?p(s,c):f(s,c)}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e,n){var r=(e.modulus,e.modulus.byteLength()),a=(n.length,d("sha1").update(new t("")).digest()),o=a.length;if(0!==n[0])throw new Error("decryption error");var u=n.slice(1,o+1),l=n.slice(o+1),f=c(u,s(l,o)),p=c(l,s(f,r-o-1));if(i(a,p.slice(0,o)))throw new Error("decryption error");for(var h=o;0===p[h];)h++;if(1!==p[h++])throw new Error("decryption error");return p.slice(h)}function a(e,t,n){for(var r=t.slice(0,2),a=2,i=0;0!==t[a++];)if(a>=t.length){i++;break}var o=t.slice(2,a-1);t.slice(a-1,a);if(("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&i++,o.length<8&&i++,i)throw new Error("decryption error");return t.slice(a)}function i(e,n){e=new t(e),n=new t(n);var r=0,a=e.length;e.length!==n.length&&(r++,a=Math.min(e.length,n.length));for(var i=-1;++i<a;)r+=e[i]^n[i];return r}var o=n(513),s=n(906),c=n(907),u=n(57),l=n(845),d=n(467),f=n(908);e.exports=function(e,n,i){var s;s=e.padding?e.padding:i?1:4;var c=o(e),d=c.modulus.byteLength();if(n.length>d||new u(n).cmp(c.modulus)>=0)throw new Error("decryption error");var p;p=i?f(new u(n),c):l(n,c);var h=new t(d-p.length);if(h.fill(0),p=t.concat([h,p],d),4===s)return r(c,p);if(1===s)return a(c,p,i);if(3===s)return p;throw new Error("unknown padding")}}).call(t,n(39).Buffer)},function(e,t,n){"use strict";(function(e,r){function a(){
|
41 |
throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function i(e,t){if("number"!=typeof e||e!==e)throw new TypeError("offset must be a number");if(e>m||e<0)throw new TypeError("offset must be a uint32");if(e>p||e>t)throw new RangeError("offset out of range")}function o(e,t,n){if("number"!=typeof e||e!==e)throw new TypeError("size must be a number");if(e>m||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>p)throw new RangeError("buffer too small")}function s(t,n,r,a){if(!(f.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)a=n,n=0,r=t.length;else if("function"==typeof r)a=r,r=t.length-n;else if("function"!=typeof a)throw new TypeError('"cb" argument must be a function');return i(n,t.length),o(r,n,t.length),c(t,n,r,a)}function c(e,t,n,a){if(r.browser){var i=e.buffer,o=new Uint8Array(i,t,n);return h.getRandomValues(o),a?void r.nextTick(function(){a(null,e)}):e}return a?void d(n,function(n,r){if(n)return a(n);r.copy(e,t),a(null,e)}):(d(n).copy(e,t),e)}function u(t,n,r){if(void 0===n&&(n=0),!(f.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return i(n,t.length),void 0===r&&(r=t.length-n),o(r,n,t.length),c(t,n,r)}var l=n(35),d=n(235),f=l.Buffer,p=l.kMaxLength,h=e.crypto||e.msCrypto,m=Math.pow(2,32)-1;h&&h.getRandomValues||!r.browser?(t.randomFill=s,t.randomFillSync=u):(t.randomFill=a,t.randomFillSync=a)}).call(t,n(45),n(63))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(113),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(149),M=r(_),b=n(7),g=r(b),v=n(1),y=r(v),A=n(10),E=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var o=arguments.length,c=Array(o),l=0;l<o;l++)c[l]=arguments[l];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(c))),r.renderChildren=function(){var e=void 0;e=r.props&&((0,i.default)(r.props).length>1||!r.props.children)?y.default.createElement("div",r.props,r.props.children):r.props.children,r.context.store&&(e=y.default.createElement(A.Provider,{store:r.context.store},e)),M.default.render(e,r.container)},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentDidMount",value:function(){this.container=document.createElement("div"),document.body.appendChild(this.container),this.renderChildren()}},{key:"componentDidUpdate",value:function(){this.renderChildren()}},{key:"componentWillUnmount",value:function(){this.container&&(M.default.unmountComponentAtNode(this.container),document.body.removeChild(this.container),delete this.container)}},{key:"render",value:function(){return null}}]),t}(y.default.Component);E.displayName="RootChild",E.propTypes={children:g.default.node},E.contextTypes={store:g.default.object},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){var e={};return e.top=window.scrollY,e.left=window.scrollX,e.width=window.innerWidth,e.height=window.innerHeight,e.right=e.left+e.width,e.bottom=e.top+e.height,b("viewport: %o",e),e}function i(){y=a()}function o(e,t){for(var n=[e,g[e],v[e],g[v[e]]],r=-1/0,a=void 0,i=0,o=n.length;i<o;i++){var s=n[i],c=t[s];if(c>0)return s;c>r&&(r=c,a=e)}return a}function s(e,t,n,r,a,i){for(var o=t?[e+" "+t,e,e+" "+g[t]]:[e,e+" "+v[e],e+" "+g[v[e]]],s=void 0,u=0,l=a*i,d=0,f=o.length;d<f;d++){var p=o[d],h=c(p,n,r),m=h.left+a,_=h.top+i,M=Math.min(h.top<y.top?_-y.top:y.bottom-h.top,i),b=Math.min(h.left<y.left?m-y.left:y.right-h.left,a),A=b*M;if(A===l)return p;A>u&&(u=A,s=p)}return s}function c(e,t,n){var r=(0,m.default)(t);if(!r)throw new Error("could not get bounding client rect of Tip element");var a=r.width,i=r.height,o=(0,m.default)(n);if(!o)throw new Error("could not get bounding client rect of `target`");var s=o.width,c=o.height,l=u(o,document);if(!l)throw new Error("could not determine page offset of `target`");var d={};switch(e){case"top":d={top:l.top-i,left:l.left+s/2-a/2};break;case"bottom":d={top:l.top+c,left:l.left+s/2-a/2};break;case"right":d={top:l.top+c/2-i/2,left:l.left+s};break;case"left":d={top:l.top+c/2-i/2,left:l.left-a};break;case"top left":d={top:l.top-i,left:l.left+s/2-a+15};break;case"top right":d={top:l.top-i,left:l.left+s/2-15};break;case"bottom left":d={top:l.top+c,left:l.left+s/2-a+15};break;case"bottom right":d={top:l.top+c,left:l.left+s/2-15};break;case"left top":d={top:l.top+c/2-i,left:l.left-a};break;case"left bottom":d={top:l.top+c/2,left:l.left-a};break;case"right top":d={top:l.top+c/2-i,left:l.left+s};break;case"right bottom":d={top:l.top+c/2,left:l.left+s};break;default:throw new Error('invalid position "'+e+'"')}return d}function u(e,t){var n=t.body||t.getElementsByTagName("body")[0],r=t.documentElement||n.parentNode,a=r.clientTop||n.clientTop||0,i=r.clientLeft||n.clientLeft||0,o=window.pageYOffset||r.scrollTop,s=window.pageXOffset||r.scrollLeft;return{top:e.top+o-a,left:e.left+s-i}}Object.defineProperty(t,"__esModule",{value:!0}),t.isElement=t.offset=t.suggested=t.unbindWindowListeners=t.bindWindowListeners=t.constrainLeft=void 0;var l=n(59),d=r(l),f=n(909),p=r(f),h=n(1085),m=r(h),_=n(102),M=r(_),b=(0,M.default)("calypso:popover:util"),g={top:"bottom",bottom:"top",left:"right",right:"left"},v={top:"right",left:"top",bottom:"left",right:"bottom"},y=a(),A=!1,E=function(){if(A)return b("window events already bound");A=!0,b("bind handlers to `resize` and `scroll` events"),window.addEventListener("resize",i,!0),window.addEventListener("scroll",i,!0)},w=function(){if(!A)return b("window events are not bound");A=!1,b("unbind handlers to `resize` and `scroll` events"),window.removeEventListener("resize",i,!0),window.removeEventListener("scroll",i,!0)},k=function(e,t,n){var r=(0,m.default)(n),a=t.clientHeight,i=t.clientWidth,c={top:r.top-a,bottom:y.height-r.bottom-a,left:r.left-i,right:y.width-r.right-i},u=e.split(/\s+/),l=(0,p.default)(u,1),d=l[0],f=(0,p.default)(u,2),h=f[1],_=o(d,c);return h!==_&&h!==g[_]||(h=null),s(_,h,t,n,i,a)||e},T=function(e,t){var n=(0,m.default)(t).width;return e.left=Math.max(0,Math.min(e.left,y.width-n)),e},L=function(e){try{return e instanceof HTMLElement}catch(t){return"object"===(void 0===e?"undefined":(0,d.default)(e))&&1===e.nodeType&&"object"===(0,d.default)(e.style)&&"object"===(0,d.default)(e.ownerDocument)}};t.constrainLeft=T,t.bindWindowListeners=E,t.unbindWindowListeners=w,t.suggested=k,t.offset=c,t.isElement=L},function(e,t,n){e.exports={default:n(1080),__esModule:!0}},function(e,t,n){n(138),n(110),e.exports=n(1081)},function(e,t,n){var r=n(200),a=n(34)("iterator"),i=n(98);e.exports=n(20).isIterable=function(e){var t=Object(e);return void 0!==t[a]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(1083),__esModule:!0}},function(e,t,n){n(138),n(110),e.exports=n(1084)},function(e,t,n){var r=n(55),a=n(223);e.exports=n(20).getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){function r(e){var t=null,n=a(e);if(3===e.nodeType){var r=n.createRange();r.selectNodeContents(e),e=r}if("function"==typeof e.getBoundingClientRect&&(t=e.getBoundingClientRect(),e.startContainer&&0===t.left&&0===t.top)){var i=n.createElement("span");i.appendChild(n.createTextNode("")),e.insertNode(i),t=i.getBoundingClientRect();var o=i.parentNode;o.removeChild(i),o.normalize()}return t}var a=n(1086);e.exports=r},function(e,t){function n(e){return e&&e.nodeType===a}function r(e){return n(e)?e:n(e.ownerDocument)?e.ownerDocument:n(e.document)?e.document:e.parentNode?r(e.parentNode):e.commonAncestorContainer?r(e.commonAncestorContainer):e.startContainer?r(e.startContainer):e.anchorNode?r(e.anchorNode):void 0}e.exports=r;var a=9},function(e,t){},function(e,t){},function(e,t,n){e.exports=n(228)},function(e,t,n){"use strict";function r(e){return(0,a.connect)(function(e,t){return{validValues:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof(0,o.default)(t,["module","module"])&&(r=t.module.module),(0,s.getModuleOptionValidValues)(e,r,n)},getOptionCurrentValue:function(t,n){return(0,s.getModuleOption)(e,t,n)},getSettingCurrentValue:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,c.getSetting)(e,t,n)},getSiteRoles:function(){return(0,u.getSiteRoles)(e)},isUpdating:function(t){return(0,c.isUpdatingSetting)(e,t)},adminEmailAddress:(0,u.getAdminEmailAddress)(e),currentIp:(0,u.getCurrentIp)(e),siteAdminUrl:(0,u.getSiteAdminUrl)(e),isCurrentUserLinked:(0,l.isCurrentUserLinked)(e)}},function(e){return{updateOptions:function(t){return e((0,c.updateSettings)(t))},regeneratePostByEmailAddress:function(t){return e((0,c.updateSettings)(t,"regeneratePbE"))},setUnsavedSettingsFlag:function(){return e((0,c.setUnsavedSettingsFlag)())},clearUnsavedSettingsFlag:function(){return e((0,c.clearUnsavedSettingsFlag)())}}})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.connectModuleOptions=r;var a=n(10),i=n(27),o=function(e){return e&&e.__esModule?e:{default:e}}(i),s=n(23),c=n(103),u=n(28),l=n(21)},function(e,t){},function(e,t,n){function r(e){if(null==e)return 0;if(o(e))return s(e)?c(e):e.length;var t=i(e);return t==u||t==l?e.size:a(e).length}var a=n(292),i=n(115),o=n(54),s=n(490),c=n(1093),u="[object Map]",l="[object Set]";e.exports=r},function(e,t,n){function r(e){return i(e)?o(e):a(e)}var a=n(1094),i=n(913),o=n(1095);e.exports=r},function(e,t,n){var r=n(497),a=r("length");e.exports=a},function(e,t){function n(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}var r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\\ud83c[\\udffb-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",c="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",i,o].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",u="[\\ufe0e\\ufe0f]?"+s+c,l="(?:"+["[^\\ud800-\\udfff]"+r+"?",r,i,o,"[\\ud800-\\udfff]"].join("|")+")",d=RegExp(a+"(?="+a+")|"+l+u,"g");e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(47);n(1097);var y=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"getIconClassNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.plan,r=t.className,a=(0,v.getPlanClass)(n);return(0,g.default)("dops-plan-icon",a,r,e)}},{key:"getPersonalIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__personal"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 124 125"},M.default.createElement("circle",{className:"dops-plan-icon__personal-0",cx:"62",cy:"62.1",r:"62"}),M.default.createElement("path",{className:"dops-plan-icon__personal-1",d:"M64 106.1l4-9.8v-3.5H62v14.6C62.9 107.4 63.6 106.9 64 106.1z"}),M.default.createElement("path",{className:"dops-plan-icon__personal-2",d:"M56.2 92.8v3.5l4 9.8c0.3 0.8 1.1 1.3 1.9 1.3V92.8H56.2z"}),M.default.createElement("path",{className:"dops-plan-icon__personal-2",d:"M62 32.9h17.1V2.5C73.7 0.9 68 0.1 62 0.1V32.9z"}),M.default.createElement("path",{className:"dops-plan-icon__personal-3",d:"M62 32.9V0.1c0 0 0 0 0 0 -5.9 0-11.6 0.8-17 2.4v30.5H62z"}),M.default.createElement("polygon",{className:"dops-plan-icon__personal-4",points:"62 32.9 45 32.9 48.3 48.7 53.3 92.8 62 92.8 "}),M.default.createElement("polygon",{className:"dops-plan-icon__personal-5",points:"62 32.9 79.2 32.9 75.9 48.7 70.9 92.8 62 92.8 "}))}},{key:"getPremiumIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__premium"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 62 61.5"},M.default.createElement("ellipse",{className:"dops-plan-icon__premium-0",cx:"31",cy:"30.8",rx:"31",ry:"30.8"}),M.default.createElement("path",{className:"dops-plan-icon__premium-1",d:"M27.8 46.3v1.9l2.2 5.4c0.2 0.5 0.5 0.7 1 0.7v-7.9L27.8 46.3z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-2",d:"M32 53.6l2.2-5.4v-1.9H31v3.8 4.1C31.5 54.3 31.9 54 32 53.6z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-3",d:"M21.6 18c0.2 2 4.8 28.3 4.8 28.3l4.6 0.1V18H21.6z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-4",d:"M40.5 18H31v23.4 5l4.5-0.1C35.5 46.3 40.1 20.4 40.5 18z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-5",d:"M31 18V0c-3.9 0-7.7 0.7-11.2 2.1 0.7 6 1.8 15.9 1.8 15.9H31z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-6",d:"M31 18h9.5c0 0 1.1-9.9 1.8-15.9C38.8 0.7 35 0 31 0V18z"}))}},{key:"getBusinessIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__business"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 124 124"},M.default.createElement("circle",{className:"dops-plan-icon__business-0",cx:"62",cy:"62",r:"62"}),M.default.createElement("path",{className:"dops-plan-icon__business-1",d:"M57.4 73.8c0-2.5 2-4.6 4.6-4.6V36.8h-9.6v12.1c-8 3.7-13.5 11.7-13.5 21.1 0 4.9 1.5 9.4 4.1 13.1l0 0c15.4 22.4 15.4 22.4 17 24.8h0.3V78.1C58.6 77.4 57.4 75.7 57.4 73.8L57.4 73.8z"}),M.default.createElement("path",{className:"dops-plan-icon__business-2",d:"M85.2 69.8c0-9.4-5.6-17.4-13.5-21.1v-12H62v32.5c2.5 0 4.6 2 4.6 4.6 0 1.9-1.2 3.5-2.9 4.2v29.8H64c1.6-2.4 1.6-2.4 17-24.8l0 0C83.6 79.2 85.2 74.7 85.2 69.8L85.2 69.8z"}),M.default.createElement("path",{className:"dops-plan-icon__business-3",d:"M48.6 32h-2.4c-3.2 0-5.8 2.6-5.8 5.8V38c0 3.2 2.6 5.8 5.8 5.8H62v-4.7V32 0c-7.2 0-14.1 1.2-20.6 3.5 1.1 5.5 2.5 11 4.1 16.5L48.6 32z"}),M.default.createElement("path",{className:"dops-plan-icon__business-4",d:"M62 39.1v4.7h15.8c3.2 0 5.8-2.6 5.8-5.8v-0.2c0-3.2-2.6-5.8-5.8-5.8h-2.4l3.1-12c1.6-5.5 3-11 4.1-16.5C76.1 1.2 69.2 0 62 0v32V39.1z"}))}},{key:"getDefaultIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__free"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 61.8 61.8"},M.default.createElement("circle",{className:"dops-plan-icon__free-0",cx:"30.9",cy:"30.9",r:"30.9"}),M.default.createElement("polygon",{className:"dops-plan-icon__free-1",points:"41.4 32.8 30.9 22.5 20.3 32.8 30.9 51.8 "}),M.default.createElement("path",{className:"dops-plan-icon__free-2",d:"M30.9 41.6L30.9 41.6c-2 0-3.7 1.6-3.7 3.6l3.7 6.5 3.7-6.5C34.5 43.2 32.9 41.6 30.9 41.6L30.9 41.6z"}),M.default.createElement("path",{className:"dops-plan-icon__free-3",d:"M25.6 27.7c0 2.9 2.3 5.2 5.2 5.2h0.1c2.9 0 5.2-2.3 5.2-5.2v-0.1V0.4c-1.7-0.3-3.5-0.5-5.3-0.5s-3.6 0.2-5.3 0.5v27.3H25.6z"}),M.default.createElement("path",{className:"dops-plan-icon__free-4",d:"M25.6 27.6V0.4c-1.8 0.3-3.6 0.8-5.3 1.4v31C23.2 32.8 25.6 30.5 25.6 27.6z"}),M.default.createElement("path",{className:"dops-plan-icon__free-2",d:"M41.4 32.8v-31c-1.7-0.6-3.5-1.1-5.3-1.4v27.2C36.1 30.5 38.5 32.8 41.4 32.8z"}))}},{key:"render",value:function(){switch(this.props.plan){case v.PLAN_PERSONAL:case v.PLAN_JETPACK_PERSONAL:case v.PLAN_JETPACK_PERSONAL_MONTHLY:return this.getPersonalIcon();case v.PLAN_PREMIUM:case v.PLAN_JETPACK_PREMIUM:case v.PLAN_JETPACK_PREMIUM_MONTHLY:return this.getPremiumIcon();case v.PLAN_BUSINESS:case v.PLAN_JETPACK_BUSINESS:case v.PLAN_JETPACK_BUSINESS_MONTHLY:case v.PLAN_VIP:return this.getBusinessIcon();default:return this.getDefaultIcon()}}}]),t}(_.Component);t.default=y,y.propTypes={classNames:m.default.string,plan:m.default.oneOf([v.PLAN_FREE,v.PLAN_PREMIUM,v.PLAN_BUSINESS,v.PLAN_JETPACK_FREE,v.PLAN_JETPACK_BUSINESS,v.PLAN_JETPACK_BUSINESS_MONTHLY,v.PLAN_JETPACK_PREMIUM,v.PLAN_JETPACK_PREMIUM_MONTHLY,v.PLAN_JETPACK_PERSONAL,v.PLAN_JETPACK_PERSONAL_MONTHLY,v.PLAN_PERSONAL,v.PLAN_VIP]).isRequired},e.exports=t.default},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),i=r(a),o=n(1),s=r(o),c=n(32),u=r(c),l=n(64),d=r(l),f=n(833),p=r(f),h=n(65),m=r(h),_=n(14),M=r(_),b=n(15),g=r(b);n(1101),t.default=(0,u.default)({displayName:"InfoPopover",propTypes:{id:i.default.string,position:i.default.string,className:i.default.string,rootClassName:i.default.string,gaEventCategory:i.default.string,popoverName:i.default.string,onClick:i.default.func,ignoreContext:i.default.shape({getDOMNode:i.default.function})},getDefaultProps:function(){return{position:"bottom",onClick:d.default}},getInitialState:function(){return{showPopover:!1}},render:function(){var e=(0,M.default)("dops-info-popover","dops-info-popover-button",{is_active:this.state.showPopover},this.props.className);return s.default.createElement("button",{ref:"infoPopover",className:e,onClick:this._onClick},s.default.createElement(m.default,{icon:"info-outline",size:18}),this.props.screenReaderText?s.default.createElement("span",{className:"screen-reader-text"},this.props.screenReaderText):"",s.default.createElement(p.default,{id:this.props.id,isVisible:this.state.showPopover,context:this.refs&&this.refs.infoPopover,ignoreContext:this.props.ignoreContext,position:this.props.position,onClose:this._onClose,className:(0,M.default)("dops-info-popover__tooltip",this.props.className),rootClassName:this.props.rootClassName},this.props.children))},_onClick:function(e){this.props.onClick(),e.preventDefault(),this.setState({showPopover:!this.state.showPopover},this._recordStats)},_onClose:function(){this.setState({showPopover:!1},this._recordStats)},_recordStats:function(){var e=this.props,t=e.gaEventCategory,n=e.popoverName;if(t&&n){var r=this.state.showPopover?" Opened":" Closed";g.default.ga.recordEvent(t,"InfoPopover: "+n+r)}}}),e.exports=t.default},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Subscriptions=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(8),y=n(104),A=r(y),E=n(25),w=r(E),k=n(15),T=r(k),L=n(71),S=n(52),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={stb_enabled:r.props.getOptionValue("stb_enabled","subscriptions"),stc_enabled:r.props.getOptionValue("stc_enabled","subscriptions")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("subscriptions",e))},r.trackConfigureClick=function(){T.default.tracks.recordJetpackClick("view-followers")},r.handleSubscribeToBlogToggleChange=function(){r.updateOptions("stb_enabled")},r.handleSubscribeToCommentToggleChange=function(){r.updateOptions("stc_enabled")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props.getModule("subscriptions"),n=this.props.getOptionValue("subscriptions"),r=this.props.isUnavailableInDevMode("subscriptions");return g.default.createElement(z.default,(0,i.default)({},this.props,{hideButton:!0,module:"subscriptions"}),g.default.createElement(D.default,{hasChild:!0,disableInDevMode:!0,module:t,support:{text:(0,v.translate)("Allows readers to subscribe to your posts or comments, and receive notifications of new content by email."),link:"https://jetpack.com/support/subscriptions/"}},g.default.createElement(S.ModuleToggle,{slug:"subscriptions",disabled:r,activated:n,toggling:this.props.isSavingAnyOption("subscriptions"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},t.description)),g.default.createElement(L.FormFieldset,null,g.default.createElement(A.default,{checked:this.state.stb_enabled,disabled:!n||r||this.props.isSavingAnyOption(["subscriptions","stb_enabled"]),onChange:this.handleSubscribeToBlogToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)('Show a "follow blog" option in the comment form'))),g.default.createElement(A.default,{checked:this.state.stc_enabled,disabled:!n||r||this.props.isSavingAnyOption(["subscriptions","stc_enabled"]),onChange:this.handleSubscribeToCommentToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)('Show a "follow comments" option in the comment form'))))),function(){return r||!n?"":e.props.isLinked?g.default.createElement(w.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackConfigureClick,href:"https://wordpress.com/people/email-followers/"+e.props.siteRawUrl},(0,v.translate)("View your Email Followers")):g.default.createElement(w.default,{compact:!0,className:"jp-settings-card__configure-link",href:e.props.connectUrl+"&from=unlinked-user-connect-masterbar"},(0,v.translate)("Connect your user account to WordPress.com to view your email followers")," ")}())}}]),t}(g.default.Component);t.Subscriptions=(0,C.ModuleSettingsForm)(P)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Security=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(27),b=r(M),g=n(23),v=n(103),y=n(21),A=n(74),E=n(210),w=n(211),k=r(w),T=n(912),L=r(T),S=n(1106),C=r(S),O=n(1107),z=r(O),N=n(1119),D=n(1120),P=n(1123),x=t.Security=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.isAkismetFound=function(){if(!r.props.isPluginActive("akismet/akismet.php"))return!1;if(r.props.searchTerm){var e=r.props.isPluginInstalled("akismet/akismet.php");return["akismet","antispam","spam","comments",e.Description,e.PluginURI].join(" ").toLowerCase().indexOf(r.props.searchTerm.toLowerCase())>-1}return!0},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,rewindStatus:this.props.rewindStatus,siteRawUrl:this.props.siteRawUrl},t=this.props.isModuleFound("protect"),n=this.props.isModuleFound("sso"),r=this.isAkismetFound(),a="active"===(0,b.default)(this.props.rewindStatus,["state"],!1),i=this.props.isModuleFound("vaultpress")||a,o=this.props.isModuleFound("monitor");return(this.props.searchTerm||this.props.active)&&(n||t||r||i||o)?m.default.createElement("div",null,m.default.createElement(k.default,null),i&&m.default.createElement(C.default,e),o&&m.default.createElement(N.Monitor,e),r&&m.default.createElement("div",null,m.default.createElement(z.default,e),m.default.createElement(L.default,null)),t&&m.default.createElement(D.Protect,e),n&&m.default.createElement(P.SSO,e)):null}}]),t}(h.Component);x.displayName="SecuritySettings",t.default=(0,_.connect)(function(e){return{module:function(t){return(0,g.getModule)(e,t)},settings:(0,v.getSettings)(e),isDevMode:(0,y.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,y.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,A.isModuleFound)(e,t)},isPluginActive:function(t){return(0,E.isPluginActive)(e,t)},isPluginInstalled:function(t){return(0,E.isPluginInstalled)(e,t)}}})(x)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.BackupsScan=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(25),y=r(v),A=n(15),E=r(A),w=n(27),k=r(w),T=n(47),L=n(850),S=r(L),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=n(62),x=n(61),j=n(44),R=r(j),Y=n(23),I=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(z.default,{header:(0,g.translate)("Backups and security scanning",{context:"Settings header"}),hideButton:!0,action:"scan"},M.default.createElement(D.default,{disableInDevMode:!0,module:{module:"backups"},support:{text:(0,g.translate)("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:"https://help.vaultpress.com/get-to-know/"}},(0,g.translate)("Checking site status…")))}}]),t}(_.Component),q=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.getCardText=function(){return r.props.isDevMode?(0,g.translate)("Unavailable in Dev Mode."):M.default.createElement(S.default,{title:(0,g.translate)("Connected"),icon:"checkmark-circle",feature:"rewind",description:(0,g.translate)("Your site is being backed up in real time and regularly scanned for security threats."),className:"is-upgrade-premium jp-banner__no-border",href:"https://wordpress.com/stats/activity/"+r.props.siteRawUrl})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(z.default,(0,i.default)({feature:"rewind"},this.props,{header:(0,g.translate)("Backups and security scanning",{context:"Settings header"}),action:"rewind",hideButton:!0}),this.getCardText())}}]),t}(_.Component),B=t.BackupsScan=(0,C.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.toggleModule=function(e,t){r.props.updateFormStateOptionValue(e,!t)},r.trackConfigureClick=function(){E.default.tracks.recordJetpackClick("configure-scan")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"getCardText",value:function(){var e=(0,k.default)(this.props.vaultPressData,["data","features","backups"],!1),t=(0,k.default)(this.props.vaultPressData,["data","features","security"],!1),n=(0,T.getPlanClass)(this.props.sitePlan.product_slug),r="";if(this.props.isDevMode)return(0,g.translate)("Unavailable in Dev Mode.");if(e&&t){var a=this.props.hasThreats;return a?M.default.createElement("div",null,M.default.createElement("strong",null,(0,g.translate)("Uh oh, %(number)s threat found.","Uh oh, %(number)s threats found.",{count:a,args:{number:(0,g.numberFormat)(a)}})),M.default.createElement("br",null),M.default.createElement("br",null),(0,g.translate)("{{a}}View details{{/a}}",{components:{a:M.default.createElement("a",{href:"https://dashboard.vaultpress.com/"})}}),M.default.createElement("br",null),(0,g.translate)("{{a}}Contact Support{{/a}}",{components:{a:M.default.createElement("a",{href:"https://jetpack.com/support"})}})):(0,g.translate)("Your site is backed up and threat-free.")}if(e&&(0,R.default)(["is-free-plan","is-personal-plan"],n))return(0,g.translate)("Your site is backed up.");switch(n){case"is-personal-plan":r=(0,g.translate)("You have paid for backups but they're not yet active."),r+=" "+(0,g.translate)('Click "Set Up" to finish installation.');break;case"is-premium-plan":case"is-business-plan":r=(0,g.translate)("You have paid for backups and security scanning but they’re not yet active."),r+=" "+(0,g.translate)('Click "Set Up" to finish installation.')}return r}},{key:"render",value:function(){var e=(0,k.default)(this.props.vaultPressData,["data","features","security"],!1),t="active"===(0,k.default)(this.props.rewindStatus,["state"],!1),n=!1!==(0,k.default)(this.props.rewindStatus,["state"],!1),r="N/A"!==this.props.vaultPressData&&!1!==(0,k.default)(this.props.vaultPressData,["data"],!1);return!n||this.props.vaultPressActive&&!r?M.default.createElement(I,null):t?M.default.createElement(q,this.props):M.default.createElement(z.default,(0,i.default)({feature:T.FEATURE_SECURITY_SCANNING_JETPACK},this.props,{header:(0,g.translate)("Backups and security scanning",{context:"Settings header"}),action:"scan",hideButton:!0}),M.default.createElement(D.default,{disableInDevMode:!0,module:{module:"backups"},support:{text:(0,g.translate)("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:"https://help.vaultpress.com/get-to-know/"}},this.getCardText()),!this.props.isUnavailableInDevMode("backups")&&e&&M.default.createElement(y.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:"https://dashboard.vaultpress.com/"},(0,g.translate)("Configure your Security Scans")))}}]),t}(_.Component));t.default=(0,b.connect)(function(e){return{sitePlan:(0,x.getSitePlan)(e),vaultPressData:(0,P.getVaultPressData)(e),hasThreats:(0,P.getVaultPressScanThreatCount)(e),vaultPressActive:(0,Y.isModuleActivated)(e,"vaultpress")}})(B)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Antispam=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(508),y=r(v),A=n(516),E=r(A),w=n(1110),k=r(w),T=n(65),L=r(T),S=n(505),C=r(S),O=n(24),z=r(O),N=n(234),D=r(N),P=n(1112),x=r(P),j=n(62),R=n(47),Y=n(15),I=r(Y),q=n(71),B=n(30),W=n(40),U=r(W),H=n(36),F=r(H),X=t.Antispam=(0,B.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.state={apiKey:r.props.getOptionValue("wordpress_api_key"),delayKeyCheck:!1,currentEvent:{}},r.keyChanged=!1,r.checkApiKeyTyped=function(e){0<e.currentTarget.value.length&&r.props.checkAkismetKey(e.currentTarget.value),r.keyChanged=!0,r.setState({delayKeyCheck:!1})},r.updateText=function(e){var t=(0,z.default)({},e);t.currentTarget.value=(0,x.default)(t.currentTarget.value),r.setState({apiKey:t.currentTarget.value,delayKeyCheck:!0,currentEvent:t},r.debouncedCheckApiKeyTyped(t))},r.trackOpenCard=function(){I.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"anti-spam"})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentWillMount",value:function(){this.debouncedCheckApiKeyTyped=(0,C.default)(this.checkApiKeyTyped,500)}},{key:"componentDidUpdate",value:function(){!this.props.isCheckingAkismetKey&&this.props.isAkismetKeyValid&&this.keyChanged&&!(0,D.default)(this.state.currentEvent)&&(this.keyChanged=!1,this.props.onOptionChange(this.state.currentEvent))}},{key:"render",value:function(){var e={name:"wordpress_api_key",value:this.state.apiKey,disabled:this.props.isSavingAnyOption("wordpress_api_key"),onChange:this.updateText},t="",n=(0,g.translate)("Checking your spam protection…"),r=!0;return null===this.props.isAkismetKeyValid?(e.value=(0,g.translate)("Fetching key…"),e.disabled=!0,r=!1):""===this.state.apiKey?(e.value="",n=(0,
|
42 |
-
g.translate)("Your site needs an Antispam key.")):this.state.delayKeyCheck||this.props.isCheckingAkismetKey?this.props.isCheckingAkismetKey&&(t=M.default.createElement("div",{className:"form-input-validation is-warning"},M.default.createElement("span",null,M.default.createElement(L.default,{size:24,icon:"sync"}),(0,g.translate)("Checking key…"))),r=!1):!1===this.props.isAkismetKeyValid?(t=M.default.createElement(k.default,{isError:!0,text:(0,g.translate)("There's a problem with your Antispam API key. {{a}}Learn more{{/a}}.",{components:{a:M.default.createElement("a",{href:"https://docs.akismet.com/getting-started/api-key/"})}})}),e.isError=!0,n=(0,g.translate)("Your site is not protected from spam.")):(t=M.default.createElement(k.default,{text:(0,g.translate)("Your Antispam key is valid.")}),e.isValid=!0,n=(0,g.translate)("Your site is protected from spam."),r=!1),M.default.createElement(U.default,(0,i.default)({},this.props,{header:(0,g.translate)("Spam filtering",{context:"Settings header"}),saveDisabled:this.props.isSavingAnyOption("wordpress_api_key"),feature:R.FEATURE_SPAM_AKISMET_PLUS}),M.default.createElement(E.default,{onOpen:this.trackOpenCard,header:n},M.default.createElement(F.default,{support:{text:(0,g.translate)("Removes spam from comments and contact forms."),link:"https://akismet.com/jetpack/"}},M.default.createElement(q.FormFieldset,null,M.default.createElement(q.FormLabel,null,M.default.createElement("span",{className:"jp-form-label-wide"},(0,g.translate)("Your API key")),M.default.createElement(y.default,e),t),r&&M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)("If you don't already have an API key, then {{a}}get your API key here{{/a}}, and you'll be guided through the process of getting one.",{components:{a:M.default.createElement("a",{href:"https://akismet.com/wordpress/"})}}))))))}}]),t}(_.Component));t.default=(0,b.connect)(function(e){return{isAkismetKeyValid:(0,j.isAkismetKeyValid)(e),isCheckingAkismetKey:(0,j.isCheckingAkismetKey)(e)}},function(e){return{checkAkismetKey:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e((0,j.checkAkismetKey)(t))}}})(X)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(24),_=n(14),M=n(25),b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=m({},this.props,{className:_(this.props.className,"is-compact")});return h.createElement(M,e,this.props.children)}}]),t}(h.Component);b.displayName="CompactCard",t.default=b,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14),M=n(65);n(1111);var b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=_({"form-input-validation":!0,"is-warning":this.props.isWarning,"is-error":this.props.isError}),t=this.props.isError||this.props.isWarning?"notice-outline":"checkmark";return m.createElement("div",{className:e},m.createElement("span",null,m.createElement(M,{size:24,icon:this.props.icon?this.props.icon:t})," ",this.props.text))}}]),t}(m.Component);b.displayName="FormInputValidation",b.propTypes={isError:h.bool,isWarning:h.bool,text:h.node,icon:h.string},b.defaultProps={isError:!1},t.default=b,e.exports=t.default},function(e,t){},function(e,t,n){function r(e,t,n){if((e=u(e))&&(n||void 0===t))return e.replace(l,"");if(!e||!(t=a(t)))return e;var r=c(e),d=c(t),f=s(r,d),p=o(r,d)+1;return i(r,f,p).join("")}var a=n(489),i=n(1113),o=n(1114),s=n(1115),c=n(1116),u=n(224),l=/^\s+|\s+$/g;e.exports=r},function(e,t,n){function r(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:a(e,t,n)}var a=n(466);e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--&&a(t,e[n],0)>-1;);return n}var a=n(226);e.exports=r},function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&a(t,e[n],0)>-1;);return n}var a=n(226);e.exports=r},function(e,t,n){function r(e){return i(e)?o(e):a(e)}var a=n(1117),i=n(913),o=n(1118);e.exports=r},function(e,t){function n(e){return e.split("")}e.exports=n},function(e,t){function n(e){return e.match(d)||[]}var r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\\ud83c[\\udffb-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",c="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",i,o].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",u="[\\ufe0e\\ufe0f]?"+s+c,l="(?:"+["[^\\ud800-\\udfff]"+r+"?",r,i,o,"[\\ud800-\\udfff]"].join("|")+")",d=RegExp(a+"(?="+a+")|"+l+u,"g");e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Monitor=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(15),v=r(g),y=n(25),A=r(y),E=n(52),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L);t.Monitor=(0,w.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.trackConfigureClick=function(){v.default.tracks.recordJetpackClick("configure-monitor")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("monitor"),t=this.props.isUnavailableInDevMode("monitor");return M.default.createElement(T.default,(0,i.default)({},this.props,{hideButton:!0,module:"monitor",header:(0,b.translate)("Downtime monitoring",{context:"Settings header"})}),M.default.createElement(S.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("monitor")},M.default.createElement(E.ModuleToggle,{slug:"monitor",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("monitor"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Monitor your site's downtime")))),M.default.createElement(A.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:"https://wordpress.com/settings/security/"+this.props.siteRawUrl},(0,b.translate)("Configure your notification settings")))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Protect=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(41),v=r(g),y=n(1121),A=r(y),E=n(44),w=r(E),k=n(516),T=r(k),L=n(14),S=r(L),C=n(15),O=r(C),z=n(71),N=n(52),D=n(30),P=n(40),x=r(P),j=n(36),R=r(j);t.Protect=(0,D.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.state={whitelist:r.props.getOptionValue("jetpack_protect_global_whitelist")?r.props.getOptionValue("jetpack_protect_global_whitelist").local:""},r.currentIpIsWhitelisted=function(){return!!(0,w.default)(r.state.whitelist,r.props.currentIp)},r.updateText=function(e){r.currentIpIsWhitelisted(),r.setState({whitelist:e.target.value}),r.props.onOptionChange(e)},r.addToWhitelist=function(){var e=r.state.whitelist+(0>=r.state.whitelist.length?"":"\n")+r.props.currentIp;r.props.updateFormStateOptionValue("jetpack_protect_global_whitelist",e),r.setState({whitelist:e}),O.default.tracks.recordJetpackClick({target:"add-to-whitelist",feature:"protect"})},r.trackOpenCard=function(){O.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"protect"})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("protect"),t=this.props.isUnavailableInDevMode("protect"),n=M.default.createElement(N.ModuleToggle,{slug:"protect",compact:!0,disabled:t,activated:e,toggling:this.props.isSavingAnyOption("protect"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.getModule("protect").description));return M.default.createElement(x.default,(0,i.default)({},this.props,{module:"protect",header:(0,b.translate)("Brute force attack protection",{context:"Settings header"}),saveDisabled:this.props.isSavingAnyOption("jetpack_protect_global_whitelist")}),M.default.createElement(T.default,{onOpen:this.trackOpenCard,header:n,className:(0,S.default)({"jp-foldable-settings-disable":t})},M.default.createElement(R.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("protect"),support:{text:(0,b.translate)("Protects your site from traditional and distributed brute force login attacks."),link:"https://jetpack.com/support/protect/"}},M.default.createElement(z.FormFieldset,null,this.props.currentIp&&M.default.createElement("div",null,M.default.createElement("div",{className:"jp-form-label-wide"},(0,b.translate)("Your current IP: %(ip)s",{args:{ip:this.props.currentIp}})),M.default.createElement(v.default,{disabled:!e||t||this.currentIpIsWhitelisted()||this.props.isSavingAnyOption(["protect","jetpack_protect_global_whitelist"]),onClick:this.addToWhitelist},(0,b.translate)("Add to whitelist"))),M.default.createElement(z.FormLabel,null,M.default.createElement(z.FormLegend,null,(0,b.translate)("Whitelisted IP addresses")),M.default.createElement(A.default,{disabled:!e||t||this.props.isSavingAnyOption(["protect","jetpack_protect_global_whitelist"]),name:"jetpack_protect_global_whitelist",placeholder:"Example: 12.12.12.1-12.12.12.100",onChange:this.updateText,value:this.state.whitelist})),M.default.createElement("span",{className:"jp-form-setting-explanation"},(0,b.translate)("You may whitelist an IP address or series of addresses preventing them from ever being blocked by Jetpack. IPv4 and IPv6 are acceptable. To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100",{components:{br:M.default.createElement("br",null)}}))))))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=n(14),b=n(116);n(1122);var g=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return _.createElement("textarea",(0,i.default)({},b(this.props,"className"),{className:M(this.props.className,"dops-textarea")}),this.props.children)}}]),t}(_.Component);g.displayName="Textarea",t.default=g,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SSO=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(8),y=n(104),A=r(y),E=n(71),w=n(52),k=n(30),T=n(40),L=r(T),S=n(36),C=r(S);t.SSO=(0,k.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={jetpack_sso_match_by_email:r.props.getOptionValue("jetpack_sso_match_by_email","sso"),jetpack_sso_require_two_step:r.props.getOptionValue("jetpack_sso_require_two_step","sso")},r.handleTwoStepToggleChange=function(){r.updateOptions("jetpack_sso_require_two_step")},r.handleMatchByEmailToggleChange=function(){r.updateOptions("jetpack_sso_match_by_email")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("sso",e))},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("sso"),t=this.props.isUnavailableInDevMode("sso");return g.default.createElement(L.default,(0,i.default)({},this.props,{hideButton:!0,module:"sso",header:(0,v.translate)("WordPress.com log in",{context:"Settings header"})}),g.default.createElement(C.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("sso"),support:{text:(0,v.translate)("Allows registered users to log in to your site with their WordPress.com accounts."),link:"https://jetpack.com/support/sso/"}},g.default.createElement(w.ModuleToggle,{slug:"sso",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("sso"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.getModule("sso").description)),g.default.createElement(E.FormFieldset,null,g.default.createElement(A.default,{checked:this.state.jetpack_sso_match_by_email,disabled:!e||t||this.props.isSavingAnyOption(["sso","jetpack_sso_match_by_email"]),onChange:this.handleMatchByEmailToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Match accounts using email addresses"))),g.default.createElement(A.default,{checked:this.state.jetpack_sso_require_two_step,disabled:!e||t||this.props.isSavingAnyOption(["sso","jetpack_sso_require_two_step"]),onChange:this.handleTwoStepToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Require accounts to use WordPress.com Two-Step Authentication"))))))}}]),t}(b.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Traffic=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(23),v=n(103),y=n(21),A=n(74),E=n(211),w=r(E),k=n(1125),T=n(1126),L=n(1127),S=n(1128),C=n(1129),O=n(1130),z=r(O),N=n(1131),D=n(1132),P=r(D),x=n(28),j=t.Traffic=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,siteRawUrl:this.props.siteRawUrl,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,getModuleOverride:this.props.getModuleOverride},t=this.props.isModuleFound("seo-tools"),n=this.props.isModuleFound("wordads"),r=this.props.isModuleFound("stats"),a=this.props.isModuleFound("related-posts"),o=this.props.isModuleFound("verification-tools"),s=this.props.isModuleFound("sitemaps"),c=this.props.isModuleFound("search"),u=this.props.isModuleFound("google-analytics");return(this.props.searchTerm||this.props.active)&&(t||n||r||a||o||s||u||c)?M.default.createElement("div",null,M.default.createElement(w.default,null),r&&M.default.createElement(S.SiteStats,e),c&&M.default.createElement(z.default,e),n&&M.default.createElement(L.Ads,(0,i.default)({},e,{configureUrl:"https://wordpress.com/ads/earnings/"+this.props.siteRawUrl})),a&&M.default.createElement(C.RelatedPosts,(0,i.default)({},e,{configureUrl:this.props.siteAdminUrl+"customize.php?autofocus[section]=jetpack_relatedposts&return="+encodeURIComponent(this.props.siteAdminUrl+"admin.php?page=jetpack#/traffic")+"&url="+encodeURIComponent(this.props.lastPostUrl)})),t&&M.default.createElement(k.SEO,(0,i.default)({},e,{configureUrl:"https://wordpress.com/settings/traffic/"+this.props.siteRawUrl+"#seo"})),u&&M.default.createElement(T.GoogleAnalytics,(0,i.default)({},e,{configureUrl:"https://wordpress.com/settings/traffic/"+this.props.siteRawUrl+"#analytics"})),s&&M.default.createElement(P.default,e),o&&M.default.createElement(N.VerificationServices,e)):null}}]),t}(M.default.Component);j.displayName="TrafficSettings",t.default=(0,b.connect)(function(e){return{module:function(t){return(0,g.getModule)(e,t)},settings:(0,v.getSettings)(e),isDevMode:(0,y.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,y.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,A.isModuleFound)(e,t)},lastPostUrl:(0,x.getLastPostUrl)(e),getModuleOverride:function(t){return(0,g.getModuleOverride)(e,t)}}})(j)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SEO=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(47),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L),C=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.trackConfigureClick=function(){A.default.tracks.recordJetpackClick("configure-seo")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(T.default,(0,i.default)({},this.props,{header:(0,b.translate)("Search engine optimization",{context:"Settings header"}),feature:E.FEATURE_SEO_TOOLS_JETPACK,hideButton:!0}),M.default.createElement(S.default,{disableInDevMode:!0,module:{module:"seo-tools"},support:{text:(0,b.translate)("Allows you to optimize your site and its content for better results in search engines."),link:"https://jetpack.com/support/seo-tools/"}},M.default.createElement("span",null,(0,b.translate)("You can tweak these settings if you'd like more advanced control. Read more about what you can do to {{a}}optimize your site's SEO{{/a}}.",{components:{a:M.default.createElement("a",{href:"https://jetpack.com/support/seo-tools/"})}}))),!this.props.isUnavailableInDevMode("seo-tools")&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},(0,b.translate)("Configure your SEO settings")))}}]),t}(M.default.Component);t.SEO=(0,w.ModuleSettingsForm)(C)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(47),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L);t.GoogleAnalytics=(0,w.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"trackConfigureClick",value:function(){A.default.tracks.recordJetpackClick("configure-ga")}},{key:"render",value:function(){return M.default.createElement(T.default,(0,i.default)({},this.props,{header:(0,b.translate)("Google Analytics",{context:"Settings header"}),feature:E.FEATURE_GOOGLE_ANALYTICS_JETPACK,hideButton:!0}),M.default.createElement(S.default,{disableInDevMode:!0,module:{module:"google-analytics"},support:{text:(0,b.translate)("Integrates your WordPress site with Google Analytics, a platform that offers insights into your traffic, visitors, and conversions."),link:"https://jetpack.com/support/google-analytics/"}},M.default.createElement("p",null,(0,b.translate)("Google Analytics is a free service that complements our {{a}}built-in stats{{/a}} with different insights into your traffic. WordPress.com stats and Google Analytics use different methods to identify and track activity on your site, so they will normally show slightly different totals for your visits, views, etc.",{components:{a:M.default.createElement("a",{href:"https://wordpress.com/stats/day/"+this.props.siteRawUrl})}}))),!this.props.isUnavailableInDevMode("google-analytics")&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},(0,b.translate)("Configure your Google Analytics settings")))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Ads=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(104),A=r(y),E=n(15),w=r(E),k=n(47),T=n(71),L=n(30),S=n(52),C=n(40),O=r(C),z=n(36),N=r(z);t.Ads=(0,L.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.updateOptions=function(e){r.props.updateFormStateModuleOption("wordads",e)},r.trackConfigureClick=function(){w.default.tracks.recordJetpackClick("view-earnings")},r.trackConfigureWidgetClick=function(){w.default.tracks.recordJetpackClick("place_ad_widget")},r.handleChange=function(e){return function(){return r.updateOptions(e)}},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("wordads"),t=this.props.isUnavailableInDevMode("wordads"),n=this.props.getOptionValue("enable_header_ad","wordads"),r=this.props.getOptionValue("wordads_second_belowpost","wordads"),a=this.props.getOptionValue("wordads_display_front_page","wordads"),o=this.props.getOptionValue("wordads_display_post","wordads"),s=this.props.getOptionValue("wordads_display_page","wordads"),c=this.props.getOptionValue("wordads_display_archive","wordads");return M.default.createElement(O.default,(0,i.default)({},this.props,{header:(0,b.translate)("Ads",{context:"Ads header"}),feature:k.FEATURE_WORDADS_JETPACK,hideButton:!0}),M.default.createElement(N.default,{disableInDevMode:!0,hasChild:!0,module:{module:"wordads"},support:{text:(0,b.translate)("Displays high-quality ads on your site that allow you to earn income."),link:"https://jetpack.com/support/ads/"}},M.default.createElement("p",null,(0,b.translate)("Show ads on the first article on your home page or at the end of every page and post. Place additional ads at the top of your site and to any widget area to increase your earnings."),M.default.createElement("br",null),M.default.createElement("small",{className:"jp-form-setting-explanation"},(0,b.translate)("By activating ads, you agree to the Automattic Ads {{link}}Terms of Service{{/link}}.",{components:{link:M.default.createElement("a",{href:"https://wordpress.com/automattic-ads-tos/",target:"_blank",rel:"noopener noreferrer",onClick:this.trackConfigureWidgetClick})}}))),M.default.createElement(S.ModuleToggle,{slug:"wordads",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("wordads"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Enable ads and display an ad below each post"))),M.default.createElement(T.FormFieldset,null,M.default.createElement(T.FormLegend,null,(0,b.translate)("Display ads below posts on")),M.default.createElement(A.default,{checked:a,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_front_page"]),onChange:this.handleChange("wordads_display_front_page")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Front page"))),M.default.createElement(A.default,{checked:o,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_post"]),onChange:this.handleChange("wordads_display_post")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Posts"))),M.default.createElement(A.default,{checked:s,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_page"]),onChange:this.handleChange("wordads_display_page")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Pages"))),M.default.createElement(A.default,{checked:c,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_archive"]),onChange:this.handleChange("wordads_display_archive")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Archives")))),M.default.createElement(T.FormFieldset,null,M.default.createElement(T.FormLegend,null,(0,b.translate)("Additional ad placements")),M.default.createElement(A.default,{checked:n,disabled:!e||t||this.props.isSavingAnyOption(["wordads","enable_header_ad"]),onChange:this.handleChange("enable_header_ad")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Top of each page"))),M.default.createElement(A.default,{checked:r,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_second_belowpost"]),onChange:this.handleChange("wordads_second_belowpost")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Second ad below post"))),M.default.createElement("small",{className:"jp-form-setting-explanation"},e&&(0,b.translate)("You can place additional ads using the Ad widget. {{link}}Try it out!{{/link}}",{components:{link:M.default.createElement("a",{className:"jp-module-settings__external-link",href:"customize.php?autofocus[panel]=widgets"})}})))),!t&&e&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},(0,b.translate)("View your earnings")))}}]),t}(M.default.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SiteStats=void 0;var a=n(11),i=r(a),o=n(113),s=r(o),c=n(51),u=r(c),l=n(2),d=r(l),f=n(3),p=r(f),h=n(6),m=r(h),_=n(4),M=r(_),b=n(5),g=r(b),v=n(1),y=r(v),A=n(8),E=n(104),w=r(E),k=n(516),T=r(k),L=n(41),S=r(L),C=n(25),O=r(C),z=n(44),N=r(z),D=n(459),P=r(D),x=n(14),j=r(x),R=n(80),Y=n(15),I=r(Y),q=n(71),B=n(30),W=n(36),U=r(W),H=n(40),F=r(H),X=n(515),V=r(X),K=function(e){function t(e){(0,p.default)(this,t);var n=(0,M.default)(this,(t.__proto__||(0,d.default)(t)).call(this,e));n.updateOptions=function(e,t){var r=n.props.getOptionValue(t,"stats"),a=!1;n.state[t+"_"+e]?(0,N.default)(r,e)&&(r=(0,P.default)(r,function(t){return t!==e})):(0,N.default)(r,e)||(r.push(e),a=!0),n.setState((0,u.default)({},t+"_"+e,!n.state[t+"_"+e]),function(){n.props.updateOptions((0,u.default)({},t,r))}),I.default.tracks.recordEvent("jetpack_wpa_settings_toggle",{module:"stats",setting:t,role:e,toggled:a?"on":"off"})},n.activateStats=function(){n.props.updateOptions({stats:!0})},n.trackOpenCard=function(){I.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"stats"})},n.handleRoleToggleChange=function(e,t){return function(){return n.updateOptions(e,t)}};var r=e.getOptionValue("count_roles","stats"),a=e.getOptionValue("roles","stats");return n.state={count_roles:r,roles:a,count_roles_administrator:(0,N.default)(r,"administrator",!1),count_roles_editor:(0,N.default)(r,"editor",!1),count_roles_author:(0,N.default)(r,"author",!1),count_roles_contributor:(0,N.default)(r,"contributor",!1),count_roles_subscriber:(0,N.default)(r,"subscriber",!1),roles_administrator:!0,roles_editor:(0,N.default)(a,"editor",!1),roles_author:(0,N.default)(a,"author",!1),roles_contributor:(0,N.default)(a,"contributor",!1),roles_subscriber:(0,N.default)(a,"subscriber",!1)},n}return(0,g.default)(t,e),(0,m.default)(t,[{key:"handleStatsOptionToggle",value:function(e){var t=this;return function(){return t.props.updateFormStateModuleOption("stats",e)}}},{key:"render",value:function(){var e=this,t=this.props.getModule("stats"),n=this.props.getOptionValue("stats"),r=this.props.isUnavailableInDevMode("stats"),a=this.props.getSiteRoles();return"inactive"===this.props.getModuleOverride("stats")?y.default.createElement(V.default,{moduleName:t.name}):n?y.default.createElement(F.default,(0,i.default)({},this.props,{header:(0,A.translate)("Site stats",{context:"Settings header"}),hideButton:!0}),y.default.createElement(T.default,{onOpen:this.trackOpenCard,header:(0,A.translate)("Collecting valuable traffic stats and insights"),clickableHeader:!0,className:(0,j.default)("jp-foldable-settings-standalone",{"jp-foldable-settings-disable":r})},y.default.createElement(U.default,{disableInDevMode:!0,module:t,support:{text:(0,A.translate)("Displays information on your site activity, including visitors and popular posts or pages."),link:"https://jetpack.com/support/wordpress-com-stats/"}},y.default.createElement(q.FormFieldset,null,y.default.createElement(w.default,{checked:!!this.props.getOptionValue("admin_bar"),disabled:!n||r,toggling:this.props.isSavingAnyOption(["stats","admin_bar"]),onChange:this.handleStatsOptionToggle("admin_bar")},y.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,A.translate)("Put a chart showing 48 hours of views in the admin bar"))),y.default.createElement(w.default,{checked:!!this.props.getOptionValue("hide_smile"),disabled:!n||r,toggling:this.props.isSavingAnyOption(["stats","hide_smile"]),onChange:this.handleStatsOptionToggle("hide_smile")},y.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,A.translate)("Hide the stats smiley face image")),y.default.createElement("span",{className:"jp-form-setting-explanation"},(0,A.translate)("The image helps collect stats, but should work when hidden.")))),y.default.createElement(q.FormFieldset,null,y.default.createElement(q.FormLegend,null,(0,A.translate)("Count logged in page views from")),(0,s.default)(a).map(function(t){return y.default.createElement(w.default,{checked:e.state["count_roles_"+t],disabled:!n||r||e.props.isSavingAnyOption(["stats","count_roles"]),onChange:e.handleRoleToggleChange(t,"count_roles"),key:"count_roles-"+t},y.default.createElement("span",{className:"jp-form-toggle-explanation"},a[t].name))})),y.default.createElement(q.FormFieldset,null,y.default.createElement(q.FormLegend,null,(0,A.translate)("Allow stats reports to be viewed by")),y.default.createElement(w.default,{checked:!0,disabled:!0},y.default.createElement("span",{className:"jp-form-toggle-explanation"},a.administrator.name)),(0,s.default)(a).map(function(t){return"administrator"!==t&&y.default.createElement(w.default,{checked:e.state["roles_"+t],disabled:!n||r||e.props.isSavingAnyOption(["stats","roles"]),onChange:e.handleRoleToggleChange(t,"roles"),key:"roles-"+t},y.default.createElement("span",{className:"jp-form-toggle-explanation"},a[t].name))}))))):y.default.createElement(O.default,{className:"jp-at-a-glance__stats-card "+(this.props.isDevMode?"is-inactive":"")},y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive"},y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-icon"},y.default.createElement("img",{src:R.imagePath+"stats.svg",width:"60",height:"60",alt:(0,A.translate)("Jetpack Stats Icon"),className:"jp-at-a-glance__stats-icon"})),y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-text"},this.props.isDevMode?(0,A.translate)("Unavailable in Dev Mode"):(0,A.translate)("{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}",{components:{a:y.default.createElement("a",{href:"javascript:void(0)",onClick:this.activateStats}),a1:y.default.createElement("a",{href:"https://jetpack.com/support/wordpress-com-stats/",target:"_blank",rel:"noopener noreferrer"})}})),!this.props.isDevMode&&y.default.createElement("div",{
|
43 |
-
className:"jp-at-a-glance__stats-inactive-button"},y.default.createElement(S.default,{onClick:this.activateStats,primary:!0},(0,A.translate)("Activate Site Stats")))))}}]),t}(y.default.Component);t.SiteStats=(0,B.ModuleSettingsForm)(K)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.RelatedPosts=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(8),y=n(474),A=r(y),E=n(25),w=r(E),k=n(104),T=r(k),L=n(71),S=n(52),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={show_headline:r.props.getOptionValue("show_headline","related-posts"),show_thumbnails:r.props.getOptionValue("show_thumbnails","related-posts")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("related-posts",e))},r.handleShowHeadlineToggleChange=function(){r.updateOptions("show_headline")},r.handleShowThumbnailsToggleChange=function(){r.updateOptions("show_thumbnails")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props.getOptionValue("related-posts"),n=this.props.isUnavailableInDevMode("related-posts");return g.default.createElement(z.default,(0,i.default)({},this.props,{hideButton:!0,module:"related-posts"}),g.default.createElement(D.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("related-posts"),support:{text:(0,v.translate)("Automatically displays similar content at the end of each post."),link:"https://jetpack.com/support/related-posts/"}},g.default.createElement(S.ModuleToggle,{slug:"related-posts",disabled:n,activated:t,toggling:this.props.isSavingAnyOption("related-posts"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Show related content after posts"))),g.default.createElement(L.FormFieldset,null,g.default.createElement(T.default,{checked:this.state.show_headline,disabled:!t||n||this.props.isSavingAnyOption(["related-posts","show_headline"]),onChange:this.handleShowHeadlineToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)('Show a "Related" header to more clearly separate the related section from posts'))),g.default.createElement(T.default,{checked:this.state.show_thumbnails,disabled:!t||n||this.props.isSavingAnyOption(["related-posts","show_thumbnails"]),onChange:this.handleShowThumbnailsToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Use a large and visually striking layout"))),(0,v.translate)("{{span}}You can now also configure related posts in the Customizer. {{ExternalLink}}Try it out!{{/ExternalLink}}{{/span}}",{components:{span:g.default.createElement("span",{className:"jp-form-setting-explanation"}),ExternalLink:g.default.createElement(A.default,{className:"jp-module-settings__external-link",href:this.props.configureUrl})}}),g.default.createElement(L.FormLabel,{className:"jp-form-label-wide"},(0,v.translate)("Preview",{context:"A header for a preview area in the configuration screen."})),g.default.createElement(w.default,{className:"jp-related-posts-preview"},this.state.show_headline&&g.default.createElement("div",{className:"jp-related-posts-preview__title"},(0,v.translate)("Related")),[{url:"1-wpios-ipad-3-1-viewsite.png",text:(0,v.translate)("Big iPhone/iPad Update Now Available"),context:(0,v.translate)('In "Mobile"',{comment:"It refers to the category where a post was found. Used in an example preview."})},{url:"wordpress-com-news-wordpress-for-android-ui-update2.jpg",text:(0,v.translate)("The WordPress for Android App Gets a Big Facelift"),context:(0,v.translate)('In "Mobile"',{comment:"It refers to the category where a post was found. Used in an example preview."})},{url:"videopresswedding.jpg",text:(0,v.translate)("Upgrade Focus: VideoPress For Weddings"),context:(0,v.translate)('In "Upgrade"',{comment:"It refers to the category where a post was found. Used in an example preview."})}].map(function(t,n){return g.default.createElement("div",{key:"preview_"+n,className:"jp-related-posts-preview__item"},e.state.show_thumbnails&&g.default.createElement("img",{src:"https://jetpackme.files.wordpress.com/2014/08/"+t.url+"?w=350&h=200&crop=1",alt:t.text}),g.default.createElement("h4",{className:"jp-related-posts-preview__post-title"},g.default.createElement("a",{href:"#/traffic"},t.text)),g.default.createElement("p",{className:"jp-related-posts-preview__post-context"},t.context))})))))}}]),t}(g.default.Component);t.RelatedPosts=(0,C.ModuleSettingsForm)(P)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(25),y=r(v),A=n(47),E=n(30),w=n(52),k=n(40),T=r(k),L=n(36),S=r(L),C=n(28),O=n(61),z=n(71),N=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(T.default,(0,i.default)({},this.props,{module:"search",feature:A.FEATURE_SEARCH_JETPACK,hideButton:!0}),M.default.createElement(S.default,{hasChild:!0,module:{module:"search"},support:{text:(0,g.translate)("Replaces the default WordPress search with a faster, filterable search experience."),link:"https://jetpack.com/support/search"}},M.default.createElement(w.ModuleToggle,{slug:"search",compact:!0,activated:this.props.getOptionValue("search"),toggling:this.props.isSavingAnyOption("search"),toggleModule:this.props.toggleModuleNow},(0,g.translate)("Replace WordPress built-in search with an improved search experience")),this.props.getOptionValue("search")&&M.default.createElement(z.FormFieldset,null,M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)("Add the Jetpack search widget to your sidebar to configure advanced search filters.")))),this.props.getOptionValue("search")&&M.default.createElement(y.default,{compact:!0,className:"jp-settings-card__configure-link",href:"customize.php?autofocus[panel]=widgets"},(0,g.translate)("Add Jetpack Search Widget")))}}]),t}(M.default.Component);t.default=(0,b.connect)(function(e){return{siteAdminUrl:(0,C.getSiteAdminUrl)(e),sitePlan:(0,O.getSitePlan)(e),fetchingSiteData:(0,O.isFetchingSiteData)(e)}})((0,E.ModuleSettingsForm)(N)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.VerificationServices=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(508),v=r(g),y=n(474),A=r(y),E=n(71),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L),C=n(473),O=r(C),z=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.activateVerificationTools=function(){return r.props.updateOptions({"verification-tools":!0})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this,t=this.props.getModule("verification-tools");return"inactive"===this.props.getModuleOverride("google-analytics")?M.default.createElement(O.default,{title:t.name,icon:"cog",description:(0,b.translate)("%(moduleName)s has been disabled by a site administrator.",{args:{moduleName:t.name}})}):this.props.getOptionValue("verification-tools")?M.default.createElement(T.default,(0,i.default)({},this.props,{module:"verification-tools",saveDisabled:this.props.isSavingAnyOption(["google","bing","pinterest","yandex"])}),M.default.createElement(S.default,{module:t,support:{text:(0,b.translate)("Provides the necessary hidden tags needed to verify your WordPress site with various services."),link:"https://jetpack.com/support/site-verification-tools"}},M.default.createElement("p",null,(0,b.translate)("Note that {{b}}verifying your site with these services is not necessary{{/b}} in order for your site to be indexed by search engines. To use these advanced search engine tools and verify your site with a service, paste the HTML Tag code below. Read the {{support}}full instructions{{/support}} if you are having trouble. Supported verification services: {{google}}Google Search Console{{/google}}, {{bing}}Bing Webmaster Center{{/bing}}, {{pinterest}}Pinterest Site Verification{{/pinterest}}, and {{yandex}}Yandex.Webmaster{{/yandex}}.",{components:{b:M.default.createElement("strong",null),support:M.default.createElement("a",{href:"https://jetpack.com/support/site-verification-tools/"}),google:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://www.google.com/webmasters/tools/"}),bing:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://www.bing.com/webmaster/"}),pinterest:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://pinterest.com/website/verify/"}),yandex:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://webmaster.yandex.com/sites/"})}})),M.default.createElement(E.FormFieldset,null,[{id:"google",label:(0,b.translate)("Google"),placeholder:'<meta name="google-site-verification" content="1234" />'},{id:"bing",label:(0,b.translate)("Bing"),placeholder:'<meta name="msvalidate.01" content="1234" />'},{id:"pinterest",label:(0,b.translate)("Pinterest"),placeholder:'<meta name="p:domain_verify" content="1234" />'},{id:"yandex",label:(0,b.translate)("Yandex"),placeholder:'<meta name="yandex-verification" content="1234" />'}].map(function(t){return M.default.createElement(E.FormLabel,{className:"jp-form-input-with-prefix",key:"verification_service_"+t.id},M.default.createElement("span",null,t.label),M.default.createElement(v.default,{name:t.id,value:e.props.getOptionValue(t.id),placeholder:t.placeholder,className:"code",disabled:e.props.isUpdating(t.id),onChange:e.props.onOptionChange}))})))):M.default.createElement(O.default,{callToAction:(0,b.translate)("Activate"),title:t.name,icon:"cog",description:t.long_description,onClick:this.activateVerificationTools})}}]),t}(M.default.Component);t.VerificationServices=(0,w.ModuleSettingsForm)(z)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Sitemaps=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(474),y=r(v),A=n(27),E=r(A),w=n(15),k=r(w),T=n(71),L=n(30),S=n(52),C=n(40),O=r(C),z=n(36),N=r(z),D=n(28),P=t.Sitemaps=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.trackSitemapUrl=function(){k.default.tracks.recordJetpackClick("sitemap-url-link")},r.trackSitemapNewsUrl=function(){k.default.tracks.recordJetpackClick("sitemap-news-url-link")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getModule("sitemaps"),t=(0,E.default)(e,["extra","sitemap_url"],""),n=(0,E.default)(e,["extra","news_sitemap_url"],"");return M.default.createElement(O.default,(0,i.default)({},this.props,{module:"sitemaps",hideButton:!0}),M.default.createElement(N.default,{hasChild:!0,module:{module:"sitemaps"},support:{text:(0,g.translate)("Automatically generates the files required for search engines to index your site."),link:"https://jetpack.com/support/sitemaps/"}},M.default.createElement(S.ModuleToggle,{slug:"sitemaps",compact:!0,activated:this.props.getOptionValue("sitemaps"),toggling:this.props.isSavingAnyOption("sitemaps"),toggleModule:this.props.toggleModuleNow},(0,g.translate)("Generate XML sitemaps")),this.props.isSiteVisibleToSearchEngines?this.props.getOptionValue("sitemaps")&&M.default.createElement(T.FormFieldset,null,M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)("Your sitemap is automatically sent to all major search engines for indexing.")),M.default.createElement("p",null,M.default.createElement(y.default,{onClick:this.trackSitemapUrl,icon:!0,target:"_blank",rel:"noopener noreferrer",href:t},t),M.default.createElement("br",null),M.default.createElement(y.default,{onClick:this.trackSitemapNewsUrl,icon:!0,target:"_blank",rel:"noopener noreferrer",href:n},n))):M.default.createElement(T.FormFieldset,null,M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)('Your site is not currently accessible to search engines. You might have "Search Engine Visibility" disabled in your {{a}}Reading Settings{{/a}}.',{components:{a:M.default.createElement("a",{href:this.props.siteAdminUrl+"options-reading.php"})}})))))}}]),t}(M.default.Component);t.default=(0,b.connect)(function(e){return{isSiteVisibleToSearchEngines:(0,D.isSiteVisibleToSearchEngines)(e),siteAdminUrl:(0,D.getSiteAdminUrl)(e)}})((0,L.ModuleSettingsForm)(P))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Writing=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(25),y=r(v),A=n(23),E=n(103),w=n(28),k=n(21),T=n(74),L=n(211),S=r(L),C=n(1134),O=r(C),z=n(1137),N=r(z),D=n(1138),P=r(D),x=n(1139),j=r(x),R=n(1140),Y=r(R),I=n(1152),q=n(1153),B=r(q),W=t.Writing=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,getModuleOverride:this.props.getModuleOverride},t=["masterbar","markdown","after-the-deadline","custom-content-types","photon","carousel","post-by-email","infinite-scroll","minileven","videopress","lazy-images"].some(this.props.isModuleFound);if(!this.props.searchTerm&&!this.props.active)return null;if(!t)return null;var n=this.props.userCanManageModules||this.props.userCanEditPosts&&this.props.isModuleActivated("after-the-deadline"),r=this.props.userCanManageModules||this.props.userCanEditPosts&&this.props.isModuleActivated("post-by-email");return M.default.createElement("div",null,M.default.createElement(S.default,null),this.props.isModuleFound("masterbar")&&!this.props.masterbarIsAlwaysActive&&M.default.createElement(I.Masterbar,(0,i.default)({connectUrl:this.props.connectUrl},e)),n&&M.default.createElement(O.default,(0,i.default)({},e,{userCanManageModules:this.props.userCanManageModules})),M.default.createElement(N.default,e),M.default.createElement(B.default,e),this.props.isModuleFound("custom-content-types")&&M.default.createElement(P.default,e),M.default.createElement(j.default,e),this.props.isModuleFound("post-by-email")&&r&&M.default.createElement(Y.default,(0,i.default)({},e,{connectUrl:this.props.connectUrl,isLinked:this.props.isLinked,userCanManageModules:this.props.userCanManageModules})),!n&&!r&&M.default.createElement(y.default,null,(0,g.translate)("Writing tools available to you will be shown here when an administrator enables them.")))}}]),t}(M.default.Component);W.displayName="WritingSettings",t.default=(0,b.connect)(function(e){return{module:function(t){return(0,A.getModule)(e,t)},settings:(0,E.getSettings)(e),masterbarIsAlwaysActive:(0,w.isAtomicSite)(e),isDevMode:(0,k.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,k.isUnavailableInDevMode)(e,t)},userCanEditPosts:(0,w.userCanEditPosts)(e),isModuleActivated:function(t){return(0,A.isModuleActivated)(e,t)},isLinked:(0,k.isCurrentUserLinked)(e),userCanManageModules:(0,w.userCanManageModules)(e),isModuleFound:function(t){return(0,T.isModuleFound)(e,t)},connectUrl:(0,k.getConnectUrl)(e),getModuleOverride:function(t){return(0,A.getModuleOverride)(e,t)}}})(W)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Composing=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(516),k=r(w),T=n(14),L=r(T),S=n(15),C=r(S),O=n(71),z=n(74),N=n(52),D=n(30),P=n(23),x=n(1135),j=r(x),R=n(40),Y=r(R),I=n(36),q=r(I),B=t.Composing=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={onpublish:r.props.getOptionValue("onpublish","after-the-deadline"),onupdate:r.props.getOptionValue("onupdate","after-the-deadline"),guess_lang:r.props.getOptionValue("guess_lang","after-the-deadline"),"Bias Language":r.props.getOptionValue("Bias Language","after-the-deadline"),Cliches:r.props.getOptionValue("Cliches","after-the-deadline"),"Complex Expression":r.props.getOptionValue("Complex Expression","after-the-deadline"),"Diacritical Marks":r.props.getOptionValue("Diacritical Marks","after-the-deadline"),"Double Negative":r.props.getOptionValue("Double Negative","after-the-deadline"),"Hidden Verbs":r.props.getOptionValue("Hidden Verbs","after-the-deadline"),"Jargon Language":r.props.getOptionValue("Jargon Language","after-the-deadline"),"Passive voice":r.props.getOptionValue("Passive voice","after-the-deadline"),"Phrases to Avoid":r.props.getOptionValue("Phrases to Avoid","after-the-deadline"),"Redundant Expression":r.props.getOptionValue("Redundant Expression","after-the-deadline")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("after-the-deadline",e))},r.handleToggleChange=function(e){return function(){return r.updateOptions(e)}},r.getToggle=function(e,t){return g.default.createElement(E.default,{checked:r.state[e],disabled:!r.props.getOptionValue("after-the-deadline")||r.props.isUnavailableInDevMode("after-the-deadline")||r.props.isSavingAnyOption(["after-the-deadline",e]),onChange:r.handleToggleChange(e)},g.default.createElement("span",{className:"jp-form-toggle-explanation"},t))},r.getAtdSettings=function(){var e=r.props.getOptionValue("ignored_phrases");return g.default.createElement(q.default,{hasChild:!0,disableInDevMode:!0,module:r.props.getModule("after-the-deadline"),support:{text:(0,y.translate)("Checks your content for correct grammar and spelling, misused words, and style while you write."),link:"https://jetpack.com/support/spelling-and-grammar/"}},g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null," ",(0,y.translate)("Proofreading")," "),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("Automatically proofread content when: ")),r.getToggle("onpublish",(0,y.translate)("A post or page is first published")),r.getToggle("onupdate",(0,y.translate)("A post or page is updated"))),g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null," ",(0,y.translate)("Automatic Language Detection")),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("The proofreader supports English, French, German, Portuguese and Spanish.")),r.getToggle("guess_lang",(0,y.translate)("Use automatically detected language to proofread posts and pages"))),g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null," ",(0,y.translate)("English Options")," "),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("Enable proofreading for the following grammar and style rules: ")),r.getToggle("Bias Language",(0,y.translate)("Bias Language")),r.getToggle("Cliches",(0,y.translate)("Clichés")),r.getToggle("Complex Expression",(0,y.translate)("Complex Phrases")),r.getToggle("Diacritical Marks",(0,y.translate)("Diacritical Marks")),r.getToggle("Double Negative",(0,y.translate)("Double Negatives")),r.getToggle("Hidden Verbs",(0,y.translate)("Hidden Verbs")),r.getToggle("Jargon Language",(0,y.translate)("Jargon")),r.getToggle("Passive voice",(0,y.translate)("Passive Voice")),r.getToggle("Phrases to Avoid",(0,y.translate)("Phrases to Avoid")),r.getToggle("Redundant Expression",(0,y.translate)("Redundant Phrases"))),g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null,(0,y.translate)("Ignored Phrases")),g.default.createElement(j.default,{name:"ignored_phrases",disabled:!r.props.getOptionValue("after-the-deadline"),placeholder:(0,y.translate)("Add a phrase"),value:void 0!==e&&""!==e?e.split(","):[],onChange:r.props.onOptionChange}),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("Confirm each new phrase you add by pressing enter."))))},r.updateFormStateByMarkdown=function(e){return r.props.getSettingCurrentValue("wpcom_publish_comments_with_markdown",e)?r.props.updateFormStateModuleOption(e,"wpcom_publish_posts_with_markdown"):r.props.updateFormStateModuleOption(e,"wpcom_publish_posts_with_markdown",!0)},r.trackOpenCard=function(){C.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"atd"})},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("after-the-deadline"),t=this.props.isModuleFound("markdown");if(!t&&!e)return null;var n=this.props.module("markdown"),r=this.props.module("after-the-deadline"),a=this.props.isUnavailableInDevMode("after-the-deadline"),o=g.default.createElement(q.default,{module:n,support:{text:(0,y.translate)("Allows you to compose content with links, lists, and other styles using the Markdown syntax."),link:"https://jetpack.com/support/markdown/"}},g.default.createElement(O.FormFieldset,null,g.default.createElement(N.ModuleToggle,{slug:"markdown",activated:!!this.props.getOptionValue("wpcom_publish_posts_with_markdown","markdown"),toggling:this.props.isSavingAnyOption(["markdown","wpcom_publish_posts_with_markdown"]),disabled:this.props.isSavingAnyOption(["markdown","wpcom_publish_posts_with_markdown"]),toggleModule:this.updateFormStateByMarkdown},g.default.createElement("span",{className:"jp-form-toggle-explanation"},n.description)))),s=g.default.createElement(k.default,{onOpen:this.trackOpenCard,className:(0,L.default)("jp-foldable-card__main-settings",{"jp-foldable-settings-disable":a}),header:this.props.userCanManageModules?g.default.createElement(N.ModuleToggle,{slug:"after-the-deadline",compact:!0,disabled:a,activated:this.props.getOptionValue("after-the-deadline"),toggling:this.props.isSavingAnyOption("after-the-deadline"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},r.description)):g.default.createElement("span",{className:"jp-form-toggle-explanation"},r.description)},this.getAtdSettings());return g.default.createElement(Y.default,(0,i.default)({},this.props,{header:(0,y.translate)("Composing",{context:"Settings header"}),hideButton:!e,module:"composing",saveDisabled:this.props.isSavingAnyOption("ignored_phrases")}),t&&o,e&&s)}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,P.getModule)(e,t)},isModuleFound:function(t){return(0,z.isModuleFound)(e,t)}}})((0,D.ModuleSettingsForm)(B))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(1136),M=r(_),b=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={tags:r.props.value||[]},r.handleChange=function(e){r.setState({tags:e}),r.props.onChange&&r.props.onChange({target:{name:r.props.name,value:e.join(",")}})},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement(M.default,{disabled:this.props.disabled,inputProps:{placeholder:this.props.placeholder},onChange:this.handleChange,value:this.state.tags})}}]),t}(m.default.Component);t.default=b,e.exports=t.default},function(e,t,n){var r,a,i;!function(o,s){a=[e,t,n(1),n(7)],r=s,void 0!==(i="function"==typeof r?r.apply(t,a):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function l(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}function d(e){return window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData?e.clipboardData.getData("text/plain"):""}function f(e){var t=e.tag,n=e.key,r=e.disabled,a=e.onRemove,i=e.classNameRemove,o=e.getTagDisplayValue,s=u(e,["tag","key","disabled","onRemove","classNameRemove","getTagDisplayValue"]);return _.default.createElement("span",b({key:n},s),o(t),!r&&_.default.createElement("a",{className:i,onClick:function(e){return a(n)}}))}function p(e){var t=(e.addTag,u(e,["addTag"])),n=t.onChange,r=t.value,a=u(t,["onChange","value"]);return _.default.createElement("input",b({type:"text",onChange:n,value:r},a))}function h(e,t){return _.default.createElement("span",null,e,t)}function m(e){return e.split(" ").map(function(e){return e.trim()})}Object.defineProperty(t,"__esModule",{value:!0});var _=a(n),M=(a(r),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g={className:"react-tagsinput-input",placeholder:"Add a tag"},v=function(e){function t(){o(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={tag:"",isFocused:!1},e.focus=e.focus.bind(e),e.blur=e.blur.bind(e),e}return c(t,e),M(t,[{key:"_getTagDisplayValue",value:function(e){var t=this.props.tagDisplayProp;return t?e[t]:e}},{key:"_makeTag",value:function(e){var t=this.props.tagDisplayProp;return t?i({},t,e):e}},{key:"_removeTag",value:function(e){var t=this.props.value.concat([]);if(e>-1&&e<t.length){var n=t.splice(e,1);this.props.onChange(t,n,[e])}}},{key:"_clearInput",value:function(){this.hasControlledInput()?this.props.onChangeInput(""):this.setState({tag:""})}},{key:"_tag",value:function(){return this.hasControlledInput()?this.props.inputValue:this.state.tag}},{key:"_addTags",value:function(e){var t=this,n=this.props,r=n.validationRegex,a=n.onChange,i=n.onValidationReject,o=n.onlyUnique,s=n.maxTags,c=n.value;o&&(e=l(e),e=e.filter(function(e){return c.every(function(n){return t._getTagDisplayValue(n)!==t._getTagDisplayValue(e)})}));var u=e.filter(function(e){return!r.test(t._getTagDisplayValue(e))});if(e=e.filter(function(e){return r.test(t._getTagDisplayValue(e))}),e=e.filter(function(e){var n=t._getTagDisplayValue(e);return"function"==typeof n.trim?n.trim().length>0:n}),s>=0){var d=Math.max(s-c.length,0);e=e.slice(0,d)}if(i&&u.length>0&&i(u),e.length>0){for(var f=c.concat(e),p=[],h=0;h<e.length;h++)p.push(c.length+h);return a(f,e,p),this._clearInput(),!0}return!(u.length>0)&&(this._clearInput(),!1)}},{key:"_shouldPreventDefaultEventOnAdd",value:function(e,t,n){return!!e||13===n&&(this.props.preventSubmit||!this.props.preventSubmit&&!t)}},{key:"focus",value:function(){this.input&&"function"==typeof this.input.focus&&this.input.focus(),this.handleOnFocus()}},{key:"blur",value:function(){this.input&&"function"==typeof this.input.blur&&this.input.blur(),this.handleOnBlur()}},{key:"accept",value:function(){var e=this._tag();return""!==e&&(e=this._makeTag(e),this._addTags([e]))}},{key:"addTag",value:function(e){return this._addTags([e])}},{key:"clearInput",value:function(){this._clearInput()}},{key:"handlePaste",value:function(e){var t=this,n=this.props,r=n.addOnPaste,a=n.pasteSplit;if(r){e.preventDefault();var i=d(e),o=a(i).map(function(e){return t._makeTag(e)});this._addTags(o)}}},{key:"handleKeyDown",value:function(e){if(!e.defaultPrevented){var t=this.props,n=t.value,r=t.removeKeys,a=t.addKeys,i=this._tag(),o=""===i,s=e.keyCode,c=e.key,u=-1!==a.indexOf(s)||-1!==a.indexOf(c),l=-1!==r.indexOf(s)||-1!==r.indexOf(c);if(u){var d=this.accept();this._shouldPreventDefaultEventOnAdd(d,o,s)&&e.preventDefault()}l&&n.length>0&&o&&(e.preventDefault(),this._removeTag(n.length-1))}}},{key:"handleClick",value:function(e){e.target===this.div&&this.focus()}},{key:"handleChange",value:function(e){var t=this.props.onChangeInput,n=this.props.inputProps.onChange,r=e.target.value;n&&n(e),this.hasControlledInput()?t(r):this.setState({tag:r})}},{key:"handleOnFocus",value:function(e){var t=this.props.inputProps.onFocus;t&&t(e),this.setState({isFocused:!0})}},{key:"handleOnBlur",value:function(e){var t=this.props.inputProps.onBlur;if(this.setState({isFocused:!1}),null!=e&&(t&&t(e),this.props.addOnBlur)){var n=this._makeTag(e.target.value);this._addTags([n])}}},{key:"handleRemove",value:function(e){this._removeTag(e)}},{key:"inputProps",value:function(){var e=this.props.inputProps,t=(e.onChange,e.onFocus,e.onBlur,u(e,["onChange","onFocus","onBlur"])),n=b({},g,t);return this.props.disabled&&(n.disabled=!0),n}},{key:"inputValue",value:function(e){return e.currentValue||e.inputValue||""}},{key:"hasControlledInput",value:function(){var e=this.props,t=e.inputValue;return"function"==typeof e.onChangeInput&&"string"==typeof t}},{key:"componentDidMount",value:function(){this.hasControlledInput()||this.setState({tag:this.inputValue(this.props)})}},{key:"componentWillReceiveProps",value:function(e){this.hasControlledInput()||this.inputValue(e)&&this.setState({tag:this.inputValue(e)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=(t.onChange,t.tagProps),a=t.renderLayout,i=t.renderTag,o=t.renderInput,s=(t.addKeys,t.removeKeys,t.className),c=t.focusedClassName,l=(t.addOnBlur,t.addOnPaste,t.inputProps,t.pasteSplit,t.onlyUnique,t.maxTags,t.validationRegex,t.disabled);t.tagDisplayProp,t.inputValue,t.onChangeInput,
|
44 |
u(t,["value","onChange","tagProps","renderLayout","renderTag","renderInput","addKeys","removeKeys","className","focusedClassName","addOnBlur","addOnPaste","inputProps","pasteSplit","onlyUnique","maxTags","validationRegex","disabled","tagDisplayProp","inputValue","onChangeInput"]);this.state.isFocused&&(s+=" "+c);var d=n.map(function(t,n){return i(b({key:n,tag:t,onRemove:e.handleRemove.bind(e),disabled:l,getTagDisplayValue:e._getTagDisplayValue.bind(e)},r))}),f=o(b({ref:function(t){e.input=t},value:this._tag(),onPaste:this.handlePaste.bind(this),onKeyDown:this.handleKeyDown.bind(this),onChange:this.handleChange.bind(this),onFocus:this.handleOnFocus.bind(this),onBlur:this.handleOnBlur.bind(this),addTag:this.addTag.bind(this)},this.inputProps()));return _.default.createElement("div",{ref:function(t){e.div=t},onClick:this.handleClick.bind(this),className:s},a(d,f))}}]),t}(_.default.Component);v.defaultProps={className:"react-tagsinput",focusedClassName:"react-tagsinput--focused",addKeys:[9,13],addOnBlur:!1,addOnPaste:!1,inputProps:{},removeKeys:[8],renderInput:p,renderTag:f,renderLayout:h,pasteSplit:m,tagProps:{className:"react-tagsinput-tag",classNameRemove:"react-tagsinput-remove"},onlyUnique:!1,maxTags:-1,validationRegex:/.*/,disabled:!1,tagDisplayProp:null,preventSubmit:!0},t.default=v,e.exports=t.default})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(44),k=r(w),T=n(47),L=n(71),S=n(52),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=n(23),x=n(74),j=n(61),R=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={carousel_display_exif:r.props.getOptionValue("carousel_display_exif","carousel")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("carousel",e))},r.handleCarouselDisplayExifChange=function(){r.updateOptions("carousel_display_exif")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("carousel"),t=this.props.isModuleFound("videopress");if(!e&&!t)return null;var n=this.props.module("carousel"),r=this.props.getOptionValue("carousel"),a=this.props.module("videopress"),o=(0,T.getPlanClass)(this.props.sitePlan.product_slug),s=g.default.createElement(D.default,{hasChild:!0,module:{module:"carousel"},support:{text:(0,y.translate)("Replaces the standard WordPress galleries with a full-screen photo browsing experience, including comments and EXIF metadata."),link:"https://jetpack.com/support/carousel"}},g.default.createElement(S.ModuleToggle,{slug:"carousel",activated:r,toggling:this.props.isSavingAnyOption("carousel"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},n.description)),g.default.createElement(L.FormFieldset,null,g.default.createElement(E.default,{checked:this.state.carousel_display_exif,disabled:!r||this.props.isSavingAnyOption(["carousel","carousel_display_exif"]),onChange:this.handleCarouselDisplayExifChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,y.translate)("Show photo metadata (Exif) in carousel, when available"))),g.default.createElement(L.FormLabel,null,g.default.createElement(L.FormLegend,{className:"jp-form-label-wide"},(0,y.translate)("Color scheme")),g.default.createElement(L.FormSelect,(0,i.default)({name:"carousel_background_color",value:this.props.getOptionValue("carousel_background_color"),disabled:!r||this.props.isSavingAnyOption(["carousel","carousel_background_color"])},this.props,{validValues:this.props.validValues("carousel_background_color","carousel")}))))),c=(0,k.default)(["is-premium-plan","is-business-plan"],o)&&g.default.createElement(D.default,{hasChild:!0,disableInDevMode:!0,module:a,support:{text:(0,y.translate)("Hosts your video files on the global WordPress.com servers."),link:"https://jetpack.com/support/videopress/"}},g.default.createElement(S.ModuleToggle,{slug:"videopress",disabled:this.props.isUnavailableInDevMode("videopress"),activated:this.props.getOptionValue("videopress"),toggling:this.props.isSavingAnyOption("videopress"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},a.description))),u="inactive"===this.props.getModuleOverride("videopress");return g.default.createElement(z.default,(0,i.default)({},this.props,{header:(0,y.translate)("Media"),hideButton:!e,feature:!u&&T.FEATURE_VIDEO_HOSTING_JETPACK,saveDisabled:this.props.isSavingAnyOption("carousel_background_color")}),e&&s,t&&c)}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,P.getModule)(e,t)},isModuleFound:function(t){return(0,x.isModuleFound)(e,t)},sitePlan:(0,j.getSitePlan)(e),getModuleOverride:function(t){return(0,P.getModuleOverride)(e,t)}}})((0,C.ModuleSettingsForm)(R)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContentTypes=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(71),k=n(30),T=n(23),L=n(74),S=n(40),C=r(S),O=n(36),z=r(O),N=t.CustomContentTypes=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={testimonial:r.props.getOptionValue("jetpack_testimonial","custom-content-types"),portfolio:r.props.getOptionValue("jetpack_portfolio","custom-content-types")},r.updateCPTs=function(e){var t="testimonial"===e?!(!r.state.testimonial||r.state.portfolio):!(!r.state.portfolio||r.state.testimonial);r.props.updateFormStateModuleOption("custom-content-types","jetpack_"+e,t),r.setState((0,s.default)({},e,!r.state[e]))},r.linkIfActiveCPT=function(e){return r.props.getSettingCurrentValue("jetpack_"+e,"custom-content-types")?g.default.createElement("a",{href:r.props.siteAdminUrl+"edit.php?post_type=jetpack-"+e}):g.default.createElement("span",null)},r.handleTestimonialToggleChange=function(){r.updateCPTs("testimonial")},r.handlePortfolioToggleChange=function(){r.updateCPTs("portfolio")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){if(!this.props.isModuleFound("custom-content-types"))return null;var e=this.props.module("custom-content-types"),t="inactive"===this.props.getModuleOverride("custom-content-types"),n=t&&(0,y.translate)("This feature has been disabled by a site administrator.");return g.default.createElement(C.default,(0,i.default)({},this.props,{module:"custom-content-types",hideButton:!0}),g.default.createElement(z.default,{hasChild:!0,module:e,support:{text:(0,y.translate)("Adds the Testimonial custom post type, allowing you to collect, organize, and display testimonials on your site."),link:"https://jetpack.com/support/custom-content-types/"}},g.default.createElement(E.default,{checked:this.state.testimonial,disabled:this.props.isSavingAnyOption("jetpack_testimonial")||t,onChange:this.handleTestimonialToggleChange,disabledReason:n},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,y.translate)("Testimonials"))),g.default.createElement(w.FormFieldset,null,g.default.createElement("p",{className:"jp-form-setting-explanation"},(0,y.translate)("Add, organize, and display {{testimonialLink}}testimonials{{/testimonialLink}}. If your theme doesn’t support testimonials yet, you can display them using the shortcode\t( [testimonials] ).",{components:{testimonialLink:this.linkIfActiveCPT("testimonial")}})))),g.default.createElement(z.default,{hasChild:!0,module:e,support:{text:(0,y.translate)("Adds the Portfolio custom post type, allowing you to manage and showcase projects on your site."),link:"https://jetpack.com/support/custom-content-types/"}},g.default.createElement(E.default,{checked:this.state.portfolio,disabled:this.props.isSavingAnyOption("jetpack_portfolio")||t,onChange:this.handlePortfolioToggleChange,disabledReason:n},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,y.translate)("Portfolios"))),g.default.createElement(w.FormFieldset,null,g.default.createElement("p",{className:"jp-form-setting-explanation"},(0,y.translate)("Add, organize, and display {{portfolioLink}}portfolios{{/portfolioLink}}. If your theme doesn’t support portfolios yet, you can display them using the shortcode ( [portfolio] ).",{components:{portfolioLink:this.linkIfActiveCPT("portfolio")}})))))}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,T.getModule)(e,t)},isModuleFound:function(t){return(0,L.isModuleFound)(e,t)},getModuleOverride:function(t){return(0,T.getModuleOverride)(e,t)}}})((0,k.ModuleSettingsForm)(N))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(15),k=r(w),T=n(71),L=n(52),S=n(23),C=n(28),O=n(74),z=n(30),N=n(40),D=r(N),P=n(36),x=r(P),j=n(515),R=r(j),Y=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.getInfiniteMode=function(){return r.props.getOptionValue("infinite-scroll")?r.props.getOptionValue("infinite_scroll","infinite-scroll")?"infinite_scroll":"infinite_button":"infinite_default"},r.updateInfiniteMode=function(e){r.setState({infinite_mode:e},r.prepareOptionsToUpdate)},r.prepareOptionsToUpdate=function(){"infinite_default"===r.state.infinite_mode?r.props.updateFormStateOptionValue("infinite-scroll",!1):"infinite_scroll"!==r.state.infinite_mode&&"infinite_button"!==r.state.infinite_mode||r.props.updateFormStateOptionValue({"infinite-scroll":!0,infinite_scroll:"infinite_scroll"===r.state.infinite_mode})},r.updateOptions=function(e,t){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption(t,e))},r.trackLearnMoreIS=function(){k.default.tracks.recordJetpackClick({target:"learn-more",feature:"infinite-scroll",extra:"not-supported-link"})},r.state={infinite_mode:r.getInfiniteMode(),wp_mobile_excerpt:r.props.getOptionValue("wp_mobile_excerpt","minileven"),wp_mobile_featured_images:r.props.getOptionValue("wp_mobile_featured_images","minileven"),wp_mobile_app_promos:r.props.getOptionValue("wp_mobile_app_promos","minileven")},r.handleInfiniteScrollModeChange=function(e){return function(){return r.updateInfiniteMode(e)}},r.handleMinilevenOptionChange=function(e,t){return function(){return r.updateOptions(e,t)}},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props.isModuleFound("infinite-scroll"),n=this.props.isModuleFound("minileven");if(!t&&!n)return null;var r=this.props.getModule("infinite-scroll"),a=this.props.getModule("minileven"),o=this.props.getOptionValue(a.module),s="inactive"===this.props.getModuleOverride("infinite-scroll");return g.default.createElement(D.default,(0,i.default)({},this.props,{header:(0,y.translate)("Theme enhancements"),hideButton:!t||!this.props.isInfiniteScrollSupported}),s&&g.default.createElement(R.default,{moduleName:r.name,compact:!0}),t&&!s&&g.default.createElement(x.default,{hasChild:!0,module:{module:r.module},key:"theme_enhancement_"+r.module,support:{text:(0,y.translate)("Loads the next posts automatically when the reader approaches the bottom of the page."),link:"https://jetpack.com/support/infinite-scroll"}},g.default.createElement(T.FormLegend,{className:"jp-form-label-wide"},r.name),this.props.isInfiniteScrollSupported?[{key:"infinite_default",label:(0,y.translate)("Load more posts using the default theme behavior")},{key:"infinite_button",label:(0,y.translate)("Load more posts in page with a button")},{key:"infinite_scroll",label:(0,y.translate)("Load more posts as the reader scrolls down")}].map(function(t){return g.default.createElement(T.FormLabel,{key:r.module+"_"+t.key},g.default.createElement("input",{type:"radio",name:"infinite_mode",value:t.key,checked:t.key===e.state.infinite_mode,disabled:e.props.isSavingAnyOption([r.module,t.key]),onChange:e.handleInfiniteScrollModeChange(t.key)}),g.default.createElement("span",{className:"jp-form-toggle-explanation"},t.label))}):g.default.createElement("span",null,(0,y.translate)("Theme support required.")+" ",g.default.createElement("a",{onClick:this.trackLearnMoreIS,href:r.learn_more_button+"#theme",title:(0,y.translate)("Learn more about adding support for Infinite Scroll to your theme.")},(0,y.translate)("Learn more")))),n&&g.default.createElement(x.default,{hasChild:!0,module:{module:a.module},key:"theme_enhancement_"+a.module,support:{text:(0,y.translate)("Enables a lightweight, mobile-friendly theme that will be displayed to visitors on mobile devices."),link:"https://jetpack.com/support/mobile-theme"}},g.default.createElement(L.ModuleToggle,{slug:a.module,activated:o,toggling:this.props.isSavingAnyOption(a.module),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},a.description)),g.default.createElement(T.FormFieldset,null,[{key:"wp_mobile_excerpt",label:(0,y.translate)("Use excerpts instead of full posts on front page and archive pages")},{key:"wp_mobile_featured_images",label:(0,y.translate)("Show featured images")},{key:"wp_mobile_app_promos",label:(0,y.translate)("Show an ad for the WordPress mobile apps in the footer of the mobile theme")}].map(function(t){return g.default.createElement(E.default,{checked:e.state[t.key],disabled:!o||e.props.isSavingAnyOption([a.module,t.key]),onChange:e.handleMinilevenOptionChange(t.key,a.module),key:a.module+"_"+t.key},g.default.createElement("span",{className:"jp-form-toggle-explanation"},t.label))}))))}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,S.getModule)(e,t)},isInfiniteScrollSupported:(0,C.currentThemeSupports)(e,"infinite-scroll"),isModuleFound:function(t){return(0,O.isModuleFound)(e,t)}}})((0,z.ModuleSettingsForm)(Y)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(41),y=r(v),A=n(1141),E=r(A),w=n(25),k=r(w),T=n(15),L=r(T),S=n(71),C=n(52),O=n(23),z=n(74),N=n(30),D=n(40),P=r(D),x=n(36),j=r(x),R=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.regeneratePostByEmailAddress=function(e){L.default.tracks.recordJetpackClick("pbe-regenerage-email"),e.preventDefault(),r.props.regeneratePostByEmailAddress()},r.address=function(){var e=r.props.getOptionValue("post_by_email_address");return!1===e||"1"===e||null===e?"":e},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){if(!this.props.isModuleFound("post-by-email"))return null;var e=this.props.getModule("post-by-email"),t=this.props.getOptionValue("post-by-email"),n=this.props.isUnavailableInDevMode("post-by-email")||!this.props.isLinked,r=this.address();return M.default.createElement(P.default,(0,i.default)({},this.props,{module:"post-by-email",hideButton:!0}),M.default.createElement(j.default,{hasChild:!0,disableInDevMode:!0,module:e,support:{text:(0,g.translate)("Allows you to publish new posts by sending an email to a special address."),link:"https://jetpack.com/support/post-by-email/"}},this.props.userCanManageModules?M.default.createElement(C.ModuleToggle,{slug:"post-by-email",compact:!0,disabled:n,activated:t,toggling:this.props.isSavingAnyOption("post-by-email"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.module("post-by-email").description)):M.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.module("post-by-email").description),M.default.createElement(S.FormFieldset,null,M.default.createElement(S.FormLabel,null,M.default.createElement(S.FormLegend,null,(0,g.translate)("Email Address")),M.default.createElement(E.default,{value:r,disabled:!t||n,copy:(0,g.translate)("Copy",{context:"verb"}),copied:(0,g.translate)("Copied!"),prompt:(0,g.translate)("Highlight and copy the following text to your clipboard:")})),M.default.createElement(y.default,{disabled:!t||n,onClick:this.regeneratePostByEmailAddress},r?(0,g.translate)("Regenerate address"):(0,g.translate)("Create address")))),!this.props.isUnavailableInDevMode("post-by-email")&&!this.props.isLinked&&M.default.createElement(k.default,{compact:!0,className:"jp-settings-card__configure-link",href:this.props.connectUrl+"&from=unlinked-user-pbe"},(0,g.translate)("Connect your user account to WordPress.com to use this feature")))}}]),t}(M.default.Component);t.default=(0,b.connect)(function(e){return{module:function(t){return(0,O.getModule)(e,t)},isModuleFound:function(t){return(0,z.isModuleFound)(e,t)}}})((0,N.ModuleSettingsForm)(R)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(7),M=r(_),b=n(1),g=r(b),v=n(14),y=r(v),A=n(116),E=r(A),w=n(1142),k=r(w),T=n(508),L=r(T);n(1151);var S=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.state={isCopied:!1,disabled:!1},r.showConfirmation=function(){r.setState({isCopied:!0}),r.confirmationTimeout=setTimeout(function(){r.setState({isCopied:!1})},4e3)},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentWillUnmount",value:function(){clearTimeout(this.confirmationTimeout),delete this.confirmationTimeout}},{key:"render",value:function(){var e=(0,E.default)(this.props,"className","copied","copy","isError","isValid","prompt","selectOnFocus");return g.default.createElement("span",{className:(0,y.default)("dops-clipboard-button-input",this.props.className)},g.default.createElement(L.default,(0,i.default)({},e,{type:"text",selectOnFocus:!0,readOnly:!0})),g.default.createElement(k.default,{text:this.props.value,onCopy:this.showConfirmation,disabled:this.props.disabled,prompt:this.props.prompt,compact:!0},this.state.isCopied?this.props.copied:this.props.copy))}}]),t}(g.default.Component);S.displayName="ClipboardButtonInput",S.propTypes={value:M.default.string,disabled:M.default.bool,className:M.default.string,copied:M.default.string,copy:M.default.string,prompt:M.default.string},S.defaultProps={value:""},t.default=S,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(113),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(41),g=r(b),v=n(7),y=n(149),A=n(1),E=n(1143),w=n(116),k=n(64),T=n(14),L=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.displayPrompt=function(){window.prompt(r.props.prompt,r.props.text)},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"componentDidMount",value:function(){var e=this,t=y.findDOMNode(this.refs.button);this.clipboard=new E(t,{text:function(){return e.props.text}}),this.clipboard.on("success",this.props.onCopy),this.clipboard.on("error",this.displayPrompt)}},{key:"componentWillUnmount",value:function(){this.clipboard.destroy(),delete this.clipboard}},{key:"render",value:function(){var e=T("dops-clipboard-button",this.props.className);return A.createElement(g.default,(0,i.default)({ref:"button"},w(this.props,(0,s.default)(this.constructor.propTypes)),{className:e}))}}]),t}(A.Component);L.displayName="ClipboardButton",L.propTypes={className:v.string,text:v.string,prompt:v.string,onCopy:v.func},L.defaultProps={onCopy:k},t.default=L,e.exports=t.default},function(e,t,n){var r,a,i;!function(o,s){a=[e,n(1144),n(1146),n(1147)],r=s,void 0!==(i="function"==typeof r?r.apply(t,a):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var u=a(t),l=a(n),d=a(r),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.resolveOptions(n),r.listenClick(e),r}return s(t,e),p(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===f(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,d.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return c("action",e)}},{key:"defaultTarget",value:function(e){var t=c("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return c("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}(l.default);e.exports=h})},function(e,t,n){var r,a,i;!function(o,s){a=[e,n(1145)],r=s,void 0!==(i="function"==typeof r?r.apply(t,a):r)&&(e.exports=i)}(0,function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(e){return e&&e.__esModule?e:{default:e}}(t),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":a(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=o})},function(e,t){function n(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),a=document.createRange();a.selectNodeContents(e),r.removeAllRanges(),r.addRange(a),t=r.toString()}return t}e.exports=n},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function r(){a.off(e,r),t.apply(n,arguments)}var a=this;return r._=t,this.on(e,r,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,a=n.length;for(r;r<a;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],a=[];if(r&&t)for(var i=0,o=r.length;i<o;i++)r[i].fn!==t&&r[i].fn._!==t&&a.push(r[i]);return a.length?n[e]=a:delete n[e],this}},e.exports=n},function(e,t,n){function r(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!s.string(t))throw new TypeError("Second argument must be a String");if(!s.fn(n))throw new TypeError("Third argument must be a Function");if(s.node(e))return a(e,t,n);if(s.nodeList(e))return i(e,t,n);if(s.string(e))return o(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function a(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function i(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function o(e,t,n){return c(document.body,e,t,n)}var s=n(1148),c=n(1149);e.exports=r},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e,t,n,r,a){var o=i.apply(this,arguments);return e.addEventListener(n,o,a),{destroy:function(){e.removeEventListener(n,o,a)}}}function a(e,t,n,a,i){return"function"==typeof e.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return r(e,t,n,a,i)}))}function i(e,t,n,r){return function(n){n.delegateTarget=o(n.target,t),n.delegateTarget&&r.call(e,n)}}var o=n(1150);e.exports=a},function(e,t){function n(e,t){for(;e&&e.nodeType!==r;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}var r=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var a=Element.prototype;a.matches=a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}e.exports=n},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Masterbar=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(30),A=n(40),E=r(A),w=n(36),k=r(w),T=n(52);t.Masterbar=(0,y.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("masterbar"),t=this.props.isUnavailableInDevMode("masterbar"),n=this.props.isLinked;return M.default.createElement(E.default,(0,i.default)({},this.props,{header:(0,b.translate)("WordPress.com toolbar",{context:"Settings header"}),module:"masterbar",hideButton:!0}),M.default.createElement(k.default,{disableInDevMode:!0,module:{module:"masterbar"},support:{text:(0,b.translate)("Adds a toolbar with links to all your sites, notifications, your WordPress.com profile, and the Reader."),
|
45 |
link:"https://jetpack.com/support/masterbar/"}},M.default.createElement(T.ModuleToggle,{slug:"masterbar",disabled:t||!n,activated:e,toggling:this.props.isSavingAnyOption("masterbar"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Enable the WordPress.com toolbar"),M.default.createElement("span",{className:"jp-form-setting-explanation"},(0,b.translate)("The WordPress.com toolbar replaces the default admin bar and offers quick links to the Reader, all your sites, your WordPress.com profile, and notifications. Centralize your WordPress experience with a single global toolbar.")))),!this.props.isUnavailableInDevMode("masterbar")&&!this.props.isLinked&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:this.props.connectUrl+"&from=unlinked-user-masterbar"},(0,b.translate)("Connect your user account to WordPress.com to use this feature")))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(851),E=r(A),w=n(71),k=n(30),T=n(23),L=n(74),S=n(40),C=r(S),O=n(36),z=r(O),N=n(52),D=(0,k.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.toggleModule=function(e,t){"photon"===e?!1==!t?r.props.updateOptions({photon:!1,"tiled-gallery":!1,tiled_galleries:!1}):r.props.updateOptions({photon:!0,"tiled-gallery":!0,tiled_galleries:!0}):r.props.updateOptions((0,s.default)({},e,!t))},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("photon"),t=this.props.isModuleFound("lazy-images");if(!e&&!t)return null;var n=this.props.module("photon"),r=this.props.module("lazy-images");return g.default.createElement(C.default,(0,i.default)({},this.props,{header:(0,y.translate)("Speed up your site"),hideButton:!0}),e&&g.default.createElement(z.default,{hasChild:!0,disableInDevMode:!0,module:n,support:{text:(0,y.translate)("Hosts your image files on the global WordPress.com servers."),link:"https://jetpack.com/support/photon/"}},g.default.createElement(N.ModuleToggle,{slug:"photon",disabled:this.props.isUnavailableInDevMode("photon"),activated:this.props.getOptionValue("photon"),toggling:this.props.isSavingAnyOption("photon"),toggleModule:this.toggleModule},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,E.default)(n.description))),g.default.createElement(w.FormFieldset,null,g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,E.default)(n.long_description)))),t&&g.default.createElement(z.default,{hasChild:!0,module:r,support:{text:(0,y.translate)("Delays the loading of images until they are visible in the visitor's browser."),link:"https://jetpack.com/support/lazy-images/"}},g.default.createElement(N.ModuleToggle,{slug:"lazy-images",disabled:this.props.isUnavailableInDevMode("lazy-images"),activated:this.props.getOptionValue("lazy-images"),toggling:this.props.isSavingAnyOption("lazy-images"),toggleModule:this.toggleModule},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,E.default)(r.description))),g.default.createElement(w.FormFieldset,null,g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,E.default)(r.long_description)))))}}]),t}(b.Component));t.default=(0,v.connect)(function(e){return{module:function(t){return(0,T.getModule)(e,t)},isModuleFound:function(t){return(0,L.isModuleFound)(e,t)}}})(D),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(23),b=n(103),g=n(21),v=n(74),y=n(28),A=n(211),E=r(A),w=n(1155),k=n(1156),T=n(1157),L=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,userCanManageModules:this.props.userCanManageModules},t=this.props.isModuleFound("publicize"),n=this.props.isModuleFound("sharedaddy"),r=this.props.isModuleFound("likes");return(this.props.searchTerm||this.props.active)&&(t||n||r)?m.default.createElement("div",null,m.default.createElement(E.default,null),t&&m.default.createElement(w.Publicize,e),n&&m.default.createElement(k.ShareButtons,e),r&&m.default.createElement(T.Likes,e)):null}}]),t}(h.Component);t.default=(0,_.connect)(function(e){return{module:function(t){return(0,M.getModule)(e,t)},settings:(0,b.getSettings)(e),isDevMode:(0,g.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,g.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,v.isModuleFound)(e,t)},isLinked:(0,g.isCurrentUserLinked)(e),connectUrl:(0,g.getConnectUrl)(e),siteRawUrl:(0,y.getSiteRawUrl)(e),siteAdminUrl:(0,y.getSiteAdminUrl)(e),userCanManageModules:(0,y.userCanManageModules)(e)}})(L),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Publicize=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(30),w=n(40),k=r(w),T=n(36),L=r(T),S=n(52);t.Publicize=(0,E.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"trackClickConfigure",value:function(){A.default.tracks.recordJetpackClick({target:"configure-publicize",page:"sharing"})}},{key:"render",value:function(){var e=this,t=this.props.isUnavailableInDevMode("publicize"),n=this.props.isLinked,r=this.props.connectUrl,a=this.props.siteRawUrl,o=this.props.getOptionValue("publicize"),s=this.props.userCanManageModules;return s||o?M.default.createElement(k.default,(0,i.default)({},this.props,{header:(0,b.translate)("Publicize connections",{context:"Settings header"}),module:"publicize",hideButton:!0}),s&&M.default.createElement(L.default,{disableInDevMode:!0,module:{module:"publicize"},support:{text:(0,b.translate)("Allows you to automatically share your newest content on social media sites, including Facebook and Twitter."),link:"https://jetpack.com/support/publicize/"}},M.default.createElement(S.ModuleToggle,{slug:"publicize",disabled:t,activated:o,toggling:this.props.isSavingAnyOption("publicize"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Automatically share your posts to social networks"))),o&&function(){if(!t)return n?M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackClickConfigure,href:"https://wordpress.com/sharing/"+a},(0,b.translate)("Connect your social media accounts")):M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:r+"&from=unlinked-user-connect-publicize"},(0,b.translate)("Connect your user account to WordPress.com to use this feature"))}()):null}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ShareButtons=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(30),w=n(40),k=r(w),T=n(36),L=r(T),S=n(52);t.ShareButtons=(0,E.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"trackClickConfigure",value:function(){A.default.tracks.recordJetpackClick({target:"configure-sharing",page:"sharing"})}},{key:"render",value:function(){var e=this,t=this.props.isLinked,n=this.props.connectUrl,r=this.props.siteRawUrl,a=this.props.siteAdminUrl,o=this.props.isDevMode,s=this.props.getOptionValue("sharedaddy");return M.default.createElement(k.default,(0,i.default)({},this.props,{header:(0,b.translate)("Sharing buttons",{context:"Settings header"}),module:"sharing",hideButton:!0}),M.default.createElement(L.default,{disableInDevMode:!0,module:{module:"sharing"},support:{text:(0,b.translate)("Adds sharing buttons to your content so that visitors can share it on social media sites."),link:"https://jetpack.com/support/sharing/"}},M.default.createElement(S.ModuleToggle,{slug:"sharedaddy",activated:s,toggling:this.props.isSavingAnyOption("sharedaddy"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Add sharing buttons to your posts"))),s&&function(){return o?M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:a+"options-general.php?page=sharing"},(0,b.translate)("Configure your sharing buttons")):t?M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackClickConfigure,href:"https://wordpress.com/sharing/buttons/"+r},(0,b.translate)("Configure your sharing buttons")):M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:n+"&from=unlinked-user-connect-sharing"},(0,b.translate)("Connect your user account to WordPress.com to use this feature"))}())}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Likes=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(30),v=n(40),y=r(v),A=n(36),E=r(A),w=n(52);t.Likes=(0,g.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.isUnavailableInDevMode("likes"),t=this.props.getOptionValue("likes");return M.default.createElement(y.default,(0,i.default)({},this.props,{header:(0,b.translate)("Like buttons",{context:"Settings header"}),module:"likes",hideButton:!0}),M.default.createElement(E.default,{disableInDevMode:!0,module:{module:"likes"},support:{text:(0,b.translate)("Adds like buttons to your content so that visitors can show their appreciation or enjoyment."),link:"https://jetpack.com/support/likes/"}},M.default.createElement(w.ModuleToggle,{slug:"likes",disabled:e,activated:t,toggling:this.props.isSavingAnyOption("likes"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Allow readers to show their appreciation of your posts by adding a like button to your content"))))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SearchableModules=void 0;var a=n(51),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(7),M=r(_),b=n(1),g=r(b),v=n(10),y=n(228),A=r(y),E=n(44),w=r(E),k=n(8),T=n(850),L=r(T),S=n(30),C=n(23),O=n(74),z=n(40),N=r(z),D=n(36),P=r(D),x=n(28),j=n(21),R=t.SearchableModules=(0,S.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var o=arguments.length,c=Array(o),l=0;l<o;l++)c[l]=arguments[l];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(c))),r.handleBannerClick=function(e){return function(){return r.props.updateOptions((0,i.default)({},e,!0))}},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this;if(!this.props.canManageModules)return null;if(this.props.searchTerm.length<3)return null;var t=["contact-form","custom-css","enhanced-distribution","json-api","latex","notes","shortcodes","shortlinks","widget-visibility","widgets"],n=this.props.modules,r=[];return(0,A.default)(n,function(n,a){if(e.props.isModuleFound(a)&&(0,w.default)(t,a)){if(e.props.isDevMode&&e.props.isUnavailableInDevMode(n.module))return r.push(g.default.createElement(Y,{key:a,moduleData:n,devMode:!0}));e.props.getOptionValue(n.module)?r.push(g.default.createElement(Y,{key:a,moduleData:n})):r.push(g.default.createElement(L.default,{className:"jp-searchable-banner",key:a,callToAction:(0,k.translate)("Activate"),description:n.description,href:"javascript:void( 0 )",icon:"cog",onClick:e.handleBannerClick(n.module),title:n.name}))}}),g.default.createElement("div",null,r)}}]),t}(b.Component));R.propTypes={searchTerm:M.default.string},R.defaultProps={searchTerm:""};var Y=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.moduleData,t=this.props.devMode;return g.default.createElement(N.default,{header:e.name,action:e.module,hideButton:!0},g.default.createElement(P.default,{disableInDevMode:t,module:{module:e.module},support:{link:e.learn_more_button}},e.description))}}]),t}(b.Component);t.default=(0,v.connect)(function(e){return{modules:(0,C.getModules)(e),isModuleFound:function(t){return(0,O.isModuleFound)(e,t)},canManageModules:(0,x.userCanManageModules)(e),isUnavailableInDevMode:function(t){return(0,j.isUnavailableInDevMode)(e,t)},isDevMode:(0,j.isDevMode)(e)}})(R)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(7),g=r(b),v=n(8),y=n(10),A=n(30),E=n(104),w=r(E),k=n(40),T=r(k),L=n(36),S=r(L),C=n(474),O=r(C),z=n(498),N=n(1160),D=n(103),P=n(15),x=r(P),j=function(){return x.default.tracks.recordJetpackClick({target:"privacy-policy",feature:"privacy"})},R=function(){return x.default.tracks.recordJetpackClick({target:"what-data-jetpack-sync",feature:"privacy"})},Y=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.isPrivacyFound=function(){return!r.props.searchTerm||[(0,v.translate)("privacy",{context:"Search term."}),(0,v.translate)("tracks",{context:"Search term."}),(0,v.translate)("data",{context:"Search term."}),(0,v.translate)("gdpr",{context:"Search term."}),(0,v.translate)("tos",{context:"Search term."}),(0,v.translate)("terms of service",{context:"Search term."})].join(" ").toLowerCase().indexOf(r.props.searchTerm.toLowerCase())>-1},r.togglePrivacy=function(){var e=r.props.trackingSettings.tracks_opt_out;r.props.setTrackingSettings(!e)},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentWillMount",value:function(){this.props.fetchTrackingSettings()}},{key:"render",value:function(){var e=this.props,t=e.searchTerm,n=e.active;return t||n?this.isPrivacyFound()&&M.default.createElement("div",null,M.default.createElement(T.default,(0,i.default)({},this.props,{header:(0,v.translate)("Privacy Settings",{context:"Settings header"}),hideButton:!0}),M.default.createElement(S.default,{hasChild:!0},M.default.createElement("p",null,(0,v.translate)("We are committed to your privacy and security. "),M.default.createElement("br",null),(0,v.translate)("Read about how Jetpack uses your data in the {{pp}}Automattic Privacy Policy{{/pp}} and our {{js}}What Data Does Jetpack Sync?{{/js}} support document.",{components:{pp:M.default.createElement(O.default,{href:"https://automattic.com/privacy/",onClick:j,target:"_blank",rel:"noopener noreferrer"}),js:M.default.createElement(O.default,{href:"https://jetpack.com/support/what-data-does-jetpack-sync/",onClick:R,target:"_blank",rel:"noopener noreferrer"})}})),M.default.createElement("p",null,M.default.createElement(w.default,{compact:!0,checked:!this.props.trackingSettings.tracks_opt_out,disabled:this.props.isFetchingTrackingSettings||this.props.isUpdatingTrackingSettings,onChange:this.togglePrivacy,id:"privacy-settings"},(0,v.translate)("Send information to help us improve our products.")))))):null}}]),t}(M.default.Component);Y.displayName="PrivacySettings",Y.propTypes={searchTerm:g.default.string,active:g.default.bool,toggleTracking:g.default.func,getOptionValue:g.default.func,isSavingAnyOption:g.default.func},Y.defaultProps={searchTerm:"",active:!1},t.default=(0,y.connect)(function(e){return{settings:(0,D.getSettings)(e),trackingSettings:(0,z.getTrackingSettings)(e),isUpdatingTrackingSettings:(0,z.isUpdatingTrackingSettings)(e),isFetchingTrackingSettings:(0,z.isFetchingTrackingSettingsList)(e)}},function(e){return{setTrackingSettings:function(t){x.default.tracks.setOptOut(t),e((0,N.updateTrackingSettings)({tracks_opt_out:t}))},fetchTrackingSettings:function(){return e((0,N.fetchTrackingSettings)())}}})((0,A.ModuleSettingsForm)(Y)),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTrackingSettings=t.fetchTrackingSettings=void 0;var r=n(114),a=n(8),i=n(16),o=n(56),s=function(e){return e&&e.__esModule?e:{default:e}}(o);t.fetchTrackingSettings=function(){return function(e){return e({type:i.USER_TRACKING_SETTINGS_FETCH}),s.default.fetchUserTrackingSettings().then(function(t){return e({type:i.USER_TRACKING_SETTINGS_FETCH_SUCCESS,settings:t}),t}).catch(function(t){e({type:i.USER_TRACKING_SETTINGS_FETCH_FAIL,error:t})})}},t.updateTrackingSettings=function(e){return function(t){var n={progress:(0,a.translate)("Updating privacy settings…"),success:(0,a.translate)("Updated privacy settings."),error:function(e){return(0,a.translate)("Error updating privacy settings. %(error)s",{args:{error:e.message||e.code||e.name||e}})}},o=function(){return e};return t((0,r.removeNotice)("tracking-settings-update")),t((0,r.removeNotice)("tracking-settings-update-success")),t((0,r.createNotice)("is-info",n.progress,{id:"tracking-settings-update"})),t({type:i.USER_TRACKING_SETTINGS_UPDATE,updatedSettings:e}),s.default.updateUserTrackingSettings(e).then(function(e){t({type:i.USER_TRACKING_SETTINGS_UPDATE_SUCCESS,updatedSettings:o(),success:e}),t((0,r.removeNotice)("tracking-settings-update")),t((0,r.removeNotice)("tracking-settings-update-success")),t((0,r.createNotice)("is-success",n.success,{id:"tracking-settings-update-success",duration:2e3}))}).catch(function(a){t({type:i.USER_TRACKING_SETTINGS_UPDATE_FAIL,updatedSettings:e,success:!1,error:a}),t((0,r.removeNotice)("tracking-settings-update")),t((0,r.removeNotice)("tracking-settings-update-success")),t((0,r.createNotice)("is-error",n.error(a),{id:"tracking-settings-update"}))})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(25),b=r(M),g=n(8),v=n(915),y=r(v),A=n(21),E=n(80),w=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement("div",{className:"jp-jetpack-connect__container"},m.default.createElement("h1",{className:"jp-jetpack-connect__container-title",title:"Welcome to Jetpack"},(0,g.translate)("Welcome to Jetpack")),m.default.createElement(b.default,{className:"jp-jetpack-connect__cta"},m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Hassle-free design, marketing, and security for your WordPress site. Connect Jetpack to a WordPress.com account to start building your own success story.")),m.default.createElement(y.default,{from:"landing-page-top"})),m.default.createElement(b.default,{className:"jp-jetpack-connect__feature jp-jetpack-connect__design"},m.default.createElement("header",{className:"jp-jetpack-connect__header"},m.default.createElement("h2",{className:"jp-jetpack-connect__container-subtitle",title:(0,g.translate)("WordPress themes and customization tools for designing your site.")},(0,g.translate)("Design the perfect website")),m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Bring your ideas to life with elegant and professional designs and code-free customization tools."))),m.default.createElement("div",{className:"jp-jetpack-connect__interior-container"},m.default.createElement("img",{src:E.imagePath+"feature-photon-med.jpg",srcSet:E.imagePath+"feature-photon-sm.jpg 600w, "+E.imagePath+"feature-photon-med.jpg 770w, "+E.imagePath+"feature-photon-lrg.jpg 1200w",className:"jp-jetpack-connect__feature-image",alt:(0,g.translate)("Jetpack's photon serves up lightning fast, optimized images")}),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's WordPress themes"),className:"dops-section-header__label"},(0,g.translate)("Professional themes")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Find the perfect design for your site from hundreds of available themes.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's customization tools"),className:"dops-section-header__label"},(0,g.translate)("Code-free customization")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Customize your site with endless widget options, image galleries, and embedded media.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's performance features"),className:"dops-section-header__label"},(0,g.translate)("Speed up your site")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Deliver blazing fast images and video and improve site load times."))))))),m.default.createElement(b.default,{className:"jp-jetpack-connect__feature jp-jetpack-connect__traffic"},m.default.createElement("header",{className:"jp-jetpack-connect__header"},m.default.createElement("h2",{className:"jp-jetpack-connect__container-subtitle",title:(0,g.translate)("Drive more traffic to your site with Jetpack")},(0,g.translate)("Increase traffic and revenue")),m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Reach more people and earn money with automated marketing tools.")),m.default.createElement("div",{className:"jp-jetpack-connect__header-img-container"},m.default.createElement("img",{src:E.imagePath+"long-clouds.svg",width:"1160",height:"63",alt:(0,g.translate)("Decoration: Jetpack clouds",{context:"Image alternate text."}),className:"jp-jetpack-connect__header-img"})," ",m.default.createElement("img",{src:E.imagePath+"stat-bars.svg",width:"400",alt:(0,g.translate)("Decoration: Jetpack bar graph",{context:"Image alternate text."}),className:"jp-jetpack-connect__header-img"}))),m.default.createElement("div",{className:"jp-jetpack-connect__interior-container"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's site stats feature"),className:"dops-section-header__label"},(0,g.translate)("Track your growth")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Keep an eye on your success with simple, concise, and mobile-friendly stats.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's publicize features"),className:"dops-section-header__label"},(0,g.translate)("Automated marketing")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Schedule social media posts in advance, show related content, and give better search results.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's ads and PayPal features"),className:"dops-section-header__label"},(0,g.translate)("Generate revenue")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Monetize your site with high-quality ads and take PayPal payments."))))))),m.default.createElement(b.default,{className:"jp-jetpack-connect__feature jp-jetpack-connect__security"},m.default.createElement("header",{className:"jp-jetpack-connect__header"},m.default.createElement("h2",{className:"jp-jetpack-connect__container-subtitle",title:(0,g.translate)("Keep your site safe, 24/7")},(0,g.translate)("Keep your site safe, 24/7")),m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Automatic defense against hacks, malware, spam, data loss, and downtime."))),m.default.createElement("div",{className:"jp-jetpack-connect__interior-container"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's monitor feature"),className:"dops-section-header__label"},(0,g.translate)("Monitor",{context:"Header. Noun: Monitor is a module of Jetpack."})),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Be alerted about any unexpected downtime the moment it happens.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's Protect features"),className:"dops-section-header__label"},(0,g.translate)("Protect",{context:"Header. Noun: Protect is a module of Jetpack."})),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Guard your site against brute force login attacks, spam, and harmfulmalware injections.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:"Jetpack's backup feature",className:"dops-section-header__label"},(0,g.translate)("Backup and restore")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Automatic, real-time backups mean your entire site is always ready to be restored."))))))),m.default.createElement(b.default,{className:"jp-jetpack-connect__cta"},m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Join the millions of users who rely on Jetpack to enhance and secure their sites. We're passionate about WordPress and here to make your life easier.")),m.default.createElement(y.default,{from:"landing-page-bottom"})))}}]),t}(m.default.Component);w.displayName="JetpackConnect",t.default=(0,_.connect)(function(e){return{connectUrl:(0,A.getConnectUrl)(e)}})(w),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.JetpackDisconnectDialog=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(41),y=r(v),A=n(25),E=r(A),w=n(65),k=r(w),T=n(1163),L=r(T),S=n(47),C=n(64),O=r(C),z=n(15),N=r(z),D=n(61),P=n(21),x=n(28),j=t.JetpackDisconnectDialog=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.getPlanFeatures=function(){switch((0,S.getPlanClass)(r.props.sitePlan.product_slug)){case"is-personal-plan":return[{text:(0,g.translate)("Daily, automated backups (unlimited storage)"),icon:"history"},{text:(0,g.translate)("Priority support"),icon:"chat"},{text:(0,g.translate)("Spam filtering"),icon:"spam"}];case"is-premium-plan":return[{text:(0,g.translate)("Daily, automated backups (unlimited storage)"),icon:"history"},{text:(0,g.translate)("Daily, automated malware scanning"),icon:"spam"},{text:(0,g.translate)("Priority support"),icon:"chat"},{text:(0,g.translate)("13Gb of high-speed video hosting"),icon:"video"}];case"is-business-plan":return[{text:(0,g.translate)("Daily, automated backups (unlimited storage)"),icon:"history"},{text:(0,g.translate)("Daily, automated malware scanning with automated resolution"),icon:"spam"},{text:(0,g.translate)("Priority support"),icon:"chat"},{text:(0,g.translate)("Unlimited high-speed video hosting"),icon:"video"},{text:(0,g.translate)("SEO preview tools"),icon:"globe"}];default:return[{text:(0,g.translate)("Site stats, related content, and sharing tools"),icon:"stats-alt"},{text:(0,g.translate)("Brute force attack protection and downtime monitoring"),icon:"lock"},{text:(0,g.translate)("Unlimited, high-speed image hosting"),icon:"image"}]}},r.closeModal=function(){N.default.tracks.recordJetpackClick({target:"manage_site_connection",button:"stay-connected"}),r.props.toggleModal()},r.disconnectSiteTrack=function(){N.default.tracks.recordJetpackClick({target:"manage_site_connection",button:"disconnect-site"}),r.props.disconnectSite()},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return this.props.show&&M.default.createElement(L.default,{className:"jp-connection-settings__modal",onRequestClose:this.props.toggleModal},M.default.createElement(E.default,{className:"jp-connection-settings__modal-body"},M.default.createElement("h2",null,(0,g.translate)("Disconnect Jetpack")),M.default.createElement("h4",null,(0,g.translate)("By disconnecting %(siteName)s from WordPress.com you will no longer have access to the following:",{args:{siteName:this.props.siteRawUrl.replace(/::/g,"/")}})),M.default.createElement("ul",null,this.getPlanFeatures().map(function(e){return M.default.createElement("li",{key:"feature_"+e.icon},M.default.createElement(k.default,{icon:e.icon,size:18}),e.text)})),M.default.createElement("div",{className:"jp-connection-settings__modal-actions"},M.default.createElement(y.default,{className:"jp-connection-settings__modal-cancel",onClick:this.closeModal},(0,g.translate)("Stay connected",{context:"A caption for a button to cancel disconnection."})),M.default.createElement(y.default,{onClick:this.disconnectSiteTrack,scary:!0,primary:!0},(0,g.translate)("Disconnect",{context:"A caption for a button to disconnect."}))),M.default.createElement("p",{className:"jp-connection-settings__modal-more"},M.default.createElement("a",{href:"https://jetpack.com/features/"},(0,g.translate)("Read more about Jetpack benefits")))))}}]),t}(M.default.Component);j.propTypes={show:m.default.bool,toggleModal:m.default.func,disconnectSite:m.default.func},j.defaultProps={show:!1,toggleModal:O.default,disconnectSite:O.default},t.default=(0,b.connect)(function(e){return{siteRawUrl:(0,x.getSiteRawUrl)(e),isDisconnecting:(0,
|
46 |
P.isDisconnectingSite)(e),sitePlan:(0,D.getSitePlan)(e)}},function(e){return{disconnectSite:function(){return e((0,P.disconnectSite)())}}})(j)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){L=!0}function i(){L=!1}var o=n(11),s=r(o),c=n(463),u=r(c),l=n(2),d=r(l),f=n(3),p=r(f),h=n(6),m=r(h),_=n(4),M=r(_),b=n(5),g=r(b),v=n(7),y=n(1),A=n(149),E=n(14),w=n(24),k=n(116),T=n(1164),L=!1;n(1166);var S=function(e){function t(){var e,n,r,a;(0,p.default)(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=(0,M.default)(this,(e=t.__proto__||(0,d.default)(t)).call.apply(e,[this].concat(o))),r.state={overlayMouseDown:!1},r.handleEscapeKey=function(e){27===e.keyCode&&r.maybeClose()},r.maybeClose=function(){r.props.onRequestClose&&!L&&r.props.onRequestClose()},r.handleMouseDownOverlay=function(e){e.preventDefault(),e.stopPropagation(),r.setState({overlayMouseDown:!0})},r.handleClickOverlay=function(e){e.preventDefault(),e.stopPropagation(),r.state.overlayMouseDown&&r.props.onRequestClose&&!L&&(r.setState({overlayMouseDown:!1}),r.props.onRequestClose())},r.handleMouseEventModal=function(e){e.stopPropagation()},a=n,(0,M.default)(r,a)}return(0,g.default)(t,e),(0,m.default)(t,[{key:"componentDidMount",value:function(){jQuery("body").addClass("dops-modal-showing").on("touchmove.dopsmodal",!1),jQuery(document).keyup(this.handleEscapeKey);try{T.activate(A.findDOMNode(this),{initialFocus:this.props.initialFocus})}catch(e){}}},{key:"componentWillUnmount",value:function(){jQuery("body").removeClass("dops-modal-showing").off("touchmove.dopsmodal",!1),jQuery(document).unbind("keyup",this.handleEscapeKey);try{T.deactivate()}catch(e){}}},{key:"render",value:function(){var e=void 0,t=this.props,n=t.style,r=t.className,a=t.width,i=t.title,o=(0,u.default)(t,["style","className","width","title"]),c=k(o,"onRequestClose"),l=c.forwardedProps;switch(a){case"wide":e={maxWidth:"inherit",width:"inherit"};break;case"medium":e={maxWidth:1050,width:"inherit"};break;default:e={}}var d=w({},n,e);return y.createElement("div",{className:"dops-modal-wrapper",onClick:this.handleClickOverlay,onMouseDown:this.handleMouseDownOverlay},y.createElement("div",(0,s.default)({className:E("dops-modal",r),style:d,onClick:this.handleMouseEventModal,onMouseDown:this.handleMouseEventModal,onMouseUp:this.handleMouseEventModal,role:"dialog","aria-label":i},l),this.props.children))}}]),t}(y.Component);S.propTypes={style:v.object,width:v.oneOf(["wide","medium","narrow"]),className:v.string,title:v.string,initialFocus:v.string,onRequestClose:v.func},S.defaultProps={style:{}},S.preventClose=a,S.allowClose=i,e.exports=S},function(e,t,n){function r(e,t){function n(e){if(!k){var t={onActivate:e&&void 0!==e.onActivate?e.onActivate:C.onActivate};return k=!0,T=!1,w=document.activeElement,t.onActivate&&t.onActivate(),l(),O}}function r(e){if(k){var t={returnFocus:e&&void 0!==e.returnFocus?e.returnFocus:C.returnFocusOnDeactivate,onDeactivate:e&&void 0!==e.onDeactivate?e.onDeactivate:C.onDeactivate};return d(),t.onDeactivate&&t.onDeactivate(),t.returnFocus&&setTimeout(function(){i(w)},0),k=!1,T=!1,this}}function c(){!T&&k&&(T=!0,d())}function u(){T&&k&&(T=!1,l())}function l(){if(k)return s&&s.pause(),s=O,g(),i(p()),document.addEventListener("focus",_,!0),document.addEventListener("click",m,!0),document.addEventListener("mousedown",h,!0),document.addEventListener("touchstart",h,!0),document.addEventListener("keydown",M,!0),O}function d(){if(k&&s===O)return document.removeEventListener("focus",_,!0),document.removeEventListener("click",m,!0),document.removeEventListener("mousedown",h,!0),document.removeEventListener("touchstart",h,!0),document.removeEventListener("keydown",M,!0),s=null,O}function f(e){var t=C[e],n=t;if(!t)return null;if("string"==typeof t&&!(n=document.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(n=t()))throw new Error("`"+e+"` did not return a node");return n}function p(){var e;if(!(e=null!==f("initialFocus")?f("initialFocus"):S.contains(document.activeElement)?document.activeElement:y[0]||f("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return e}function h(e){C.clickOutsideDeactivates&&!S.contains(e.target)&&r({returnFocus:!1})}function m(e){C.clickOutsideDeactivates||S.contains(e.target)||(e.preventDefault(),e.stopImmediatePropagation())}function _(e){S.contains(e.target)||(e.preventDefault(),e.stopImmediatePropagation(),"function"==typeof e.target.blur&&e.target.blur(),L&&v(L))}function M(e){"Tab"!==e.key&&9!==e.keyCode||b(e),!1!==C.escapeDeactivates&&a(e)&&r()}function b(e){if(g(),e.target.hasAttribute("tabindex")&&Number(e.target.getAttribute("tabindex"))<0)return L=e;e.preventDefault();var t=y.indexOf(e.target);return e.shiftKey?i(e.target===A||-1===y.indexOf(e.target)?E:y[t-1]):e.target===E?i(A):void i(y[t+1])}function g(){y=o(S),A=y[0],E=y[y.length-1]}function v(e){if(e.shiftKey)return i(E);i(A)}var y=[],A=null,E=null,w=null,k=!1,T=!1,L=null,S="string"==typeof e?document.querySelector(e):e,C=t||{};C.returnFocusOnDeactivate=!t||void 0===t.returnFocusOnDeactivate||t.returnFocusOnDeactivate,C.escapeDeactivates=!t||void 0===t.escapeDeactivates||t.escapeDeactivates;var O={activate:n,deactivate:r,pause:c,unpause:u};return O}function a(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}function i(e){e&&e.focus&&e!==document.activeElement&&(e.focus(),"input"===e.tagName.toLowerCase()&&e.select())}var o=n(1165),s=null;e.exports=r},function(e,t){function n(e){function t(r,a){if(r===e.documentElement)return!1;for(var i=0,o=n.length;i<o;i++)if(n[i][0]===r)return n[i][1];a=a||e.defaultView.getComputedStyle(r);var s=!1;return"none"===a.display?s=!0:r.parentNode&&(s=t(r.parentNode)),n.push([r,s]),s}var n=[];return function(n){if(n===e.documentElement)return!1;var r=e.defaultView.getComputedStyle(n);return!!t(n,r)||"hidden"===r.visibility}}e.exports=function(e,t){t=t||{};var r=e.ownerDocument||e,a=[],i=[],o=n(r),s=["input","select","a[href]","textarea","button","[tabindex]"],c=e.querySelectorAll(s.join(","));if(t.includeContainer){var u=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;s.some(function(t){return u.call(e,t)})&&(c=Array.prototype.slice.apply(c),c.unshift(e))}for(var l,d,f=0,p=c.length;f<p;f++)l=c[f],(d=parseInt(l.getAttribute("tabindex"),10)||l.tabIndex)<0||"INPUT"===l.tagName&&"hidden"===l.type||l.disabled||o(l,r)||(0===d?a.push(l):i.push({index:f,tabIndex:d,node:l}));var h=i.sort(function(e,t){return e.tabIndex===t.tabIndex?e.index-t.index:e.tabIndex-t.tabIndex}).map(function(e){return e.node});return Array.prototype.push.apply(h,a),h}},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return{__html:e.jumpstart_desc}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=r(i),s=n(3),c=r(s),u=n(6),l=r(u),d=n(4),f=r(d),p=n(5),h=r(p),m=n(1),_=r(m),M=n(18),b=n(10),g=n(41),v=r(g),y=n(8),A=n(916),E=n(23),w=n(80),k=n(475),T=r(k),L=function(e){function t(){var e,n,r,a;(0,c.default)(this,t);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return n=r=(0,f.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(s))),r.activateButton=function(){return _.default.createElement(v.default,{primary:!0,onClick:r.props.jumpStartActivate,disabled:r.props.isJumpstarting},r.props.isJumpstarting?(0,y.translate)("Activating recommended features…"):(0,y.translate)("Activate recommended features"))},a=n,(0,f.default)(r,a)}return(0,h.default)(t,e),(0,l.default)(t,[{key:"renderInnerContent",value:function(){var e=this.props.jumpstartFeatures.map(function(e){return _.default.createElement("div",{className:"jp-jumpstart__feature-list-column",key:"module-card_"+e.name},_.default.createElement("div",{className:"jp-jumpstart__feature-content"},_.default.createElement("h4",{className:"jp-jumpstart__feature-content-title",title:e.name},e.name),_.default.createElement("p",{dangerouslySetInnerHTML:a(e)})))});return _.default.createElement("div",{className:"jp-jumpstart"},_.default.createElement("p",null,(0,y.translate)("We're now collecting stats, securing your site, and speeding up your images. Pretty soon you'll be able to see everything going on with your site right through Jetpack! Welcome aboard.")),_.default.createElement("p",null,this.activateButton()),_.default.createElement("div",null,_.default.createElement("h2",{className:"jp-jumpstart__feature-heading"},(0,y.translate)("Jetpack's recommended features include:")),_.default.createElement("div",{className:"jp-jumpstart__feature-list"},e),this.activateButton(),_.default.createElement("p",{className:"jp-jumpstart__note"},(0,y.translate)("Features can be activated or deactivated at any time."))))}},{key:"render",value:function(){return _.default.createElement(T.default,{svg:_.default.createElement("img",{src:w.imagePath+"man-and-laptop.svg",width:"199",height:"153",alt:(0,y.translate)("Person with laptop")}),title:(0,y.translate)("Your Jetpack site is ready to go!"),content:this.renderInnerContent(),dismiss:this.props.jumpStartSkip})}}]),t}(_.default.Component);L.displayName="JumpStart",t.default=(0,b.connect)(function(e){return{isJumpstarting:(0,A.isJumpstarting)(e),jumpstartFeatures:(0,E.getModulesByFeature)(e,"Jumpstart")}},function(e){return(0,M.bindActionCreators)({jumpStartActivate:A.jumpStartActivate,jumpStartSkip:A.jumpStartSkip},e)})(L),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.jumpStartSkip=t.jumpStartActivate=void 0;var a=n(114),i=n(8),o=n(646),s=n(15),c=r(s),u=n(16),l=n(56),d=r(l),f=n(23),p=n(103),h=(t.jumpStartActivate=function(){return function(e){return e({type:u.JUMPSTART_ACTIVATE}),e((0,a.removeNotice)("jumpstart-activate")),e((0,a.createNotice)("is-info",(0,i.translate)("Activating recommended features…"),{id:"jumpstart-activate"})),d.default.jumpStart("activate").then(function(){e({type:u.JUMPSTART_ACTIVATE_SUCCESS,jumpStart:!0}),c.default.tracks.recordEvent("jetpack_wpa_jumpstart_submit",{}),e((0,a.removeNotice)("jumpstart-activate")),e((0,a.createNotice)("is-success",(0,i.translate)("Recommended features active."),{id:"jumpstart-activate",duration:2e3})),e((0,f.fetchModules)()),e((0,p.fetchSettings)())}).catch(function(t){e({type:u.JUMPSTART_ACTIVATE_FAIL,error:t}),e((0,a.removeNotice)("jumpstart-activate")),e((0,a.createNotice)("is-error",(0,i.translate)("Recommended features failed to activate. %(error)s",{args:{error:t}}),{id:"jumpstart-activate"}))})}},(0,o.createHistory)());t.jumpStartSkip=function(){return function(e){return e({type:u.JUMPSTART_SKIP}),c.default.tracks.recordEvent("jetpack_wpa_jumpstart_skip",{}),h.push(window.location.pathname+"?page=jetpack#/dashboard"),d.default.jumpStart("deactivate").then(function(){e({type:u.JUMPSTART_SKIP_SUCCESS,jumpStart:!1})}).catch(function(t){e({type:u.JUMPSTART_SKIP_FAIL,error:t})})}}},function(e,t,n){function r(e,t,n){t=(n?i(e,t,n):void 0===t)?1:c(o(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var u=0,l=0,d=Array(s(r/t));u<r;)d[l++]=a(e,u,u+=t);return d}var a=n(466),i=n(219),o=n(227),s=Math.ceil,c=Math.max;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(7),M=r(_),b=n(10),g=n(128),v=r(g),y=n(8),A=n(14),E=r(A),w=n(61),k=n(21),T=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.siteRawUrl,n=e.inDevMode,r=m.default.createElement("a",{href:"https://wordpress.com/stats/activity/"+t}),a=(0,y.translate)("{{a}}View your site's activity{{/a}} in a single feed.",{components:{a:r}});return m.default.createElement("div",{className:"jp-dash-item__interior"},m.default.createElement(v.default,{label:(0,y.translate)("Activity"),isModule:!1,className:(0,E.default)({"jp-dash-item__is-inactive":n}),pro:!1},m.default.createElement("p",{className:"jp-dash-item__description"},n?(0,y.translate)("Unavailable in Dev Mode."):a)))}}]),t}(h.Component);T.propTypes={inDevMode:M.default.bool.isRequired,siteRawUrl:M.default.string.isRequired,sitePlan:M.default.object.isRequired},T.defaultProps={inDevMode:!1,siteRawUrl:"",sitePlan:""},t.default=(0,b.connect)(function(e){return{sitePlan:(0,w.getSitePlan)(e),inDevMode:(0,k.isDevMode)(e)}})(T),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DashStats=void 0;var a=n(59),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(7),M=r(_),b=n(1),g=r(b),v=n(228),y=r(v),A=n(27),E=r(A),w=n(234),k=r(w),T=n(25),L=r(T),S=n(1173),C=r(S),O=n(10),z=n(918),N=r(z),D=n(41),P=r(D),x=n(867),j=r(x),R=n(8),Y=n(15),I=r(Y),q=n(80),B=n(21),W=n(28),U=n(1182),H=r(U),F=n(1183),X=r(F),V=n(62),K=n(23),J=n(103),G=n(515),Q=r(G),Z=t.DashStats=function(e){function t(e){(0,u.default)(this,t);var n=(0,p.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e));return n.state={emptyStatsDismissed:e.isEmptyStatsCardDismissed},n}return(0,m.default)(t,e),(0,d.default)(t,[{key:"barClick",value:function(e){e.data.link&&(I.default.tracks.recordJetpackClick("stats_bar"),window.open(e.data.link,"_blank"))}},{key:"statsChart",value:function(e){var t=this.props,n=[],r=0;return"object"!==(0,i.default)(t.statsData[e])?{chartData:n,totalViews:!1}:((0,y.default)(t.statsData[e].data,function(a){var i=a[1],o=a[0],s="",c="";r+=i,"day"===e?(s=(0,R.moment)(o).format("MMM D"),c=(0,R.moment)(o).format("MMMM Do")):"week"===e?(o=o.replace(/W/g,"-"),s=(0,R.moment)(o).format("MMM D"),c=(0,R.translate)("Week of %(date)s",{args:{date:(0,R.moment)(o).format("MMMM Do")}})):(s=(0,R.moment)(o).format("MMM"),c=(0,R.moment)(o).format("MMMM, YYYY")),n.push({label:s,value:i,nestedValue:null,className:"statsChartbar",data:{link:"https://wordpress.com/stats/"+e+"/"+t.siteRawUrl+"?startDate="+o},tooltipData:[{label:c,value:(0,R.translate)("Views: %(numberOfViews)s",{args:{numberOfViews:(0,R.numberFormat)(i)}}),className:"tooltip class"},{label:(0,R.translate)("Click to view detailed stats.")}]})}),{chartData:n,totalViews:r})}},{key:"statsErrors",value:function(){return(0,E.default)(this.props.statsData,["general","errors"],!1)}},{key:"renderStatsChart",value:function(e){return g.default.createElement("div",null,g.default.createElement("div",{className:"jp-at-a-glance__stats-chart"},g.default.createElement(C.default,{data:e,barClick:this.barClick}),0===e.length&&g.default.createElement(j.default,null)),g.default.createElement("div",{id:"stats-bottom",className:"jp-at-a-glance__stats-bottom"},g.default.createElement(X.default,{statsData:this.props.statsData,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl})))}},{key:"renderEmptyStatsCard",value:function(){var e=this,t=function(){e.setState({emptyStatsDismissed:!0}),e.props.updateOptions({dismiss_empty_stats_card:!0})};return g.default.createElement(L.default,{className:"jp-at-a-glance__stats-empty"},g.default.createElement("img",{src:q.imagePath+"stats-people.svg",width:"272",height:"144",alt:(0,R.translate)("Jetpack Stats People"),className:"jp-at-a-glance__stats-icon"}),g.default.createElement("p",null,(0,R.translate)("Hello there! Your stats have been activated."),g.default.createElement("br",null),(0,R.translate)("Just give us a little time to collect data so we can display it for you here.")),g.default.createElement(P.default,{onClick:t,primary:!0},(0,R.translate)("Okay, got it!")))}},{key:"renderStatsArea",value:function(){var e=this,t=function(){return e.props.updateOptions({stats:!0})};if(this.props.getOptionValue("stats")){if(this.statsErrors())return g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive"},g.default.createElement("span",null,(0,R.translate)("Something happened while loading stats. Please try again later or {{a}}view your stats now on WordPress.com{{/a}}",{components:{a:g.default.createElement("a",{href:"https://wordpress.com/stats/insights/"+this.props.siteRawUrl})}})));var n=this.statsChart(this.props.activeTab),r=n.chartData,a=n.totalViews,i=r.length&&a<=0&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed;return g.default.createElement("div",{className:"jp-at-a-glance__stats-container"},i?this.renderEmptyStatsCard():this.renderStatsChart(r))}return g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive"},g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-icon"},g.default.createElement("img",{src:q.imagePath+"stats.svg",width:"60",height:"60",alt:(0,R.translate)("Jetpack Stats Icon"),className:"jp-at-a-glance__stats-icon"})),g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-text"},this.props.isDevMode?(0,R.translate)("Unavailable in Dev Mode"):(0,R.translate)("{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}",{components:{a:g.default.createElement("a",{href:"javascript:void(0)",onClick:t}),a1:g.default.createElement("a",{href:"https://jetpack.com/support/wordpress-com-stats/",target:"_blank",rel:"noopener noreferrer"})}})),!this.props.isDevMode&&g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-button"},g.default.createElement(P.default,{onClick:t,primary:!0},(0,R.translate)("Activate Site Stats"))))}},{key:"maybeShowStatsTabs",value:function(){var e=this;if(!1===this.statsChart(this.props.activeTab).totalViews&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed)return!1;var t=function(){I.default.tracks.recordJetpackClick({target:"stats_switch_view",view:"day"}),e.props.switchView("day"),e.props.fetchStatsData("day")},n=function(){I.default.tracks.recordJetpackClick({target:"stats_switch_view",view:"week"}),e.props.switchView("week"),e.props.fetchStatsData("week")},r=function(){I.default.tracks.recordJetpackClick({target:"stats_switch_view",view:"month"}),e.props.switchView("month"),e.props.fetchStatsData("month")};return this.props.getOptionValue("stats")&&!this.statsErrors()?g.default.createElement("ul",{className:"jp-at-a-glance__stats-views"},g.default.createElement("li",{tabIndex:"0",className:"jp-at-a-glance__stats-view"},g.default.createElement("a",{href:"javascript:void(0)",onClick:t,className:this.getClass("day")},(0,R.translate)("Days"))),g.default.createElement("li",{tabIndex:"0",className:"jp-at-a-glance__stats-view"},g.default.createElement("a",{href:"javascript:void(0)",onClick:n,className:this.getClass("week")},(0,R.translate)("Weeks"))),g.default.createElement("li",{tabIndex:"0",className:"jp-at-a-glance__stats-view"},g.default.createElement("a",{href:"javascript:void(0)",onClick:r,className:this.getClass("month")},(0,R.translate)("Months")))):void 0}},{key:"getClass",value:function(e){return this.props.activeTab===e?"jp-at-a-glance__stats-view-link is-current":"jp-at-a-glance__stats-view-link"}},{key:"render",value:function(){return"inactive"===this.props.getModuleOverride("stats")?g.default.createElement("div",null,g.default.createElement(Q.default,{moduleName:(0,R.translate)("Site Stats")})):this.props.isModuleAvailable&&g.default.createElement("div",null,g.default.createElement(H.default,{range:this.props.activeTab}),g.default.createElement(N.default,{label:(0,R.translate)("Site Stats")},this.maybeShowStatsTabs()),g.default.createElement(L.default,{className:"jp-at-a-glance__stats-card "+(this.props.isDevMode?"is-inactive":"")},this.renderStatsArea()))}}]),t}(b.Component);Z.propTypes={isDevMode:M.default.bool.isRequired,siteRawUrl:M.default.string.isRequired,siteAdminUrl:M.default.string.isRequired,statsData:M.default.any.isRequired,isModuleAvailable:M.default.bool.isRequired},t.default=(0,O.connect)(function(e){return{isModuleAvailable:(0,K.isModuleAvailable)(e,"stats"),activeTab:(0,V.getActiveStatsTab)(e),isDevMode:(0,B.isDevMode)(e),isLinked:(0,B.isCurrentUserLinked)(e),connectUrl:(0,B.getConnectUrl)(e),statsData:(0,k.default)((0,V.getStatsData)(e))?(0,W.getInitialStateStatsData)(e):(0,V.getStatsData)(e),isEmptyStatsCardDismissed:(0,J.emptyStatsCardDismissed)(e),getModuleOverride:function(t){return(0,K.getModuleOverride)(e,t)}}},function(e){return{switchView:function(t){return e((0,V.statsSwitchTab)(t))},fetchStatsData:function(t){return e((0,V.fetchStatsData)(t))}}})(Z)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(7),_=n(64),M=n(919),b=n(1174),g=n(1180);n(1181);var v=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={maxBars:100,width:650},r.resize=function(){var e=r.refs.chart,t=e.clientWidth-82,n=void 0;g.hasTouch()?(t=t<=0?350:t,n=Math.floor(t/r.props.minTouchBarWidth)):n=Math.floor(t/r.props.minBarWidth),r.setState({maxBars:n,width:t})},r.getYAxisMax=function(e){var t=Math.max.apply(null,e),n=Math.pow(10,t.toString().length-1),r=Math.ceil((t+1)/n)*n;return r<10&&(r=10),r},r.getData=function(){var e=r.props.data;return e=e.slice(0-r.state.maxBars)},r.getValues=function(){var e=r.getData();return e=e.map(function(e){return e.value},r)},r.isEmptyChart=function(e){return e=e.filter(function(e){return e>0},r),0===e.length},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){this.resize=M(this.resize,400),window.addEventListener("resize",this.resize),this.resize()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"componentWillReceiveProps",value:function(e){this.props.loading&&!e.loading&&this.resize()}},{key:"render",value:function(){var e=this.getValues(),t=this.getYAxisMax(e),n=this.getData(),r=void 0;return e.length&&this.isEmptyChart(e)&&(r=h.createElement("div",{className:"dops-chart__empty"},h.createElement("span",{className:"dops-chart__empty_notice"},"No activity this period"))),h.createElement("div",{ref:"chart",className:"dops-chart"},h.createElement("div",{className:"dops-chart__y-axis-markers"},h.createElement("div",{className:"dops-chart__y-axis-marker is-hundred"}),h.createElement("div",{className:"dops-chart__y-axis-marker is-fifty"}),h.createElement("div",{className:"dops-chart__y-axis-marker is-zero"})),h.createElement("div",{className:"dops-chart__y-axis"},h.createElement("div",{className:"dops-chart__y-axis-width-fix"},new Number(1e5).toLocaleString()),h.createElement("div",{className:"dops-chart__y-axis-label is-hundred"},t.toLocaleString()),h.createElement("div",{className:"dops-chart__y-axis-label is-fifty"},(t/2).toLocaleString()),h.createElement("div",{className:"dops-chart__y-axis-label is-zero"},0)),h.createElement(b,{barClick:this.props.barClick,data:n,yAxisMax:t,chartWidth:this.state.width,isTouch:g.hasTouch()}),r)}}]),t}(h.Component);v.displayName="ModuleChart",v.propTypes={loading:m.bool,data:m.array,minTouchBarWidth:m.number,minBarWidth:m.number,barClick:m.func},v.defaultProps={minTouchBarWidth:42,minBarWidth:15,barClick:_},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(1175),M=n(1178),b=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.buildBars=function(e){var t=r.props.data.length,n=r.props.chartWidth,a=n/t,i="bottom right";return r.props.data.map(function(r,o){var s=a*(o+1);return s+230>n&&s+a-230>0&&(i="bottom left"),m.createElement(_,{index:o,key:o,isTouch:this.props.isTouch,tooltipPosition:i,className:r.className,clickHandler:this.props.barClick,data:r,max:e,count:t})},r)},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.createElement("div",null,m.createElement("div",{className:"dops-chart__bars"},this.buildBars(this.props.yAxisMax)),m.createElement(M,{data:this.props.data,labelWidth:42}))}}]),t}(m.Component);b.displayName="ModuleChartBarContainer",b.propTypes={isTouch:h.bool,data:h.array,yAxisMax:h.number,width:h.number,barClick:h.func},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14),M=n(1176),b=n(65),g=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={showPopover:!1},r.buildSections=function(){var e=r.props.data.value,t=r.props.max,n=t?Math.ceil(e/t*1e4)/100:0,a=100-n,i=Math.max(1,Math.floor(a)),o=[],s=r.props.data.nestedValue,c={"dops-chart__bar-section":!0,"is-spacer":!0,"is-ghost":100===a&&!r.props.active},u=void 0,l=void 0,d=void 0,f={height:i+"%"};o.push(m.createElement("div",{key:"spacer",className:_(c),style:f}));var p={top:i+"%"};return s&&(l=e?Math.ceil(s/e*1e4)/100:0,d={height:l+"%"},u=m.createElement("div",{key:"nestedValue",className:"dops-chart__bar-section-inner",style:d})),o.push(m.createElement("div",{ref:"valueBar",key:"value",className:"dops-chart__bar-section is-bar",style:p},u)),o.push(m.createElement("div",{key:"label",className:"dops-chart__bar-label"},r.props.label)),o},r.clickHandler=function(){"function"==typeof r.props.clickHandler&&r.props.clickHandler(r.props.data)},r.mouseEnter=function(){r.setState({showPopover:!0})},r.mouseLeave=function(){r.setState({showPopover:!1})},r.renderTooltip=function(){if(!r.props.data.tooltipData||!r.props.data.tooltipData.length||r.props.isTouch)return null;var e=r.props.data.tooltipData,t=e.map(function(e,t){var n=["module-content-list-item"],r=void 0;return e.icon&&(r=m.createElement(b,{icon:e.icon,size:18})),n.push(e.className),m.createElement("li",{key:t,className:n.join(" ")},m.createElement("span",{className:"dops-wrapper"},m.createElement("span",{className:"value"},e.value),m.createElement("span",{className:"label"},r,e.label)))});return m.createElement(M,{className:"dops-chart__tooltip",id:"popover__chart-bar",showDelay:200,context:r.refs&&r.refs.valueBar,isVisible:r.state.showPopover,position:r.props.tooltipPosition},m.createElement("ul",null,t))},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props.count||1,t={"dops-chart__bar":!0};this.props.className&&(t[this.props.className]=!0);var n={width:1/e*100+"%"};return m.createElement("div",{onClick:this.clickHandler,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,className:_(t),style:n},this.buildSections(),m.createElement("div",{className:"dops-chart__bar-marker is-hundred"}),m.createElement("div",{className:"dops-chart__bar-marker is-fifty"}),m.createElement("div",{className:"dops-chart__bar-marker is-zero"}),this.renderTooltip())}}]),t}(m.Component);g.displayName="ModuleChartBar",g.propTypes={isTouch:h.bool,tooltipPosition:h.string,className:h.string,clickHandler:h.func,data:h.object.isRequired,max:h.number,count:h.number},t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(833),y=r(v),A=n(808),E=r(A);n(1177);var w=function(){},k=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){if(!this.props.showOnMobile&&E.default.isMobile())return null;var e=(0,g.default)("dops-popover","dops-tooltip","is-"+this.props.position,this.props.className);return M.default.createElement(y.default,{autoPosition:this.props.autoPosition,className:e,rootClassName:this.props.rootClassName,context:this.props.context,id:this.props.id,isVisible:this.props.isVisible,onClose:w,position:this.props.position,showDelay:this.props.showDelay},this.props.children)}}]),t}(_.Component);k.propTypes={autoPosition:m.default.bool,className:m.default.string,id:m.default.string,isVisible:m.default.bool,position:m.default.string,rootClassName:m.default.string,status:m.default.string,showDelay:m.default.number,showOnMobile:m.default.bool},k.defaultProps={showDelay:100,position:"top",showOnMobile:!1},t.default=k,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(7),_=n(919),M=n(1179),b=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={divisor:1,spacing:r.props.labelWidth},r.resize=function(e){var t=r.props,n=r.refs.axis;!e||e instanceof Event||(t=e),n.style.overflow="hidden";var a=n.clientWidth;n.style.overflow="visible";var i=t.data.length||1,o=a/i,s=t.labelWidth,c=Math.ceil(s/o);r.setState({divisor:c,spacing:o})},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){this.resizeThrottled=_(this.resize,400),window.addEventListener("resize",this.resizeThrottled),this.resize()}},{key:"componentWillUnmount",value:function(){this.resizeThrottled.cancel&&this.resizeThrottled.cancel(),window.removeEventListener("resize",this.resizeThrottled)}},{key:"componentWillReceiveProps",value:function(e){this.resize(e)}},{key:"render",value:function(){var e=this.props.data,t=e.map(function(t,n){var r=n*this.state.spacing+(this.state.spacing-this.props.labelWidth)/2,a=e.length-n-1,i=void 0;return a%this.state.divisor==0&&(i=h.createElement(M,{key:n,label:t.label,width:this.props.labelWidth,x:r})),i},this);return h.createElement("div",{ref:"axis",className:"dops-chart__x-axis"},t)}}]),t}(h.Component);b.displayName="ModuleChartXAxis",b.propTypes={labelWidth:m.number.isRequired,data:m.array.isRequired},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e={width:this.props.width+"px"};return e.left=this.props.x+"px",m.createElement("div",{className:"dops-chart__x-axis-label",style:e},this.props.label)}}]),t}(m.Component);_.displayName="ModuleChartLabel",_.propTypes={width:h.number.isRequired,x:h.number.isRequired,label:h.string.isRequired},t.default=_,e.exports=t.default},function(e,t,n){"use strict";e.exports={hasTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}}
|
31 |
}),m.default.createElement(g.default,{module_slug:"protect"}),m.default.createElement(g.default,{module_slug:"vaultpress"}))}}]),t}(m.default.Component);t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function a(e){return e?e.nodeType===P?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(z)||""}function o(e,t,n,r,a){var i;if(y.logTopLevelRenders){var o=e._currentElement.props.child,s=o.type;i="React mount: "+("string"==typeof s?s:s.displayName||s.name),console.time(i)}var c=w.mountComponent(e,n,null,g(e,t),a,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,I._mountImageIntoNode(c,t,e,r,n)}function s(e,t,n,r){var a=T.ReactReconcileTransaction.getPooled(!n&&v.useCreateElement);a.perform(o,null,e,t,a,n,r),T.ReactReconcileTransaction.release(a)}function c(e,t,n){for(w.unmountComponent(e,n),t.nodeType===P&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function u(e){var t=a(e);if(t){var n=b.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function l(e){return!(!e||e.nodeType!==D&&e.nodeType!==P&&e.nodeType!==x)}function d(e){var t=a(e),n=t&&b.getInstanceFromNode(t);return n&&!n._hostParent?n:null}function f(e){var t=d(e);return t?t._hostContainerInfo._topLevelWrapper:null}var p=n(12),h=n(97),m=n(92),_=n(85),M=n(152),b=(n(66),n(22)),g=n(598),v=n(923),y=n(478),A=n(133),E=(n(43),n(599)),w=n(95),k=n(215),T=n(53),L=n(132),S=n(256),C=(n(9),n(151)),O=n(214),z=(n(13),m.ID_ATTRIBUTE_NAME),N=m.ROOT_ATTRIBUTE_NAME,D=1,P=9,x=11,j={},R=1,Y=function(){this.rootID=R++};Y.prototype.isReactComponent={},Y.prototype.render=function(){return this.props.child},Y.isReactTopLevelWrapper=!0;var I={TopLevelWrapper:Y,_instancesByReactRootID:j,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,a){return I.scrollMonitor(r,function(){k.enqueueElementInternal(e,t,n),a&&k.enqueueCallbackInternal(e,a)}),e},_renderNewRootComponent:function(e,t,n,r){l(t)||p("37"),M.ensureScrollValueMonitoring();var a=S(e,!1);T.batchedUpdates(s,a,t,n,r);var i=a._instance.rootID;return j[i]=a,a},renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&A.has(e)||p("38"),I._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){k.validateCallback(r,"ReactDOM.render"),_.isValidElement(t)||p("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var o,s=_.createElement(Y,{child:t});if(e){var c=A.get(e);o=c._processChildContext(c._context)}else o=L;var l=f(n);if(l){var d=l._currentElement,h=d.props.child;if(O(h,t)){var m=l._renderedComponent.getPublicInstance(),M=r&&function(){r.call(m)};return I._updateRootComponent(l,s,o,n,M),m}I.unmountComponentAtNode(n)}var b=a(n),g=b&&!!i(b),v=u(n),y=g&&!l&&!v,E=I._renderNewRootComponent(s,n,y,o)._renderedComponent.getPublicInstance();return r&&r.call(E),E},render:function(e,t,n){return I._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)||p("40");var t=f(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(N);return!1}return delete j[t._instance.rootID],T.batchedUpdates(c,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,o){if(l(t)||p("41"),i){var s=a(t);if(E.canReuseMarkup(e,s))return void b.precacheNode(n,s);var c=s.getAttribute(E.CHECKSUM_ATTR_NAME);s.removeAttribute(E.CHECKSUM_ATTR_NAME);var u=s.outerHTML;s.setAttribute(E.CHECKSUM_ATTR_NAME,c);var d=e,f=r(d,u),m=" (client) "+d.substring(f-20,f+20)+"\n (server) "+u.substring(f-20,f+20);t.nodeType===P&&p("42",m)}if(t.nodeType===P&&p("43"),o.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else C(t,e),b.precacheNode(n,t.firstChild)}};e.exports=I},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===a.COMPOSITE;)e=e._renderedComponent;return t===a.HOST?e._renderedComponent:t===a.EMPTY?null:void 0}var a=n(479);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Navigation=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(862),v=r(g),y=n(804),A=r(y),E=n(809),w=r(E),k=n(8),T=n(15),L=r(T),S=n(23),C=n(28),O=t.Navigation=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.trackNavClick=function(e){L.default.tracks.recordJetpackClick({target:"nav_item",path:e})},r.trackDashboardClick=function(){r.trackNavClick("dashboard")},r.trackPlansClick=function(){r.trackNavClick("dashboard")},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=void 0;return e=this.props.userCanManageModules?M.default.createElement(A.default,{selectedText:this.props.route.name},M.default.createElement(w.default,{path:"#/dashboard",onClick:this.trackDashboardClick,selected:"/dashboard"===this.props.route.path||"/"===this.props.route.path},(0,k.translate)("At a Glance",{context:"Navigation item."})),M.default.createElement(w.default,{path:"#/plans",onClick:this.trackPlansClick,selected:"/plans"===this.props.route.path},(0,k.translate)("Plans",{context:"Navigation item."}))):M.default.createElement(A.default,{selectedText:this.props.route.name},M.default.createElement(w.default,{path:"#/dashboard",selected:"/dashboard"===this.props.route.path||"/"===this.props.route.path},(0,k.translate)("At a Glance",{context:"Navigation item."}))),M.default.createElement("div",{id:"jp-navigation",className:"dops-navigation"},M.default.createElement(v.default,{selectedText:this.props.route.name},e))}}]),t}(M.default.Component);O.propTypes={route:m.default.object.isRequired},t.default=(0,b.connect)(function(e){return{userCanManageModules:(0,C.userCanManageModules)(e),userCanViewStats:(0,C.userCanViewStats)(e),isModuleActivated:function(t){return(0,S.isModuleActivated)(e,t)}}})(O)},function(e,t,n){"use strict";var r=n(7),a=n(1),i=n(935),o=n(14),s=n(32),c=n(804),u=n(809),l=n(866);n(945);var d=s({displayName:"SectionNav",propTypes:{children:r.node,selectedText:r.node,selectedCount:r.number,hasPinnedItems:r.bool,onMobileNavPanelOpen:r.func},getInitialState:function(){return{mobileOpen:!1}},getDefaultProps:function(){return{onMobileNavPanelOpen:function(){}}},componentWillMount:function(){this.checkForSiblingControls(this.props.children)},componentWillReceiveProps:function(e){i(this.props,e)||(this.checkForSiblingControls(e.children),this.hasSiblingControls||this.closeMobilePanel())},render:function(){var e=this.getChildren(),t=void 0;return e?(t=o({"dops-section-nav":!0,"is-open":this.state.mobileOpen,"has-pinned-items":this.hasPinnedSearch||this.props.hasPinnedItems}),a.createElement("div",{className:t},a.createElement("div",{className:"dops-section-nav__mobile-header",onTouchTap:this.toggleMobileOpenState},a.createElement("span",{className:"dops-section-nav__mobile-header-text"},this.props.selectedText)),a.createElement("div",{className:"dops-section-nav__panel"},e))):(t=o({"dops-section-nav":!0,"is-empty":!0}),a.createElement("div",{className:t},a.createElement("div",{className:"dops-section-nav__panel"},a.createElement(u,null))))},getChildren:function(){return a.Children.map(this.props.children,function(e){var t={hasSiblingControls:this.hasSiblingControls,closeSectionNavMobilePanel:this.closeMobilePanel};return e?(e.type!==c||e.props.selectedText||"string"!=typeof this.props.selectedText||(t.selectedText=this.props.selectedText),e.type===c&&this.props.selectedCount&&(t.selectedCount=this.props.selectedCount),e.type===l&&(e.props.pinned&&(this.hasPinnedSearch=!0),t.onSearch=this.generateOnSearch(e.props.onSearch)),a.cloneElement(e,t)):null}.bind(this))},closeMobilePanel:function(){window.innerWidth<480&&this.state.mobileOpen&&this.setState({mobileOpen:!1})},toggleMobileOpenState:function(){var e=!this.state.mobileOpen;this.setState({mobileOpen:e}),e&&this.props.onMobileNavPanelOpen()},generateOnSearch:function(e){return function(){e.apply(this,arguments),this.closeMobilePanel()}.bind(this)},checkForSiblingControls:function(e){this.hasSiblingControls=!1,a.Children.forEach(e,function(e,t){t&&e&&e.type!==l&&(this.hasSiblingControls=!0)}.bind(this))}});e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(149),M=r(_),b=n(1),g=r(b),v=n(503),y=r(v),A=n(459),E=r(A),w=n(504),k=r(w),T=n(864),L=r(T),S=n(938),C=r(S),O=n(14),z=r(O),N=n(865),D=r(N),P=n(940),x=r(P),j=n(941),R=r(j),Y=n(805),I=r(Y);n(942);var q=g.default.Component,B=function(){},W=function(e){function t(e){(0,s.default)(this,t);var n=(0,d.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e));n.navigateItem=n.navigateItem.bind(n),n.toggleDropdown=n.toggleDropdown.bind(n),n.handleOutsideClick=n.handleOutsideClick.bind(n),n._onClick=n._onClick.bind(n);var r={isOpen:!1};return e.options.length&&(r.selected=n.getInitialSelectedItem(e)),n.state=r,n}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.setState({instanceId:++t.instances})}},{key:"componentWillReceiveProps",value:function(e){this.state.isOpen&&this.closeDropdown(),void 0!==this.state.selected&&this.props.initialSelected!==e.initialSelected&&this.setState({selected:e.initialSelected})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.handleOutsideClick)}},{key:"componentDidUpdate",value:function(e,t){this.state.isOpen?window.addEventListener("click",this.handleOutsideClick):window.removeEventListener("click",this.handleOutsideClick),this.state.isOpen!==t.isOpen&&this.props.onToggle({target:this,open:this.state.isOpen})}},{key:"getInitialSelectedItem",value:function(e){if(e=e||this.props,e.initialSelected)return e.initialSelected;if(e.options.length){var t=(0,y.default)(e.options,function(e){return!e.isLabel});return t&&t.value}}},{key:"dropdownOptions",value:function(){var e=0,t=this;return this.props.children?g.default.Children.map(this.props.children,function(n,r){if(!n)return null;var a=g.default.cloneElement(n,{ref:n.type===D.default?"item-"+e:null,key:"item-"+r,onClick:function(e){t.refs.dropdownContainer.focus(),"function"==typeof n.props.onClick&&n.props.onClick(e)}});return n.type===D.default&&e++,a},this):this.props.options.map(function(t,n){if(!t)return g.default.createElement(x.default,{key:"dropdown-separator-"+this.state.instanceId+"-"+n});if(t.isLabel)return g.default.createElement(R.default,{key:"dropdown-label-"+this.state.instanceId+"-"+n},t.label);var r=g.default.createElement(D.default,{key:"dropdown-item-"+this.state.instanceId+"-"+t.value,ref:"item-"+e,selected:this.state.selected===t.value,onClick:this.onSelectItem(t),path:t.path},t.label);return e++,r},this)}},{key:"render",value:function(){var e={"dops-select-dropdown":!0,"is-compact":this.props.compact,"is-open":this.state.isOpen,"is-disabled":this.props.disabled};this.props.className&&this.props.className.split(" ").forEach(function(t){e[t]=!0});var t=(0,z.default)(e),n=this.props.selectedText?this.props.selectedText:(0,C.default)((0,y.default)(this.props.options,{value:this.state.selected}),"label");return g.default.createElement("div",{style:this.props.style,className:t},g.default.createElement("div",{ref:"dropdownContainer",className:"dops-select-dropdown__container",valueLink:this.props.valueLink,tabIndex:this.props.tabIndex||0,role:"listbox","aria-labelledby":"select-dropdown-"+this.state.instanceId,"aria-haspopup":"true","aria-owns":"select-submenu-"+this.state.instanceId,"aria-controls":"select-submenu-"+this.state.instanceId,"aria-expanded":this.state.isOpen,onClick:this._onClick,onKeyDown:this.navigateItem},g.default.createElement("div",{id:"select-dropdown-"+this.state.instanceId,className:"dops-select-dropdown__header"},g.default.createElement("span",{className:"dops-select-dropdown__header-text"},n,"number"==typeof this.props.selectedCount&&g.default.createElement(I.default,{count:this.props.selectedCount}))),g.default.createElement("ul",{id:"select-submenu-"+this.state.instanceId,className:"dops-select-dropdown__options"},this.dropdownOptions())))}},{key:"_onClick",value:function(){this.props.disabled||this.toggleDropdown()}},{key:"toggleDropdown",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"openDropdown",value:function(){this.setState({isOpen:!0})}},{key:"closeDropdown",value:function(){this.state.isOpen&&(delete this.focused,this.setState({isOpen:!1}))}},{key:"onSelectItem",value:function(e){return this.selectItem.bind(this,e)}},{key:"selectItem",value:function(e){e&&(this.props.onSelect&&this.props.onSelect(e),this.setState({selected:e.value}),this.refs.dropdownContainer.focus())}},{key:"navigateItem",value:function(e){switch(e.keyCode){case 9:this.navigateItemByTabKey(e);break;case 32:case 13:e.preventDefault(),this.activateItem();break;case 38:e.preventDefault(),this.focusSibling("previous"),this.openDropdown();break;case 40:e.preventDefault(),this.focusSibling("next"),this.openDropdown();break;case 27:e.preventDefault(),this.closeDropdown(),this.refs.dropdownContainer.focus()}}},{key:"navigateItemByTabKey",value:function(e){if(this.state.isOpen){e.preventDefault();var t=e.shiftKey?"previous":"next";this.focusSibling(t)}}},{key:"activateItem",value:function(){if(!this.state.isOpen)return this.openDropdown();document.activeElement.click()}},{key:"focusSibling",value:function(e){var t=void 0,n=void 0;if(this.state.isOpen){this.props.options.length?(t=(0,L.default)((0,E.default)(this.props.options,function(e){return e&&!e.isLabel}),"value"),n="number"==typeof this.focused?this.focused:t.indexOf(this.state.selected)):(t=(0,E.default)(this.props.children,function(e){return e.type===D.default}),n="number"==typeof this.focused?this.focused:(0,k.default)(t,function(e){return e.props.selected}));var r="previous"===e?-1:1,a=n+r;a>=t.length||a<0||(M.default.findDOMNode(this.refs["item-"+a].refs.itemLink).focus(),this.focused=a)}}},{key:"handleOutsideClick",value:function(e){M.default.findDOMNode(this.refs.dropdownContainer).contains(e.target)||this.closeDropdown()}}]),t}(q);W.defaultProps={options:[],onSelect:B,onToggle:B,disabled:!1,style:{}},W.propTypes={selectedText:m.default.string,selectedCount:m.default.number,initialSelected:m.default.string,className:m.default.string,style:m.default.object,onSelect:m.default.func,onToggle:m.default.func,focusSibling:m.default.func,tabIndex:m.default.number,disabled:m.default.bool,options:m.default.arrayOf(m.default.shape({value:m.default.string.isRequired,label:m.default.string.isRequired,path:m.default.string}))},W.instances=0,t.default=W,e.exports=t.default},function(e,t,n){function r(e,t){return(s(e)?a:o)(e,i(t,3))}var a=n(125),i=n(91),o=n(937),s=n(26);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14),M=n(805),b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=_(this.props.className,{"dops-select-dropdown__item":!0,"is-selected":this.props.selected,"is-disabled":this.props.disabled});return m.createElement("li",{className:"dops-select-dropdown__option"},m.createElement("a",{ref:"itemLink",href:this.props.path,className:e,onClick:this.props.disabled?null:this.props.onClick,"data-bold-text":this.props.value||this.props.children,role:"option",tabIndex:0,"aria-selected":this.props.selected},m.createElement("span",{className:"dops-select-dropdown__item-text"},this.props.children,"number"==typeof this.props.count&&m.createElement(M,{count:this.props.count}))))}}]),t}(m.Component);b.propTypes={children:h.string.isRequired,path:h.string,selected:h.bool,onClick:h.func,count:h.number},b.defaultProps={selected:!1},e.exports=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){switch(t.key){case" ":case"Enter":this[e](t)}}var i=n(11),o=r(i),s=n(2),c=r(s),u=n(3),l=r(u),d=n(6),f=r(d),p=n(4),h=r(p),m=n(5),_=r(m),M=n(149),b=r(M),g=n(7),v=r(g),y=n(1),A=r(y),E=n(14),w=r(E),k=n(505),T=r(k),L=n(64),S=r(L),C=n(15),O=r(C),z=n(867),N=r(z),D=n(65),P=r(D),x=n(808);n(944);var j=function(e){function t(){var e,n,r,a;(0,l.default)(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=(0,h.default)(this,(e=t.__proto__||(0,c.default)(t)).call.apply(e,[this].concat(o))),r.state={keyword:r.props.initialValue||"",isOpen:!!r.props.isOpen,hasFocus:!1},r.scrollOverlay=function(){r.refs.overlay&&window.requestAnimationFrame(function(){r.refs.overlay&&r.refs.searchInput&&(r.refs.overlay.scrollLeft=r.getScrollLeft(r.refs.searchInput))})},r.getScrollLeft=function(e){if(!e.createTextRange)return e.scrollLeft;var t=e.createTextRange(),n=window.getComputedStyle(e,void 0),r=parseFloat(n.paddingLeft),a=t.getBoundingClientRect();return e.getBoundingClientRect().left+e.clientLeft+r-a.left},r.focus=function(){setTimeout(function(){return r.refs.searchInput&&b.default.findDOMNode(r.refs.searchInput).focus()},0)},r.blur=function(){b.default.findDOMNode(r.refs.searchInput).blur()},r.getCurrentSearchValue=function(){return b.default.findDOMNode(r.refs.searchInput).value},r.clear=function(){r.setState({keyword:""})},r.onBlur=function(e){r.props.onBlur&&r.props.onBlur(e),r.setState({hasFocus:!1})},r.onChange=function(){r.setState({keyword:r.getCurrentSearchValue()})},r.openSearch=function(e){r.props.onClick(),e.preventDefault(),r.setState({keyword:"",isOpen:!0}),O.default.ga.recordEvent(r.props.analyticsGroup,"Clicked Open Search")},r.closeSearch=function(e){if(e.preventDefault(),!r.props.disabled){var t=b.default.findDOMNode(r.refs.searchInput);r.setState({keyword:"",isOpen:r.props.isOpen||!1}),t.value="",t.blur(),r.props.pinned&&b.default.findDOMNode(r.refs.openIcon).focus(),r.props.onSearchClose(e),O.default.ga.recordEvent(r.props.analyticsGroup,"Clicked Close Search")}},r.keyUp=function(e){"Enter"===e.key&&(0,x.isMobile)()&&r.blur(),r.props.pinned&&("Escape"===e.key&&r.closeSearch(e),r.scrollOverlay())},r.keyDown=function(e){r.scrollOverlay(),"Escape"===e.key&&""===e.target.value&&r.closeSearch(e),r.props.onKeyDown(e)},r.onFocus=function(){var e=b.default.findDOMNode(r.refs.searchInput),t=e.value;t&&(e.value="",e.value=t),r.setState({hasFocus:!0}),r.props.onSearchOpen()},r.renderStylingDiv=function(){return A.default.createElement("div",{className:"dops-search__text-overlay",ref:"overlay"},r.props.overlayStyling(r.state.keyword))},r.closeButton=function(){return r.props.hideClose||!r.state.keyword&&!r.state.isOpen?null:A.default.createElement("div",{role:"button",className:"dops-search__icon-navigation",onClick:r.closeSearch,tabIndex:"0",onKeyDown:r.closeListener,"aria-controls":"dops-search-component-"+r.state.instanceId,"aria-label":"Close Search"},A.default.createElement(P.default,{icon:"cross",className:"dops-search__close-icon"}))},a=n,(0,h.default)(r,a)}return(0,_.default)(t,e),(0,f.default)(t,[{key:"componentWillMount",value:function(){this.setState({instanceId:++t.instances}),this.closeListener=a.bind(this,"closeSearch"),this.openListener=a.bind(this,"openSearch")}},{key:"componentWillReceiveProps",value:function(e){e.onSearch===this.props.onSearch&&e.delaySearch===this.props.delaySearch||(this.onSearch=this.props.delaySearch?(0,T.default)(this.props.onSearch,this.props.delayTimeout):this.props.onSearch),e.isOpen&&this.setState({isOpen:e.isOpen}),e.initialValue===this.props.initialValue||this.state.keyword!==this.props.initialValue&&""!==this.state.keyword||this.setState({keyword:e.initialValue||""})}},{key:"componentDidUpdate",value:function(e,t){this.scrollOverlay(),(this.state.isOpen&&!t.isOpen||this.props.autoFocus&&!e.autoFocus)&&this.focus(),this.state.keyword!==t.keyword&&(this.state.keyword?this.onSearch(this.state.keyword):(this.props.delaySearch&&this.onSearch.cancel(),this.props.onSearch(this.state.keyword)),this.props.onSearchChange(this.state.keyword))}},{key:"componentDidMount",value:function(){var e=this;this.onSearch=this.props.delaySearch?(0,T.default)(this.props.onSearch,this.props.delayTimeout):this.props.onSearch,this.props.autoFocus&&setTimeout(function(){return e.focus()},0)}},{key:"render",value:function(){var e=this.state.keyword,t=this.props.placeholder||"Search…",n=this.props.pinned&&!this.state.isOpen,r=this.state.isOpen||!this.props.pinned||this.props.initialValue,a=this.props.disableAutocorrect&&{autoComplete:"off",autoCorrect:"off",spellCheck:"false"},i=(0,w.default)(this.props.additionalClasses,this.props.dir,{"is-expanded-to-container":this.props.fitsContainer,"is-open":r,"is-searching":this.props.searching,"has-focus":this.state.hasFocus,"dops-search":!0}),s=(0,w.default)("dops-search__input-fade",this.props.dir),c=(0,w.default)("dops-search__input",this.props.dir);return A.default.createElement("div",{dir:this.props.dir||null,className:i,role:"search"},A.default.createElement(N.default,null),A.default.createElement("div",{role:"button",className:"dops-search__icon-navigation",ref:"openIcon",onClick:n?this.openSearch:this.focus,tabIndex:n?"0":null,onKeyDown:n?this.openListener:null,"aria-controls":"dops-search-component-"+this.state.instanceId,"aria-label":"Open Search"},A.default.createElement(P.default,{icon:"search",className:"dops-search__open-icon"})),A.default.createElement("div",{className:s},A.default.createElement("input",(0,o.default)({type:"search",id:"dops-search-component-"+this.state.instanceId,className:c,placeholder:t,role:"search",value:e,ref:"searchInput",onInput:this.onChange,onKeyUp:this.keyUp,onKeyDown:this.keyDown,onMouseUp:this.props.onClick,onFocus:this.onFocus,onBlur:this.onBlur,disabled:this.props.disabled,"aria-hidden":!r,autoCapitalize:"none",dir:this.props.dir,maxLength:this.props.maxLength},a)),this.props.overlayStyling&&this.renderStylingDiv()),this.closeButton())}}]),t}(A.default.Component);j.displayName="Search",j.instances=0,j.propTypes={additionalClasses:v.default.string,initialValue:v.default.string,placeholder:v.default.string,pinned:v.default.bool,delaySearch:v.default.bool,delayTimeout:v.default.number,onSearch:v.default.func.isRequired,onSearchChange:v.default.func,onSearchOpen:v.default.func,onSearchClose:v.default.func,analyticsGroup:v.default.string,overlayStyling:v.default.func,autoFocus:v.default.bool,disabled:v.default.bool,onKeyDown:v.default.func,onClick:v.default.func,disableAutocorrect:v.default.bool,onBlur:v.default.func,searching:v.default.bool,isOpen:v.default.bool,dir:v.default.oneOf(["ltr","rtl"]),fitsContainer:v.default.bool,maxLength:v.default.number,hideClose:v.default.bool},j.defaultProps={pinned:!1,delaySearch:!1,delayTimeout:300,autoFocus:!1,disabled:!1,onSearchChange:S.default,onSearchOpen:S.default,onSearchClose:S.default,onKeyDown:S.default,onClick:S.default,overlayStyling:void 0,disableAutocorrect:!1,searching:!1,isOpen:!1,dir:void 0,fitsContainer:!1,hideClose:!1},e.exports=j},function(e,t,n){"use strict";(function(t){function r(e){return e&&e.__esModule?e:{default:e}}var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14);n(943);var M=function(e){function n(){var e,r,a,o;(0,s.default)(this,n);for(var c=arguments.length,u=Array(c),l=0;l<c;l++)u[l]=arguments[l];return r=a=(0,d.default)(this,(e=n.__proto__||(0,i.default)(n)).call.apply(e,[this].concat(u))),a.isSVGCSSAnimationSupported=function(){return!/(MSIE |Trident\/)/.test(t.window?t.window.navigator.userAgent:"")},a.getClassName=function(){return _("dops-spinner",a.props.className,{"is-fallback":!a.isSVGCSSAnimationSupported()})},a.renderFallback=function(){var e={width:a.props.size,height:a.props.size};return m.createElement("div",{className:a.getClassName(),style:e},m.createElement("span",{className:"dops-spinner__progress is-left"}),m.createElement("span",{className:"dops-spinner__progress is-right"}))},o=r,(0,d.default)(a,o)}return(0,p.default)(n,e),(0,u.default)(n,[{key:"componentWillMount",value:function(){this.setState({instanceId:++n.instances})}},{key:"render",value:function(){var e=parseInt(this.state.instanceId,10);return this.isSVGCSSAnimationSupported()?m.createElement("div",{className:this.getClassName()},m.createElement("svg",{className:"dops-spinner__image",width:this.props.size,height:this.props.size,viewBox:"0 0 100 100",dangerouslySetInnerHTML:{__html:'\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<mask id="maskBorder'+e+'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="100%" height="100%" fill="white" />\n\t\t\t\t\t\t\t<circle r="46%" cx="50%" cy="50%" fill="black" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskDonut'+e+'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="100%" height="100%" fill="black" />\n\t\t\t\t\t\t\t<circle r="46%" cx="50%" cy="50%" fill="white" />\n\t\t\t\t\t\t\t<circle r="30%" cx="50%" cy="50%" fill="black" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskLeft'+e+'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="50%" height="100%" fill="white" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskRight'+e+'">\n\t\t\t\t\t\t\t<rect x="50%" y="0" width="50%" height="100%" fill="white" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<circle class="dops-spinner__border" r="50%" cx="50%" cy="50%" mask="url( #maskBorder'+e+' )" />\n\t\t\t\t\t<g mask="url( #maskDonut'+e+' )">\n\t\t\t\t\t\t<g mask="url( #maskLeft'+e+' )">\n\t\t\t\t\t\t\t<rect class="dops-spinner__progress is-left" x="0" y="0" width="50%" height="100%" />\n\t\t\t\t\t\t</g>\n\t\t\t\t\t\t<g mask="url( #maskRight'+e+' )">\n\t\t\t\t\t\t\t<rect class="dops-spinner__progress is-right" x="50%" y="0" width="50%" height="100%" />\n\t\t\t\t\t\t</g>\n\t\t\t\t\t</g>\n\t\t\t\t'}})):this.renderFallback()}}]),n}(m.Component);M.propTypes={className:h.string,size:h.number,duration:h.number},M.instances=0,M.defaultProps={size:20,duration:3e3},e.exports=M}).call(t,n(45))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationSettings=void 0;var a=n(113),i=r(a),o=n(7),s=r(o),c=n(1),u=r(c),l=n(32),d=r(l),f=n(10),p=n(862),h=r(p),m=n(804),_=r(m),M=n(809),b=r(M),g=n(866),v=r(g),y=n(8),A=n(64),E=r(A),w=n(946),k=r(w),T=n(15),L=r(T),S=n(960),C=r(S),O=n(74),z=n(28),N=n(21),D=n(23),P=n(210),x=n(507),j=r(x),R=t.NavigationSettings=(0,d.default)({displayName:"NavigationSettings",mixins:[k.default],moduleList:[],componentWillMount:function(){this.context.router.listen(this.onRouteChange),this.moduleList=(0,i.default)(this.props.moduleList)},onRouteChange:function(e){var t=e.search||"",n=t.substr(1).split("&"),r=n.filter(function(e){return 0===e.indexOf("term=")}),a="";r.length>0&&(a=r[0].split("=")[1]),this.props.searchForTerm(decodeURIComponent(a))},maybeShowSearch:function(){if(this.props.userCanManageModules)return u.default.createElement(v.default,{onClick:this.handleClickForTracking("search"),pinned:!0,fitsContainer:!0,placeholder:(0,y.translate)("Search for a Jetpack feature."),delaySearch:!0,delayTimeout:500,onSearch:this.doSearch,isOpen:!!this.props.searchTerm,initialValue:this.props.searchTerm})},trackNavClick:function(e){L.default.tracks.recordJetpackClick({target:"nav_item",path:e})},buildUrl:function(e,t){var n=e.split("#"),r=n[1].split("?");return this.props.searchForTerm(t),"#"+r[0]+(t?"?term="+t:"")},hasAnyOfThese:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return 0<(0,C.default)(this.moduleList,e).length},handleClickForTracking:function(e){var t=this;return function(){return t.trackNavClick(e)}},render:function(){var e=void 0,t=void 0;return this.props.userCanManageModules?e=u.default.createElement(_.default,{selectedText:this.props.route.name},this.hasAnyOfThese(["masterbar","markdown","after-the-deadline","custom-content-types","photon","carousel","post-by-email","infinite-scroll","minileven"])&&u.default.createElement(b.default,{path:"#writing",onClick:this.handleClickForTracking("writing"),selected:"/writing"===this.props.route.path||"/settings"===this.props.route.path},(0,y.translate)("Writing",{context:"Navigation item."})),this.hasAnyOfThese(["publicize","sharedaddy","likes"])&&u.default.createElement(b.default,{path:"#sharing",onClick:this.handleClickForTracking("sharing"),selected:"/sharing"===this.props.route.path},(0,y.translate)("Sharing",{context:"Navigation item."})),this.hasAnyOfThese(["comments","gravatar-hovercards","markdown","subscriptions"])&&u.default.createElement(b.default,{path:"#discussion",onClick:this.handleClickForTracking("discussion"),selected:"/discussion"===this.props.route.path},(0,y.translate)("Discussion",{context:"Navigation item."})),this.hasAnyOfThese(["seo-tools","wordads","stats","related-posts","verification-tools","sitemaps","google-analytics"])&&u.default.createElement(b.default,{path:"#traffic",onClick:this.handleClickForTracking("traffic"),selected:"/traffic"===this.props.route.path},(0,y.translate)("Traffic",{context:"Navigation item."})),(this.hasAnyOfThese(["protect","sso","vaultpress"])||this.props.isPluginActive("akismet/akismet.php"))&&u.default.createElement(b.default,{path:"#security",onClick:this.handleClickForTracking("security"),selected:"/security"===this.props.route.path},(0,y.translate)("Security",{context:"Navigation item."}))):this.props.isSubscriber?e=!1:(t=this.props.isModuleActivated("publicize")&&this.props.userCanPublish?this.hasAnyOfThese(["publicize"])&&u.default.createElement(b.default,{path:"#sharing",onClick:this.handleClickForTracking("sharing"),selected:"/sharing"===this.props.route.path},(0,y.translate)("Sharing",{context:"Navigation item."})):"",e=u.default.createElement(_.default,{selectedText:this.props.route.name},this.hasAnyOfThese(["after-the-deadline","post-by-email"])&&u.default.createElement(b.default,{path:"#writing",onClick:this.handleClickForTracking("writing"),selected:"/writing"===this.props.route.path||"/settings"===this.props.route.path},(0,y.translate)("Writing",{context:"Navigation item."})),t)),u.default.createElement("div",{id:"jp-navigation",className:"dops-navigation"},u.default.createElement(j.default,null),u.default.createElement(h.default,{selectedText:this.props.route.name},e,this.maybeShowSearch()))}});R.contextTypes={router:s.default.object.isRequired},R.propTypes={userCanManageModules:s.default.bool.isRequired,isSubscriber:s.default.bool.isRequired,userCanPublish:s.default.bool.isRequired,isLinked:s.default.bool.isRequired,isSiteConnected:s.default.bool.isRequired,isModuleActivated:s.default.func.isRequired,searchHasFocus:s.default.bool.isRequired},R.defaultProps={userCanManageModules:!1,isSubscriber:!1,userCanPublish:!1,isLinked:!1,isSiteConnected:!1,isModuleActivated:E.default,searchHasFocus:!1},t.default=(0,f.connect)(function(e){return{userCanManageModules:(0,z.userCanManageModules)(e),isSubscriber:(0,z.userIsSubscriber)(e),userCanPublish:(0,z.userCanPublish)(e),isLinked:(0,N.isCurrentUserLinked)(e),isSiteConnected:(0,N.isSiteConnected)(e),isModuleActivated:function(t){return(0,D.isModuleActivated)(e,t)},moduleList:(0,D.getModules)(e),isPluginActive:function(t){return(0,P.isPluginActive)(e,t)},searchTerm:(0,O.getSearchTerm)(e)}},function(e){return{searchForTerm:function(t){return e((0,O.filterSearch)(t))}}})(R)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}
|
32 |
Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(967),v=r(g),y=n(1105),A=r(y),E=n(1124),w=r(E),k=n(1133),T=r(k),L=n(1154),S=r(L),C=n(1158),O=r(C),z=n(1159),N=r(z),D=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={route:this.props.route,searchTerm:this.props.searchTerm,rewindStatus:this.props.rewindStatus};return M.default.createElement("div",{className:"jp-settings-container"},M.default.createElement("div",{className:"jp-no-results"},e.searchTerm?(0,b.translate)("No search results found for %(term)s",{args:{term:e.searchTerm}}):(0,b.translate)("Enter a search term to find settings or close search.")),M.default.createElement(v.default,(0,i.default)({siteRawUrl:this.props.siteRawUrl,active:"/discussion"===this.props.route.path},e)),M.default.createElement(A.default,(0,i.default)({siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl,active:"/security"===this.props.route.path},e)),M.default.createElement(w.default,(0,i.default)({siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,active:"/traffic"===this.props.route.path},e)),M.default.createElement(T.default,(0,i.default)({siteAdminUrl:this.props.siteAdminUrl,active:"/writing"===this.props.route.path||"/settings"===this.props.route.path},e)),M.default.createElement(S.default,(0,i.default)({siteAdminUrl:this.props.siteAdminUrl,active:"/sharing"===this.props.route.path},e)),M.default.createElement(N.default,(0,i.default)({active:"/privacy"===this.props.route.path},e)),M.default.createElement(O.default,{searchTerm:this.props.searchTerm}))}}]),t}(M.default.Component);D.displayName="SearchableSettings",t.default=D,e.exports=t.default},function(e,t,n){"use strict";var r=n(49).f,a=n(159),i=n(449),o=n(72),s=n(444),c=n(206),u=n(220),l=n(486),d=n(493),f=n(60),p=n(222).fastKey,h=n(834),m=f?"_s":"size",_=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var l=e(function(e,r){s(e,l,t,"_i"),e._t=t,e._i=a(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&c(r,n,e[u],e)});return i(l.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=h(this,t),r=_(n,e);if(r){var a=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=a),a&&(a.p=i),n._f==r&&(n._f=a),n._l==r&&(n._l=i),n[m]--}return!!r},forEach:function(e){h(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!_(h(this,t),e)}}),f&&r(l.prototype,"size",{get:function(){return h(this,t)[m]}}),l},def:function(e,t,n){var r,a,i=_(e,t);return i?i.v=n:(e._l=i={i:a=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[m]++,"F"!==a&&(e._i[a]=i)),e},getEntry:_,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=h(e,t),this._k=n,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?l(0,n.k):"values"==t?l(0,n.v):l(0,[n.k,n.v]):(e._t=void 0,l(1))},n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){"use strict";var r=n(37),a=n(33),i=n(222),o=n(82),s=n(73),c=n(449),u=n(206),l=n(444),d=n(50),f=n(123),p=n(49).f,h=n(976)(0),m=n(60);e.exports=function(e,t,n,_,M,b){var g=r[e],v=g,y=M?"set":"add",A=v&&v.prototype,E={};return m&&"function"==typeof v&&(b||A.forEach&&!o(function(){(new v).entries().next()}))?(v=t(function(t,n){l(t,v,e,"_c"),t._c=new g,void 0!=n&&u(n,M,t[y],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&s(v.prototype,e,function(n,r){if(l(this,v,e),!t&&b&&!d(n))return"get"==e&&void 0;var a=this._c[e](0===n?0:n,r);return t?this:a})}),b||p(v.prototype,"size",{get:function(){return this._c.size}})):(v=_.getConstructor(t,e,M,y),c(v.prototype,n),i.NEED=!0),f(v,e),E[e]=v,a(a.G+a.W+a.F,E),b||_.setStrong(v,e,M),v}},function(e,t,n){var r=n(200),a=n(980);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return a(this)}}},function(e,t,n){"use strict";var r=n(33);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(33),a=n(122),i=n(72),o=n(206);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,c=arguments[1];return a(this),t=void 0!==c,t&&a(c),void 0==e?new this:(n=[],t?(r=0,s=i(c,arguments[2],2),o(e,!1,function(e){n.push(s(e,r++))})):o(e,!1,n.push,n),new this(n))}})}},function(e,t,n){"use strict";(function(t){function r(e){a.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var a=n(836).Transform;n(19)(r,a),r.prototype._transform=function(e,n,r){var a=null;try{"buffer"!==n&&(e=new t(e,n)),this.update(e)}catch(e){a=e}r(a)},r.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},r.prototype.update=function(e,n){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,n||"binary"));for(var r=this._block,a=0;this._blockOffset+e.length-a>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[a++];this._update(),this._blockOffset=0}for(;a<e.length;)r[this._blockOffset++]=e[a++];for(var o=0,s=8*e.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},r.prototype._update=function(e){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=r}).call(t,n(39).Buffer)},function(e,t,n){"use strict";(function(t,r){function a(e){return R.from(e)}function i(e){return R.isBuffer(e)||e instanceof Y}function o(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?P(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function s(e,t){D=D||n(212),e=e||{};var r=t instanceof D;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var a=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:r&&(i||0===i)?i:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new U,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(W||(W=n(839).StringDecoder),this.decoder=new W(e.encoding),this.encoding=e.encoding)}function c(e){if(D=D||n(212),!(this instanceof c))return new c(e);this._readableState=new s(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),j.call(this)}function u(e,t,n,r,i){var o=e._readableState;if(null===t)o.reading=!1,m(e,o);else{var s;i||(s=d(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===R.prototype||(t=a(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):l(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?l(e,o,t,!1):b(e,o)):l(e,o,t,!1))):r||(o.reading=!1)}return f(o)}function l(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&_(e)),b(e,t)}function d(e,t){var n;return i(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function p(e){return e>=X?e=X:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function h(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=p(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function m(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,_(e)}}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(B("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?N.nextTick(M,e):M(e))}function M(e){B("emit readable"),e.emit("readable"),w(e)}function b(e,t){t.readingMore||(t.readingMore=!0,N.nextTick(g,e,t))}function g(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(B("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function v(e){return function(){var t=e._readableState;B("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&x(e,"data")&&(t.flowing=!0,w(e))}}function y(e){B("readable nexttick read 0"),e.read(0)}function A(e,t){t.resumeScheduled||(t.resumeScheduled=!0,N.nextTick(E,e,t))}function E(e,t){t.reading||(B("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;for(B("flow",t.flowing);t.flowing&&null!==e.read(););}function k(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=T(e,t.buffer,t.decoder),n}function T(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?L(e,t):S(e,t),r}function L(e,t){var n=t.head,r=1,a=n.data;for(e-=a.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(o===i.length?a+=i:a+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++r}return t.length-=r,a}function S(e,t){var n=R.allocUnsafe(e),r=t.head,a=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,o),0===(e-=o)){o===i.length?(++a,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(o));break}++a}return t.length-=a,n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,N.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function z(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}var N=n(509);e.exports=c;var D,P=n(440);c.ReadableState=s;var x=(n(147).EventEmitter,function(e,t){return e.listeners(t).length}),j=n(877),R=n(35).Buffer,Y=t.Uint8Array||function(){},I=n(468);I.inherits=n(19);var q=n(994),B=void 0;B=q&&q.debuglog?q.debuglog("stream"):function(){};var W,U=n(995),H=n(878);I.inherits(c,j);var F=["error","close","destroy","pause","resume"];Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),c.prototype.destroy=H.destroy,c.prototype._undestroy=H.undestroy,c.prototype._destroy=function(e,t){this.push(null),t(e)},c.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=R.from(e,t),t=""),n=!0),u(this,e,t,!1,n)},c.prototype.unshift=function(e){return u(this,e,null,!0,!1)},c.prototype.isPaused=function(){return!1===this._readableState.flowing},c.prototype.setEncoding=function(e){return W||(W=n(839).StringDecoder),this._readableState.decoder=new W(e),this._readableState.encoding=e,this};var X=8388608;c.prototype.read=function(e){B("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return B("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):_(this),null;if(0===(e=h(e,t))&&t.ended)return 0===t.length&&C(this),null;var r=t.needReadable;B("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,B("length less than watermark",r)),t.ended||t.reading?(r=!1,B("reading or ended",r)):r&&(B("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=h(n,t)));var a;return a=e>0?k(e,t):null,null===a?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==a&&this.emit("data",a),a},c.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},c.prototype.pipe=function(e,t){function n(e,t){B("onunpipe"),e===f&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,i())}function a(){B("onend"),e.end()}function i(){B("cleanup"),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("drain",_),e.removeListener("error",c),e.removeListener("unpipe",n),f.removeListener("end",a),f.removeListener("end",d),f.removeListener("data",s),M=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||_()}function s(t){B("ondata"),b=!1,!1!==e.write(t)||b||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&-1!==z(p.pipes,e))&&!M&&(B("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,b=!0),f.pause())}function c(t){B("onerror",t),d(),e.removeListener("error",c),0===x(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",l),d()}function l(){B("onfinish"),e.removeListener("close",u),d()}function d(){B("unpipe"),f.unpipe(e)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,B("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,m=h?a:d;p.endEmitted?N.nextTick(m):f.once("end",m),e.on("unpipe",n);var _=v(f);e.on("drain",_);var M=!1,b=!1;return f.on("data",s),o(e,"error",c),e.once("close",u),e.once("finish",l),e.emit("pipe",f),p.flowing||(B("pipe resume"),f.resume()),e},c.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<a;i++)r[i].emit("unpipe",this,n);return this}var o=z(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},c.prototype.on=function(e,t){var n=j.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&_(this):N.nextTick(y,this))}return n},c.prototype.addListener=c.prototype.on,c.prototype.resume=function(){var e=this._readableState;return e.flowing||(B("resume"),e.flowing=!0,A(this,e)),this},c.prototype.pause=function(){return B("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(B("pause"),this._readableState.flowing=!1,this.emit("pause")),this},c.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;e.on("end",function(){if(B("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){if(B("wrapped data"),n.decoder&&(a=n.decoder.write(a)),(!n.objectMode||null!==a&&void 0!==a)&&(n.objectMode||a&&a.length)){t.push(a)||(r=!0,e.pause())}});for(var a in e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var i=0;i<F.length;i++)e.on(F[i],this.emit.bind(this,F[i]));return this._read=function(t){B("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(c.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),c._fromList=k}).call(t,n(45),n(63))},function(e,t,n){e.exports=n(147).EventEmitter},function(e,t,n){"use strict";function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return r||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(e,t){e.emit("error",t)}var o=n(509);e.exports={destroy:r,undestroy:a}},function(e,t,n){"use strict";function r(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){o(e,t,n)}):o(this,null,null)}function o(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}e.exports=a;var s=n(212),c=n(468);c.inherits=n(19),c.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;s.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){function r(){this.init(),this._w=h,d.call(this,64,56)}function a(e,t,n){return n^e&(t^n)}function i(e,t,n){return e&t|n&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var l=n(19),d=n(236),f=n(35).Buffer,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=new Array(64);l(r,d),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,l=0|this._c,d=0|this._d,f=0|this._e,h=0|this._f,m=0|this._g,_=0|this._h,M=0;M<16;++M)t[M]=e.readInt32BE(4*M);for(;M<64;++M)t[M]=u(t[M-2])+t[M-7]+c(t[M-15])+t[M-16]|0;for(var b=0;b<64;++b){var g=_+s(f)+a(f,h,m)+p[b]+t[b]|0,v=o(n)+i(n,r,l)|0;_=m,m=h,h=f,f=d+g|0,d=l,l=r,r=n,n=g+v|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=l+this._c|0,this._d=d+this._d|0,this._e=f+this._e|0,this._f=h+this._f|0,this._g=m+this._g|0,this._h=_+this._h|0},r.prototype._hash=function(){var e=f.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=M,h.call(this,128,112)}function a(e,t,n){return n^e&(t^n)}function i(e,t,n){return e&t|n&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function f(e,t){return e>>>0<t>>>0?1:0}var p=n(19),h=n(236),m=n(35).Buffer,_=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],M=new Array(160);p(r,h),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,p=0|this._ch,h=0|this._dh,m=0|this._eh,M=0|this._fh,b=0|this._gh,g=0|this._hh,v=0|this._al,y=0|this._bl,A=0|this._cl,E=0|this._dl,w=0|this._el,k=0|this._fl,T=0|this._gl,L=0|this._hl,S=0;S<32;S+=2)t[S]=e.readInt32BE(4*S),t[S+1]=e.readInt32BE(4*S+4);for(;S<160;S+=2){var C=t[S-30],O=t[S-30+1],z=c(C,O),N=u(O,C);C=t[S-4],O=t[S-4+1];var D=l(C,O),P=d(O,C),x=t[S-14],j=t[S-14+1],R=t[S-32],Y=t[S-32+1],I=N+j|0,q=z+x+f(I,N)|0;I=I+P|0,q=q+D+f(I,P)|0,I=I+Y|0,q=q+R+f(I,Y)|0,t[S]=q,t[S+1]=I}for(var B=0;B<160;B+=2){q=t[B],I=t[B+1];var W=i(n,r,p),U=i(v,y,A),H=o(n,v),F=o(v,n),X=s(m,w),V=s(w,m),K=_[B],J=_[B+1],G=a(m,M,b),Q=a(w,k,T),Z=L+V|0,$=g+X+f(Z,L)|0;Z=Z+Q|0,$=$+G+f(Z,Q)|0,Z=Z+J|0,$=$+K+f(Z,J)|0,Z=Z+I|0,$=$+q+f(Z,I)|0;var ee=F+U|0,te=H+W+f(ee,F)|0;g=b,L=T,b=M,T=k,M=m,k=w,w=E+Z|0,m=h+$+f(w,E)|0,h=p,E=A,p=r,A=y,r=n,y=v,v=Z+ee|0,n=$+te+f(v,Z)|0}this._al=this._al+v|0,this._bl=this._bl+y|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+w|0,this._fl=this._fl+k|0,this._gl=this._gl+T|0,this._hl=this._hl+L|0,this._ah=this._ah+n+f(this._al,v)|0,this._bh=this._bh+r+f(this._bl,y)|0,this._ch=this._ch+p+f(this._cl,A)|0,this._dh=this._dh+h+f(this._dl,E)|0,this._eh=this._eh+m+f(this._el,w)|0,this._fh=this._fh+M+f(this._fl,k)|0,this._gh=this._gh+b+f(this._gl,T)|0,this._hh=this._hh+g+f(this._hl,L)|0},r.prototype._hash=function(){function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}var t=m.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},e.exports=r},function(e,t,n){"use strict";function r(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>n){t=("rmd160"===e?new u:l(e)).update(t).digest()}else t.length<n&&(t=s.concat([t,d],n));for(var r=this._ipad=s.allocUnsafe(n),a=this._opad=s.allocUnsafe(n),i=0;i<n;i++)r[i]=54^t[i],a[i]=92^t[i];this._hash="rmd160"===e?new u:l(e),this._hash.update(r)}var a=n(19),i=n(1009),o=n(162),s=n(35).Buffer,c=n(883),u=n(840),l=n(841),d=s.alloc(128);a(r,o),r.prototype._update=function(e){this._hash.update(e)},r.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:l(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return e=e.toLowerCase(),"rmd160"===e||"ripemd160"===e?new r("rmd160",t):"md5"===e?new i(c,t):new r(e,t)}},function(e,t,n){var r=n(835);e.exports=function(e){return(new r).update(e).digest()}},function(e,t){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},function(e,t,n){t.pbkdf2=n(1011),t.pbkdf2Sync=n(888)},function(e,t){var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!==t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t){var n;if(t.browser)n="utf-8";else{n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}e.exports=n}).call(t,n(63))},function(e,t,n){function r(e,t,n){var r=a(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=r(t):t.length<i&&(t=d.concat([t,f],i));for(var o=d.allocUnsafe(i+p[e]),s=d.allocUnsafe(i+p[e]),c=0;c<i;c++)o[c]=54^t[c],s[c]=92^t[c];var u=d.allocUnsafe(i+n+4);o.copy(u,0,0,i),this.ipad1=u,this.ipad2=o,this.opad=s,this.alg=e,this.blocksize=i,this.hash=r,this.size=p[e]}function a(e){function t(t){return c(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?s:"md5"===e?o:t}function i(e,t,n,a,i){d.isBuffer(e)||(e=d.from(e,l)),d.isBuffer(t)||(t=d.from(t,l)),u(n,a),i=i||"sha1";var o=new r(i,e,t.length),s=d.allocUnsafe(a),c=d.allocUnsafe(t.length+4);t.copy(c,0,0,t.length);for(var f=0,h=p[i],m=Math.ceil(a/h),_=1;_<=m;_++){c.writeUInt32BE(_,t.length);for(var M=o.run(c,o.ipad1),b=M,g=1;g<n;g++){b=o.run(b,o.ipad2);for(var v=0;v<h;v++)M[v]^=b[v]}M.copy(s,f),f+=h}return s}var o=n(883),s=n(840),c=n(841),u=n(886),l=n(887),d=n(35).Buffer,f=d.alloc(128),p={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};r.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=i},function(e,t,n){function r(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}var a=n(469),i=n(35).Buffer,o=n(890);t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;s<n;s++){var c=r(e),u=o+16*s;e._cache.writeUInt32BE(c[0],u+0),e._cache.writeUInt32BE(c[1],u+4),e._cache.writeUInt32BE(c[2],u+8),e._cache.writeUInt32BE(c[3],u+12)}var l=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),a(t,l)}},function(e,t){function n(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}e.exports=n},function(e,t){e.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,
|
33 |
mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(e,t,n){function r(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),a=0;a<r;++a)n+=e[a]^t[a];return n}function a(e,t,n){if(12===t.length)return e._finID=s.concat([t,s.from([0,0,0,1])]),s.concat([t,s.from([0,0,0,2])]);var r=new l(n),a=t.length,i=a%16;r.update(t),i&&(i=16-i,r.update(s.alloc(i,0))),r.update(s.alloc(8,0));var o=8*a,c=s.alloc(8);c.writeUIntBE(o,0,8),r.update(c),e._finID=r.state;var u=s.from(e._finID);return f(u),u}function i(e,t,n,r){c.call(this);var i=s.alloc(4,0);this._cipher=new o.AES(t);var u=this._cipher.encryptBlock(i);this._ghash=new l(u),n=a(this,n,u),this._prev=s.from(n),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}var o=n(510),s=n(35).Buffer,c=n(162),u=n(19),l=n(1026),d=n(469),f=n(890);u(i,c),i.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=s.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=d(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&r(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},i.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},i.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},i.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=i},function(e,t,n){function r(e,t,n,r){o.call(this),this._cipher=new a.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=r,this._mode=e}var a=n(510),i=n(35).Buffer,o=n(162);n(19)(r,o),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},e.exports=r},function(e,t,n){function r(){if(null!==g)return g;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),a=0;a<t&&e[a]<=r&&n%e[a]!=0;a++);t!==a&&e[a]<=r||(e[t++]=n)}return g=e,e}function a(e){for(var t=r(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function i(e){var t=c.mont(e);return 0===p.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function o(e,t){if(e<16)return new c(2===t||5===t?[140,123]:[140,39]);t=new c(t);for(var n,r;;){for(n=new c(s(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(f),n.testn(1)||n.iadd(p),t.cmp(p)){if(!t.cmp(h))for(;n.mod(m).cmp(_);)n.iadd(b)}else for(;n.mod(u).cmp(M);)n.iadd(b);if(r=n.shrn(1),a(r)&&a(n)&&i(r)&&i(n)&&d.test(r)&&d.test(n))return n}}var s=n(235);e.exports=o,o.simpleSieve=a,o.fermatTest=i;var c=n(57),u=new c(24),l=n(895),d=new l,f=new c(1),p=new c(2),h=new c(5),m=(new c(16),new c(8),new c(10)),_=new c(3),M=(new c(7),new c(11)),b=new c(4),g=(new c(12),null)},function(e,t,n){function r(e){this.rand=e||new i.Rand}var a=n(57),i=n(896);e.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var r=new a(this.rand.generate(n))}while(r.cmp(e)>=0);return r},r.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},r.prototype.test=function(e,t,n){var r=e.bitLength(),i=a.mont(e),o=new a(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),l=s.toRed(i);t>0;t--){var d=this._randrange(new a(2),s);n&&n(d);var f=d.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(l)){for(var p=1;p<c;p++){if(f=f.redSqr(),0===f.cmp(o))return!1;if(0===f.cmp(l))break}if(p===c)return!1}}return!0},r.prototype.getDivisor=function(e,t){var n=e.bitLength(),r=a.mont(e),i=new a(1).toRed(r);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var c=e.shrn(s),u=o.toRed(r);t>0;t--){var l=this._randrange(new a(2),o),d=e.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(r).redPow(c);if(0!==f.cmp(i)&&0!==f.cmp(u)){for(var p=1;p<s;p++){if(f=f.redSqr(),0===f.cmp(i))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(u))break}if(p===s)return f=f.redSqr(),f.fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){function r(e){this.rand=e}var a;if(e.exports=function(e){return a||(a=new r(null)),a.generate(e)},e.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=n(1031);if("function"!=typeof i.randomBytes)throw new Error("Not supported");r.prototype._rand=function(e){return i.randomBytes(e)}}catch(e){}},function(e,t,n){"use strict";function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(var r=0;r<e.length;r++){var a=e.charCodeAt(r),i=a>>8,o=255&a;i?n.push(i,o):n.push(o)}return n}function a(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t}var o=t;o.toArray=r,o.zero2=a,o.toHex=i,o.encode=function(e,t){return"hex"===t?i(e):e}},function(e,t,n){"use strict";function r(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?o(t,n,r):2===e?i(t,n,r):void 0}function a(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function o(e,t,n){return e^t^n}function s(e){return f(e,2)^f(e,13)^f(e,22)}function c(e){return f(e,6)^f(e,11)^f(e,25)}function u(e){return f(e,7)^f(e,18)^e>>>3}function l(e){return f(e,17)^f(e,19)^e>>>10}var d=n(126),f=d.rotr32;t.ft_1=r,t.ch32=a,t.maj32=i,t.p32=o,t.s0_256=s,t.s1_256=c,t.g0_256=u,t.g1_256=l},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;M.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}var a=n(126),i=n(470),o=n(898),s=n(105),c=a.sum32,u=a.sum32_4,l=a.sum32_5,d=o.ch32,f=o.maj32,p=o.s0_256,h=o.s1_256,m=o.g0_256,_=o.g1_256,M=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];a.inherits(r,M),e.exports=r,r.blockSize=512,r.outSize=256,r.hmacStrength=192,r.padLength=64,r.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(_(n[r-2]),n[r-7],m(n[r-15]),n[r-16]);var a=this.h[0],i=this.h[1],o=this.h[2],M=this.h[3],b=this.h[4],g=this.h[5],v=this.h[6],y=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var A=l(y,h(b),d(b,g,v),this.k[r],n[r]),E=c(p(a),f(a,i,o));y=v,v=g,g=b,b=c(M,A),M=o,o=i,i=a,a=c(A,E)}this.h[0]=c(this.h[0],a),this.h[1]=c(this.h[1],i),this.h[2]=c(this.h[2],o),this.h[3]=c(this.h[3],M),this.h[4]=c(this.h[4],b),this.h[5]=c(this.h[5],g),this.h[6]=c(this.h[6],v),this.h[7]=c(this.h[7],y)},r.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;O.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=z,this.W=new Array(160)}function a(e,t,n,r,a){var i=e&n^~e&a;return i<0&&(i+=4294967296),i}function i(e,t,n,r,a,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function o(e,t,n,r,a){var i=e&n^e&a^n&a;return i<0&&(i+=4294967296),i}function s(e,t,n,r,a,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function c(e,t){var n=g(e,t,28),r=g(t,e,2),a=g(t,e,7),i=n^r^a;return i<0&&(i+=4294967296),i}function u(e,t){var n=v(e,t,28),r=v(t,e,2),a=v(t,e,7),i=n^r^a;return i<0&&(i+=4294967296),i}function l(e,t){var n=g(e,t,14),r=g(e,t,18),a=g(t,e,9),i=n^r^a;return i<0&&(i+=4294967296),i}function d(e,t){var n=v(e,t,14),r=v(e,t,18),a=v(t,e,9),i=n^r^a;return i<0&&(i+=4294967296),i}function f(e,t){var n=g(e,t,1),r=g(e,t,8),a=y(e,t,7),i=n^r^a;return i<0&&(i+=4294967296),i}function p(e,t){var n=v(e,t,1),r=v(e,t,8),a=A(e,t,7),i=n^r^a;return i<0&&(i+=4294967296),i}function h(e,t){var n=g(e,t,19),r=g(t,e,29),a=y(e,t,6),i=n^r^a;return i<0&&(i+=4294967296),i}function m(e,t){var n=v(e,t,19),r=v(t,e,29),a=A(e,t,6),i=n^r^a;return i<0&&(i+=4294967296),i}var _=n(126),M=n(470),b=n(105),g=_.rotr64_hi,v=_.rotr64_lo,y=_.shr64_hi,A=_.shr64_lo,E=_.sum64,w=_.sum64_hi,k=_.sum64_lo,T=_.sum64_4_hi,L=_.sum64_4_lo,S=_.sum64_5_hi,C=_.sum64_5_lo,O=M.BlockHash,z=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];_.inherits(r,O),e.exports=r,r.blockSize=1024,r.outSize=512,r.hmacStrength=192,r.padLength=128,r.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var a=h(n[r-4],n[r-3]),i=m(n[r-4],n[r-3]),o=n[r-14],s=n[r-13],c=f(n[r-30],n[r-29]),u=p(n[r-30],n[r-29]),l=n[r-32],d=n[r-31];n[r]=T(a,i,o,s,c,u,l,d),n[r+1]=L(a,i,o,s,c,u,l,d)}},r.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],f=this.h[1],p=this.h[2],h=this.h[3],m=this.h[4],_=this.h[5],M=this.h[6],g=this.h[7],v=this.h[8],y=this.h[9],A=this.h[10],T=this.h[11],L=this.h[12],O=this.h[13],z=this.h[14],N=this.h[15];b(this.k.length===n.length);for(var D=0;D<n.length;D+=2){var P=z,x=N,j=l(v,y),R=d(v,y),Y=a(v,y,A,T,L),I=i(v,y,A,T,L,O),q=this.k[D],B=this.k[D+1],W=n[D],U=n[D+1],H=S(P,x,j,R,Y,I,q,B,W,U),F=C(P,x,j,R,Y,I,q,B,W,U);P=c(r,f),x=u(r,f),j=o(r,f,p,h,m),R=s(r,f,p,h,m,_);var X=w(P,x,j,R),V=k(P,x,j,R);z=L,N=O,L=A,O=T,A=v,T=y,v=w(M,g,H,F),y=k(g,g,H,F),M=m,g=_,m=p,_=h,p=r,h=f,r=w(H,F,X,V),f=k(H,F,X,V)}E(this.h,0,r,f),E(this.h,2,p,h),E(this.h,4,m,_),E(this.h,6,M,g),E(this.h,8,v,y),E(this.h,10,A,T),E(this.h,12,L,O),E(this.h,14,z,N)},r.prototype._digest=function(e){return"hex"===e?_.toHex32(this.h,"big"):_.split32(this.h,"big")}},function(e,t,n){function r(e,t){if(o.call(this,t),!s.isBuffer(e))return void this.error("Input not Buffer");this.base=e,this.offset=0,this.length=e.length}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var i=n(19),o=n(472).Reporter,s=n(39).Buffer;i(r,o),t.DecoderBuffer=r,r.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},r.prototype.restore=function(e){var t=new r(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},r.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new r(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},r.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,t),t+=n.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,n){var r=t;r._reverse=function(e){var t={};return Object.keys(e).forEach(function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n}),t},r.der=n(1063)},function(e,t,n){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){u.Node.call(this,"der",e)}function i(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=d.tagClass[n>>6],a=0==(32&n);if(31==(31&n)){var i=n;for(n=0;128==(128&i);){if(i=e.readUInt8(t),e.isError(i))return i;n<<=7,n|=127&i}}else n&=31;return{cls:r,primitive:a,tag:n,tagStr:d.tag[n]}}function o(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var a=127&r;if(a>4)return e.error("length octect is too long");r=0;for(var i=0;i<a;i++){r<<=8;var o=e.readUInt8(n);if(e.isError(o))return o;r|=o}return r}var s=n(19),c=n(471),u=c.base,l=c.bignum,d=c.constants.der;e.exports=r,r.prototype.decode=function(e,t){return e instanceof u.DecoderBuffer||(e=new u.DecoderBuffer(e,t)),this.tree._decode(e,t)},s(a,u.Node),a.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;var r=e.save(),a=i(e,'Failed to peek tag: "'+t+'"');return e.isError(a)?a:(e.restore(r),a.tag===t||a.tagStr===t||a.tagStr+"of"===t||n)},a.prototype._decodeTag=function(e,t,n){var r=i(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;var a=o(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(a))return a;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==a)return e.skip(a,'Failed to match body of: "'+t+'"');var s=e.save(),c=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(c)?c:(a=e.offset-s.offset,e.restore(s),e.skip(a,'Failed to match body of: "'+t+'"'))},a.prototype._skipUntilEnd=function(e,t){for(;;){var n=i(e,t);if(e.isError(n))return n;var r=o(e,n.primitive,t);if(e.isError(r))return r;var a;if(a=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(a))return a;if("end"===n.tagStr)break}},a.prototype._decodeList=function(e,t,n,r){for(var a=[];!e.isEmpty();){var i=this._peekTag(e,"end");if(e.isError(i))return i;var o=n.decode(e,"der",r);if(e.isError(o)&&i)break;a.push(o)}return a},a.prototype._decodeStr=function(e,t){if("bitstr"===t){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}if("bmpstr"===t){var r=e.raw();if(r.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",i=0;i<r.length/2;i++)a+=String.fromCharCode(r.readUInt16BE(2*i));return a}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},a.prototype._decodeObjid=function(e,t,n){for(var r,a=[],i=0;!e.isEmpty();){var o=e.readUInt8();i<<=7,i|=127&o,0==(128&o)&&(a.push(i),i=0)}128&o&&a.push(i);var s=a[0]/40|0,c=a[0]%40;if(r=n?a:[s,c].concat(a.slice(1)),t){var u=t[r.join(" ")];void 0===u&&(u=t[r.join(".")]),void 0!==u&&(r=u)}return r},a.prototype._decodeTime=function(e,t){var n=e.raw().toString();if("gentime"===t)var r=0|n.slice(0,4),a=0|n.slice(4,6),i=0|n.slice(6,8),o=0|n.slice(8,10),s=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");var r=0|n.slice(0,2),a=0|n.slice(2,4),i=0|n.slice(4,6),o=0|n.slice(6,8),s=0|n.slice(8,10),c=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,a-1,i,o,s,c,0)},a.prototype._decodeNull=function(e){return null},a.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},a.prototype._decodeInt=function(e,t){var n=e.raw(),r=new l(n);return t&&(r=t[r.toString(10)]||r),r},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,n){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){l.Node.call(this,"der",e)}function i(e){return e<10?"0"+e:e}function o(e,t,n,r){var a;if("seqof"===e?e="seq":"setof"===e&&(e="set"),d.tagByName.hasOwnProperty(e))a=d.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);a=e}return a>=31?r.error("Multi-octet tag encoding unsupported"):(t||(a|=32),a|=d.tagClassByName[n||"universal"]<<6)}var s=n(19),c=n(39).Buffer,u=n(471),l=u.base,d=u.constants.der;e.exports=r,r.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(a,l.Node),a.prototype._encodeComposite=function(e,t,n,r){var a=o(e,t,n,this.reporter);if(r.length<128){var i=new c(2);return i[0]=a,i[1]=r.length,this._createEncoderBuffer([i,r])}for(var s=1,u=r.length;u>=256;u>>=8)s++;var i=new c(2+s);i[0]=a,i[1]=128|s;for(var u=1+s,l=r.length;l>0;u--,l>>=8)i[u]=255&l;return this._createEncoderBuffer([i,r])},a.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new c(2*e.length),r=0;r<e.length;r++)n.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},a.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var r=0;r<e.length;r++)e[r]|=0}else if(Array.isArray(e)){e=e.slice();for(var r=0;r<e.length;r++)e[r]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,r=0;r<e.length;r++){var i=e[r];for(a++;i>=128;i>>=7)a++}for(var o=new c(a),s=o.length-1,r=e.length-1;r>=0;r--){var i=e[r];for(o[s--]=127&i;(i>>=7)>0;)o[s--]=128|127&i}return this._createEncoderBuffer(o)},a.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[i(r.getFullYear()),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[i(r.getFullYear()%100),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new c(n)}if(c.isBuffer(e)){var r=e.length;0===e.length&&r++;var a=new c(r);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var r=1,i=e;i>=256;i>>=8)r++;for(var a=new Array(r),i=a.length-1;i>=0;i--)a[i]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new c(a))},a.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},a.prototype._skipDefault=function(e,t,n){var r,a=this._baseState;if(null===a.default)return!1;var i=e.join();if(void 0===a.defaultBuffer&&(a.defaultBuffer=this._encodeValue(a.default,t,n).join()),i.length!==a.defaultBuffer.length)return!1;for(r=0;r<i.length;r++)if(i[r]!==a.defaultBuffer[r])return!1;return!0}},function(e,t){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},function(e,t,n){(function(t){function r(e){var n=new t(4);return n.writeUInt32BE(e,0),n}var a=n(467);e.exports=function(e,n){for(var i,o=new t(""),s=0;o.length<n;)i=r(s++),o=t.concat([o,a("sha1").update(e).update(i).digest()]);return o.slice(0,n)}}).call(t,n(39).Buffer)},function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},function(e,t,n){(function(t){function r(e,n){return new t(e.toRed(a.mont(n.modulus)).redPow(new a(n.publicExponent)).fromRed().toArray())}var a=n(57);e.exports=r}).call(t,n(39).Buffer)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(1079),i=r(a),o=n(1082),s=r(o);t.default=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=(0,s.default)(e);!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,i.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(25),y=r(v);n(1091);var A=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=(0,g.default)(this.props.className,"dops-section-header"),t=""!==this.props.cardBadge?M.default.createElement("span",{className:"dops-section-header__card-badge"},this.props.cardBadge):"";return M.default.createElement(y.default,{compact:!0,className:(0,g.default)(e,{"has-card-badge":""!==this.props.cardBadge})},M.default.createElement("div",{className:"dops-section-header__label"},M.default.createElement("span",{className:"dops-section-header__label-text"},this.props.label),t),M.default.createElement("div",{className:"dops-section-header__actions"},this.props.children))}}]),t}(M.default.Component);A.displayName="SectionHeader",A.propTypes={label:m.default.string,cardBadge:m.default.oneOfType([m.default.string,m.default.element,m.default.object])},A.defaultProps={label:"",cardBadge:""},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(41),y=r(v),A=n(163),E=r(A),w=n(15),k=r(w),T=n(27),L=r(T),S=n(28),C=n(507),O=r(C),z=n(849),N=r(z),D=n(912),P=r(D),x=n(21),j=n(210),R=n(62),Y=n(61),I=function(e,t){return k.default.tracks.recordJetpackClick({target:"pro-status",type:e,feature:t})},q=function(e,t){return function(){return I(e,t)}},B=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.getProActions=function(e,t){var n="",a=!1,i=!1,o="";switch(e){case"threats":n="is-error",r.props.isCompact?i=(0,g.translate)("Threats",{context:"A caption for a small button to fix security issues."}):(a=(0,g.translate)("Threats found!",{context:"Short warning message about new threats found."}),i=(0,g.translate)("FIX",{context:"A caption for a small button to fix security issues."})),o="https://dashboard.vaultpress.com/";break;case"free":case"personal":e="upgrade",n="is-warning",r.props.isCompact||(a=(0,g.translate)("No scanning",{context:"Short warning message about site having no security scan."})),i=(0,g.translate)("Upgrade",{context:"Caption for a button to purchase a paid feature."}),o="https://jetpack.com/redirect/?source=upgrade&site="+r.props.siteRawUrl;break;case"pro":e="upgrade",n="is-warning",i=(0,g.translate)("Upgrade",{context:"Caption for a button to purchase a pro plan."}),o="https://jetpack.com/redirect/?source=plans-business&site="+r.props.siteRawUrl;break;case"secure":n="is-success",a=(0,g.translate)("Secure",{context:"Short message informing user that the site is secure."});break;case"invalid_key":n="is-warning",i=(0,g.translate)("Invalid key",{context:"Short warning message about an invalid key being used for Akismet."}),o=r.props.siteAdminUrl+"admin.php?page=akismet-key-config";break;case"rewind_connected":return M.default.createElement(E.default,{showDismiss:!1,status:"is-success",isCompact:!0},(0,g.translate)("Connected"));case"active":return M.default.createElement("span",{className:"jp-dash-item__active-label"},(0,g.translate)("ACTIVE"))}return M.default.createElement(E.default,{showDismiss:!1,status:n,isCompact:!0},a,i&&M.default.createElement("a",{className:"dops-notice__text-no-underline",onClick:q(e,t),href:o},i))},r.getSetUpButton=function(e){return M.default.createElement(y.default,{onClick:q("set_up",e),compact:!0,primary:!0,href:"https://wordpress.com/plugins/setup/"+r.props.siteRawUrl+"?only="+e},(0,g.translate)("Set up",{context:"Caption for a button to set up a feature."}))},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props.sitePlan(),n=this.props.getVaultPressData(),r="";"scan"!==this.props.proFeature&&"backups"!==this.props.proFeature&&"vaultpress"!==this.props.proFeature||(r="vaultpress/vaultpress.php"),"akismet"===this.props.proFeature&&(r="akismet/akismet.php");var a=/jetpack_personal*/.test(t.product_slug),i=/jetpack_free*/.test(t.product_slug),o=/jetpack_premium*/.test(t.product_slug),s=(0,L.default)(n,["data","features","backups"],!1),c=(0,L.default)(n,["data","features","security"],!1);return M.default.createElement("div",null,M.default.createElement(O.default,null),M.default.createElement(P.default,null),M.default.createElement(N.default,null),!this.props.isDevMode&&function(u,l,d){switch(u){case"rewind":return e.getProActions("rewind_connected","rewind");case"backups":if(i&&!s&&e.props.isCompact)return e.getProActions("free","backups");break;case"scan":if(e.props.fetchingSiteData||e.props.isFetchingVaultPressData)return"";if((i||a)&&!c)return e.props.isCompact?e.getProActions("free","scan"):a&&!s?e.getSetUpButton("backups"):"";if("N/A"!==n)return c?e.getProActions(0===e.props.getScanThreats()?"secure":"threats","scan"):e.getSetUpButton("scan");break;case"search":return i||a||o?e.getProActions("pro"):"";case"akismet":if(i&&(!l||!d))return e.props.isCompact?e.getProActions("free","anti-spam"):"";if(!e.props.isAkismetKeyValid&&!e.props.fetchingAkismetData&&l&&d)return e.getProActions("invalid_key","anti-spam")}return t.product_slug&&r&&!i?l&&d?e.getProActions("active"):e.getSetUpButton(u):""}(this.props.proFeature,this.props.pluginActive(r),this.props.pluginInstalled(r)))}}]),t}(M.default.Component);B.propTypes={isCompact:m.default.bool,proFeature:m.default.string},B.defaultProps={isCompact:!0,proFeature:""},t.default=(0,b.connect)(function(e){return{siteRawUrl:(0,S.getSiteRawUrl)(e),siteAdminUrl:(0,S.getSiteAdminUrl)(e),getScanThreats:function(){return(0,
|
34 |
+
R.getVaultPressScanThreatCount)(e)},getVaultPressData:function(){return(0,R.getVaultPressData)(e)},getAkismetData:function(){return(0,R.getAkismetData)(e)},isFetchingVaultPressData:(0,R.isFetchingVaultPressData)(e),sitePlan:function(){return(0,Y.getSitePlan)(e)},fetchingPluginsData:(0,j.isFetchingPluginsData)(e),pluginActive:function(t){return(0,j.isPluginActive)(e,t)},pluginInstalled:function(t){return(0,j.isPluginInstalled)(e,t)},isDevMode:(0,x.isDevMode)(e),fetchingSiteData:(0,Y.isFetchingSiteData)(e),isAkismetKeyValid:(0,R.isAkismetKeyValid)(e),fetchingAkismetData:(0,R.isFetchingAkismetData)(e)}})(B),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(10),_=n(18),M=n(62),b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.props.isCheckingAkismetKey||this.props.checkAkismetKey()}},{key:"render",value:function(){return null}}]),t}(h.Component);b.defaultProps={checkAkismetKey:function(){}},t.default=(0,m.connect)(function(e){return{checkAkismetKey:(0,M.checkAkismetKey)(),isCheckingAkismetKey:(0,M.isCheckingAkismetKey)(e)}},function(e){return(0,_.bindActionCreators)({checkAkismetKey:M.checkAkismetKey},e)})(b),e.exports=t.default},function(e,t){function n(e){return r.test(e)}var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(8),g=n(15),v=r(g),y=n(1100),A=r(y),E=n(474),w=r(E);n(1103);var k=function(e){function t(){(0,s.default)(this,t);var e=(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments));return e.getModule=e.getModule.bind(e),e.trackInfoClick=e.trackInfoClick.bind(e),e.trackLearnMoreClick=e.trackLearnMoreClick.bind(e),e.trackPrivacyInfoClick=e.trackPrivacyInfoClick.bind(e),e}return(0,p.default)(t,e),(0,u.default)(t,[{key:"getModule",value:function(){return this.props.module||{}}},{key:"trackInfoClick",value:function(){v.default.tracks.recordJetpackClick({target:"info-icon",feature:this.getModule().module})}},{key:"trackLearnMoreClick",value:function(){v.default.tracks.recordJetpackClick({target:"learn-more",feature:this.getModule().module})}},{key:"trackPrivacyInfoClick",value:function(){v.default.tracks.recordJetpackClick({target:"privacy-info",feature:this.getModule().module})}},{key:"render",value:function(){var e=this.getModule(),t=this.props,n=t.text,r=t.link,a=t.privacyLink;return n=n||e.long_description||"",r=r||e.learn_more_button||"",!a&&r&&(a=r+"#privacy"),M.default.createElement("div",{className:"jp-support-info"},M.default.createElement(A.default,{position:"left",onClick:this.trackInfoClick,screenReaderText:(0,b.translate)("Learn more")},n+" ",M.default.createElement("span",{className:"jp-support-info__learn-more"},M.default.createElement(w.default,{href:r,onClick:this.trackLearnMoreClick,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more"))),M.default.createElement("span",{className:"jp-support-info__privacy"},M.default.createElement(w.default,{href:a,onClick:this.trackPrivacyInfoClick,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information")))))}}]),t}(_.Component);k.propTypes={module:m.default.object,text:m.default.string,link:m.default.string,privacyLink:m.default.string},k.defaultProps={module:void 0,text:"",link:"",privacyLink:""},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectButton=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(41),v=r(g),y=n(8),A=n(15),E=r(A),w=n(21),k=n(28),T=n(127),L=r(T),S=n(1162),C=r(S);n(1167);var O=t.ConnectButton=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={showModal:!1},r.handleOpenModal=function(e){E.default.tracks.recordJetpackClick("manage_site_connection"),e.preventDefault(),r.toggleVisibility()},r.disconnectSite=function(){r.toggleVisibility(),r.props.disconnectSite()},r.toggleVisibility=function(){r.setState({showModal:!r.state.showModal})},r.renderUserButton=function(){if(r.props.isLinked)return M.default.createElement("div",null,M.default.createElement("a",{role:"button",tabIndex:"0",className:"jp-jetpack-unlink__button",onKeyDown:(0,L.default)(r.props.unlinkUser),onClick:r.props.unlinkUser,disabled:r.props.isUnlinking},(0,y.translate)("Unlink me from WordPress.com")));var e=r.props.connectUrl;r.props.from&&(e+="&from="+r.props.from,e+="&additional-user");var t={className:"is-primary jp-jetpack-connect__button",href:e,disabled:r.props.fetchingConnectUrl},n=(0,y.translate)("Link to WordPress.com");return r.props.asLink?M.default.createElement("a",t,n):M.default.createElement(v.default,t,n)},r.renderContent=function(){if(r.props.connectUser)return r.renderUserButton();if(r.props.isSiteConnected)return M.default.createElement("a",{role:"button",tabIndex:"0",onKeyDown:(0,L.default)(r.handleOpenModal),onClick:r.handleOpenModal,disabled:r.props.isDisconnecting},(0,y.translate)("Manage site connection"));var e=r.props.connectUrl;r.props.from&&(e+="&from="+r.props.from);var t={className:"jp-jetpack-connect__button",href:e,disabled:r.props.fetchingConnectUrl},n=(0,y.translate)("Set up Jetpack");return r.props.asLink?M.default.createElement("a",t,n):M.default.createElement(v.default,t,n)},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return M.default.createElement("div",null,!this.props.isSiteConnected&&M.default.createElement("p",{className:"jp-banner__tos-blurb"},(0,y.translate)("By clicking the button below, you agree to our fascinating {{tosLink}}Terms of Service{{/tosLink}} and to {{shareDetailsLink}}share details{{/shareDetailsLink}} with WordPress.com",{components:{tosLink:M.default.createElement("a",{href:"https://wordpress.com/tos",rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:M.default.createElement("a",{href:"https://jetpack.com/support/what-data-does-jetpack-sync",rel:"noopener noreferrer",target:"_blank"})}})),this.renderContent(),this.props.children,M.default.createElement(C.default,{show:this.state.showModal,toggleModal:this.toggleVisibility,disconnectSite:this.disconnectSite}))}}]),t}(M.default.Component);O.displayName="ConnectButton",O.propTypes={connectUser:m.default.bool,from:m.default.string,asLink:m.default.bool},O.defaultProps={connectUser:!1,from:"",asLink:!1},t.default=(0,b.connect)(function(e){return{siteRawUrl:(0,k.getSiteRawUrl)(e),isSiteConnected:(0,w.getSiteConnectionStatus)(e),isDisconnecting:(0,w.isDisconnectingSite)(e),fetchingConnectUrl:(0,w.isFetchingConnectUrl)(e),connectUrl:(0,w.getConnectUrl)(e),isLinked:(0,w.isCurrentUserLinked)(e),isUnlinking:(0,w.isUnlinkingUser)(e)}},function(e){return{disconnectSite:function(){return e((0,w.disconnectSite)())},unlinkUser:function(){return e((0,w.unlinkUser)())}}})(O)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=function(e){return e&&e.__esModule?e:{default:e}}(a),o=n(499),s=r(o),c=n(1169),u=r(c),l=(0,i.default)({},s,u);t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(909),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(15),E=r(A),w=n(1170),k=r(w),T=n(27),L=r(T),S=n(30),C=n(918),O=r(C),z=n(1171),N=r(z),D=n(1172),P=r(D),x=n(1184),j=r(x),R=n(1186),Y=r(R),I=n(1187),q=r(I),B=n(1188),W=r(B),U=n(1190),H=r(U),F=n(1191),X=r(F),V=n(1193),K=r(V),J=n(1194),G=r(J),Q=n(1195),Z=r(Q),$=n(507),ee=r($),te=n(211),ne=r(te),re=n(28),ae=n(21),ie=n(23),oe=function(e){return e.map(function(e){return[e.header,(0,k.default)(e.cards,2).map(function(e){var t=(0,M.default)(e,2),n=t[0],r=t[1];return g.default.createElement("div",{className:"jp-at-a-glance__item-grid"},g.default.createElement("div",{className:"jp-at-a-glance__left"},n),g.default.createElement("div",{className:"jp-at-a-glance__right"},r))})]})},se=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={updateOptions:this.props.updateOptions,getOptionValue:this.props.getOptionValue,isUpdating:this.props.isUpdating},t={siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl},n=function(){return E.default.tracks.recordJetpackClick("aag_manage_security_wpcom")},r=g.default.createElement(O.default,{label:(0,y.translate)("Security"),settingsPath:this.props.userCanManageModules?"#security":void 0,externalLink:this.props.isDevMode||!this.props.userCanManageModules?"":(0,y.translate)("Manage security on WordPress.com"),externalLinkPath:this.props.isDevMode?"":"https://wordpress.com/settings/security/"+this.props.siteRawUrl,externalLinkClick:n}),a=g.default.createElement("div",null,g.default.createElement(O.default,{label:(0,y.translate)("Connections")}),g.default.createElement(Z.default,null)),o="active"===(0,L.default)(this.props.rewindStatus,["state"],!1),s=[g.default.createElement(q.default,(0,i.default)({},e,{siteRawUrl:this.props.siteRawUrl,isRewindActive:o})),g.default.createElement(H.default,(0,i.default)({},e,{siteRawUrl:this.props.siteRawUrl,isRewindActive:o})),g.default.createElement(W.default,t),g.default.createElement(X.default,(0,i.default)({},e,t))];if("inactive"!==this.props.getModuleOverride("protect")&&s.push(g.default.createElement(j.default,e)),"inactive"!==this.props.getModuleOverride("monitor")&&s.push(g.default.createElement(Y.default,e)),o&&s.unshift(g.default.createElement(N.default,(0,i.default)({},e,{siteRawUrl:this.props.siteRawUrl}))),this.props.userCanManageModules){var c=[{header:r,cards:s}],u=[];return"inactive"!==this.props.getModuleOverride("photon")&&u.push(g.default.createElement(K.default,e)),"inactive"!==this.props.getModuleOverride("search")&&u.push(g.default.createElement(G.default,e)),u.length&&c.push({header:g.default.createElement(O.default,{label:(0,y.translate)("Performance")}),cards:u}),g.default.createElement("div",{className:"jp-at-a-glance"},g.default.createElement(ee.default,null),g.default.createElement(ne.default,null),g.default.createElement(P.default,(0,i.default)({},e,t)),oe(c),a)}var l="";this.props.userCanViewStats&&(l=g.default.createElement(P.default,(0,i.default)({},e,t)));var d="";return this.props.getOptionValue("protect")&&(d=g.default.createElement(j.default,e)),this.props.userIsSubscriber?g.default.createElement("div",null,l,a):g.default.createElement("div",null,l,this.props.getOptionValue("protect")&&r,d,a)}}]),t}(b.Component);t.default=(0,v.connect)(function(e){return{userCanManageModules:(0,re.userCanManageModules)(e),userCanViewStats:(0,re.userCanViewStats)(e),userIsSubscriber:(0,re.userIsSubscriber)(e),isDevMode:(0,ae.isDevMode)(e),getModuleOverride:function(t){return(0,ie.getModuleOverride)(e,t)}}})((0,S.ModuleSettingsForm)(se)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DashSectionHeader=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(65),y=r(v),A=n(8),E=n(15),w=r(E),k=t.DashSectionHeader=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.trackCogClick=function(){w.default.tracks.recordJetpackClick({target:"settings-cog",group:"security",page:"aag"})},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=void 0,t=void 0,n=void 0,r=(0,g.default)(this.props.className,"jp-dash-section-header");return this.props.settingsPath&&(e=M.default.createElement("a",{className:"jp-dash-section-header__settings",href:this.props.settingsPath},M.default.createElement("span",{className:"screen-reader-text"},(0,A.translate)("Settings",{context:"Noun. Displayed to screen readers."})),M.default.createElement(y.default,{onClick:this.trackCogClick,icon:"cog",size:16}))),this.props.externalLink&&(t=M.default.createElement("a",{className:"jp-dash-section-header__external-link",href:this.props.externalLinkPath,onClick:this.props.externalLinkClick},this.props.externalLink)),this.props.children&&(n=M.default.createElement("div",{className:"jp-dash-section-header__children"},this.props.children)),M.default.createElement("div",{className:r},M.default.createElement("div",{className:"jp-dash-section-header__label"},M.default.createElement("h2",{className:"jp-dash-section-header__name"},this.props.label),e),t,n)}}]),t}(M.default.Component);k.displayName="DashSectionHeader",k.propTypes={label:m.default.string.isRequired,settingsPath:m.default.string,externalLinkPath:m.default.string,externalLink:m.default.string,externalLinkClick:m.default.func},k.defaultProps={label:"",settingsPath:"",externalLinkPath:"",externalLink:""},t.default=k},function(e,t,n){function r(e,t,n){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError(o);return i(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),a(e,t,{leading:r,maxWait:t,trailing:s})}var a=n(505),i=n(42),o="Expected a function";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(8),M=n(518),b=r(M),g=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement("div",null,m.default.createElement("p",null,(0,_.translate)("VideoPress allows you to upload videos from your computer to be hosted on WordPress.com, rather than on your host’s servers. You can then insert these on your self-hosted Jetpack site. ")),m.default.createElement(b.default,{module_slug:"videopress"}))}}]),t}(m.default.Component);t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(149),i=r(a),o=n(1),s=r(o),c=n(10),u=n(274),l=n(218),d=n(646),f=n(24),p=(r(f),n(927)),h=r(p),m=n(933),_=r(m),M=n(660),b=r(M),g=n(8),v=r(g),y=n(934),A=r(y),E=n(16);!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(E);(0,h.default)(),(0,_.default)();var w=window.Initial_State;w.locale=JSON.parse(w.locale),void 0!==w.locale[""]?(w.locale[""].localeSlug=w.localeSlug,Number.prototype.realToLocaleString=Number.prototype.toLocaleString,Number.prototype.toLocaleString=function(e,t){return e=e||w.localeSlug,t=t||{},this.realToLocaleString(e,t)}):w.locale={"":{localeSlug:w.localeSlug}},v.default.setLocale(w.locale);var k=(0,u.useRouterHistory)(d.createHashHistory)(),T=(0,l.syncHistoryWithStore)(k,b.default);!function(){var e=document.getElementById("jp-plugin-container");null!==e&&i.default.render(s.default.createElement("div",null,s.default.createElement(c.Provider,{store:b.default},s.default.createElement(u.Router,{history:T},s.default.createElement(u.Route,{path:"/",name:v.default.translate("At A Glance",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/jumpstart",component:A.default}),s.default.createElement(u.Route,{path:"/dashboard",name:v.default.translate("At A Glance"),component:A.default}),s.default.createElement(u.Route,{path:"/plans",name:v.default.translate("Plans",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/settings",name:v.default.translate("Settings",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/discussion",name:v.default.translate("Discussion",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/security",name:v.default.translate("Security",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/traffic",name:v.default.translate("Traffic",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/writing",name:v.default.translate("Writing",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/sharing",name:v.default.translate("Sharing",{context:"Navigation item."}),component:A.default}),s.default.createElement(u.Route,{path:"/wpbody-content",component:A.default}),s.default.createElement(u.Route,{path:"/wp-toolbar",component:A.default}),s.default.createElement(u.Route,{path:"/privacy",component:A.default}),s.default.createElement(u.Route,{path:"*",component:A.default})))),e)}()},function(e,t,n){"use strict";var r=n(22),a=n(519),i=n(859),o=n(95),s=n(53),c=n(601),u=n(924),l=n(860),d=n(925);n(13);a.inject();var f={findDOMNode:u,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:c,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:d};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=l(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:o});e.exports=f},function(e,t,n){"use strict";var r={useCreateElement:!0,useFiber:!1};e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=o.get(e);if(t)return t=s(t),t?i.getNodeFromInstance(t):null;"function"==typeof e.render?a("44"):a("45",Object.keys(e))}var a=n(12),i=(n(66),n(22)),o=n(133),s=n(860);n(9),n(13);e.exports=r},function(e,t,n){"use strict";var r=n(859);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(29),i=function(e){return e&&e.__esModule?e:{default:e}}(a),o=n(118),s=n(153),c=function(e){var t=function(t){var n=e();if("string"==typeof n)return(t||window.event).returnValue=n,n};return(0,o.addEventListener)(window,"beforeunload",t),function(){return(0,o.removeEventListener)(window,"beforeunload",t)}},u=function(e){return s.canUseDOM||(0,i.default)(!1),function(t){var n=e(t),a=[],i=void 0,o=function(){for(var e=void 0,t=0,n=a.length;null==e&&t<n;++t)e=a[t].call();return e};return r({},n,{listenBeforeUnload:function(e){return 1===a.push(e)&&(i=c(o)),function(){a=a.filter(function(t){return t!==e}),0===a.length&&i&&(i(),i=null)}}})}};t.default=u},function(e,t,n){var r=(n(9),n(928)),a=!1;e.exports=function(e){e=e||{};var t=e.shouldRejectClick||r;a=!0,n(94).injection.injectEventPluginsByName({TapEventPlugin:n(929)(t)})}},function(e,t){e.exports=function(e,t){if(e&&t-e<750)return!0}},function(e,t,n){"use strict";function r(e,t){var n=l.extractSingleTouch(t);return n?n[e.page]:e.page in t?t[e.page]:t[e.client]+d[e.envScroll]}function a(e,t){var n=r(v.x,t),a=r(v.y,t);return Math.pow(Math.pow(n-e.x,2)+Math.pow(a-e.y,2),.5)}function i(e){return{tapMoveThreshold:_,ignoreMouseThreshold:M,eventTypes:E,extractEvents:function(t,n,i,o){if(!p(t)&&!h(t))return null;if(m(t))g=w();else if(e(g,w()))return null;var s=null,l=a(b,i);return h(t)&&l<_&&(s=u.getPooled(E.touchTap,n,i,o)),p(t)?(b.x=r(v.x,i),b.y=r(v.y,i)):h(t)&&(b.x=0,b.y=0),c.accumulateTwoPhaseDispatches(s),s}}}var o=n(930),s=n(150),c=n(93),u=n(96),l=n(931),d=n(213),f=n(932),p=(o.topLevelTypes,s.isStartish),h=s.isEndish,m=function(e){return["topTouchCancel","topTouchEnd","topTouchStart","topTouchMove"].indexOf(e)>=0},_=10,M=750,b={x:null,y:null},g=null,v={x:{page:"pageX",client:"clientX",envScroll:"currentPageScrollLeft"},y:{page:"pageY",client:"clientY",envScroll:"currentPageScrollTop"}},y=["topTouchStart","topTouchCancel","topTouchEnd","topTouchMove"],A=["topMouseDown","topMouseMove","topMouseUp"].concat(y),E={touchTap:{phasedRegistrationNames:{bubbled:f({onTouchTap:null}),captured:f({onTouchTapCapture:null})},dependencies:A}},w=function(){return Date.now?Date.now:function(){return+new Date}}();e.exports=i},function(e,t,n){"use strict";var r={topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null},a={topLevelTypes:r};e.exports=a},function(e,t){var n={extractSingleTouch:function(e){var t=e.touches,n=e.changedTouches,r=t&&t.length>0,a=n&&n.length>0;return!r&&a?n[0]:r?t[0]:e}};e.exports=n},function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=r},function(e,t,n){"use strict";function r(){document.addEventListener("keydown",function(e){i||-1!==a.indexOf(e.keyCode)&&(i=!0,document.documentElement.classList.add("dops-accessible-focus"))}),document.addEventListener("mouseup",function(){i&&(i=!1,document.documentElement.classList.remove("dops-accessible-focus"))})}var a=[9,32,37,38,39,40],i=!1;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(44),b=r(M),g=n(646),v=n(274),y=n(8),A=n(797),E=r(A),w=n(861),k=r(w),T=n(868),L=r(T),S=n(869),C=r(S),O=n(1161),z=r(O),N=n(1168),D=r(N),P=n(916),x=n(21),j=n(28),R=n(103),Y=n(74),I=n(917),q=r(I),B=n(1197),W=r(B),U=n(852),H=r(U),F=n(1209),X=r(F),V=n(1210),K=r(V),J=n(1211),G=r(J),Q=n(1212),Z=r(Q),$=n(1224),ee=r($),te=n(1225),ne=r(te),re=n(15),ae=r(re),ie=n(56),oe=r(ie),se=n(1226),ce=r(se),ue=n(1230),le=r(ue),de=n(477),fe=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.onBeforeUnload=function(){if(r.props.areThereUnsavedSettings){if(!confirm((0,y.translate)("There are unsaved settings in this tab that will be lost if you leave it. Proceed?")))return!1;r.props.clearUnsavedSettingsFlag()}},r.routerWillLeave=function(){if(r.props.areThereUnsavedSettings){if(!confirm((0,y.translate)("There are unsaved settings in this tab that will be lost if you leave it. Proceed?")))return!1;window.setTimeout(r.props.clearUnsavedSettingsFlag,10)}},r.initializeAnalyitics=function(){var e=r.props.tracksUserData;e&&ae.default.initialize(e.userid,e.username)},r.handleJumpstart=function(e){var t=(0,g.createHistory)(),n=e.jumpStartStatus,a=e.isJumpstarting;!r.props.jumpStartStatus&&n&&(window.location.hash="jumpstart",t.push(window.location.pathname+"?page=jetpack#/jumpstart")),!r.props.jumpStartStatus||n||a||(window.location.hash="dashboard",t.push(window.location.pathname+"?page=jetpack#/dashboard"))},r.renderMainContent=function(e){if(r.props.isSiteConnected&&ae.default.tracks.recordEvent("jetpack_wpa_page_view",{path:e}),!r.props.userCanManageModules)return!!r.props.siteConnectionStatus&&m.default.createElement("div",{"aria-live":"assertive"},m.default.createElement(G.default,r.props));if(!r.props.siteConnectionStatus&&r.props.userCanConnectSite)return m.default.createElement("div",{"aria-live":"assertive"},m.default.createElement(z.default,null));if(r.props.isSiteConnected&&r.props.jumpStartStatus)if((0,b.default)(["/","/dashboard"],e)){window.location.hash="jumpstart";var t=(0,g.createHistory)();t.push(window.location.pathname+"?page=jetpack#/jumpstart")}else if("/jumpstart"===e)return m.default.createElement("div",{"aria-live":"assertive"},m.default.createElement(D.default,null));var n=m.default.createElement(L.default,{route:r.props.route,siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl}),a=void 0,i=m.default.createElement(k.default,{route:r.props.route});switch(e){case"/dashboard":a=m.default.createElement(q.default,{siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl,rewindStatus:r.props.rewindStatus});break;case"/plans":a=m.default.createElement(W.default,{siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl,rewindStatus:r.props.rewindStatus});break;case"/settings":case"/general":case"/engagement":case"/security":case"/traffic":case"/discussion":case"/writing":case"/sharing":case"/privacy":i=n,a=m.default.createElement(C.default,{route:r.props.route,siteAdminUrl:r.props.siteAdminUrl,siteRawUrl:r.props.siteRawUrl,searchTerm:r.props.searchTerm,rewindStatus:r.props.rewindStatus});break;default:(0,g.createHistory)().replace(window.location.pathname+"?page=jetpack#/dashboard"),a=m.default.createElement(q.default,{siteRawUrl:r.props.siteRawUrl,siteAdminUrl:r.props.siteAdminUrl,rewindStatus:r.props.rewindStatus})}return window.wpNavMenuClassChange(),m.default.createElement("div",{"aria-live":"assertive"},i,a,m.default.createElement(ce.default,{siteRawUrl:r.props.siteRawUrl,newPlanActivated:r.props.newPlanActivated,userCanManageModules:r.props.userCanManageModules}))},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.props.setInitialState(),oe.default.setApiRoot(this.props.apiRoot),oe.default.setApiNonce(this.props.apiNonce),this.initializeAnalyitics(),window.addEventListener("beforeunload",this.onBeforeUnload),this.props.router.listenBefore(this.routerWillLeave)}},{key:"shouldComponentUpdate",value:function(e){return!(0,b.default)(["/wpbody-content","/wp-toolbar"],e.route.path)&&(e.siteConnectionStatus!==this.props.siteConnectionStatus||e.jumpStartStatus!==this.props.jumpStartStatus||e.isLinked!==this.props.isLinked||e.route.path!==this.props.route.path||e.searchTerm!==this.props.searchTerm||e.newPlanActivated!==this.props.newPlanActivated||e.rewindStatus!==this.props.rewindStatus)}},{key:"componentDidUpdate",value:function(e){if(e.siteConnectionStatus!==this.props.siteConnectionStatus){var t=jQuery("#toplevel_page_jetpack").find("ul.wp-submenu li");t.find('a[href$="#/settings"]').hide(),t.find('a[href$="admin.php?page=stats"]').hide()}}},{key:"componentWillReceiveProps",value:function(e){e.jumpStartStatus===this.props.jumpStartStatus&&e.isJumpstarting===this.props.isJumpstarting||this.handleJumpstart(e)}},{key:"render",value:function(){return m.default.createElement("div",null,m.default.createElement(E.default,{route:this.props.route}),m.default.createElement("div",{className:"jp-lower"},this.props.isSiteConnected&&m.default.createElement(le.default,null),m.default.createElement(ee.default,null),m.default.createElement(Z.default,null),this.renderMainContent(this.props.route.path),!this.props.jumpStartStatus&&m.default.createElement(X.default,{path:this.props.route.path}),!this.props.jumpStartStatus&&m.default.createElement(K.default,null)),m.default.createElement(H.default,{siteAdminUrl:this.props.siteAdminUrl}),m.default.createElement(ne.default,{analytics:ae.default}))}}]),t}(m.default.Component);t.default=(0,_.connect)(function(e){return{jumpStartStatus:(0,P.getJumpStartStatus)(e),isJumpstarting:(0,P.isJumpstarting)(e),siteConnectionStatus:(0,x.getSiteConnectionStatus)(e),isLinked:(0,x.isCurrentUserLinked)(e),siteRawUrl:(0,j.getSiteRawUrl)(e),siteAdminUrl:(0,j.getSiteAdminUrl)(e),searchTerm:(0,Y.getSearchTerm)(e),apiRoot:(0,j.getApiRootUrl)(e),apiNonce:(0,j.getApiNonce)(e),tracksUserData:(0,j.getTracksUserData)(e),areThereUnsavedSettings:(0,R.areThereUnsavedSettings)(e),userCanManageModules:(0,j.userCanManageModules)(e),userCanConnectSite:(0,j.userCanConnectSite)(e),isSiteConnected:(0,x.isSiteConnected)(e),newPlanActivated:(0,R.showWelcomeForNewPlan)(e),rewindStatus:(0,de.getRewindStatus)(e)}},function(e){return{setInitialState:function(){return e((0,j.setInitialState)())},clearUnsavedSettingsFlag:function(){return e((0,R.clearUnsavedSettingsFlag)())}}})((0,v.withRouter)(fe)),window.wpNavMenuClassChange=function(){var e=window.location.hash,t=["#/settings","#/general","#/discussion","#/security","#/traffic","#/writing","#/sharing","#/privacy"],n=["#/","#/dashboard","#/plans"];if(jQuery(".current").each(function(e,t){jQuery(t).removeClass("current")}),e=e.split("?")[0],(0,b.default)(n,e)){jQuery("#toplevel_page_jetpack").find("li").filter(function(e){return 1===e})[0].classList.add("current")}else if((0,b.default)(t,e)){var r=jQuery("#toplevel_page_jetpack").find("li").filter(function(e){return 2===e});r[0].classList.add("current")}var a=jQuery("body");a.on("click",'a[href$="#/dashboard"], a[href$="#/settings"], .jp-dash-section-header__settings[href="#/security"], .dops-button[href="#/plans"]',function(){window.scrollTo(0,0)}),a.on("click",".jetpack-js-stop-propagation",function(e){e.stopPropagation()})},e.exports=t.default},function(e,t,n){function r(e,t){return a(e,t)}var a=n(231);e.exports=r},function(e,t,n){var r=n(46),a=function(){return r.Date.now()};e.exports=a},function(e,t,n){function r(e,t){var n=-1,r=i(e)?Array(e.length):[];return a(e,function(e,a,i){r[++n]=t(e,a,i)}),r}var a=n(148),i=n(54);e.exports=r},function(e,t,n){function r(e,t,n){t=a(t,e);var r=-1,s=t.length;for(s||(s=1,e=void 0);++r<s;){var c=null==e?void 0:e[o(t[r])];void 0===c&&(r=s,c=n),e=i(c)?c.call(e):c}return e}var a=n(101),i=n(155),o=n(90);e.exports=r},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return h.createElement("li",{className:"dops-select-dropdown__separator"})}}]),t}(h.Component);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0})
|
35 |
;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=m.default.Component,M=function(e){return e.stopPropagation()},b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement("li",{onClick:M,className:"dops-select-dropdown__label"},m.default.createElement("label",null,this.props.children))}}]),t}(_);t.default=b,e.exports=t.default},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(102)("calypso:url-search"),a=n(947),i=n(949);e.exports={getInitialState:function(){return{searchOpen:!1}},componentWillReceiveProps:function(e){e.search||this.setState({searchOpen:!1})},doSearch:function(e){var t=void 0;if(this.setState({searchOpen:!1!==e}),this.onSearch)return void this.onSearch(e);t=this.buildUrl&&"function"==typeof this.buildUrl?this.buildUrl(window.location.href,e):i(window.location.href,e),r("search posts for:",e),this.props.search&&e?(r("replacing URL: "+t),a.replace(t)):(r("setting URL: "+t),a(t))},getSearchOpen:function(){return!1!==this.state.searchOpen||this.props.search}}},function(e,t,n){"use strict";(function(t){function r(e,t){if("function"==typeof e)return r("*",e);if("function"==typeof t)for(var n=new s(e),a=1;a<arguments.length;++a)r.callbacks.push(n.middleware(arguments[a]));else"string"==typeof e?r["string"==typeof t?"redirect":"show"](e,t):r.start(e)}function a(e){if(!e.handled){var t;t=g?b+m.hash.replace("#!",""):m.pathname+m.search,t!==e.canonicalPath&&(r.stop(),e.handled=!1,m.href=e.canonicalPath)}}function i(e){return"string"!=typeof e?e:M?decodeURIComponent(e.replace(/\+/g," ")):e}function o(e,t){"/"===e[0]&&0!==e.indexOf(b)&&(e=b+(g?"#!":"")+e);var n=e.indexOf("?");if(this.canonicalPath=e,this.path=e.replace(b,"")||"/",g&&(this.path=this.path.replace("#!","")||"/"),this.title=document.title,this.state=t||{},this.state.path=e,this.querystring=~n?i(e.slice(n+1)):"",this.pathname=i(~n?e.slice(0,n):e),this.params={},this.hash="",!g){if(!~this.path.indexOf("#"))return;var r=this.path.split("#");this.path=r[0],this.hash=i(r[1])||"",this.querystring=this.querystring.split("#")[0]}}function s(e,t){t=t||{},this.path="*"===e?"(.*)":e,this.method="GET",this.regexp=d(this.path,this.keys=[],t)}function c(e){if(1===u(e)&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var n=e.path?e.path[0]:e.target;n&&"A"!==n.nodeName;)n=n.parentNode;if(n&&"A"===n.nodeName&&!n.hasAttribute("download")&&"external"!==n.getAttribute("rel")){var a=n.getAttribute("href");if((g||n.pathname!==m.pathname||!n.hash&&"#"!==a)&&!(a&&a.indexOf("mailto:")>-1)&&!n.target&&l(n.href)){var i=n.pathname+n.search+(n.hash||"");void 0!==t&&i.match(/^\/[a-zA-Z]:\//)&&(i=i.replace(/^\/[a-zA-Z]:\//,"/"));var o=i;0===i.indexOf(b)&&(i=i.substr(b.length)),g&&(i=i.replace("#!","")),b&&o===i||(e.preventDefault(),r.show(o))}}}}function u(e){return e=e||window.event,null===e.which?e.button:e.which}function l(e){var t=m.protocol+"//"+m.hostname;return m.port&&(t+=":"+m.port),e&&0===e.indexOf(t)}var d=n(948);e.exports=r;var f,p,h="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",m="undefined"!=typeof window&&(window.history.location||window.location),_=!0,M=!0,b="",g=!1;r.callbacks=[],r.exits=[],r.current="",r.len=0,r.base=function(e){if(0===arguments.length)return b;b=e},r.start=function(e){if(e=e||{},!f&&(f=!0,!1===e.dispatch&&(_=!1),!1===e.decodeURLComponents&&(M=!1),!1!==e.popstate&&window.addEventListener("popstate",v,!1),!1!==e.click&&document.addEventListener(h,c,!1),!0===e.hashbang&&(g=!0),_)){var t=g&&~m.hash.indexOf("#!")?m.hash.substr(2)+m.search:m.pathname+m.search+m.hash;r.replace(t,null,!0,_)}},r.stop=function(){f&&(r.current="",r.len=0,f=!1,document.removeEventListener(h,c,!1),window.removeEventListener("popstate",v,!1))},r.show=function(e,t,n,a){var i=new o(e,t);return r.current=i.path,!1!==n&&r.dispatch(i),!1!==i.handled&&!1!==a&&i.pushState(),i},r.back=function(e,t){r.len>0?(history.back(),r.len--):e?setTimeout(function(){r.show(e,t)}):setTimeout(function(){r.show(b,t)})},r.redirect=function(e,t){"string"==typeof e&&"string"==typeof t&&r(e,function(e){setTimeout(function(){r.replace(t)},0)}),"string"==typeof e&&void 0===t&&setTimeout(function(){r.replace(e)},0)},r.replace=function(e,t,n,a){var i=new o(e,t);return r.current=i.path,i.init=n,i.save(),!1!==a&&r.dispatch(i),i},r.dispatch=function(e){function t(){var e=r.exits[s++];if(!e)return n();e(i,t)}function n(){var t=r.callbacks[o++];return e.path!==r.current?void(e.handled=!1):t?void t(e,n):a(e)}var i=p,o=0,s=0;p=e,i?t():n()},r.exit=function(e,t){if("function"==typeof e)return r.exit("*",e);for(var n=new s(e),a=1;a<arguments.length;++a)r.exits.push(n.middleware(arguments[a]))},r.Context=o,o.prototype.pushState=function(){r.len++,history.pushState(this.state,this.title,g&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},o.prototype.save=function(){history.replaceState(this.state,this.title,g&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},r.Route=s,s.prototype.middleware=function(e){var t=this;return function(n,r){if(t.match(n.path,n.params))return e(n,r);r()}},s.prototype.match=function(e,t){var n=this.keys,r=e.indexOf("?"),a=~r?e.slice(0,r):e,o=this.regexp.exec(decodeURIComponent(a));if(!o)return!1;for(var s=1,c=o.length;s<c;++s){var u=n[s-1],l=i(o[s]);void 0===l&&hasOwnProperty.call(t,u.name)||(t[u.name]=l)}return!0};var v=function(){var e=!1;if("undefined"!=typeof window)return"complete"===document.readyState?e=!0:window.addEventListener("load",function(){setTimeout(function(){e=!0},0)}),function(t){if(e)if(t.state){var n=t.state.path;r.replace(n,t.state)}else r.show(m.pathname+m.hash,void 0,void 0,!1)}}();r.sameOrigin=l}).call(t,n(63))},function(e,t,n){function r(e){for(var t,n=[],r=0,a=0,i="";null!=(t=_.exec(e));){var o=t[0],c=t[1],u=t.index;if(i+=e.slice(a,u),a=u+o.length,c)i+=c[1];else{i&&(n.push(i),i="");var l=t[2],d=t[3],f=t[4],p=t[5],h=t[6],m=t[7],M="+"===h||"*"===h,b="?"===h||"*"===h,g=l||"/",v=f||p||(m?".*":"[^"+g+"]+?");n.push({name:d||r++,prefix:l||"",delimiter:g,optional:b,repeat:M,pattern:s(v)})}}return a<e.length&&(i+=e.substr(a)),i&&n.push(i),n}function a(e){return i(r(e))}function i(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"==typeof e[n]&&(t[n]=new RegExp("^"+e[n].pattern+"$"));return function(n){for(var r="",a=n||{},i=0;i<e.length;i++){var o=e[i];if("string"!=typeof o){var s,c=a[o.name];if(null==c){if(o.optional)continue;throw new TypeError('Expected "'+o.name+'" to be defined')}if(m(c)){if(!o.repeat)throw new TypeError('Expected "'+o.name+'" to not repeat, but received "'+c+'"');if(0===c.length){if(o.optional)continue;throw new TypeError('Expected "'+o.name+'" to not be empty')}for(var u=0;u<c.length;u++){if(s=encodeURIComponent(c[u]),!t[i].test(s))throw new TypeError('Expected all "'+o.name+'" to match "'+o.pattern+'", but received "'+s+'"');r+=(0===u?o.prefix:o.delimiter)+s}}else{if(s=encodeURIComponent(c),!t[i].test(s))throw new TypeError('Expected "'+o.name+'" to match "'+o.pattern+'", but received "'+s+'"');r+=o.prefix+s}}else r+=o}return r}}function o(e){return e.replace(/([.+*?=^!:${}()[\]|\/])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function u(e){return e.sensitive?"":"i"}function l(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return c(e,t)}function d(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(h(e[a],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",u(n)),t)}function f(e,t,n){for(var a=r(e),i=p(a,n),o=0;o<a.length;o++)"string"!=typeof a[o]&&t.push(a[o]);return c(i,t)}function p(e,t){t=t||{};for(var n=t.strict,r=!1!==t.end,a="",i=e[e.length-1],s="string"==typeof i&&/\/$/.test(i),c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=o(l);else{var d=o(l.prefix),f=l.pattern;l.repeat&&(f+="(?:"+d+f+")*"),f=l.optional?d?"(?:"+d+"("+f+"))?":"("+f+")?":d+"("+f+")",a+=f}}return n||(a=(s?a.slice(0,-2):a)+"(?:\\/(?=$))?"),a+=r?"$":n&&s?"":"(?=\\/|$)",new RegExp("^"+a,u(t))}function h(e,t,n){return t=t||[],m(t)?n||(n={}):(n=t,t=[]),e instanceof RegExp?l(e,t,n):m(e)?d(e,t,n):f(e,t,n)}var m=n(440);e.exports=h,e.exports.parse=r,e.exports.compile=a,e.exports.tokensToFunction=i,e.exports.tokensToRegExp=p;var _=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(e,t,n){"use strict";var r=n(950),a=n(956);e.exports=function(e,t){var n=r.parse(e,!0);return t?n.query.s=t:delete n.query.s,n=a(n,"pathname","hash","query"),r.format(n).replace(/\%20/g,"+")}},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function a(e,t,n){if(e&&u.isObject(e)&&e instanceof r)return e;var a=new r;return a.parse(e,t,n),a}function i(e){return u.isString(e)&&(e=a(e)),e instanceof r?e.format():r.prototype.format.call(e)}function o(e,t){return a(e,!1,!0).resolve(t)}function s(e,t){return e?a(e,!1,!0).resolveObject(t):t}var c=n(951),u=n(952);t.parse=a,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(h),_=["%","/","?",";","#"].concat(m),M=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=n(953);r.prototype.parse=function(e,t,n){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),a=-1!==r&&r<e.indexOf("#")?"?":"#",i=e.split(a),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(a);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var d=f.exec(s);if(d)return this.path=s,this.href=s,this.pathname=d[1],d[2]?(this.search=d[2],this.query=t?E.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=l.exec(s);if(p){p=p[0];var h=p.toLowerCase();this.protocol=h,s=s.substr(p.length)}if(n||p||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===s.substr(0,2);!w||p&&y[p]||(s=s.substr(2),this.slashes=!0)}if(!y[p]&&(w||p&&!A[p])){for(var k=-1,T=0;T<M.length;T++){var L=s.indexOf(M[T]);-1!==L&&(-1===k||L<k)&&(k=L)}var S,C;C=-1===k?s.lastIndexOf("@"):s.lastIndexOf("@",k),-1!==C&&(S=s.slice(0,C),s=s.slice(C+1),this.auth=decodeURIComponent(S)),k=-1;for(var T=0;T<_.length;T++){var L=s.indexOf(_[T]);-1!==L&&(-1===k||L<k)&&(k=L)}-1===k&&(k=s.length),this.host=s.slice(0,k),s=s.slice(k),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var z=this.hostname.split(/\./),T=0,N=z.length;T<N;T++){var D=z[T];if(D&&!D.match(b)){for(var P="",x=0,j=D.length;x<j;x++)D.charCodeAt(x)>127?P+="x":P+=D[x];if(!P.match(b)){var R=z.slice(0,T),Y=z.slice(T+1),I=D.match(g);I&&(R.push(I[1]),Y.unshift(I[2])),Y.length&&(s="/"+Y.join(".")+s),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=c.toASCII(this.hostname));var q=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+q,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!v[h])for(var T=0,N=m.length;T<N;T++){var W=m[T];if(-1!==s.indexOf(W)){var U=encodeURIComponent(W);U===W&&(U=escape(W)),s=s.split(W).join(U)}}var H=s.indexOf("#");-1!==H&&(this.hash=s.substr(H),s=s.slice(0,H));var F=s.indexOf("?");if(-1!==F?(this.search=s.substr(F),this.query=s.substr(F+1),t&&(this.query=E.parse(this.query)),s=s.slice(0,F)):t&&(this.search="",this.query={}),s&&(this.pathname=s),A[h]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",X=this.search||"";this.path=q+X}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,i="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&u.isObject(this.query)&&Object.keys(this.query).length&&(i=E.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||A[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+a+n+o+r},r.prototype.resolve=function(e){return this.resolveObject(a(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(u.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,a=Object.keys(this),i=0;i<a.length;i++){var o=a[i];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=e[l])}return A[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!A[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var p=d[f];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",_=n.search||"";n.path=m+_}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var M=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=b||M||n.host&&e.pathname,v=g,E=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],w=n.protocol&&!A[n.protocol];if(w&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),g=g&&(""===h[0]||""===E[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=h;else if(h.length)E||(E=[]),E.pop(),E=E.concat(h),n.search=e.search,n.query=e.query;else if(!u.isNullOrUndefined(e.search)){if(w){n.hostname=n.host=E.shift();var k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return n.search=e.search,n.query=e.query,u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=E.slice(-1)[0],L=(n.host||e.host||E.length>1)&&("."===T||".."===T)||""===T,S=0,C=E.length;C>=0;C--)T=E[C],"."===T?E.splice(C,1):".."===T?(E.splice(C,1),S++):S&&(E.splice(C,1),S--);if(!g&&!v)for(;S--;S)E.unshift("..");!g||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),L&&"/"!==E.join("/").substr(-1)&&E.push("");var O=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(w){n.hostname=n.host=O?"":E.length?E.shift():"";var k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return g=g||n.host&&E.length,g&&!O&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=d.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var a;!function(i){function o(e){throw new RangeError(N[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function c(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(z,"."),r+s(e.split("."),t).join(".")}function u(e){for(var t,n,r=[],a=0,i=e.length;a<i;)t=e.charCodeAt(a++),t>=55296&&t<=56319&&a<i?(n=e.charCodeAt(a++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),a--)):r.push(t);return r}function l(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=x(e>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:y}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){var r=0;for(e=n?P(e/k):e>>1,e+=P(e/t);e>D*E>>1;r+=y)e=P(e/D);return P(r+(D+1)*e/(e+w))}function h(e){var t,n,r,a,i,s,c,u,f,h,m=[],_=e.length,M=0,b=L,g=T;for(n=e.lastIndexOf(S),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&o("not-basic"),m.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<_;){for(i=M,s=1,c=y;a>=_&&o("invalid-input"),u=d(e.charCodeAt(a++)),(u>=y||u>P((v-M)/s))&&o("overflow"),M+=u*s,f=c<=g?A:c>=g+E?E:c-g,!(u<f);c+=y)h=y-f,s>P(v/h)&&o("overflow"),s*=h;t=m.length+1,g=p(M-i,t,0==i),P(M/t)>v-b&&o("overflow"),b+=P(M/t),M%=t,m.splice(M++,0,b)}return l(m)}function m(e){var t,n,r,a,i,s,c,l,d,h,m,_,M,b,g,w=[];for(e=u(e),_=e.length,t=L,n=0,i=T,s=0;s<_;++s)(m=e[s])<128&&w.push(x(m));for(r=a=w.length,a&&w.push(S);r<_;){for(c=v,s=0;s<_;++s)(m=e[s])>=t&&m<c&&(c=m);for(M=r+1,c-t>P((v-n)/M)&&o("overflow"),n+=(c-t)*M,t=c,s=0;s<_;++s)if(m=e[s],m<t&&++n>v&&o("overflow"),m==t){for(l=n,d=y;h=d<=i?A:d>=i+E?E:d-i,!(l<h);d+=y)g=l-h,b=y-h,w.push(x(f(h+g%b,0))),l=P(g/b);w.push(x(f(l,0))),i=p(n,M,r==a),n=0,++r}++n,++t}return w.join("")}function _(e){return c(e,function(e){return C.test(e)?h(e.slice(4).toLowerCase()):e})}function M(e){return c(e,function(e){return O.test(e)?"xn--"+m(e):e})}var b=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,"object"==typeof r&&r);var g,v=2147483647,y=36,A=1,E=26,w=38,k=700,T=72,L=128,S="-",C=/^xn--/,O=/[^\x20-\x7E]/,z=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=y-A,P=Math.floor,x=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:u,encode:l},decode:h,encode:m,toASCII:M,toUnicode:_},void 0!==(a=function(){return g}.call(t,n,t,e))&&(e.exports=a)}()}).call(t,n(109)(e),n(45))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(954),t.encode=t.stringify=n(955)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var d,f,p,h,m=e[l].replace(s,"%20"),_=m.indexOf(n);_>=0?(d=m.substr(0,_),f=m.substr(_+1)):(d=m,f=""),p=decodeURIComponent(d),h=decodeURIComponent(f),r(o,p)?a(o[p])?o[p].push(h):o[p]=[o[p],h]:o[p]=h}return o};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),function(o){var s=encodeURIComponent(a(o))+n;return i(e[o])?r(e[o],function(e){return s+encodeURIComponent(a(e))}).join(t):s+encodeURIComponent(a(e[o]))}).join(t):s?encodeURIComponent(a(s))+n+encodeURIComponent(a(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r=n(957),a=n(506),i=a(function(e,t){return null==e?{}:r(e,t)});e.exports=i},function(e,t,n){function r(e,t){return a(e,t,function(t,n){return i(e,n)})}var a=n(958),i=n(496);e.exports=r},function(e,t,n){function r(e,t,n){for(var r=-1,s=t.length,c={};++r<s;){var u=t[r],l=a(e,u);n(l,u)&&i(c,o(u,e),l)}return c}var a=n(161),i=n(959),o=n(101);e.exports=r},function(e,t,n){function r(e,t,n,r){if(!s(e))return e;t=i(t,e);for(var u=-1,l=t.length,d=l-1,f=e;null!=f&&++u<l;){var p=c(t[u]),h=n;if(u!=d){var m=f[p];h=r?r(m,p,f):void 0,void 0===h&&(h=s(m)?m:o(t[u+1])?[]:{})}a(f,p,h),f=f[p]}return e}var a=n(154),i=n(101),o=n(156),s=n(42),c=n(90);e.exports=r},function(e,t,n){var r=n(125),a=n(961),i=n(485),o=n(964),s=i(function(e){var t=r(e,o);return t.length&&t[0]===e[0]?a(t):[]});e.exports=s},function(e,t,n){function r(e,t,n){for(var r=n?o:i,d=e[0].length,f=e.length,p=f,h=Array(f),m=1/0,_=[];p--;){var M=e[p];p&&t&&(M=s(M,c(t))),m=l(M.length,m),h[p]=!n&&(t||d>=120&&M.length>=120)?new a(p&&M):void 0}M=e[0];var b=-1,g=h[0];e:for(;++b<d&&_.length<m;){var v=M[b],y=t?t(v):v;if(v=n||0!==v?v:0,!(g?u(g,y):r(_,y,n))){for(p=f;--p;){var A=h[p];if(!(A?u(A,y):r(e[p],y,n)))continue e}g&&g.push(y),_.push(v)}}return _}var a=n(494),i=n(962),o=n(963),s=n(125),c=n(158),u=n(495),l=Math.min;e.exports=r},function(e,t,n){function r(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}var a=n(226);e.exports=r},function(e,t){function n(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}e.exports=n},function(e,t,n){function r(e){return a(e)?e:[]}var a=n(488);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterSearch=void 0;var r=n(16);t.filterSearch=function(e){return function(t){t({type:r.JETPACK_SEARCH_TERM,term:e})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPluginsData=void 0;var r=n(16),a=n(56),i=function(e){return e&&e.__esModule?e:{default:e}}(a);t.fetchPluginsData=function(){return function(e){return e({type:r.JETPACK_PLUGINS_DATA_FETCH}),i.default.fetchPluginsData().then(function(t){return e({type:r.JETPACK_PLUGINS_DATA_FETCH_RECEIVE,pluginsData:t}),t}).catch(function(t){e({type:r.JETPACK_PLUGINS_DATA_FETCH_FAIL,error:t})})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Discussion=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(23),v=n(103),y=n(21),A=n(74),E=n(211),w=r(E),k=n(969),T=n(1104),L=t.Discussion=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode},t=this.props.isModuleFound("comments"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("gravatar-hovercards"),a=this.props.isModuleFound("subscriptions"),o=this.props.isModuleFound("comment-likes");return(this.props.searchTerm||this.props.active)&&(t||a||n||r||o)?M.default.createElement("div",null,M.default.createElement(w.default,null),M.default.createElement(k.Comments,(0,i.default)({},e,{isModuleFound:this.props.isModuleFound,getModuleOverride:this.props.getModuleOverride})),a&&M.default.createElement(T.Subscriptions,(0,i.default)({},e,{isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl}))):null}}]),t}(M.default.Component);L.displayName="DiscussionSettings",t.default=(0,b.connect)(function(e){return{module:function(t){return(0,g.getModule)(e,t)},settings:(0,v.getSettings)(e),isDevMode:(0,y.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,y.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,A.isModuleFound)(e,t)},connectUrl:(0,y.getConnectUrl)(e),isLinked:(0,y.isCurrentUserLinked)(e),getModuleOverride:function(t){return(0,g.getModuleOverride)(e,t)}}})(L)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateSettings=t.updateSetting=t.fetchSettings=t.clearUnsavedSettingsFlag=t.setUnsavedSettingsFlag=void 0;var a=n(59),i=r(a),o=n(114),s=n(8),c=n(230),u=r(c),l=n(16),d=n(23),f=n(56),p=r(f);t.setUnsavedSettingsFlag=function(){return{type:l.JETPACK_SETTINGS_SET_UNSAVED_FLAG}},t.clearUnsavedSettingsFlag=function(){return{type:l.JETPACK_SETTINGS_CLEAR_UNSAVED_FLAG}},t.fetchSettings=function(){return function(e){return e({type:l.JETPACK_SETTINGS_FETCH}),p.default.fetchSettings().then(function(t){return e({type:l.JETPACK_SETTINGS_FETCH_RECEIVE,settings:t}),t}).catch(function(t){e({type:l.JETPACK_SETTINGS_FETCH_FAIL,error:t})})}},t.updateSetting=function(e){return function(t){return t({type:l.JETPACK_SETTING_UPDATE,updatedOption:e}),p.default.updateSetting(e).then(function(n){t({type:l.JETPACK_SETTING_UPDATE_SUCCESS,updatedOption:e,success:n})}).catch(function(n){t({type:l.JETPACK_SETTING_UPDATE_FAIL,success:!1,error:n,updatedOption:e})})}},t.updateSettings=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(n){var r={progress:(0,s.translate)("Updating settings…"),success:(0,s.translate)("Updated settings."),error:function(e){return(0,s.translate)("Error updating settings. %(error)s",{args:{error:e.message||e.code||e.name||e}})}},a=function(){return e};"regeneratePbE"===t&&(r={progress:(0,s.translate)("Updating Post by Email address…"),success:(0,s.translate)("Regenerated Post by Email address."),error:function(e){return(0,s.translate)("Error regenerating Post by Email address. %(error)s",{args:{error:e}})}},a=function(e){return{post_by_email_address:e.post_by_email_address}},e={post_by_email_address:"regenerate"});var c=["masterbar","jetpack_testimonial","jetpack_portfolio"];"object"===(void 0===e?"undefined":(0,i.default)(e))&&(0,u.default)(c,function(t){return t in e})&&(r.success=(0,s.translate)("Updated settings. Refreshing page…")),n((0,o.removeNotice)("module-setting-update")),n((0,o.removeNotice)("module-setting-update-success"));var f=["dismiss_dash_app_card","dismiss_empty_stats_card","show_welcome_for_new_plan"];return"object"!==(void 0===e?"undefined":(0,i.default)(e))||(0,u.default)(f,function(t){return t in e})||n((0,o.createNotice)("is-info",r.progress,{id:"module-setting-update"})),n({type:l.JETPACK_SETTINGS_UPDATE,updatedOptions:e}),p.default.updateSettings(e).then(function(t){n({type:l.JETPACK_SETTINGS_UPDATE_SUCCESS,updatedOptions:a(t),success:t}),(0,d.maybeHideNavMenuItem)(e),(0,d.maybeReloadAfterAction)(e),n((0,o.removeNotice)("module-setting-update")),n((0,o.removeNotice)("module-setting-update-success")),"object"!==(void 0===e?"undefined":(0,i.default)(e))||(0,u.default)(f,function(t){return t in e})||n((0,o.createNotice)("is-success",r.success,{id:"module-setting-update-success",duration:2e3}))}).catch(function(t){n({type:l.JETPACK_SETTINGS_UPDATE_FAIL,success:!1,error:t,updatedOptions:e}),n((0,o.removeNotice)("module-setting-update")),n((0,o.createNotice)("is-error",r.error(t),{id:"module-setting-update"}))})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Comments=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(508),v=r(g),y=n(71),A=n(52),E=n(30),w=n(40),k=r(w),T=n(36),L=r(T),S=n(104),C=r(S),O=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.updateFormStateByMarkdown=function(e){return r.props.getSettingCurrentValue("wpcom_publish_posts_with_markdown",e)?r.props.updateFormStateModuleOption(e,"wpcom_publish_comments_with_markdown"):r.props.updateFormStateModuleOption(e,"wpcom_publish_comments_with_markdown",!0)},r.handleMarkdownCommentsToggle=function(){r.props.updateFormStateModuleOption("markdown","wpcom_publish_comments_with_markdown")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("comments"),t=this.props.isModuleFound("gravatar-hovercards"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("comment-likes");if(!(e||t||n||r))return null;var a=this.props,o=a.isUnavailableInDevMode,s=a.getOptionValue,c=this.props.getModule("comments"),u=this.props.getOptionValue("comments"),l=this.props.isUnavailableInDevMode("comments"),d=this.props.getModule("gravatar-hovercards"),f=this.props.getModule("markdown"),p=o("comment-likes"),h=s("comment-likes");return M.default.createElement(k.default,(0,i.default)({},this.props,{header:(0,b.translate)("Comments"),module:"comments",saveDisabled:this.props.isSavingAnyOption(["highlander_comment_form_prompt","jetpack_comment_form_color_scheme"])}),e&&M.default.createElement(L.default,{hasChild:!0,disableInDevMode:!0,module:c,support:{text:(0,b.translate)("Replaces the standard WordPress comment form with a new comment system that includes social media login options."),link:"https://jetpack.com/support/comments"}},M.default.createElement(A.ModuleToggle,{slug:"comments",compact:!0,disabled:l,activated:this.props.getOptionValue("comments"),toggling:this.props.isSavingAnyOption("comments"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},c.description)),M.default.createElement(y.FormFieldset,null,M.default.createElement(y.FormLabel,null,M.default.createElement("span",{className:"jp-form-label-wide"},(0,b.translate)("Comments headline")),M.default.createElement(v.default,{name:"highlander_comment_form_prompt",value:this.props.getOptionValue("highlander_comment_form_prompt"),disabled:!u||l||this.props.isSavingAnyOption("highlander_comment_form_prompt"),onChange:this.props.onOptionChange})),M.default.createElement("span",{className:"jp-form-setting-explanation"},(0,b.translate)("A few catchy words to motivate your readers to comment.")),M.default.createElement(y.FormLabel,null,M.default.createElement("span",{className:"jp-form-label-wide"},(0,b.translate)("Color scheme")),M.default.createElement(y.FormSelect,(0,i.default)({name:"jetpack_comment_form_color_scheme",value:this.props.getOptionValue("jetpack_comment_form_color_scheme"),disabled:!u||l||this.props.isSavingAnyOption("jetpack_comment_form_color_scheme"),onChange:this.props.onOptionChange},this.props,{validValues:this.props.validValues("jetpack_comment_form_color_scheme","comments")}))))),(t||n||r)&&M.default.createElement(L.default,null,t&&M.default.createElement(y.FormFieldset,null,M.default.createElement(A.ModuleToggle,{slug:"gravatar-hovercards",compact:!0,activated:this.props.getOptionValue("gravatar-hovercards"),toggling:this.props.isSavingAnyOption("gravatar-hovercards"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},d.description+" ",M.default.createElement("a",{href:d.learn_more_button,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more")),M.default.createElement("span",{
|
36 |
className:"jp-form-toggle-privacy-info"},M.default.createElement("a",{href:d.learn_more_button+"#privacy",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information")))))),n&&M.default.createElement(y.FormFieldset,null,M.default.createElement(C.default,{checked:!!this.props.getOptionValue("wpcom_publish_comments_with_markdown","markdown"),disabled:this.props.isSavingAnyOption(["markdown","wpcom_publish_comments_with_markdown"])||"inactive"===this.props.getModuleOverride("markdown"),toggling:this.props.isSavingAnyOption(["markdown","wpcom_publish_comments_with_markdown"]),onChange:this.handleMarkdownCommentsToggle},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Enable Markdown use for comments.")+" ",M.default.createElement("a",{href:f.learn_more_button,target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more")),M.default.createElement("span",{className:"jp-form-toggle-privacy-info"},M.default.createElement("a",{href:f.learn_more_button+"#privacy",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information")))))),r&&M.default.createElement(y.FormFieldset,null,M.default.createElement(A.ModuleToggle,{slug:"comment-likes",compact:!0,disabled:p,activated:h,toggling:this.props.isSavingAnyOption("comment-likes"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},"Enable comment likes. ",M.default.createElement("a",{href:"https://jetpack.com/support/comment-likes/",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Learn more")),M.default.createElement("span",{className:"jp-form-toggle-privacy-info"},M.default.createElement("a",{href:"https://jetpack.com/support/comment-likes/#privacy",target:"_blank",rel:"noopener noreferrer"},(0,b.translate)("Privacy Information"))))))))}}]),t}(M.default.Component);t.Comments=(0,E.ModuleSettingsForm)(O)},function(e,t){},function(e,t,n){function r(e,t){return e&&a(e,i(t))}var a=n(229),i=n(492);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(833),y=r(v);n(1088);var A=function(e){function t(){(0,s.default)(this,t);var e=(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments));return e.state={showPopover:!1},e.togglePopover=function(){e.setState({showPopover:!e.state.showPopover})},e._onPopoverClose=function(){e.setState({showPopover:!1})},e.renderPopover=function(){return M.default.createElement(y.default,{isVisible:e.state.showPopover,context:e.refs&&e.refs.toggleSwitch,position:e.props.disabledPopoverPosition,onClose:e._onPopoverClose,className:"dops-info-popover__tooltip"},e.props.disabledReason)},e.onKeyDown=e.onKeyDown.bind(e),e.onClick=e.onClick.bind(e),e.onLabelClick=e.onLabelClick.bind(e),e}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentWillMount",value:function(){this.id=this.constructor.idNum++}},{key:"onKeyDown",value:function(e){this.props.disabled||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.props.onChange()),this.props.onKeyDown(e))}},{key:"onClick",value:function(){this.props.disabled?this.props.disabledReason&&this.togglePopover():this.props.onChange()}},{key:"onLabelClick",value:function(e){if(!this.props.disabled){var t=e.target.nodeName.toLowerCase();"a"!==t&&"input"!==t&&"select"!==t&&(e.preventDefault(),this.props.onChange())}}},{key:"render",value:function(){var e=this.props.id||"toggle-"+this.id,t=(0,g.default)("form-toggle",this.props.className,{"is-toggling":this.props.toggling});return M.default.createElement("span",null,M.default.createElement("input",{className:t,type:"checkbox",checked:this.props.checked,readOnly:!0,disabled:this.props.disabled}),M.default.createElement("label",{className:"form-toggle__label",htmlFor:e},M.default.createElement("span",{className:"form-toggle__switch",disabled:this.props.disabled,id:e,onClick:this.onClick,onKeyDown:this.onKeyDown,role:"checkbox","aria-checked":this.props.checked,"aria-label":this.props["aria-label"],tabIndex:this.props.disabled?-1:0,ref:"toggleSwitch"}),M.default.createElement("span",{className:"form-toggle__label-content",onClick:this.onLabelClick},this.props.children)),this.renderPopover())}}]),t}(_.Component);A.propTypes={onChange:m.default.func,onKeyDown:m.default.func,checked:m.default.bool,disabled:m.default.bool,id:m.default.string,className:m.default.string,toggling:m.default.bool,"aria-label":m.default.string,children:m.default.node,disabledReason:m.default.node},A.defaultProps={checked:!1,disabled:!1,onKeyDown:function(){},onChange:function(){},disabledPopoverPosition:"bottom",disabledReason:""},A.idNum=0,t.default=A,e.exports=t.default},function(e,t,n){e.exports={default:n(974),__esModule:!0}},function(e,t,n){n(199),n(110),n(138),n(975),n(979),n(981),n(982),e.exports=n(20).Set},function(e,t,n){"use strict";var r=n(870),a=n(834);e.exports=n(871)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(a(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){var r=n(72),a=n(221),i=n(100),o=n(160),s=n(977);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,l=4==e,d=6==e,f=5==e||d,p=t||s;return function(t,s,h){for(var m,_,M=i(t),b=a(M),g=r(s,h,3),v=o(b.length),y=0,A=n?p(t,v):c?p(t,0):void 0;v>y;y++)if((f||y in b)&&(m=b[y],_=g(m,y,M),e))if(n)A[y]=_;else if(_)switch(e){case 3:return!0;case 5:return m;case 6:return y;case 2:A.push(m)}else if(l)return!1;return d?-1:u||l?l:A}}},function(e,t,n){var r=n(978);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(50),a=n(487),i=n(34)("species");e.exports=function(e){var t;return a(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!a(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(33);r(r.P+r.R,"Set",{toJSON:n(872)("Set")})},function(e,t,n){var r=n(206);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){n(873)("Set")},function(e,t,n){n(874)("Set")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return p.set(e,t),function(){p.delete(e)}}function i(e){p.forEach(function(t,n){(0,f.default)(n,e.target)||t.call(n,e)})}function o(e){e||(e=document),l.default.bind(e,"click",i)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(984),c=r(s);t.default=a;var u=n(990),l=r(u),d=n(991),f=r(d),p=new c.default;a.globalClick=i,a.install=o,"undefined"!=typeof document&&o(document),e.exports=t.default},function(e,t,n){e.exports={default:n(985),__esModule:!0}},function(e,t,n){n(199),n(110),n(138),n(986),n(987),n(988),n(989),e.exports=n(20).Map},function(e,t,n){"use strict";var r=n(870),a=n(834);e.exports=n(871)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(a(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(a(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(33);r(r.P+r.R,"Map",{toJSON:n(872)("Map")})},function(e,t,n){n(873)("Map")},function(e,t,n){n(874)("Map")},function(e,t){var n=window.addEventListener?"addEventListener":"attachEvent",r=window.removeEventListener?"removeEventListener":"detachEvent",a="addEventListener"!==n?"on":"";t.bind=function(e,t,r,i){return e[n](a+t,r,i||!1),r},t.unbind=function(e,t,n,i){return e[r](a+t,n,i||!1),n}},function(e,t){function n(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}e.exports=n},function(e,t,n){function r(e){var t,n;for(t=[],n=0;n<e.length;n++)t.push(i[e[n]%64]);return t.join("")}function a(e){if("undefined"!=typeof window){if(void 0!==window.crypto)return r(window.crypto.getRandomValues(new Uint8Array(e)));for(var t=new Array(e),a=0;a<e;a++)t[a]=Math.floor(256*Math.random());return r(t)}var i=n(993);try{return r(i.randomBytes(e))}catch(t){return r(i.pseudoRandomBytes(e))}}var i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";e.exports=a},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(235),t.createHash=t.Hash=n(467),t.createHmac=t.Hmac=n(882);var r=n(1010),a=Object.keys(r),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(a);t.getHashes=function(){return i};var o=n(885);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var s=n(1012);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=n(1029);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=n(1034);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=n(1072);var l=n(1073);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var d=n(1076);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){e.copy(t,n)}var i=n(35).Buffer,o=n(996);e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)a(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var a=Function.prototype.apply;t.setTimeout=function(){return new r(a.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(a.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(998),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(45))},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[c]=r,s(c),c++}function a(e){delete u[e]}function i(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function o(e){if(l)setTimeout(o,0,e);else{var t=u[e];if(t){l=!0;try{i(t)}finally{a(e),l=!1}}}}if(!e.setImmediate){var s,c=1,u={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){o(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&o(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){o(e.data)},s=function(t){e.port2.postMessage(t)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var e=d.documentElement;s=function(t){var n=d.createElement("script");n.onreadystatechange=function(){o(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(o,0,e)}}(),f.setImmediate=r,f.clearImmediate=a}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(45),n(63))},function(e,t,n){(function(t){function n(e,t){function n(){if(!a){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),a=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var a=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(t,n(45))},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);a.call(this,e)}e.exports=r;var a=n(879),i=n(468);i.inherits=n(19),i.inherits(r,a),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(838)},function(e,t,n){e.exports=n(212)},function(e,t,n){e.exports=n(837).Transform},function(e,t,n){e.exports=n(837).PassThrough},function(e,t,n){function r(){this.init(),this._w=d,c.call(this,64,56)}function a(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}var s=n(19),c=n(236),u=n(35).Buffer,l=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);s(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,s=0|this._c,c=0|this._d,u=0|this._e,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<80;++d)t[d]=t[d-3]^t[d-8]^t[d-14]^t[d-16];for(var f=0;f<80;++f){var p=~~(f/20),h=a(n)+o(p,r,s,c)+u+t[f]+l[p]|0;u=c,c=s,s=i(r),r=n,n=h}this._a=n+this._a|0,this._b=r+this._b|0,this._c=s+this._c|0,this._d=c+this._d|0,this._e=u+this._e|0},r.prototype._hash=function(){var e=u.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=f,u.call(this,64,56)}function a(e){return e<<1|e>>>31}function i(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}var c=n(19),u=n(236),l=n(35).Buffer,d=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);c(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,c=0|this._c,u=0|this._d,l=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=a(t[f-3]^t[f-8]^t[f-14]^t[f-16]);for(var p=0;p<80;++p){var h=~~(p/20),m=i(n)+s(h,r,c,u)+l+t[p]+d[h]|0;l=u,u=c,c=o(r),r=n,n=m}this._a=n+this._a|0,this._b=r+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},r.prototype._hash=function(){var e=l.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=c,o.call(this,64,56)}var a=n(19),i=n(880),o=n(236),s=n(35).Buffer,c=new Array(64);a(r,i),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=r},function(e,t,n){function r(){this.init(),this._w=c,o.call(this,128,112)}var a=n(19),i=n(881),o=n(236),s=n(35).Buffer,c=new Array(160);a(r,i),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}var t=s.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},e.exports=r},function(e,t,n){"use strict";function r(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>c?t=e(t):t.length<c&&(t=i.concat([t,s],c));for(var n=this._ipad=i.allocUnsafe(c),r=this._opad=i.allocUnsafe(c),a=0;a<c;a++)n[a]=54^t[a],r[a]=92^t[a];this._hash=[n]}var a=n(19),i=n(35).Buffer,o=n(162),s=i.alloc(128),c=64;a(r,o),r.prototype._update=function(e){this._hash.push(e)},r.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=r},function(e,t,n){e.exports=n(884)},function(e,t,n){(function(t,r){function a(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];s=s||d.alloc(8);var n=i(s,s,10,128,e).then(function(){return!0}).catch(function(){return!1});return h[e]=n,n}function i(e,t,n,r,a){return f.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return f.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:a}},e,r<<3)}).then(function(e){return d.from(e)})}function o(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}var s,c=n(886),u=n(887),l=n(888),d=n(35).Buffer,f=t.crypto&&t.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];e.exports=function(e,n,s,f,h,m){if(d.isBuffer(e)||(e=d.from(e,u)),d.isBuffer(n)||(n=d.from(n,u)),c(s,f),"function"==typeof h&&(m=h,h=void 0),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");h=h||"sha1";var _=p[h.toLowerCase()];if(!_||"function"!=typeof t.Promise)return r.nextTick(function(){var t;try{t=l(e,n,s,f,h)}catch(e){return m(e)}m(null,t)});o(a(_).then(function(t){return t?i(e,n,s,f,_):l(e,n,s,f,h)}),m)}}).call(t,n(45),n(63))},function(e,t,n){function r(e,t){e=e.toLowerCase();var n,r;if(l[e])n=l[e].key,r=l[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");n=8*d[e].key,r=d[e].iv}var a=f(t,!1,n,r);return i(e,a.key,a.iv)}function a(e,t){e=e.toLowerCase();var n,r;if(l[e])n=l[e].key,r=l[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");n=8*d[e].key,r=d[e].iv}var a=f(t,!1,n,r);return o(e,a.key,a.iv)}function i(e,t,n){if(e=e.toLowerCase(),l[e])return u.createCipheriv(e,t,n);if(d[e])return new c({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function o(e,t,n){if(e=e.toLowerCase(),l[e])return u.createDecipheriv(e,t,n);if(d[e])return new c({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function s(){return Object.keys(d).concat(u.getCiphers())}var c=n(1013),u=n(843),l=n(844),d=n(1028),f=n(511);t.createCipher=t.Cipher=r,t.createCipheriv=t.Cipheriv=i,t.createDecipher=t.Decipher=a,t.createDecipheriv=t.Decipheriv=o,t.listCiphers=t.getCiphers=s},function(e,t,n){(function(t){function r(e){a.call(this);var n,r=e.mode.toLowerCase(),i=s[r];n=e.decrypt?"decrypt":"encrypt";var o=e.key;"des-ede"!==r&&"des-ede-cbc"!==r||(o=t.concat([o,o.slice(0,8)]));var c=e.iv;this._des=i.create({key:o,iv:c,type:n})}var a=n(162),i=n(842),o=n(19),s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=r,o(r,a),r.prototype._update=function(e){return new t(this._des.update(e))},r.prototype._final=function(){return new t(this._des.final())}}).call(t,n(39).Buffer)},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var a=0,i=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)i<<=1,i|=t>>>s+o&1;for(var s=1;s<=25;s+=8)i<<=1,i|=e>>>s+o&1}n[r+0]=a>>>0,n[r+1]=i>>>0},t.rip=function(e,t,n,r){for(var a=0,i=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;n[r+0]=a>>>0,n[r+1]=i>>>0},t.pc1=function(e,t,n,r){for(var a=0,i=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;n[r+0]=a>>>0,n[r+1]=i>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,a){for(var i=0,o=0,s=r.length>>>1,c=0;c<s;c++)i<<=1,i|=e>>>r[c]&1;for(var c=s;c<r.length;c++)o<<=1,o|=t>>>r[c]&1;n[a+0]=i>>>0,n[a+1]=o>>>0},t.expand=function(e,t,n){var r=0,a=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(var i=11;i>=3;i-=4)a|=e>>>i&63,a<<=6;a|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=a>>>0};var a=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){var i=e>>>18-6*r&63,o=a[64*r+i];n<<=4,n|=o}for(var r=0;r<4;r++){var i=t>>>18-6*r&63,o=a[256+64*r+i];n<<=4,n|=o}return n>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<i.length;n++)t<<=1,t|=e>>>i[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var a=[],i=0;i<t;i+=n)a.push(r.slice(i,i+n));return a.join(" ")}},function(e,t,n){"use strict";function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var a=n(105);e.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(a,n)));for(var i=e.length-(e.length-t)%this.blockSize;t<i;t+=this.blockSize)this._update(e,t,a,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return a},r.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(a,n);return t+=this._buffer(e,t),a},r.prototype.final=function(e){var t;e&&(t=this.update(e));var n;return n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},r.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){a.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){"use strict";function r(){this.tmp=new Array(2),this.keys=null}function a(e){u.call(this,e);var t=new r;this._desState=t,this.deriveKeys(t,e.key)}var i=n(105),o=n(19),s=n(842),c=s.utils,u=s.Cipher;o(a,u),e.exports=a,a.create=function(e){return new a(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];a.prototype.deriveKeys=function(e,t){e.keys=new Array(32),i.equal(t.length,this.blockSize,"Invalid key length");var n=c.readUInt32BE(t,0),r=c.readUInt32BE(t,4);c.pc1(n,r,e.tmp,0),n=e.tmp[0],r=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var o=l[a>>>1];n=c.r28shl(n,o),r=c.r28shl(r,o),c.pc2(n,r,e.keys,a)}},a.prototype._update=function(e,t,n,r){var a=this._desState,i=c.readUInt32BE(e,t),o=c.readUInt32BE(e,t+4);c.ip(i,o,a.tmp,0),i=a.tmp[0],o=a.tmp[1],"encrypt"===this.type?this._encrypt(a,i,o,a.tmp,0):this._decrypt(a,i,o,a.tmp,0),i=a.tmp[0],o=a.tmp[1],c.writeUInt32BE(n,i,r),c.writeUInt32BE(n,o,r+4)},a.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},a.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)i.equal(e[n],t);return e.slice(0,e.length-t)},a.prototype._encrypt=function(e,t,n,r,a){for(var i=t,o=n,s=0;s<e.keys.length;s+=2){var u=e.keys[s],l=e.keys[s+1];c.expand(o,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var d=c.substitute(u,l),f=c.permute(d),p=o;o=(i^f)>>>0,i=p}c.rip(o,i,r,a)},a.prototype._decrypt=function(e,t,n,r,a){for(var i=n,o=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],l=e.keys[s+1];c.expand(i,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var d=c.substitute(u,l),f=c.permute(d),p=i;i=(o^f)>>>0,o=p}c.rip(i,o,r,a)}},function(e,t,n){"use strict";function r(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function a(e){function t(t){e.call(this,t),this._cbcInit()}o(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var a=n[r];t.prototype[a]=s[a]}return t.create=function(e){return new t(e)},t}var i=n(105),o=n(19),s={};t.instantiate=a,s._cbcInit=function(){var e=new r(this.options.iv);this._cbcState=e},s._update=function(e,t,n,r){var a=this._cbcState,i=this.constructor.super_.prototype,o=a.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];i._update.call(this,o,0,n,r);for(var s=0;s<this.blockSize;s++)o[s]=n[r+s]}else{i._update.call(this,e,t,n,r);for(var s=0;s<this.blockSize;s++)n[r+s]^=o[s];for(var s=0;s<this.blockSize;s++)o[s]=e[t+s]}}},function(e,t,n){"use strict";function r(e,t){i.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),r=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:r}),u.create({type:"encrypt",key:a})]:[u.create({type:"decrypt",key:a}),u.create({type:"encrypt",key:r}),u.create({type:"decrypt",key:n})]}function a(e){c.call(this,e);var t=new r(this.type,this.options.key);this._edeState=t}var i=n(105),o=n(19),s=n(842),c=s.Cipher,u=s.DES;o(a,c),e.exports=a,a.create=function(e){return new a(e)},a.prototype._update=function(e,t,n,r){var a=this._edeState;a.ciphers[0]._update(e,t,n,r),a.ciphers[1]._update(n,r,n,r),a.ciphers[2]._update(n,r,n,r)},a.prototype._pad=u.prototype._pad,a.prototype._unpad=u.prototype._unpad},function(e,t,n){function r(e,t,n){d.call(this),this._cache=new a,this._cipher=new f.AES(t),this._prev=u.from(n),this._mode=e,this._autopadding=!0}function a(){this.cache=u.allocUnsafe(0)}function i(e,t,n){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=u.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=u.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new l(a.module,t,n):"auth"===a.type?new c(a.module,t,n):new r(a.module,t,n)}function o(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=p(t,!1,n.key,n.iv);return i(e,r.key,r.iv)}var s=n(844),c=n(892),u=n(35).Buffer,l=n(893),d=n(162),f=n(510),p=n(511);n(19)(r,d),r.prototype._update=function(e){this._cache.add(e);for(var t,n,r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return u.concat(r)};var h=u.alloc(16,16);r.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},r.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},a.prototype.add=function(e){this.cache=u.concat([this.cache,e])},a.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},a.prototype.flush=function(){for(var e=16-this.cache.length,t=u.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return u.concat([this.cache,t])},t.createCipheriv=i,t.createCipher=o},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){
|
37 |
var r=n(469);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var a=e._cipher.decryptBlock(t);return r(a,n)}},function(e,t,n){function r(e,t,n){var r=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(r),e._prev=a.concat([e._prev,n?t:o]),o}var a=n(35).Buffer,i=n(469);t.encrypt=function(e,t,n){for(var i,o=a.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=a.allocUnsafe(0)),!(e._cache.length<=t.length)){o=a.concat([o,r(e,t,n)]);break}i=e._cache.length,o=a.concat([o,r(e,t.slice(0,i),n)]),t=t.slice(i)}return o}},function(e,t,n){function r(e,t,n){var r=e._cipher.encryptBlock(e._prev),i=r[0]^t;return e._prev=a.concat([e._prev.slice(1),a.from([n?t:i])]),i}var a=n(35).Buffer;t.encrypt=function(e,t,n){for(var i=t.length,o=a.allocUnsafe(i),s=-1;++s<i;)o[s]=r(e,t[s],n);return o}},function(e,t,n){function r(e,t,n){for(var r,i,o,s=-1,c=0;++s<8;)r=e._cipher.encryptBlock(e._prev),i=t&1<<7-s?128:0,o=r[0]^i,c+=(128&o)>>s%8,e._prev=a(e._prev,n?i:o);return c}function a(e,t){var n=e.length,r=-1,a=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++r<n;)a[r]=e[r]<<1|e[r+1]>>7;return a}var i=n(35).Buffer;t.encrypt=function(e,t,n){for(var a=t.length,o=i.allocUnsafe(a),s=-1;++s<a;)o[s]=r(e,t[s],n);return o}},function(e,t,n){(function(e){function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var a=n(469);t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,r(t)]);var i=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),a(n,i)}}).call(t,n(39).Buffer)},function(e,t,n){function r(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function a(e){var t=o.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function i(e){this.h=e,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}var o=n(35).Buffer,s=o.alloc(16,0);i.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},i.prototype._multiply=function(){for(var e,t,n,i=r(this.h),o=[0,0,0,0],s=-1;++s<128;){for(t=0!=(this.state[~~(s/8)]&1<<7-s%8),t&&(o[0]^=i[0],o[1]^=i[1],o[2]^=i[2],o[3]^=i[3]),n=0!=(1&i[3]),e=3;e>0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,n&&(i[0]=i[0]^225<<24)}this.state=a(o)},i.prototype.update=function(e){this.cache=o.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},i.prototype.final=function(e,t){return this.cache.length&&this.ghash(o.concat([this.cache,s],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=i},function(e,t,n){function r(e,t,n){f.call(this),this._cache=new a,this._last=void 0,this._cipher=new p.AES(t),this._prev=u.from(n),this._mode=e,this._autopadding=!0}function a(){this.cache=u.allocUnsafe(0)}function i(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function o(e,t,n){var a=l[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=u.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=u.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new d(a.module,t,n,!0):"auth"===a.type?new c(a.module,t,n,!0):new r(a.module,t,n)}function s(e,t){var n=l[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=h(t,!1,n.key,n.iv);return o(e,r.key,r.iv)}var c=n(892),u=n(35).Buffer,l=n(844),d=n(893),f=n(162),p=n(510),h=n(511);n(19)(r,f),r.prototype._update=function(e){this._cache.add(e);for(var t,n,r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return u.concat(r)},r.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return i(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},r.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},a.prototype.add=function(e){this.cache=u.concat([this.cache,e])},a.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},a.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=s,t.createDecipheriv=o},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){function r(t){var n=new e(o[t].prime,"hex"),r=new e(o[t].gen,"hex");return new s(n,r)}function a(t,n,r,o){return e.isBuffer(n)||void 0===c[n]?a(t,"binary",n,r):(n=n||"binary",o=o||"binary",r=r||new e([2]),e.isBuffer(r)||(r=new e(r,o)),"number"==typeof t?new s(i(t,r),r,!0):(e.isBuffer(t)||(t=new e(t,n)),new s(t,r,!0)))}var i=n(894),o=n(1032),s=n(1033),c={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=r,t.createDiffieHellman=t.DiffieHellman=a}).call(t,n(39).Buffer)},function(e,t){},function(e,t){},function(e,t){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(e,t,n){(function(t){function r(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new c(e),this}function a(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new c(e),this}function i(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in b)return b[r];var a=0;if(e.isEven()||!_.simpleSieve||!_.fermatTest(e)||!l.test(e))return a+=1,a+="02"===n||"05"===n?8:4,b[r]=a,a;l.test(e.shrn(1))||(a+=2);var i;switch(n){case"02":e.mod(d).cmp(f)&&(a+=8);break;case"05":i=e.mod(p),i.cmp(h)&&i.cmp(m)&&(a+=8);break;default:a+=4}return b[r]=a,a}function o(e,t,n){this.setGenerator(t),this.__prime=new c(e),this._prime=c.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=r,this.setPrivateKey=a):this._primeCode=8}function s(e,n){var r=new t(e.toArray());return n?r.toString(n):r}var c=n(57),u=n(895),l=new u,d=new c(24),f=new c(11),p=new c(10),h=new c(3),m=new c(7),_=n(894),M=n(235);e.exports=o;var b={};Object.defineProperty(o.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=i(this.__prime,this.__gen)),this._primeCode}}),o.prototype.generateKeys=function(){return this._priv||(this._priv=new c(M(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},o.prototype.computeSecret=function(e){e=new c(e),e=e.toRed(this._prime);var n=e.redPow(this._priv).fromRed(),r=new t(n.toArray()),a=this.getPrime();if(r.length<a.length){var i=new t(a.length-r.length);i.fill(0),r=t.concat([i,r])}return r},o.prototype.getPublicKey=function(e){return s(this._pub,e)},o.prototype.getPrivateKey=function(e){return s(this._priv,e)},o.prototype.getPrime=function(e){return s(this.__prime,e)},o.prototype.getGenerator=function(e){return s(this._gen,e)},o.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new c(e),this}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e){c.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function a(e){c.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){return new r(e)}function o(e){return new a(e)}var s=n(467),c=n(836),u=n(19),l=n(1035),d=n(1071),f=n(884);Object.keys(f).forEach(function(e){f[e].id=new t(f[e].id,"hex"),f[e.toLowerCase()]=f[e]}),u(r,c.Writable),r.prototype._write=function(e,t,n){this._hash.update(e),n()},r.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},r.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=l(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},u(a,c.Writable),a.prototype._write=function(e,t,n){this._hash.update(e),n()},a.prototype.update=function(e,n){return"string"==typeof e&&(e=new t(e,n)),this._hash.update(e),this},a.prototype.verify=function(e,n,r){"string"==typeof n&&(n=new t(n,r)),this.end();var a=this._hash.digest();return d(n,a,e,this._signType,this._tag)},e.exports={Sign:i,Verify:o,createSign:i,createVerify:o}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e,n,r,o,s){var c=_(n);if(c.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return a(e,c)}if("dsa"===c.type){if("dsa"!==o)throw new Error("wrong private key type");return i(e,c,r)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");e=t.concat([s,e]);for(var u=c.modulus.byteLength(),l=[0,1];e.length+l.length+1<u;)l.push(255);l.push(0);for(var d=-1;++d<e.length;)l.push(e[d]);return p(l,c)}function a(e,n){var r=M[n.curve.join(".")];if(!r)throw new Error("unknown curve "+n.curve.join("."));var a=new h(r),i=a.keyFromPrivate(n.privateKey),o=i.sign(e);return new t(o.toDER())}function i(e,t,n){for(var r,a=t.params.priv_key,i=t.params.p,u=t.params.q,f=t.params.g,p=new m(0),h=c(e,u).mod(u),_=!1,M=s(a,u,e,n);!1===_;)r=l(u,M,n),p=d(f,r,i,u),_=r.invm(u).imul(h.add(a.mul(p))).mod(u),0===_.cmpn(0)&&(_=!1,p=new m(0));return o(p,_)}function o(e,n){e=e.toArray(),n=n.toArray(),128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n));var r=e.length+n.length+4,a=[48,r,2,e.length];return a=a.concat(e,[2,n.length],n),new t(a)}function s(e,n,r,a){if(e=new t(e.toArray()),e.length<n.byteLength()){var i=new t(n.byteLength()-e.length);i.fill(0),e=t.concat([i,e])}var o=r.length,s=u(r,n),c=new t(o);c.fill(1);var l=new t(o);return l.fill(0),l=f(a,l).update(c).update(new t([0])).update(e).update(s).digest(),c=f(a,l).update(c).digest(),l=f(a,l).update(c).update(new t([1])).update(e).update(s).digest(),c=f(a,l).update(c).digest(),{k:l,v:c}}function c(e,t){var n=new m(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function u(e,n){e=c(e,n),e=e.mod(n);var r=new t(e.toArray());if(r.length<n.byteLength()){var a=new t(n.byteLength()-r.length);a.fill(0),r=t.concat([a,r])}return r}function l(e,n,r){var a,i;do{for(a=new t(0);8*a.length<e.bitLength();)n.v=f(r,n.k).update(n.v).digest(),a=t.concat([a,n.v]);i=c(a,e),n.k=f(r,n.k).update(n.v).update(new t([0])).digest(),n.v=f(r,n.k).update(n.v).digest()}while(-1!==i.cmp(e));return i}function d(e,t,n,r){return e.toRed(m.mont(n)).redPow(t).fromRed().mod(r)}var f=n(882),p=n(845),h=n(84).ec,m=n(57),_=n(513),M=n(905);e.exports=r,e.exports.getKey=s,e.exports.makeKey=l}).call(t,n(39).Buffer)},function(e,t){e.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(e,t,n){"use strict";function r(e,t){for(var n=[],r=1<<t+1,a=e.clone();a.cmpn(1)>=0;){var i;if(a.isOdd()){var o=a.andln(r-1);i=o>(r>>1)-1?(r>>1)-o:o,a.isubn(i)}else i=0;n.push(i);for(var s=0!==a.cmpn(0)&&0===a.andln(r-1)?t+1:1,c=1;c<s;c++)n.push(0);a.iushrn(s)}return n}function a(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,a=0;e.cmpn(-r)>0||t.cmpn(-a)>0;){var i=e.andln(3)+r&3,o=t.andln(3)+a&3;3===i&&(i=-1),3===o&&(o=-1);var s;if(0==(1&i))s=0;else{var c=e.andln(7)+r&7;s=3!==c&&5!==c||2!==o?i:-i}n[0].push(s);var u;if(0==(1&o))u=0;else{var c=t.andln(7)+a&7;u=3!==c&&5!==c||2!==i?o:-o}n[1].push(u),2*r===s+1&&(r=1-r),2*a===u+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return n}function i(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}}function o(e){return"string"==typeof e?c.toArray(e,"hex"):e}function s(e){return new u(e,"hex","le")}var c=t,u=n(57),l=n(105),d=n(897);c.assert=l,c.toArray=d.toArray,c.zero2=d.zero2,c.toHex=d.toHex,c.encode=d.encode,c.getNAF=r,c.getJSF=a,c.cachedProperty=i,c.parseBytes=o,c.intFromLE=s},function(e,t,n){"use strict";function r(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}var i=n(57),o=n(84),s=o.utils,c=s.getNAF,u=s.getJSF,l=s.assert;e.exports=r,r.prototype.point=function(){throw new Error("Not implemented")},r.prototype.validate=function(){throw new Error("Not implemented")},r.prototype._fixedNafMul=function(e,t){l(e.precomputed);var n=e._getDoubles(),r=c(t,1),a=(1<<n.step+1)-(n.step%2==0?2:1);a/=3;for(var i=[],o=0;o<r.length;o+=n.step){for(var s=0,t=o+n.step-1;t>=o;t--)s=(s<<1)+r[t];i.push(s)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=a;f>0;f--){for(var o=0;o<i.length;o++){var s=i[o];s===f?d=d.mixedAdd(n.points[o]):s===-f&&(d=d.mixedAdd(n.points[o].neg()))}u=u.add(d)}return u.toP()},r.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var a=r.points,i=c(t,n),o=this.jpoint(null,null,null),s=i.length-1;s>=0;s--){for(var t=0;s>=0&&0===i[s];s--)t++;if(s>=0&&t++,o=o.dblp(t),s<0)break;var u=i[s];l(0!==u),o="affine"===e.type?u>0?o.mixedAdd(a[u-1>>1]):o.mixedAdd(a[-u-1>>1].neg()):u>0?o.add(a[u-1>>1]):o.add(a[-u-1>>1].neg())}return"affine"===e.type?o.toP():o},r.prototype._wnafMulAdd=function(e,t,n,r,a){for(var i=this._wnafT1,o=this._wnafT2,s=this._wnafT3,l=0,d=0;d<r;d++){var f=t[d],p=f._getNAFPoints(e);i[d]=p.wnd,o[d]=p.points}for(var d=r-1;d>=1;d-=2){var h=d-1,m=d;if(1===i[h]&&1===i[m]){var _=[t[h],null,null,t[m]];0===t[h].y.cmp(t[m].y)?(_[1]=t[h].add(t[m]),_[2]=t[h].toJ().mixedAdd(t[m].neg())):0===t[h].y.cmp(t[m].y.redNeg())?(_[1]=t[h].toJ().mixedAdd(t[m]),_[2]=t[h].add(t[m].neg())):(_[1]=t[h].toJ().mixedAdd(t[m]),_[2]=t[h].toJ().mixedAdd(t[m].neg()));var M=[-3,-1,-5,-7,0,7,5,1,3],b=u(n[h],n[m]);l=Math.max(b[0].length,l),s[h]=new Array(l),s[m]=new Array(l);for(var g=0;g<l;g++){var v=0|b[0][g],y=0|b[1][g];s[h][g]=M[3*(v+1)+(y+1)],s[m][g]=0,o[h]=_}}else s[h]=c(n[h],i[h]),s[m]=c(n[m],i[m]),l=Math.max(s[h].length,l),l=Math.max(s[m].length,l)}for(var A=this.jpoint(null,null,null),E=this._wnafT4,d=l;d>=0;d--){for(var w=0;d>=0;){for(var k=!0,g=0;g<r;g++)E[g]=0|s[g][d],0!==E[g]&&(k=!1);if(!k)break;w++,d--}if(d>=0&&w++,A=A.dblp(w),d<0)break;for(var g=0;g<r;g++){var f,T=E[g];0!==T&&(T>0?f=o[g][T-1>>1]:T<0&&(f=o[g][-T-1>>1].neg()),A="affine"===f.type?A.mixedAdd(f):A.add(f))}}for(var d=0;d<r;d++)o[d]=null;return a?A:A.toP()},r.BasePoint=a,a.prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},r.prototype.decodePoint=function(e,t){e=s.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n){6===e[0]?l(e[e.length-1]%2==0):7===e[0]&&l(e[e.length-1]%2==1);return this.point(e.slice(1,1+n),e.slice(1+n,1+2*n))}if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},a.prototype.encode=function(e,t){return s.encode(this._encode(t),e)},a.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},a.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a<t;a+=e){for(var i=0;i<e;i++)r=r.dbl();n.push(r)}return{step:e,points:n}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),a=1;a<n;a++)t[a]=t[a-1].add(r);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){"use strict";function r(e){l.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function a(e,t,n,r){l.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function i(e,t,n,r){l.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(n,16),this.z=new c(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=n(512),s=n(84),c=n(57),u=n(19),l=o.base,d=s.utils.assert;u(r,l),e.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=r[0].cmp(r[1])<0?r[0]:r[1],t=t.toRed(this.red)}if(e.lambda)n=new c(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?n=a[0]:(n=a[1],d(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}var i;return i=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(n),{beta:t,lambda:n,basis:i}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),n=new c(2).toRed(t).redInvm(),r=n.redNeg(),a=new c(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},r.prototype._getEndoBasis=function(e){for(var t,n,r,a,i,o,s,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,p=this.n.clone(),h=new c(1),m=new c(0),_=new c(0),M=new c(1),b=0;0!==f.cmpn(0);){var g=p.div(f);u=p.sub(g.mul(f)),l=_.sub(g.mul(h));var v=M.sub(g.mul(m));if(!r&&u.cmp(d)<0)t=s.neg(),n=h,r=u.neg(),a=l;else if(r&&2==++b)break;s=u,p=f,f=u,_=h,h=l,M=m,m=v}i=u.neg(),o=l;var y=r.sqr().add(a.sqr());return i.sqr().add(o.sqr()).cmp(y)>=0&&(i=t,o=n),r.negative&&(r=r.neg(),a=a.neg()),i.negative&&(i=i.neg(),o=o.neg()),[{a:r,b:a},{a:i,b:o}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),s=i.mul(r.a),c=a.mul(n.b),u=i.mul(r.b);return{k1:e.sub(o).sub(s),k2:c.add(u).neg()}},r.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(a).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,i=0;i<e.length;i++){var o=this._endoSplit(t[i]),s=e[i],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*i]=s,r[2*i+1]=c,a[2*i]=o.k1,a[2*i+1]=o.k2}for(var u=this._wnafMulAdd(1,r,a,2*i,n),l=0;l<2*i;l++)r[l]=null,a[l]=null;return u},u(a,l.BasePoint),r.prototype.point=function(e,t,n){return new a(this,e,t,n)},r.prototype.pointFromJSON=function(e,t){return a.fromJSON(this,e,t)},a.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},a.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},a.fromJSON=function(e,t,n){function r(t){return e.point(t[0],t[1],n)}"string"==typeof t&&(t=JSON.parse(t));var a=e.point(t[0],t[1],n);if(!t[2])return a;var i=t[2];return a.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[a].concat(i.doubles.points.map(r))},naf:i.naf&&{wnd:i.naf.wnd,points:[a].concat(i.naf.points.map(r))}},a},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),i=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)},a.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},a.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(i,l.BasePoint),r.prototype.jpoint=function(e,t,n){return new i(this,e,t,n)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null)
|
39 |
points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);"string"==typeof e&&(c(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var a=n(57),i=n(1051),o=n(84),s=o.utils,c=s.assert,u=n(1052),l=n(1053);e.exports=r,r.prototype.keyPair=function(e){return new u(this,e)},r.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new a(2));;){var s=new a(t.generate(n));if(!(s.cmp(r)>0))return s.iaddn(1),this.keyFromPrivate(s)}},r.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},r.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new a(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new i({hash:this.hash,entropy:s,nonce:c,pers:r.pers,persEnc:r.persEnc||"utf8"}),d=this.n.sub(new a(1)),f=0;!0;f++){var p=r.k?r.k(f):new a(u.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(d)>=0)){var h=this.g.mul(p);if(!h.isInfinity()){var m=h.getX(),_=m.umod(this.n);if(0!==_.cmpn(0)){var M=p.invm(this.n).mul(_.mul(t.getPrivate()).iadd(e));if(M=M.umod(this.n),0!==M.cmpn(0)){var b=(h.getY().isOdd()?1:0)|(0!==m.cmp(_)?2:0);return r.canonical&&M.cmp(this.nh)>0&&(M=this.n.sub(M),b^=1),new l({r:_,s:M,recoveryParam:b})}}}}}},r.prototype.verify=function(e,t,n,r){e=this._truncateToN(new a(e,16)),n=this.keyFromPublic(n,r),t=new l(t,"hex");var i=t.r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(i).umod(this.n);if(!this.curve._maxwellTrick){var d=this.g.mulAdd(c,n.getPublic(),u);return!d.isInfinity()&&0===d.getX().umod(this.n).cmp(i)}var d=this.g.jmulAdd(c,n.getPublic(),u);return!d.isInfinity()&&d.eqXToP(i)},r.prototype.recoverPubKey=function(e,t,n,r){c((3&n)===n,"The recovery param is more than two bits"),t=new l(t,r);var i=this.n,o=new a(e),s=t.r,u=t.s,d=1&n,f=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var p=t.r.invm(i),h=i.sub(o).mul(p).umod(i),m=u.mul(p).umod(i);return this.g.mulAdd(h,s,m)},r.prototype.getKeyRecoveryParam=function(e,t,n,r){if(t=new l(t,r),null!==t.recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(n))return a}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),a=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,a)}var a=n(846),i=n(897),o=n(105);e.exports=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new a.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},r.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,e);return this._update(n),this._reseed++,i.encode(o,t)}},function(e,t,n){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var a=n(57),i=n(84),o=i.utils,s=o.assert;e.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new a(e,t||16),
|
40 |
this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";function r(e,t){if(e instanceof r)return e;this._importDER(e,t)||(d(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function i(e,t){var n=e[t.place++];if(!(128&n))return n;for(var r=15&n,a=0,i=0,o=t.place;i<r;i++,o++)a<<=8,a|=e[o];return t.place=o,a}function o(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function s(e,t){if(t<128)return void e.push(t);var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}var c=n(57),u=n(84),l=u.utils,d=l.assert;e.exports=r,r.prototype._importDER=function(e,t){e=l.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;if(i(e,n)+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var r=i(e,n),o=e.slice(n.place,r+n.place);if(n.place+=r,2!==e[n.place++])return!1;var s=i(e,n);if(e.length!==s+n.place)return!1;var u=e.slice(n.place,s+n.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new c(o),this.s=new c(u),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=o(t),n=o(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];s(r,t.length),r=r.concat(t),r.push(2),s(r,n.length);var a=r.concat(n),i=[48];return s(i,a.length),i=i.concat(a),l.encode(i,e)}},function(e,t,n){"use strict";function r(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof r))return new r(e);var e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=a.sha512}var a=n(846),i=n(84),o=i.utils,s=o.assert,c=o.parseBytes,u=n(1055),l=n(1056);e.exports=r,r.prototype.sign=function(e,t){e=c(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),a=this.g.mul(r),i=this.encodePoint(a),o=this.hashInt(i,n.pubBytes(),e).mul(n.priv()),s=r.add(o).umod(this.curve.n);return this.makeSignature({R:a,S:s,Rencoded:i})},r.prototype.verify=function(e,t,n){e=c(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),a=this.hashInt(t.Rencoded(),r.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(r.pub().mul(a)).eq(i)},r.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},r.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},r.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},r.prototype.makeSignature=function(e){return e instanceof l?e:new l(this,e)},r.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},r.prototype.decodePoint=function(e){e=o.parseBytes(e);var t=e.length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),a=o.intFromLE(n);return this.curve.pointFromY(a,r)},r.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},r.prototype.decodeInt=function(e){return o.intFromLE(e)},r.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";function r(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}var a=n(84),i=a.utils,o=i.assert,s=i.parseBytes,c=i.cachedProperty;r.fromPublic=function(e,t){return t instanceof r?t:new r(e,{pub:t})},r.fromSecret=function(e,t){return t instanceof r?t:new r(e,{secret:t})},r.prototype.secret=function(){return this._secret},c(r,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),c(r,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),c(r,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),c(r,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),c(r,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),c(r,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),r.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},r.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},r.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},r.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},e.exports=r},function(e,t,n){"use strict";function r(e,t){this.eddsa=e,"object"!=typeof t&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof a&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var a=n(57),i=n(84),o=i.utils,s=o.assert,c=o.cachedProperty,u=o.parseBytes;c(r,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),c(r,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),c(r,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),c(r,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),r.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},r.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=r},function(e,t,n){"use strict";var r=n(471);t.certificate=n(1068);var a=r.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});t.RSAPrivateKey=a;var i=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.RSAPublicKey=i;var o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});t.PublicKey=o;var s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});t.PrivateKey=c;var u=r.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});t.EncryptedPrivateKey=u;var l=r.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});t.DSAPrivateKey=l,t.DSAparam=r.define("DSAparam",function(){this.int()});var d=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});t.ECPrivateKey=d;var f=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(e,t,n){function r(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var a=n(471),i=n(19);t.define=function(e,t){return new r(e,t)},r.prototype._createNamed=function(e){var t;try{t=n(1059).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(a.decoders[e])),this.decoders[e]},r.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(a.encoders[e])),this.encoders[e]},r.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(module,exports,__webpack_require__){function Context(){}var indexOf=__webpack_require__(1060),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,a=n.execScript;!r&&a&&(a.call(n,"null"),r=n.eval),forEach(Object_keys(e),function(t){n[t]=e[t]}),forEach(globals,function(t){e[t]&&(n[t]=e[t])});var i=Object_keys(n),o=r.call(n,this.code);return forEach(Object_keys(n),function(t){(t in e||-1===indexOf(i,t))&&(e[t]=n[t])}),forEach(globals,function(t){t in e||defineProp(e,t,n[t])}),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return forEach(Object_keys(t),function(n){e[n]=t[n]}),n},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(n){t[n]=e[n]}),t}},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){function r(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}var i=n(19);t.Reporter=r,r.prototype.isError=function(e){return e instanceof a},r.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},r.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},r.prototype.enterKey=function(e){return this._reporterState.path.push(e)},r.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},r.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},r.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},r.prototype.error=function(e){var t,n=this._reporterState,r=e instanceof a;if(t=r?e:new a(n.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},r.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){function r(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}var a=n(472).Reporter,i=n(472).EncoderBuffer,o=n(472).DecoderBuffer,s=n(105),c=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(c),l=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];e.exports=r;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];r.prototype.clone=function(){var e=this._baseState,t={};d.forEach(function(n){t[n]=e[n]});var n=new this.constructor(t.parent);return n._baseState=t,n},r.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}},this)},r.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},r.prototype._useArgs=function(e){var t=this._baseState,n=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==n.length&&(s(null===t.children),t.children=n,n.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n}),t}))},l.forEach(function(e){r.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),c.forEach(function(e){r.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}}),r.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},r.prototype.optional=function(){return this._baseState.optional=!0,this},r.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},r.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},r.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},r.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},r.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},r.prototype.any=function(){return this._baseState.any=!0,this},r.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},r.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},r.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r=n.default,a=!0,i=null;if(null!==n.key&&(i=e.enterKey(n.key)),n.optional){var s=null;if(null!==n.explicit?s=n.explicit:null!==n.implicit?s=n.implicit:null!==n.tag&&(s=n.tag),null!==s||n.any){if(a=this._peekTag(e,s,n.any),e.isError(a))return a}else{var c=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}var u;if(n.obj&&a&&(u=e.enterObject()),a){if(null!==n.explicit){var l=this._decodeTag(e,n.explicit);if(e.isError(l))return l;e=l}var d=e.offset;if(null===n.use&&null===n.choice){if(n.any)var c=e.save();var f=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(f))return f;n.any?r=e.raw(c):e=f}if(t&&t.track&&null!==n.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),r=n.any?r:null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),e.isError(r))return r;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(n){n._decode(e,t)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var p=new o(r);r=this._getUse(n.contains,e._reporterState.obj)._decode(p,t)}}return n.obj&&a&&(r=e.leaveObject(u)),null===n.key||null===r&&!0!==a?null!==i&&e.exitKey(i):e.leaveKey(i,n.key,r),r},r.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},r.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},r.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,a=!1;return Object.keys(n.choice).some(function(i){var o=e.save(),s=n.choice[i];try{var c=s._decode(e,t);if(e.isError(c))return!1;r={type:i,value:c},a=!0}catch(t){return e.restore(o),!1}return!0},this),a?r:e.error("Choice not matched")},r.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},r.prototype._encode=function(e,t,n){var r=this._baseState;if(null===r.default||r.default!==e){var a=this._encodeValue(e,t,n);if(void 0!==a&&!this._skipDefault(a,t,n))return a}},r.prototype._encodeValue=function(e,t,n){var r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new a);var i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}var o=null,s=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,n)._encode(e,t),s=!0;else if(r.children)o=r.children.map(function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var a=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),a},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)},c))}else null!==r.use?i=this._getUse(r.use,n)._encode(e,t):(o=this._encodePrimitive(r.tag,e),s=!0);var i;if(!r.any&&null===r.choice){var u=null!==r.implicit?r.implicit:r.tag,l=null===r.implicit?"universal":"context";null===u?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(u,s,l,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},r.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},r.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},r.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},r.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},function(e,t,n){var r=n(902);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r._reverse(t.tag)},function(e,t,n){var r=t;r.der=n(903),r.pem=n(1065)},function(e,t,n){function r(e){o.call(this,e),this.enc="pem"}var a=n(19),i=n(39).Buffer,o=n(903);a(r,o),e.exports=r,r.prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u<n.length;u++){var l=n[u].match(a);if(null!==l&&l[2]===r){if(-1!==s){if("END"!==l[1])break;c=u;break}if("BEGIN"!==l[1])break;s=u}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+r);var d=n.slice(s+1,c).join("");d.replace(/[^a-z0-9\+\/=]+/gi,"");var f=new i(d,"base64");return o.prototype.decode.call(this,f,t)}},function(e,t,n){var r=t;r.der=n(904),r.pem=n(1067)},function(e,t,n){function r(e){i.call(this,e),this.enc="pem"}var a=n(19),i=n(904);a(r,i),e.exports=r,r.prototype.encode=function(e,t){for(var n=i.prototype.encode.call(this,e),r=n.toString("base64"),a=["-----BEGIN "+t.label+"-----"],o=0;o<r.length;o+=64)a.push(r.slice(o,o+64));return a.push("-----END "+t.label+"-----"),a.join("\n")}},function(e,t,n){"use strict";var r=n(471),a=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),i=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),c=r.define("RelativeDistinguishedName",function(){this.setof(i)}),u=r.define("RDNSequence",function(){this.seqof(c)}),l=r.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),d=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(a),this.key("notAfter").use(a))}),f=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),p=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(l),this.key("validity").use(d),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())}),h=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});e.exports=h},function(e,t){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},function(e,t,n){(function(t){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,a=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=n(511),s=n(843);e.exports=function(e,n){var c,u=e.toString(),l=u.match(r);if(l){var d="aes"+l[1],f=new t(l[2],"hex"),p=new t(l[3].replace(/[\r\n]/g,""),"base64"),h=o(n,f.slice(0,8),parseInt(l[1],10)).key,m=[],_=s.createDecipheriv(d,h,f);m.push(_.update(p)),m.push(_.final()),c=t.concat(m)}else{var M=u.match(i);c=new t(M[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(a)[1],data:c}}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e,n,r,o,c){var l=u(r);if("ec"===l.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return a(e,n,l)}if("dsa"===l.type){if("dsa"!==o)throw new Error("wrong public key type");return i(e,n,l)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");n=t.concat([c,n]);for(var d=l.modulus.byteLength(),f=[1],p=0;n.length+f.length+2<d;)f.push(255),p++;f.push(0);for(var h=-1;++h<n.length;)f.push(n[h]);f=new t(f);var m=s.mont(l.modulus);e=new s(e).toRed(m),e=e.redPow(new s(l.publicExponent)),e=new t(e.fromRed().toArray());var _=p<8?1:0;for(d=Math.min(e.length,f.length),e.length!==f.length&&(_=1),h=-1;++h<d;)_|=e[h]^f[h];return 0===_}function a(e,t,n){var r=l[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var a=new c(r),i=n.data.subjectPrivateKey.data;return a.verify(t,e,i)}function i(e,t,n){var r=n.data.p,a=n.data.q,i=n.data.g,c=n.data.pub_key,l=u.signature.decode(e,"der"),d=l.s,f=l.r;o(d,a),o(f,a);var p=s.mont(r),h=d.invm(a);return 0===i.toRed(p).redPow(new s(t).mul(h).mod(a)).fromRed().mul(c.toRed(p).redPow(f.mul(h).mod(a)).fromRed()).mod(r).mod(a).cmp(f)}function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var s=n(57),c=n(84).ec,u=n(513),l=n(905);e.exports=r}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function a(e,n,r){Array.isArray(e)||(e=e.toArray());var a=new t(e);if(r&&a.length<r){var i=new t(r-a.length);i.fill(0),a=t.concat([i,a])}return n?a.toString(n):a}var i=n(84),o=n(57);e.exports=function(e){return new r(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,r.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},r.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},r.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),a(n,e)},r.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},r.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},r.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new o(e);return r=r.toString(16),this.keys._importPrivate(r),this}}).call(t,n(39).Buffer)},function(e,t,n){t.publicEncrypt=n(1074),t.privateDecrypt=n(1075),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){(function(t){function r(e,n){var r=e.modulus.byteLength(),a=n.length,i=c("sha1").update(new t("")).digest(),o=i.length,f=2*o;if(a>r-f-2)throw new Error("message too long");var p=new t(r-a-f-2);p.fill(0);var h=r-o-1,m=s(o),_=l(t.concat([i,p,new t([1]),n],h),u(m,h)),M=l(m,u(_,o));return new d(t.concat([new t([0]),M,_],r))}function a(e,n,r){var a=n.length,o=e.modulus.byteLength();if(a>o-11)throw new Error("message too long");var s;return r?(s=new t(o-a-3),s.fill(255)):s=i(o-a-3),new d(t.concat([new t([0,r?1:2]),s,new t([0]),n],o))}function i(e,n){for(var r,a=new t(e),i=0,o=s(2*e),c=0;i<e;)c===o.length&&(o=s(2*e),c=0),(r=o[c++])&&(a[i++]=r);return a}var o=n(513),s=n(235),c=n(467),u=n(906),l=n(907),d=n(57),f=n(908),p=n(845);e.exports=function(e,t,n){var i;i=e.padding?e.padding:n?1:4;var s,c=o(e);if(4===i)s=r(c,t);else if(1===i)s=a(c,t,n);else{if(3!==i)throw new Error("unknown padding");if(s=new d(t),s.cmp(c.modulus)>=0)throw new Error("data too long for modulus")}return n?p(s,c):f(s,c)}}).call(t,n(39).Buffer)},function(e,t,n){(function(t){function r(e,n){var r=(e.modulus,e.modulus.byteLength()),a=(n.length,d("sha1").update(new t("")).digest()),o=a.length;if(0!==n[0])throw new Error("decryption error");var u=n.slice(1,o+1),l=n.slice(o+1),f=c(u,s(l,o)),p=c(l,s(f,r-o-1));if(i(a,p.slice(0,o)))throw new Error("decryption error");for(var h=o;0===p[h];)h++;if(1!==p[h++])throw new Error("decryption error");return p.slice(h)}function a(e,t,n){for(var r=t.slice(0,2),a=2,i=0;0!==t[a++];)if(a>=t.length){i++;break}var o=t.slice(2,a-1);t.slice(a-1,a);if(("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&i++,o.length<8&&i++,i)throw new Error("decryption error");return t.slice(a)}function i(e,n){e=new t(e),n=new t(n);var r=0,a=e.length;e.length!==n.length&&(r++,a=Math.min(e.length,n.length));for(var i=-1;++i<a;)r+=e[i]^n[i];return r}var o=n(513),s=n(906),c=n(907),u=n(57),l=n(845),d=n(467),f=n(908);e.exports=function(e,n,i){var s;s=e.padding?e.padding:i?1:4;var c=o(e),d=c.modulus.byteLength();if(n.length>d||new u(n).cmp(c.modulus)>=0)throw new Error("decryption error");var p;p=i?f(new u(n),c):l(n,c);var h=new t(d-p.length);if(h.fill(0),p=t.concat([h,p],d),4===s)return r(c,p);if(1===s)return a(c,p,i);if(3===s)return p;throw new Error("unknown padding")}}).call(t,n(39).Buffer)},function(e,t,n){"use strict";(function(e,r){function a(){
|
41 |
throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function i(e,t){if("number"!=typeof e||e!==e)throw new TypeError("offset must be a number");if(e>m||e<0)throw new TypeError("offset must be a uint32");if(e>p||e>t)throw new RangeError("offset out of range")}function o(e,t,n){if("number"!=typeof e||e!==e)throw new TypeError("size must be a number");if(e>m||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>p)throw new RangeError("buffer too small")}function s(t,n,r,a){if(!(f.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)a=n,n=0,r=t.length;else if("function"==typeof r)a=r,r=t.length-n;else if("function"!=typeof a)throw new TypeError('"cb" argument must be a function');return i(n,t.length),o(r,n,t.length),c(t,n,r,a)}function c(e,t,n,a){if(r.browser){var i=e.buffer,o=new Uint8Array(i,t,n);return h.getRandomValues(o),a?void r.nextTick(function(){a(null,e)}):e}return a?void d(n,function(n,r){if(n)return a(n);r.copy(e,t),a(null,e)}):(d(n).copy(e,t),e)}function u(t,n,r){if(void 0===n&&(n=0),!(f.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return i(n,t.length),void 0===r&&(r=t.length-n),o(r,n,t.length),c(t,n,r)}var l=n(35),d=n(235),f=l.Buffer,p=l.kMaxLength,h=e.crypto||e.msCrypto,m=Math.pow(2,32)-1;h&&h.getRandomValues||!r.browser?(t.randomFill=s,t.randomFillSync=u):(t.randomFill=a,t.randomFillSync=a)}).call(t,n(45),n(63))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(113),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(149),M=r(_),b=n(7),g=r(b),v=n(1),y=r(v),A=n(10),E=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var o=arguments.length,c=Array(o),l=0;l<o;l++)c[l]=arguments[l];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(c))),r.renderChildren=function(){var e=void 0;e=r.props&&((0,i.default)(r.props).length>1||!r.props.children)?y.default.createElement("div",r.props,r.props.children):r.props.children,r.context.store&&(e=y.default.createElement(A.Provider,{store:r.context.store},e)),M.default.render(e,r.container)},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentDidMount",value:function(){this.container=document.createElement("div"),document.body.appendChild(this.container),this.renderChildren()}},{key:"componentDidUpdate",value:function(){this.renderChildren()}},{key:"componentWillUnmount",value:function(){this.container&&(M.default.unmountComponentAtNode(this.container),document.body.removeChild(this.container),delete this.container)}},{key:"render",value:function(){return null}}]),t}(y.default.Component);E.displayName="RootChild",E.propTypes={children:g.default.node},E.contextTypes={store:g.default.object},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){var e={};return e.top=window.scrollY,e.left=window.scrollX,e.width=window.innerWidth,e.height=window.innerHeight,e.right=e.left+e.width,e.bottom=e.top+e.height,b("viewport: %o",e),e}function i(){y=a()}function o(e,t){for(var n=[e,g[e],v[e],g[v[e]]],r=-1/0,a=void 0,i=0,o=n.length;i<o;i++){var s=n[i],c=t[s];if(c>0)return s;c>r&&(r=c,a=e)}return a}function s(e,t,n,r,a,i){for(var o=t?[e+" "+t,e,e+" "+g[t]]:[e,e+" "+v[e],e+" "+g[v[e]]],s=void 0,u=0,l=a*i,d=0,f=o.length;d<f;d++){var p=o[d],h=c(p,n,r),m=h.left+a,_=h.top+i,M=Math.min(h.top<y.top?_-y.top:y.bottom-h.top,i),b=Math.min(h.left<y.left?m-y.left:y.right-h.left,a),A=b*M;if(A===l)return p;A>u&&(u=A,s=p)}return s}function c(e,t,n){var r=(0,m.default)(t);if(!r)throw new Error("could not get bounding client rect of Tip element");var a=r.width,i=r.height,o=(0,m.default)(n);if(!o)throw new Error("could not get bounding client rect of `target`");var s=o.width,c=o.height,l=u(o,document);if(!l)throw new Error("could not determine page offset of `target`");var d={};switch(e){case"top":d={top:l.top-i,left:l.left+s/2-a/2};break;case"bottom":d={top:l.top+c,left:l.left+s/2-a/2};break;case"right":d={top:l.top+c/2-i/2,left:l.left+s};break;case"left":d={top:l.top+c/2-i/2,left:l.left-a};break;case"top left":d={top:l.top-i,left:l.left+s/2-a+15};break;case"top right":d={top:l.top-i,left:l.left+s/2-15};break;case"bottom left":d={top:l.top+c,left:l.left+s/2-a+15};break;case"bottom right":d={top:l.top+c,left:l.left+s/2-15};break;case"left top":d={top:l.top+c/2-i,left:l.left-a};break;case"left bottom":d={top:l.top+c/2,left:l.left-a};break;case"right top":d={top:l.top+c/2-i,left:l.left+s};break;case"right bottom":d={top:l.top+c/2,left:l.left+s};break;default:throw new Error('invalid position "'+e+'"')}return d}function u(e,t){var n=t.body||t.getElementsByTagName("body")[0],r=t.documentElement||n.parentNode,a=r.clientTop||n.clientTop||0,i=r.clientLeft||n.clientLeft||0,o=window.pageYOffset||r.scrollTop,s=window.pageXOffset||r.scrollLeft;return{top:e.top+o-a,left:e.left+s-i}}Object.defineProperty(t,"__esModule",{value:!0}),t.isElement=t.offset=t.suggested=t.unbindWindowListeners=t.bindWindowListeners=t.constrainLeft=void 0;var l=n(59),d=r(l),f=n(909),p=r(f),h=n(1085),m=r(h),_=n(102),M=r(_),b=(0,M.default)("calypso:popover:util"),g={top:"bottom",bottom:"top",left:"right",right:"left"},v={top:"right",left:"top",bottom:"left",right:"bottom"},y=a(),A=!1,E=function(){if(A)return b("window events already bound");A=!0,b("bind handlers to `resize` and `scroll` events"),window.addEventListener("resize",i,!0),window.addEventListener("scroll",i,!0)},w=function(){if(!A)return b("window events are not bound");A=!1,b("unbind handlers to `resize` and `scroll` events"),window.removeEventListener("resize",i,!0),window.removeEventListener("scroll",i,!0)},k=function(e,t,n){var r=(0,m.default)(n),a=t.clientHeight,i=t.clientWidth,c={top:r.top-a,bottom:y.height-r.bottom-a,left:r.left-i,right:y.width-r.right-i},u=e.split(/\s+/),l=(0,p.default)(u,1),d=l[0],f=(0,p.default)(u,2),h=f[1],_=o(d,c);return h!==_&&h!==g[_]||(h=null),s(_,h,t,n,i,a)||e},T=function(e,t){var n=(0,m.default)(t).width;return e.left=Math.max(0,Math.min(e.left,y.width-n)),e},L=function(e){try{return e instanceof HTMLElement}catch(t){return"object"===(void 0===e?"undefined":(0,d.default)(e))&&1===e.nodeType&&"object"===(0,d.default)(e.style)&&"object"===(0,d.default)(e.ownerDocument)}};t.constrainLeft=T,t.bindWindowListeners=E,t.unbindWindowListeners=w,t.suggested=k,t.offset=c,t.isElement=L},function(e,t,n){e.exports={default:n(1080),__esModule:!0}},function(e,t,n){n(138),n(110),e.exports=n(1081)},function(e,t,n){var r=n(200),a=n(34)("iterator"),i=n(98);e.exports=n(20).isIterable=function(e){var t=Object(e);return void 0!==t[a]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(1083),__esModule:!0}},function(e,t,n){n(138),n(110),e.exports=n(1084)},function(e,t,n){var r=n(55),a=n(223);e.exports=n(20).getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){function r(e){var t=null,n=a(e);if(3===e.nodeType){var r=n.createRange();r.selectNodeContents(e),e=r}if("function"==typeof e.getBoundingClientRect&&(t=e.getBoundingClientRect(),e.startContainer&&0===t.left&&0===t.top)){var i=n.createElement("span");i.appendChild(n.createTextNode("")),e.insertNode(i),t=i.getBoundingClientRect();var o=i.parentNode;o.removeChild(i),o.normalize()}return t}var a=n(1086);e.exports=r},function(e,t){function n(e){return e&&e.nodeType===a}function r(e){return n(e)?e:n(e.ownerDocument)?e.ownerDocument:n(e.document)?e.document:e.parentNode?r(e.parentNode):e.commonAncestorContainer?r(e.commonAncestorContainer):e.startContainer?r(e.startContainer):e.anchorNode?r(e.anchorNode):void 0}e.exports=r;var a=9},function(e,t){},function(e,t){},function(e,t,n){e.exports=n(228)},function(e,t,n){"use strict";function r(e){return(0,a.connect)(function(e,t){return{validValues:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof(0,o.default)(t,["module","module"])&&(r=t.module.module),(0,s.getModuleOptionValidValues)(e,r,n)},getOptionCurrentValue:function(t,n){return(0,s.getModuleOption)(e,t,n)},getSettingCurrentValue:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,c.getSetting)(e,t,n)},getSiteRoles:function(){return(0,u.getSiteRoles)(e)},isUpdating:function(t){return(0,c.isUpdatingSetting)(e,t)},adminEmailAddress:(0,u.getAdminEmailAddress)(e),currentIp:(0,u.getCurrentIp)(e),siteAdminUrl:(0,u.getSiteAdminUrl)(e),isCurrentUserLinked:(0,l.isCurrentUserLinked)(e)}},function(e){return{updateOptions:function(t){return e((0,c.updateSettings)(t))},regeneratePostByEmailAddress:function(t){return e((0,c.updateSettings)(t,"regeneratePbE"))},setUnsavedSettingsFlag:function(){return e((0,c.setUnsavedSettingsFlag)())},clearUnsavedSettingsFlag:function(){return e((0,c.clearUnsavedSettingsFlag)())}}})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.connectModuleOptions=r;var a=n(10),i=n(27),o=function(e){return e&&e.__esModule?e:{default:e}}(i),s=n(23),c=n(103),u=n(28),l=n(21)},function(e,t){},function(e,t,n){function r(e){if(null==e)return 0;if(o(e))return s(e)?c(e):e.length;var t=i(e);return t==u||t==l?e.size:a(e).length}var a=n(292),i=n(115),o=n(54),s=n(490),c=n(1093),u="[object Map]",l="[object Set]";e.exports=r},function(e,t,n){function r(e){return i(e)?o(e):a(e)}var a=n(1094),i=n(913),o=n(1095);e.exports=r},function(e,t,n){var r=n(497),a=r("length");e.exports=a},function(e,t){function n(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}var r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\\ud83c[\\udffb-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",c="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",i,o].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",u="[\\ufe0e\\ufe0f]?"+s+c,l="(?:"+["[^\\ud800-\\udfff]"+r+"?",r,i,o,"[\\ud800-\\udfff]"].join("|")+")",d=RegExp(a+"(?="+a+")|"+l+u,"g");e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(47);n(1097);var y=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"getIconClassNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.plan,r=t.className,a=(0,v.getPlanClass)(n);return(0,g.default)("dops-plan-icon",a,r,e)}},{key:"getPersonalIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__personal"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 124 125"},M.default.createElement("circle",{className:"dops-plan-icon__personal-0",cx:"62",cy:"62.1",r:"62"}),M.default.createElement("path",{className:"dops-plan-icon__personal-1",d:"M64 106.1l4-9.8v-3.5H62v14.6C62.9 107.4 63.6 106.9 64 106.1z"}),M.default.createElement("path",{className:"dops-plan-icon__personal-2",d:"M56.2 92.8v3.5l4 9.8c0.3 0.8 1.1 1.3 1.9 1.3V92.8H56.2z"}),M.default.createElement("path",{className:"dops-plan-icon__personal-2",d:"M62 32.9h17.1V2.5C73.7 0.9 68 0.1 62 0.1V32.9z"}),M.default.createElement("path",{className:"dops-plan-icon__personal-3",d:"M62 32.9V0.1c0 0 0 0 0 0 -5.9 0-11.6 0.8-17 2.4v30.5H62z"}),M.default.createElement("polygon",{className:"dops-plan-icon__personal-4",points:"62 32.9 45 32.9 48.3 48.7 53.3 92.8 62 92.8 "}),M.default.createElement("polygon",{className:"dops-plan-icon__personal-5",points:"62 32.9 79.2 32.9 75.9 48.7 70.9 92.8 62 92.8 "}))}},{key:"getPremiumIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__premium"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 62 61.5"},M.default.createElement("ellipse",{className:"dops-plan-icon__premium-0",cx:"31",cy:"30.8",rx:"31",ry:"30.8"}),M.default.createElement("path",{className:"dops-plan-icon__premium-1",d:"M27.8 46.3v1.9l2.2 5.4c0.2 0.5 0.5 0.7 1 0.7v-7.9L27.8 46.3z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-2",d:"M32 53.6l2.2-5.4v-1.9H31v3.8 4.1C31.5 54.3 31.9 54 32 53.6z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-3",d:"M21.6 18c0.2 2 4.8 28.3 4.8 28.3l4.6 0.1V18H21.6z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-4",d:"M40.5 18H31v23.4 5l4.5-0.1C35.5 46.3 40.1 20.4 40.5 18z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-5",d:"M31 18V0c-3.9 0-7.7 0.7-11.2 2.1 0.7 6 1.8 15.9 1.8 15.9H31z"}),M.default.createElement("path",{className:"dops-plan-icon__premium-6",d:"M31 18h9.5c0 0 1.1-9.9 1.8-15.9C38.8 0.7 35 0 31 0V18z"}))}},{key:"getBusinessIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__business"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 124 124"},M.default.createElement("circle",{className:"dops-plan-icon__business-0",cx:"62",cy:"62",r:"62"}),M.default.createElement("path",{className:"dops-plan-icon__business-1",d:"M57.4 73.8c0-2.5 2-4.6 4.6-4.6V36.8h-9.6v12.1c-8 3.7-13.5 11.7-13.5 21.1 0 4.9 1.5 9.4 4.1 13.1l0 0c15.4 22.4 15.4 22.4 17 24.8h0.3V78.1C58.6 77.4 57.4 75.7 57.4 73.8L57.4 73.8z"}),M.default.createElement("path",{className:"dops-plan-icon__business-2",d:"M85.2 69.8c0-9.4-5.6-17.4-13.5-21.1v-12H62v32.5c2.5 0 4.6 2 4.6 4.6 0 1.9-1.2 3.5-2.9 4.2v29.8H64c1.6-2.4 1.6-2.4 17-24.8l0 0C83.6 79.2 85.2 74.7 85.2 69.8L85.2 69.8z"}),M.default.createElement("path",{className:"dops-plan-icon__business-3",d:"M48.6 32h-2.4c-3.2 0-5.8 2.6-5.8 5.8V38c0 3.2 2.6 5.8 5.8 5.8H62v-4.7V32 0c-7.2 0-14.1 1.2-20.6 3.5 1.1 5.5 2.5 11 4.1 16.5L48.6 32z"}),M.default.createElement("path",{className:"dops-plan-icon__business-4",d:"M62 39.1v4.7h15.8c3.2 0 5.8-2.6 5.8-5.8v-0.2c0-3.2-2.6-5.8-5.8-5.8h-2.4l3.1-12c1.6-5.5 3-11 4.1-16.5C76.1 1.2 69.2 0 62 0v32V39.1z"}))}},{key:"getDefaultIcon",value:function(){return M.default.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__free"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 61.8 61.8"},M.default.createElement("circle",{className:"dops-plan-icon__free-0",cx:"30.9",cy:"30.9",r:"30.9"}),M.default.createElement("polygon",{className:"dops-plan-icon__free-1",points:"41.4 32.8 30.9 22.5 20.3 32.8 30.9 51.8 "}),M.default.createElement("path",{className:"dops-plan-icon__free-2",d:"M30.9 41.6L30.9 41.6c-2 0-3.7 1.6-3.7 3.6l3.7 6.5 3.7-6.5C34.5 43.2 32.9 41.6 30.9 41.6L30.9 41.6z"}),M.default.createElement("path",{className:"dops-plan-icon__free-3",d:"M25.6 27.7c0 2.9 2.3 5.2 5.2 5.2h0.1c2.9 0 5.2-2.3 5.2-5.2v-0.1V0.4c-1.7-0.3-3.5-0.5-5.3-0.5s-3.6 0.2-5.3 0.5v27.3H25.6z"}),M.default.createElement("path",{className:"dops-plan-icon__free-4",d:"M25.6 27.6V0.4c-1.8 0.3-3.6 0.8-5.3 1.4v31C23.2 32.8 25.6 30.5 25.6 27.6z"}),M.default.createElement("path",{className:"dops-plan-icon__free-2",d:"M41.4 32.8v-31c-1.7-0.6-3.5-1.1-5.3-1.4v27.2C36.1 30.5 38.5 32.8 41.4 32.8z"}))}},{key:"render",value:function(){switch(this.props.plan){case v.PLAN_PERSONAL:case v.PLAN_JETPACK_PERSONAL:case v.PLAN_JETPACK_PERSONAL_MONTHLY:return this.getPersonalIcon();case v.PLAN_PREMIUM:case v.PLAN_JETPACK_PREMIUM:case v.PLAN_JETPACK_PREMIUM_MONTHLY:return this.getPremiumIcon();case v.PLAN_BUSINESS:case v.PLAN_JETPACK_BUSINESS:case v.PLAN_JETPACK_BUSINESS_MONTHLY:case v.PLAN_VIP:return this.getBusinessIcon();default:return this.getDefaultIcon()}}}]),t}(_.Component);t.default=y,y.propTypes={classNames:m.default.string,plan:m.default.oneOf([v.PLAN_FREE,v.PLAN_PREMIUM,v.PLAN_BUSINESS,v.PLAN_JETPACK_FREE,v.PLAN_JETPACK_BUSINESS,v.PLAN_JETPACK_BUSINESS_MONTHLY,v.PLAN_JETPACK_PREMIUM,v.PLAN_JETPACK_PREMIUM_MONTHLY,v.PLAN_JETPACK_PERSONAL,v.PLAN_JETPACK_PERSONAL_MONTHLY,v.PLAN_PERSONAL,v.PLAN_VIP]).isRequired},e.exports=t.default},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),i=r(a),o=n(1),s=r(o),c=n(32),u=r(c),l=n(64),d=r(l),f=n(833),p=r(f),h=n(65),m=r(h),_=n(14),M=r(_),b=n(15),g=r(b);n(1101),t.default=(0,u.default)({displayName:"InfoPopover",propTypes:{id:i.default.string,position:i.default.string,className:i.default.string,rootClassName:i.default.string,gaEventCategory:i.default.string,popoverName:i.default.string,onClick:i.default.func,ignoreContext:i.default.shape({getDOMNode:i.default.function})},getDefaultProps:function(){return{position:"bottom",onClick:d.default}},getInitialState:function(){return{showPopover:!1}},render:function(){var e=(0,M.default)("dops-info-popover","dops-info-popover-button",{is_active:this.state.showPopover},this.props.className);return s.default.createElement("button",{ref:"infoPopover",className:e,onClick:this._onClick},s.default.createElement(m.default,{icon:"info-outline",size:18}),this.props.screenReaderText?s.default.createElement("span",{className:"screen-reader-text"},this.props.screenReaderText):"",s.default.createElement(p.default,{id:this.props.id,isVisible:this.state.showPopover,context:this.refs&&this.refs.infoPopover,ignoreContext:this.props.ignoreContext,position:this.props.position,onClose:this._onClose,className:(0,M.default)("dops-info-popover__tooltip",this.props.className),rootClassName:this.props.rootClassName},this.props.children))},_onClick:function(e){this.props.onClick(),e.preventDefault(),this.setState({showPopover:!this.state.showPopover},this._recordStats)},_onClose:function(){this.setState({showPopover:!1},this._recordStats)},_recordStats:function(){var e=this.props,t=e.gaEventCategory,n=e.popoverName;if(t&&n){var r=this.state.showPopover?" Opened":" Closed";g.default.ga.recordEvent(t,"InfoPopover: "+n+r)}}}),e.exports=t.default},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Subscriptions=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(8),y=n(104),A=r(y),E=n(25),w=r(E),k=n(15),T=r(k),L=n(71),S=n(52),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={stb_enabled:r.props.getOptionValue("stb_enabled","subscriptions"),stc_enabled:r.props.getOptionValue("stc_enabled","subscriptions")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("subscriptions",e))},r.trackConfigureClick=function(){T.default.tracks.recordJetpackClick("view-followers")},r.handleSubscribeToBlogToggleChange=function(){r.updateOptions("stb_enabled")},r.handleSubscribeToCommentToggleChange=function(){r.updateOptions("stc_enabled")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props.getModule("subscriptions"),n=this.props.getOptionValue("subscriptions"),r=this.props.isUnavailableInDevMode("subscriptions");return g.default.createElement(z.default,(0,i.default)({},this.props,{hideButton:!0,module:"subscriptions"}),g.default.createElement(D.default,{hasChild:!0,disableInDevMode:!0,module:t,support:{text:(0,v.translate)("Allows readers to subscribe to your posts or comments, and receive notifications of new content by email."),link:"https://jetpack.com/support/subscriptions/"}},g.default.createElement(S.ModuleToggle,{slug:"subscriptions",disabled:r,activated:n,toggling:this.props.isSavingAnyOption("subscriptions"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},t.description)),g.default.createElement(L.FormFieldset,null,g.default.createElement(A.default,{checked:this.state.stb_enabled,disabled:!n||r||this.props.isSavingAnyOption(["subscriptions","stb_enabled"]),onChange:this.handleSubscribeToBlogToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)('Show a "follow blog" option in the comment form'))),g.default.createElement(A.default,{checked:this.state.stc_enabled,disabled:!n||r||this.props.isSavingAnyOption(["subscriptions","stc_enabled"]),onChange:this.handleSubscribeToCommentToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)('Show a "follow comments" option in the comment form'))))),function(){return r||!n?"":e.props.isLinked?g.default.createElement(w.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackConfigureClick,href:"https://wordpress.com/people/email-followers/"+e.props.siteRawUrl},(0,v.translate)("View your Email Followers")):g.default.createElement(w.default,{compact:!0,className:"jp-settings-card__configure-link",href:e.props.connectUrl+"&from=unlinked-user-connect-masterbar"},(0,v.translate)("Connect your user account to WordPress.com to view your email followers")," ")}())}}]),t}(g.default.Component);t.Subscriptions=(0,C.ModuleSettingsForm)(P)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Security=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(27),b=r(M),g=n(23),v=n(103),y=n(21),A=n(74),E=n(210),w=n(211),k=r(w),T=n(912),L=r(T),S=n(1106),C=r(S),O=n(1107),z=r(O),N=n(1119),D=n(1120),P=n(1123),x=t.Security=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.isAkismetFound=function(){if(!r.props.isPluginActive("akismet/akismet.php"))return!1;if(r.props.searchTerm){var e=r.props.isPluginInstalled("akismet/akismet.php");return["akismet","antispam","spam","comments",e.Description,e.PluginURI].join(" ").toLowerCase().indexOf(r.props.searchTerm.toLowerCase())>-1}return!0},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,rewindStatus:this.props.rewindStatus,siteRawUrl:this.props.siteRawUrl},t=this.props.isModuleFound("protect"),n=this.props.isModuleFound("sso"),r=this.isAkismetFound(),a="active"===(0,b.default)(this.props.rewindStatus,["state"],!1),i=this.props.isModuleFound("vaultpress")||a,o=this.props.isModuleFound("monitor");return(this.props.searchTerm||this.props.active)&&(n||t||r||i||o)?m.default.createElement("div",null,m.default.createElement(k.default,null),i&&m.default.createElement(C.default,e),o&&m.default.createElement(N.Monitor,e),r&&m.default.createElement("div",null,m.default.createElement(z.default,e),m.default.createElement(L.default,null)),t&&m.default.createElement(D.Protect,e),n&&m.default.createElement(P.SSO,e)):null}}]),t}(h.Component);x.displayName="SecuritySettings",t.default=(0,_.connect)(function(e){return{module:function(t){return(0,g.getModule)(e,t)},settings:(0,v.getSettings)(e),isDevMode:(0,y.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,y.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,A.isModuleFound)(e,t)},isPluginActive:function(t){return(0,E.isPluginActive)(e,t)},isPluginInstalled:function(t){return(0,E.isPluginInstalled)(e,t)}}})(x)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.BackupsScan=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(25),y=r(v),A=n(15),E=r(A),w=n(27),k=r(w),T=n(47),L=n(850),S=r(L),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=n(62),x=n(61),j=n(44),R=r(j),Y=n(23),I=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(z.default,{header:(0,g.translate)("Backups and security scanning",{context:"Settings header"}),hideButton:!0,action:"scan"},M.default.createElement(D.default,{disableInDevMode:!0,module:{module:"backups"},support:{text:(0,g.translate)("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:"https://help.vaultpress.com/get-to-know/"}},(0,g.translate)("Checking site status…")))}}]),t}(_.Component),q=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.getCardText=function(){return r.props.isDevMode?(0,g.translate)("Unavailable in Dev Mode."):M.default.createElement(S.default,{title:(0,g.translate)("Connected"),icon:"checkmark-circle",feature:"rewind",description:(0,g.translate)("Your site is being backed up in real time and regularly scanned for security threats."),className:"is-upgrade-premium jp-banner__no-border",href:"https://wordpress.com/stats/activity/"+r.props.siteRawUrl})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(z.default,(0,i.default)({feature:"rewind"},this.props,{header:(0,g.translate)("Backups and security scanning",{context:"Settings header"}),action:"rewind",hideButton:!0}),this.getCardText())}}]),t}(_.Component),B=t.BackupsScan=(0,C.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.toggleModule=function(e,t){r.props.updateFormStateOptionValue(e,!t)},r.trackConfigureClick=function(){E.default.tracks.recordJetpackClick("configure-scan")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"getCardText",value:function(){var e=(0,k.default)(this.props.vaultPressData,["data","features","backups"],!1),t=(0,k.default)(this.props.vaultPressData,["data","features","security"],!1),n=(0,T.getPlanClass)(this.props.sitePlan.product_slug),r="";if(this.props.isDevMode)return(0,g.translate)("Unavailable in Dev Mode.");if(e&&t){var a=this.props.hasThreats;return a?M.default.createElement("div",null,M.default.createElement("strong",null,(0,g.translate)("Uh oh, %(number)s threat found.","Uh oh, %(number)s threats found.",{count:a,args:{number:(0,g.numberFormat)(a)}})),M.default.createElement("br",null),M.default.createElement("br",null),(0,g.translate)("{{a}}View details{{/a}}",{components:{a:M.default.createElement("a",{href:"https://dashboard.vaultpress.com/"})}}),M.default.createElement("br",null),(0,g.translate)("{{a}}Contact Support{{/a}}",{components:{a:M.default.createElement("a",{href:"https://jetpack.com/support"})}})):(0,g.translate)("Your site is backed up and threat-free.")}if(e&&(0,R.default)(["is-free-plan","is-personal-plan"],n))return(0,g.translate)("Your site is backed up.");switch(n){case"is-personal-plan":r=(0,g.translate)("You have paid for backups but they're not yet active."),r+=" "+(0,g.translate)('Click "Set Up" to finish installation.');break;case"is-premium-plan":case"is-business-plan":r=(0,g.translate)("You have paid for backups and security scanning but they’re not yet active."),r+=" "+(0,g.translate)('Click "Set Up" to finish installation.')}return r}},{key:"render",value:function(){var e=(0,k.default)(this.props.vaultPressData,["data","features","security"],!1),t="active"===(0,k.default)(this.props.rewindStatus,["state"],!1),n=!1!==(0,k.default)(this.props.rewindStatus,["state"],!1),r="N/A"!==this.props.vaultPressData&&!1!==(0,k.default)(this.props.vaultPressData,["data"],!1);return!n||this.props.vaultPressActive&&!r?M.default.createElement(I,null):t?M.default.createElement(q,this.props):M.default.createElement(z.default,(0,i.default)({feature:T.FEATURE_SECURITY_SCANNING_JETPACK},this.props,{header:(0,g.translate)("Backups and security scanning",{context:"Settings header"}),action:"scan",hideButton:!0}),M.default.createElement(D.default,{disableInDevMode:!0,module:{module:"backups"},support:{text:(0,g.translate)("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:"https://help.vaultpress.com/get-to-know/"}},this.getCardText()),!this.props.isUnavailableInDevMode("backups")&&e&&M.default.createElement(y.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:"https://dashboard.vaultpress.com/"},(0,g.translate)("Configure your Security Scans")))}}]),t}(_.Component));t.default=(0,b.connect)(function(e){return{sitePlan:(0,x.getSitePlan)(e),vaultPressData:(0,P.getVaultPressData)(e),hasThreats:(0,P.getVaultPressScanThreatCount)(e),vaultPressActive:(0,Y.isModuleActivated)(e,"vaultpress")}})(B)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Antispam=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(508),y=r(v),A=n(516),E=r(A),w=n(1110),k=r(w),T=n(65),L=r(T),S=n(505),C=r(S),O=n(24),z=r(O),N=n(234),D=r(N),P=n(1112),x=r(P),j=n(62),R=n(47),Y=n(15),I=r(Y),q=n(71),B=n(30),W=n(40),U=r(W),H=n(36),F=r(H),X=t.Antispam=(0,B.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.state={apiKey:r.props.getOptionValue("wordpress_api_key"),delayKeyCheck:!1,currentEvent:{}},r.keyChanged=!1,r.checkApiKeyTyped=function(e){0<e.currentTarget.value.length&&r.props.checkAkismetKey(e.currentTarget.value),r.keyChanged=!0,r.setState({delayKeyCheck:!1})},r.updateText=function(e){var t=(0,z.default)({},e);t.currentTarget.value=(0,x.default)(t.currentTarget.value),r.setState({apiKey:t.currentTarget.value,delayKeyCheck:!0,currentEvent:t},r.debouncedCheckApiKeyTyped(t))},r.trackOpenCard=function(){I.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"anti-spam"})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentWillMount",value:function(){this.debouncedCheckApiKeyTyped=(0,C.default)(this.checkApiKeyTyped,500)}},{key:"componentDidUpdate",value:function(){!this.props.isCheckingAkismetKey&&this.props.isAkismetKeyValid&&this.keyChanged&&!(0,D.default)(this.state.currentEvent)&&(this.keyChanged=!1,this.props.onOptionChange(this.state.currentEvent))}},{key:"render",value:function(){var e={name:"wordpress_api_key",value:this.state.apiKey,disabled:this.props.isSavingAnyOption("wordpress_api_key"),onChange:this.updateText},t="",n=(0,g.translate)("Checking your spam protection…"),r=!0;return null===this.props.isAkismetKeyValid?(e.value=(0,g.translate)("Fetching key…"),e.disabled=!0,r=!1):""===this.state.apiKey?(e.value="",n=(0,
|
42 |
+
g.translate)("Your site needs an Antispam key.")):this.state.delayKeyCheck||this.props.isCheckingAkismetKey?this.props.isCheckingAkismetKey&&(t=M.default.createElement("div",{className:"form-input-validation is-warning"},M.default.createElement("span",null,M.default.createElement(L.default,{size:24,icon:"sync"}),(0,g.translate)("Checking key…"))),r=!1):!1===this.props.isAkismetKeyValid?(t=M.default.createElement(k.default,{isError:!0,text:(0,g.translate)("There's a problem with your Antispam API key. {{a}}Learn more{{/a}}.",{components:{a:M.default.createElement("a",{href:"https://docs.akismet.com/getting-started/api-key/"})}})}),e.isError=!0,n=(0,g.translate)("Your site is not protected from spam.")):(t=M.default.createElement(k.default,{text:(0,g.translate)("Your Antispam key is valid.")}),e.isValid=!0,n=(0,g.translate)("Your site is protected from spam."),r=!1),M.default.createElement(U.default,(0,i.default)({},this.props,{header:(0,g.translate)("Spam filtering",{context:"Settings header"}),saveDisabled:this.props.isSavingAnyOption("wordpress_api_key"),feature:R.FEATURE_SPAM_AKISMET_PLUS}),M.default.createElement(E.default,{onOpen:this.trackOpenCard,header:n},M.default.createElement(F.default,{support:{text:(0,g.translate)("Removes spam from comments and contact forms."),link:"https://akismet.com/jetpack/"}},M.default.createElement(q.FormFieldset,null,M.default.createElement(q.FormLabel,null,M.default.createElement("span",{className:"jp-form-label-wide"},(0,g.translate)("Your API key")),M.default.createElement(y.default,e),t),r&&M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)("If you don't already have an API key, then {{a}}get your API key here{{/a}}, and you'll be guided through the process of getting one.",{components:{a:M.default.createElement("a",{href:"https://akismet.com/wordpress/"})}}))))))}}]),t}(_.Component));t.default=(0,b.connect)(function(e){return{isAkismetKeyValid:(0,j.isAkismetKeyValid)(e),isCheckingAkismetKey:(0,j.isCheckingAkismetKey)(e)}},function(e){return{checkAkismetKey:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e((0,j.checkAkismetKey)(t))}}})(X)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(24),_=n(14),M=n(25),b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=m({},this.props,{className:_(this.props.className,"is-compact")});return h.createElement(M,e,this.props.children)}}]),t}(h.Component);b.displayName="CompactCard",t.default=b,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14),M=n(65);n(1111);var b=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=_({"form-input-validation":!0,"is-warning":this.props.isWarning,"is-error":this.props.isError}),t=this.props.isError||this.props.isWarning?"notice-outline":"checkmark";return m.createElement("div",{className:e},m.createElement("span",null,m.createElement(M,{size:24,icon:this.props.icon?this.props.icon:t})," ",this.props.text))}}]),t}(m.Component);b.displayName="FormInputValidation",b.propTypes={isError:h.bool,isWarning:h.bool,text:h.node,icon:h.string},b.defaultProps={isError:!1},t.default=b,e.exports=t.default},function(e,t){},function(e,t,n){function r(e,t,n){if((e=u(e))&&(n||void 0===t))return e.replace(l,"");if(!e||!(t=a(t)))return e;var r=c(e),d=c(t),f=s(r,d),p=o(r,d)+1;return i(r,f,p).join("")}var a=n(489),i=n(1113),o=n(1114),s=n(1115),c=n(1116),u=n(224),l=/^\s+|\s+$/g;e.exports=r},function(e,t,n){function r(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:a(e,t,n)}var a=n(466);e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--&&a(t,e[n],0)>-1;);return n}var a=n(226);e.exports=r},function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&a(t,e[n],0)>-1;);return n}var a=n(226);e.exports=r},function(e,t,n){function r(e){return i(e)?o(e):a(e)}var a=n(1117),i=n(913),o=n(1118);e.exports=r},function(e,t){function n(e){return e.split("")}e.exports=n},function(e,t){function n(e){return e.match(d)||[]}var r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\\ud83c[\\udffb-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",c="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",i,o].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",u="[\\ufe0e\\ufe0f]?"+s+c,l="(?:"+["[^\\ud800-\\udfff]"+r+"?",r,i,o,"[\\ud800-\\udfff]"].join("|")+")",d=RegExp(a+"(?="+a+")|"+l+u,"g");e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Monitor=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(15),v=r(g),y=n(25),A=r(y),E=n(52),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L);t.Monitor=(0,w.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.trackConfigureClick=function(){v.default.tracks.recordJetpackClick("configure-monitor")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("monitor"),t=this.props.isUnavailableInDevMode("monitor");return M.default.createElement(T.default,(0,i.default)({},this.props,{hideButton:!0,module:"monitor",header:(0,b.translate)("Downtime monitoring",{context:"Settings header"})}),M.default.createElement(S.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("monitor"),support:{text:(0,b.translate)("Keep tabs on your site and receive alerts the moment downtime is detected."),link:"https://jetpack.com/support/monitor/"}},M.default.createElement(E.ModuleToggle,{slug:"monitor",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("monitor"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Monitor your site's downtime")))),M.default.createElement(A.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:"https://wordpress.com/settings/security/"+this.props.siteRawUrl},(0,b.translate)("Configure your notification settings")))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Protect=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(41),v=r(g),y=n(1121),A=r(y),E=n(44),w=r(E),k=n(516),T=r(k),L=n(14),S=r(L),C=n(15),O=r(C),z=n(71),N=n(52),D=n(30),P=n(40),x=r(P),j=n(36),R=r(j);t.Protect=(0,D.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.state={whitelist:r.props.getOptionValue("jetpack_protect_global_whitelist")?r.props.getOptionValue("jetpack_protect_global_whitelist").local:""},r.currentIpIsWhitelisted=function(){return!!(0,w.default)(r.state.whitelist,r.props.currentIp)},r.updateText=function(e){r.currentIpIsWhitelisted(),r.setState({whitelist:e.target.value}),r.props.onOptionChange(e)},r.addToWhitelist=function(){var e=r.state.whitelist+(0>=r.state.whitelist.length?"":"\n")+r.props.currentIp;r.props.updateFormStateOptionValue("jetpack_protect_global_whitelist",e),r.setState({whitelist:e}),O.default.tracks.recordJetpackClick({target:"add-to-whitelist",feature:"protect"})},r.trackOpenCard=function(){O.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"protect"})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("protect"),t=this.props.isUnavailableInDevMode("protect"),n=M.default.createElement(N.ModuleToggle,{slug:"protect",compact:!0,disabled:t,activated:e,toggling:this.props.isSavingAnyOption("protect"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.getModule("protect").description));return M.default.createElement(x.default,(0,i.default)({},this.props,{module:"protect",header:(0,b.translate)("Brute force attack protection",{context:"Settings header"}),saveDisabled:this.props.isSavingAnyOption("jetpack_protect_global_whitelist")}),M.default.createElement(T.default,{onOpen:this.trackOpenCard,header:n,className:(0,S.default)({"jp-foldable-settings-disable":t})},M.default.createElement(R.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("protect"),support:{text:(0,b.translate)("Protects your site from traditional and distributed brute force login attacks."),link:"https://jetpack.com/support/protect/"}},M.default.createElement(z.FormFieldset,null,this.props.currentIp&&M.default.createElement("div",null,M.default.createElement("div",{className:"jp-form-label-wide"},(0,b.translate)("Your current IP: %(ip)s",{args:{ip:this.props.currentIp}})),M.default.createElement(v.default,{disabled:!e||t||this.currentIpIsWhitelisted()||this.props.isSavingAnyOption(["protect","jetpack_protect_global_whitelist"]),onClick:this.addToWhitelist},(0,b.translate)("Add to whitelist"))),M.default.createElement(z.FormLabel,null,M.default.createElement(z.FormLegend,null,(0,b.translate)("Whitelisted IP addresses")),M.default.createElement(A.default,{disabled:!e||t||this.props.isSavingAnyOption(["protect","jetpack_protect_global_whitelist"]),name:"jetpack_protect_global_whitelist",placeholder:"Example: 12.12.12.1-12.12.12.100",onChange:this.updateText,value:this.state.whitelist})),M.default.createElement("span",{className:"jp-form-setting-explanation"},(0,b.translate)("You may whitelist an IP address or series of addresses preventing them from ever being blocked by Jetpack. IPv4 and IPv6 are acceptable. To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100",{components:{br:M.default.createElement("br",null)}}))))))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=n(14),b=n(116);n(1122);var g=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return _.createElement("textarea",(0,i.default)({},b(this.props,"className"),{className:M(this.props.className,"dops-textarea")}),this.props.children)}}]),t}(_.Component);g.displayName="Textarea",t.default=g,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SSO=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(8),y=n(104),A=r(y),E=n(71),w=n(52),k=n(30),T=n(40),L=r(T),S=n(36),C=r(S);t.SSO=(0,k.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={jetpack_sso_match_by_email:r.props.getOptionValue("jetpack_sso_match_by_email","sso"),jetpack_sso_require_two_step:r.props.getOptionValue("jetpack_sso_require_two_step","sso")},r.handleTwoStepToggleChange=function(){r.updateOptions("jetpack_sso_require_two_step")},r.handleMatchByEmailToggleChange=function(){r.updateOptions("jetpack_sso_match_by_email")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("sso",e))},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("sso"),t=this.props.isUnavailableInDevMode("sso");return g.default.createElement(L.default,(0,i.default)({},this.props,{hideButton:!0,module:"sso",header:(0,v.translate)("WordPress.com log in",{context:"Settings header"})}),g.default.createElement(C.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("sso"),support:{text:(0,v.translate)("Allows registered users to log in to your site with their WordPress.com accounts."),link:"https://jetpack.com/support/sso/"}},g.default.createElement(w.ModuleToggle,{slug:"sso",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("sso"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.getModule("sso").description)),g.default.createElement(E.FormFieldset,null,g.default.createElement(A.default,{checked:this.state.jetpack_sso_match_by_email,disabled:!e||t||this.props.isSavingAnyOption(["sso","jetpack_sso_match_by_email"]),onChange:this.handleMatchByEmailToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Match accounts using email addresses"))),g.default.createElement(A.default,{checked:this.state.jetpack_sso_require_two_step,disabled:!e||t||this.props.isSavingAnyOption(["sso","jetpack_sso_require_two_step"]),onChange:this.handleTwoStepToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Require accounts to use WordPress.com Two-Step Authentication"))))))}}]),t}(b.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Traffic=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(23),v=n(103),y=n(21),A=n(74),E=n(211),w=r(E),k=n(1125),T=n(1126),L=n(1127),S=n(1128),C=n(1129),O=n(1130),z=r(O),N=n(1131),D=n(1132),P=r(D),x=n(28),j=t.Traffic=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,siteRawUrl:this.props.siteRawUrl,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,getModuleOverride:this.props.getModuleOverride},t=this.props.isModuleFound("seo-tools"),n=this.props.isModuleFound("wordads"),r=this.props.isModuleFound("stats"),a=this.props.isModuleFound("related-posts"),o=this.props.isModuleFound("verification-tools"),s=this.props.isModuleFound("sitemaps"),c=this.props.isModuleFound("search"),u=this.props.isModuleFound("google-analytics");return(this.props.searchTerm||this.props.active)&&(t||n||r||a||o||s||u||c)?M.default.createElement("div",null,M.default.createElement(w.default,null),r&&M.default.createElement(S.SiteStats,e),c&&M.default.createElement(z.default,e),n&&M.default.createElement(L.Ads,(0,i.default)({},e,{configureUrl:"https://wordpress.com/ads/earnings/"+this.props.siteRawUrl})),a&&M.default.createElement(C.RelatedPosts,(0,i.default)({},e,{configureUrl:this.props.siteAdminUrl+"customize.php?autofocus[section]=jetpack_relatedposts&return="+encodeURIComponent(this.props.siteAdminUrl+"admin.php?page=jetpack#/traffic")+"&url="+encodeURIComponent(this.props.lastPostUrl)})),t&&M.default.createElement(k.SEO,(0,i.default)({},e,{configureUrl:"https://wordpress.com/settings/traffic/"+this.props.siteRawUrl+"#seo"})),u&&M.default.createElement(T.GoogleAnalytics,(0,i.default)({},e,{configureUrl:"https://wordpress.com/settings/traffic/"+this.props.siteRawUrl+"#analytics"})),s&&M.default.createElement(P.default,e),o&&M.default.createElement(N.VerificationServices,e)):null}}]),t}(M.default.Component);j.displayName="TrafficSettings",t.default=(0,b.connect)(function(e){return{module:function(t){return(0,g.getModule)(e,t)},settings:(0,v.getSettings)(e),isDevMode:(0,y.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,y.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,A.isModuleFound)(e,t)},lastPostUrl:(0,x.getLastPostUrl)(e),getModuleOverride:function(t){return(0,g.getModuleOverride)(e,t)}}})(j)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SEO=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(47),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L),C=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.trackConfigureClick=function(){A.default.tracks.recordJetpackClick("configure-seo")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(T.default,(0,i.default)({},this.props,{header:(0,b.translate)("Search engine optimization",{context:"Settings header"}),feature:E.FEATURE_SEO_TOOLS_JETPACK,hideButton:!0}),M.default.createElement(S.default,{disableInDevMode:!0,module:{module:"seo-tools"},support:{text:(0,b.translate)("Allows you to optimize your site and its content for better results in search engines."),link:"https://jetpack.com/support/seo-tools/"}},M.default.createElement("span",null,(0,b.translate)("You can tweak these settings if you'd like more advanced control. Read more about what you can do to {{a}}optimize your site's SEO{{/a}}.",{components:{a:M.default.createElement("a",{href:"https://jetpack.com/support/seo-tools/"})}}))),!this.props.isUnavailableInDevMode("seo-tools")&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},(0,b.translate)("Configure your SEO settings")))}}]),t}(M.default.Component);t.SEO=(0,w.ModuleSettingsForm)(C)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(47),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L);t.GoogleAnalytics=(0,w.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"trackConfigureClick",value:function(){A.default.tracks.recordJetpackClick("configure-ga")}},{key:"render",value:function(){return M.default.createElement(T.default,(0,i.default)({},this.props,{header:(0,b.translate)("Google Analytics",{context:"Settings header"}),feature:E.FEATURE_GOOGLE_ANALYTICS_JETPACK,hideButton:!0}),M.default.createElement(S.default,{disableInDevMode:!0,module:{module:"google-analytics"},support:{text:(0,b.translate)("Integrates your WordPress site with Google Analytics, a platform that offers insights into your traffic, visitors, and conversions."),link:"https://jetpack.com/support/google-analytics/"}},M.default.createElement("p",null,(0,b.translate)("Google Analytics is a free service that complements our {{a}}built-in stats{{/a}} with different insights into your traffic. WordPress.com stats and Google Analytics use different methods to identify and track activity on your site, so they will normally show slightly different totals for your visits, views, etc.",{components:{a:M.default.createElement("a",{href:"https://wordpress.com/stats/day/"+this.props.siteRawUrl})}}))),!this.props.isUnavailableInDevMode("google-analytics")&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},(0,b.translate)("Configure your Google Analytics settings")))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Ads=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(104),A=r(y),E=n(15),w=r(E),k=n(47),T=n(71),L=n(30),S=n(52),C=n(40),O=r(C),z=n(36),N=r(z);t.Ads=(0,L.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.updateOptions=function(e){r.props.updateFormStateModuleOption("wordads",e)},r.trackConfigureClick=function(){w.default.tracks.recordJetpackClick("view-earnings")},r.trackConfigureWidgetClick=function(){w.default.tracks.recordJetpackClick("place_ad_widget")},r.handleChange=function(e){return function(){return r.updateOptions(e)}},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("wordads"),t=this.props.isUnavailableInDevMode("wordads"),n=this.props.getOptionValue("enable_header_ad","wordads"),r=this.props.getOptionValue("wordads_second_belowpost","wordads"),a=this.props.getOptionValue("wordads_display_front_page","wordads"),o=this.props.getOptionValue("wordads_display_post","wordads"),s=this.props.getOptionValue("wordads_display_page","wordads"),c=this.props.getOptionValue("wordads_display_archive","wordads");return M.default.createElement(O.default,(0,i.default)({},this.props,{header:(0,b.translate)("Ads",{context:"Ads header"}),feature:k.FEATURE_WORDADS_JETPACK,hideButton:!0}),M.default.createElement(N.default,{disableInDevMode:!0,hasChild:!0,module:{module:"wordads"},support:{text:(0,b.translate)("Displays high-quality ads on your site that allow you to earn income."),link:"https://jetpack.com/support/ads/"}},M.default.createElement("p",null,(0,b.translate)("Show ads on the first article on your home page or at the end of every page and post. Place additional ads at the top of your site and to any widget area to increase your earnings."),M.default.createElement("br",null),M.default.createElement("small",{className:"jp-form-setting-explanation"},(0,b.translate)("By activating ads, you agree to the Automattic Ads {{link}}Terms of Service{{/link}}.",{components:{link:M.default.createElement("a",{href:"https://wordpress.com/automattic-ads-tos/",target:"_blank",rel:"noopener noreferrer",onClick:this.trackConfigureWidgetClick})}}))),M.default.createElement(S.ModuleToggle,{slug:"wordads",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("wordads"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Enable ads and display an ad below each post"))),M.default.createElement(T.FormFieldset,null,M.default.createElement(T.FormLegend,null,(0,b.translate)("Display ads below posts on")),M.default.createElement(A.default,{checked:a,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_front_page"]),onChange:this.handleChange("wordads_display_front_page")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Front page"))),M.default.createElement(A.default,{checked:o,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_post"]),onChange:this.handleChange("wordads_display_post")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Posts"))),M.default.createElement(A.default,{checked:s,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_page"]),onChange:this.handleChange("wordads_display_page")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Pages"))),M.default.createElement(A.default,{checked:c,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_archive"]),onChange:this.handleChange("wordads_display_archive")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Archives")))),M.default.createElement(T.FormFieldset,null,M.default.createElement(T.FormLegend,null,(0,b.translate)("Additional ad placements")),M.default.createElement(A.default,{checked:n,disabled:!e||t||this.props.isSavingAnyOption(["wordads","enable_header_ad"]),onChange:this.handleChange("enable_header_ad")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Top of each page"))),M.default.createElement(A.default,{checked:r,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_second_belowpost"]),onChange:this.handleChange("wordads_second_belowpost")},M.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,b.translate)("Second ad below post"))),M.default.createElement("small",{className:"jp-form-setting-explanation"},e&&(0,b.translate)("You can place additional ads using the Ad widget. {{link}}Try it out!{{/link}}",{components:{link:M.default.createElement("a",{className:"jp-module-settings__external-link",href:"customize.php?autofocus[panel]=widgets"})}})))),!t&&e&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},(0,b.translate)("View your earnings")))}}]),t}(M.default.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SiteStats=void 0;var a=n(11),i=r(a),o=n(113),s=r(o),c=n(51),u=r(c),l=n(2),d=r(l),f=n(3),p=r(f),h=n(6),m=r(h),_=n(4),M=r(_),b=n(5),g=r(b),v=n(1),y=r(v),A=n(8),E=n(104),w=r(E),k=n(516),T=r(k),L=n(41),S=r(L),C=n(25),O=r(C),z=n(44),N=r(z),D=n(459),P=r(D),x=n(14),j=r(x),R=n(80),Y=n(15),I=r(Y),q=n(71),B=n(30),W=n(36),U=r(W),H=n(40),F=r(H),X=n(515),V=r(X),K=function(e){function t(e){(0,p.default)(this,t);var n=(0,M.default)(this,(t.__proto__||(0,d.default)(t)).call(this,e));n.updateOptions=function(e,t){var r=n.props.getOptionValue(t,"stats"),a=!1;n.state[t+"_"+e]?(0,N.default)(r,e)&&(r=(0,P.default)(r,function(t){return t!==e})):(0,N.default)(r,e)||(r.push(e),a=!0),n.setState((0,u.default)({},t+"_"+e,!n.state[t+"_"+e]),function(){n.props.updateOptions((0,u.default)({},t,r))}),I.default.tracks.recordEvent("jetpack_wpa_settings_toggle",{module:"stats",setting:t,role:e,toggled:a?"on":"off"})},n.activateStats=function(){n.props.updateOptions({stats:!0})},n.trackOpenCard=function(){I.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"stats"})},n.handleRoleToggleChange=function(e,t){return function(){return n.updateOptions(e,t)}};var r=e.getOptionValue("count_roles","stats"),a=e.getOptionValue("roles","stats");return n.state={count_roles:r,roles:a,count_roles_administrator:(0,N.default)(r,"administrator",!1),count_roles_editor:(0,N.default)(r,"editor",!1),count_roles_author:(0,N.default)(r,"author",!1),count_roles_contributor:(0,N.default)(r,"contributor",!1),count_roles_subscriber:(0,N.default)(r,"subscriber",!1),roles_administrator:!0,roles_editor:(0,N.default)(a,"editor",!1),roles_author:(0,N.default)(a,"author",!1),roles_contributor:(0,N.default)(a,"contributor",!1),roles_subscriber:(0,N.default)(a,"subscriber",!1)},n}return(0,g.default)(t,e),(0,m.default)(t,[{key:"handleStatsOptionToggle",value:function(e){var t=this;return function(){return t.props.updateFormStateModuleOption("stats",e)}}},{key:"render",value:function(){var e=this,t=this.props.getModule("stats"),n=this.props.getOptionValue("stats"),r=this.props.isUnavailableInDevMode("stats"),a=this.props.getSiteRoles();return"inactive"===this.props.getModuleOverride("stats")?y.default.createElement(V.default,{moduleName:t.name}):n?y.default.createElement(F.default,(0,i.default)({},this.props,{header:(0,A.translate)("Site stats",{context:"Settings header"}),hideButton:!0}),y.default.createElement(T.default,{onOpen:this.trackOpenCard,header:(0,A.translate)("Collecting valuable traffic stats and insights"),clickableHeader:!0,className:(0,j.default)("jp-foldable-settings-standalone",{"jp-foldable-settings-disable":r})},y.default.createElement(U.default,{disableInDevMode:!0,module:t,support:{text:(0,A.translate)("Displays information on your site activity, including visitors and popular posts or pages."),link:"https://jetpack.com/support/wordpress-com-stats/"}},y.default.createElement(q.FormFieldset,null,y.default.createElement(w.default,{checked:!!this.props.getOptionValue("admin_bar"),disabled:!n||r,toggling:this.props.isSavingAnyOption(["stats","admin_bar"]),onChange:this.handleStatsOptionToggle("admin_bar")},y.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,A.translate)("Put a chart showing 48 hours of views in the admin bar"))),y.default.createElement(w.default,{checked:!!this.props.getOptionValue("hide_smile"),disabled:!n||r,toggling:this.props.isSavingAnyOption(["stats","hide_smile"]),onChange:this.handleStatsOptionToggle("hide_smile")},y.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,A.translate)("Hide the stats smiley face image")),y.default.createElement("span",{className:"jp-form-setting-explanation"},(0,A.translate)("The image helps collect stats, but should work when hidden.")))),y.default.createElement(q.FormFieldset,null,y.default.createElement(q.FormLegend,null,(0,A.translate)("Count logged in page views from")),(0,s.default)(a).map(function(t){return y.default.createElement(w.default,{checked:e.state["count_roles_"+t],disabled:!n||r||e.props.isSavingAnyOption(["stats","count_roles"]),onChange:e.handleRoleToggleChange(t,"count_roles"),key:"count_roles-"+t},y.default.createElement("span",{className:"jp-form-toggle-explanation"},a[t].name))})),y.default.createElement(q.FormFieldset,null,y.default.createElement(q.FormLegend,null,(0,A.translate)("Allow stats reports to be viewed by")),y.default.createElement(w.default,{checked:!0,disabled:!0},y.default.createElement("span",{className:"jp-form-toggle-explanation"},a.administrator.name)),(0,s.default)(a).map(function(t){return"administrator"!==t&&y.default.createElement(w.default,{checked:e.state["roles_"+t],disabled:!n||r||e.props.isSavingAnyOption(["stats","roles"]),onChange:e.handleRoleToggleChange(t,"roles"),key:"roles-"+t},y.default.createElement("span",{className:"jp-form-toggle-explanation"},a[t].name))}))))):y.default.createElement(O.default,{className:"jp-at-a-glance__stats-card "+(this.props.isDevMode?"is-inactive":"")},y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive"},y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-icon"},y.default.createElement("img",{src:R.imagePath+"stats.svg",width:"60",height:"60",alt:(0,A.translate)("Jetpack Stats Icon"),className:"jp-at-a-glance__stats-icon"})),y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-text"},this.props.isDevMode?(0,A.translate)("Unavailable in Dev Mode"):(0,A.translate)("{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}",{components:{a:y.default.createElement("a",{href:"javascript:void(0)",onClick:this.activateStats}),a1:y.default.createElement("a",{
|
43 |
+
href:"https://jetpack.com/support/wordpress-com-stats/",target:"_blank",rel:"noopener noreferrer"})}})),!this.props.isDevMode&&y.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-button"},y.default.createElement(S.default,{onClick:this.activateStats,primary:!0},(0,A.translate)("Activate Site Stats")))))}}]),t}(y.default.Component);t.SiteStats=(0,B.ModuleSettingsForm)(K)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.RelatedPosts=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(8),y=n(474),A=r(y),E=n(25),w=r(E),k=n(104),T=r(k),L=n(71),S=n(52),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={show_headline:r.props.getOptionValue("show_headline","related-posts"),show_thumbnails:r.props.getOptionValue("show_thumbnails","related-posts")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("related-posts",e))},r.handleShowHeadlineToggleChange=function(){r.updateOptions("show_headline")},r.handleShowThumbnailsToggleChange=function(){r.updateOptions("show_thumbnails")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props.getOptionValue("related-posts"),n=this.props.isUnavailableInDevMode("related-posts");return g.default.createElement(z.default,(0,i.default)({},this.props,{hideButton:!0,module:"related-posts"}),g.default.createElement(D.default,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("related-posts"),support:{text:(0,v.translate)("Automatically displays similar content at the end of each post."),link:"https://jetpack.com/support/related-posts/"}},g.default.createElement(S.ModuleToggle,{slug:"related-posts",disabled:n,activated:t,toggling:this.props.isSavingAnyOption("related-posts"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Show related content after posts"))),g.default.createElement(L.FormFieldset,null,g.default.createElement(T.default,{checked:this.state.show_headline,disabled:!t||n||this.props.isSavingAnyOption(["related-posts","show_headline"]),onChange:this.handleShowHeadlineToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)('Show a "Related" header to more clearly separate the related section from posts'))),g.default.createElement(T.default,{checked:this.state.show_thumbnails,disabled:!t||n||this.props.isSavingAnyOption(["related-posts","show_thumbnails"]),onChange:this.handleShowThumbnailsToggleChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,v.translate)("Use a large and visually striking layout"))),(0,v.translate)("{{span}}You can now also configure related posts in the Customizer. {{ExternalLink}}Try it out!{{/ExternalLink}}{{/span}}",{components:{span:g.default.createElement("span",{className:"jp-form-setting-explanation"}),ExternalLink:g.default.createElement(A.default,{className:"jp-module-settings__external-link",href:this.props.configureUrl})}}),g.default.createElement(L.FormLabel,{className:"jp-form-label-wide"},(0,v.translate)("Preview",{context:"A header for a preview area in the configuration screen."})),g.default.createElement(w.default,{className:"jp-related-posts-preview"},this.state.show_headline&&g.default.createElement("div",{className:"jp-related-posts-preview__title"},(0,v.translate)("Related")),[{url:"1-wpios-ipad-3-1-viewsite.png",text:(0,v.translate)("Big iPhone/iPad Update Now Available"),context:(0,v.translate)('In "Mobile"',{comment:"It refers to the category where a post was found. Used in an example preview."})},{url:"wordpress-com-news-wordpress-for-android-ui-update2.jpg",text:(0,v.translate)("The WordPress for Android App Gets a Big Facelift"),context:(0,v.translate)('In "Mobile"',{comment:"It refers to the category where a post was found. Used in an example preview."})},{url:"videopresswedding.jpg",text:(0,v.translate)("Upgrade Focus: VideoPress For Weddings"),context:(0,v.translate)('In "Upgrade"',{comment:"It refers to the category where a post was found. Used in an example preview."})}].map(function(t,n){return g.default.createElement("div",{key:"preview_"+n,className:"jp-related-posts-preview__item"},e.state.show_thumbnails&&g.default.createElement("img",{src:"https://jetpackme.files.wordpress.com/2014/08/"+t.url+"?w=350&h=200&crop=1",alt:t.text}),g.default.createElement("h4",{className:"jp-related-posts-preview__post-title"},g.default.createElement("a",{href:"#/traffic"},t.text)),g.default.createElement("p",{className:"jp-related-posts-preview__post-context"},t.context))})))))}}]),t}(g.default.Component);t.RelatedPosts=(0,C.ModuleSettingsForm)(P)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(25),y=r(v),A=n(47),E=n(30),w=n(52),k=n(40),T=r(k),L=n(36),S=r(L),C=n(28),O=n(61),z=n(71),N=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){return M.default.createElement(T.default,(0,i.default)({},this.props,{module:"search",feature:A.FEATURE_SEARCH_JETPACK,hideButton:!0}),M.default.createElement(S.default,{hasChild:!0,module:{module:"search"},support:{text:(0,g.translate)("Replaces the default WordPress search with a faster, filterable search experience."),link:"https://jetpack.com/support/search"}},M.default.createElement(w.ModuleToggle,{slug:"search",compact:!0,activated:this.props.getOptionValue("search"),toggling:this.props.isSavingAnyOption("search"),toggleModule:this.props.toggleModuleNow},(0,g.translate)("Replace WordPress built-in search with an improved search experience")),this.props.getOptionValue("search")&&M.default.createElement(z.FormFieldset,null,M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)("Add the Jetpack search widget to your sidebar to configure advanced search filters.")))),this.props.getOptionValue("search")&&M.default.createElement(y.default,{compact:!0,className:"jp-settings-card__configure-link",href:"customize.php?autofocus[panel]=widgets"},(0,g.translate)("Add Jetpack Search Widget")))}}]),t}(M.default.Component);t.default=(0,b.connect)(function(e){return{siteAdminUrl:(0,C.getSiteAdminUrl)(e),sitePlan:(0,O.getSitePlan)(e),fetchingSiteData:(0,O.isFetchingSiteData)(e)}})((0,E.ModuleSettingsForm)(N)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.VerificationServices=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(508),v=r(g),y=n(474),A=r(y),E=n(71),w=n(30),k=n(40),T=r(k),L=n(36),S=r(L),C=n(473),O=r(C),z=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.activateVerificationTools=function(){return r.props.updateOptions({"verification-tools":!0})},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this,t=this.props.getModule("verification-tools");return"inactive"===this.props.getModuleOverride("google-analytics")?M.default.createElement(O.default,{title:t.name,icon:"cog",description:(0,b.translate)("%(moduleName)s has been disabled by a site administrator.",{args:{moduleName:t.name}})}):this.props.getOptionValue("verification-tools")?M.default.createElement(T.default,(0,i.default)({},this.props,{module:"verification-tools",saveDisabled:this.props.isSavingAnyOption(["google","bing","pinterest","yandex"])}),M.default.createElement(S.default,{module:t,support:{text:(0,b.translate)("Provides the necessary hidden tags needed to verify your WordPress site with various services."),link:"https://jetpack.com/support/site-verification-tools"}},M.default.createElement("p",null,(0,b.translate)("Note that {{b}}verifying your site with these services is not necessary{{/b}} in order for your site to be indexed by search engines. To use these advanced search engine tools and verify your site with a service, paste the HTML Tag code below. Read the {{support}}full instructions{{/support}} if you are having trouble. Supported verification services: {{google}}Google Search Console{{/google}}, {{bing}}Bing Webmaster Center{{/bing}}, {{pinterest}}Pinterest Site Verification{{/pinterest}}, and {{yandex}}Yandex.Webmaster{{/yandex}}.",{components:{b:M.default.createElement("strong",null),support:M.default.createElement("a",{href:"https://jetpack.com/support/site-verification-tools/"}),google:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://www.google.com/webmasters/tools/"}),bing:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://www.bing.com/webmaster/"}),pinterest:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://pinterest.com/website/verify/"}),yandex:M.default.createElement(A.default,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://webmaster.yandex.com/sites/"})}})),M.default.createElement(E.FormFieldset,null,[{id:"google",label:(0,b.translate)("Google"),placeholder:'<meta name="google-site-verification" content="1234" />'},{id:"bing",label:(0,b.translate)("Bing"),placeholder:'<meta name="msvalidate.01" content="1234" />'},{id:"pinterest",label:(0,b.translate)("Pinterest"),placeholder:'<meta name="p:domain_verify" content="1234" />'},{id:"yandex",label:(0,b.translate)("Yandex"),placeholder:'<meta name="yandex-verification" content="1234" />'}].map(function(t){return M.default.createElement(E.FormLabel,{className:"jp-form-input-with-prefix",key:"verification_service_"+t.id},M.default.createElement("span",null,t.label),M.default.createElement(v.default,{name:t.id,value:e.props.getOptionValue(t.id),placeholder:t.placeholder,className:"code",disabled:e.props.isUpdating(t.id),onChange:e.props.onOptionChange}))})))):M.default.createElement(O.default,{callToAction:(0,b.translate)("Activate"),title:t.name,icon:"cog",description:t.long_description,onClick:this.activateVerificationTools})}}]),t}(M.default.Component);t.VerificationServices=(0,w.ModuleSettingsForm)(z)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Sitemaps=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(474),y=r(v),A=n(27),E=r(A),w=n(15),k=r(w),T=n(71),L=n(30),S=n(52),C=n(40),O=r(C),z=n(36),N=r(z),D=n(28),P=t.Sitemaps=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.trackSitemapUrl=function(){k.default.tracks.recordJetpackClick("sitemap-url-link")},r.trackSitemapNewsUrl=function(){k.default.tracks.recordJetpackClick("sitemap-news-url-link")},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getModule("sitemaps"),t=(0,E.default)(e,["extra","sitemap_url"],""),n=(0,E.default)(e,["extra","news_sitemap_url"],"");return M.default.createElement(O.default,(0,i.default)({},this.props,{module:"sitemaps",hideButton:!0}),M.default.createElement(N.default,{hasChild:!0,module:{module:"sitemaps"},support:{text:(0,g.translate)("Automatically generates the files required for search engines to index your site."),link:"https://jetpack.com/support/sitemaps/"}},M.default.createElement(S.ModuleToggle,{slug:"sitemaps",compact:!0,activated:this.props.getOptionValue("sitemaps"),toggling:this.props.isSavingAnyOption("sitemaps"),toggleModule:this.props.toggleModuleNow},(0,g.translate)("Generate XML sitemaps")),this.props.isSiteVisibleToSearchEngines?this.props.getOptionValue("sitemaps")&&M.default.createElement(T.FormFieldset,null,M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)("Your sitemap is automatically sent to all major search engines for indexing.")),M.default.createElement("p",null,M.default.createElement(y.default,{onClick:this.trackSitemapUrl,icon:!0,target:"_blank",rel:"noopener noreferrer",href:t},t),M.default.createElement("br",null),M.default.createElement(y.default,{onClick:this.trackSitemapNewsUrl,icon:!0,target:"_blank",rel:"noopener noreferrer",href:n},n))):M.default.createElement(T.FormFieldset,null,M.default.createElement("p",{className:"jp-form-setting-explanation"},(0,g.translate)('Your site is not currently accessible to search engines. You might have "Search Engine Visibility" disabled in your {{a}}Reading Settings{{/a}}.',{components:{a:M.default.createElement("a",{href:this.props.siteAdminUrl+"options-reading.php"})}})))))}}]),t}(M.default.Component);t.default=(0,b.connect)(function(e){return{isSiteVisibleToSearchEngines:(0,D.isSiteVisibleToSearchEngines)(e),siteAdminUrl:(0,D.getSiteAdminUrl)(e)}})((0,L.ModuleSettingsForm)(P))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Writing=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(25),y=r(v),A=n(23),E=n(103),w=n(28),k=n(21),T=n(74),L=n(211),S=r(L),C=n(1134),O=r(C),z=n(1137),N=r(z),D=n(1138),P=r(D),x=n(1139),j=r(x),R=n(1140),Y=r(R),I=n(1152),q=n(1153),B=r(q),W=t.Writing=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,getModuleOverride:this.props.getModuleOverride},t=["masterbar","markdown","after-the-deadline","custom-content-types","photon","carousel","post-by-email","infinite-scroll","minileven","videopress","lazy-images"].some(this.props.isModuleFound);if(!this.props.searchTerm&&!this.props.active)return null;if(!t)return null;var n=this.props.userCanManageModules||this.props.userCanEditPosts&&this.props.isModuleActivated("after-the-deadline"),r=this.props.userCanManageModules||this.props.userCanEditPosts&&this.props.isModuleActivated("post-by-email");return M.default.createElement("div",null,M.default.createElement(S.default,null),this.props.isModuleFound("masterbar")&&!this.props.masterbarIsAlwaysActive&&M.default.createElement(I.Masterbar,(0,i.default)({connectUrl:this.props.connectUrl},e)),n&&M.default.createElement(O.default,(0,i.default)({},e,{userCanManageModules:this.props.userCanManageModules})),M.default.createElement(N.default,e),M.default.createElement(B.default,e),this.props.isModuleFound("custom-content-types")&&M.default.createElement(P.default,e),M.default.createElement(j.default,e),this.props.isModuleFound("post-by-email")&&r&&M.default.createElement(Y.default,(0,i.default)({},e,{connectUrl:this.props.connectUrl,isLinked:this.props.isLinked,userCanManageModules:this.props.userCanManageModules})),!n&&!r&&M.default.createElement(y.default,null,(0,g.translate)("Writing tools available to you will be shown here when an administrator enables them.")))}}]),t}(M.default.Component);W.displayName="WritingSettings",t.default=(0,b.connect)(function(e){return{module:function(t){return(0,A.getModule)(e,t)},settings:(0,E.getSettings)(e),masterbarIsAlwaysActive:(0,w.isAtomicSite)(e),isDevMode:(0,k.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,k.isUnavailableInDevMode)(e,t)},userCanEditPosts:(0,w.userCanEditPosts)(e),isModuleActivated:function(t){return(0,A.isModuleActivated)(e,t)},isLinked:(0,k.isCurrentUserLinked)(e),userCanManageModules:(0,w.userCanManageModules)(e),isModuleFound:function(t){return(0,T.isModuleFound)(e,t)},connectUrl:(0,k.getConnectUrl)(e),getModuleOverride:function(t){return(0,A.getModuleOverride)(e,t)}}})(W)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Composing=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(516),k=r(w),T=n(14),L=r(T),S=n(15),C=r(S),O=n(71),z=n(74),N=n(52),D=n(30),P=n(23),x=n(1135),j=r(x),R=n(40),Y=r(R),I=n(36),q=r(I),B=t.Composing=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={onpublish:r.props.getOptionValue("onpublish","after-the-deadline"),onupdate:r.props.getOptionValue("onupdate","after-the-deadline"),guess_lang:r.props.getOptionValue("guess_lang","after-the-deadline"),"Bias Language":r.props.getOptionValue("Bias Language","after-the-deadline"),Cliches:r.props.getOptionValue("Cliches","after-the-deadline"),"Complex Expression":r.props.getOptionValue("Complex Expression","after-the-deadline"),"Diacritical Marks":r.props.getOptionValue("Diacritical Marks","after-the-deadline"),"Double Negative":r.props.getOptionValue("Double Negative","after-the-deadline"),"Hidden Verbs":r.props.getOptionValue("Hidden Verbs","after-the-deadline"),"Jargon Language":r.props.getOptionValue("Jargon Language","after-the-deadline"),"Passive voice":r.props.getOptionValue("Passive voice","after-the-deadline"),"Phrases to Avoid":r.props.getOptionValue("Phrases to Avoid","after-the-deadline"),"Redundant Expression":r.props.getOptionValue("Redundant Expression","after-the-deadline")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("after-the-deadline",e))},r.handleToggleChange=function(e){return function(){return r.updateOptions(e)}},r.getToggle=function(e,t){return g.default.createElement(E.default,{checked:r.state[e],disabled:!r.props.getOptionValue("after-the-deadline")||r.props.isUnavailableInDevMode("after-the-deadline")||r.props.isSavingAnyOption(["after-the-deadline",e]),onChange:r.handleToggleChange(e)},g.default.createElement("span",{className:"jp-form-toggle-explanation"},t))},r.getAtdSettings=function(){var e=r.props.getOptionValue("ignored_phrases");return g.default.createElement(q.default,{hasChild:!0,disableInDevMode:!0,module:r.props.getModule("after-the-deadline"),support:{text:(0,y.translate)("Checks your content for correct grammar and spelling, misused words, and style while you write."),link:"https://jetpack.com/support/spelling-and-grammar/"}},g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null," ",(0,y.translate)("Proofreading")," "),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("Automatically proofread content when: ")),r.getToggle("onpublish",(0,y.translate)("A post or page is first published")),r.getToggle("onupdate",(0,y.translate)("A post or page is updated"))),g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null," ",(0,y.translate)("Automatic Language Detection")),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("The proofreader supports English, French, German, Portuguese and Spanish.")),r.getToggle("guess_lang",(0,y.translate)("Use automatically detected language to proofread posts and pages"))),g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null," ",(0,y.translate)("English Options")," "),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("Enable proofreading for the following grammar and style rules: ")),r.getToggle("Bias Language",(0,y.translate)("Bias Language")),r.getToggle("Cliches",(0,y.translate)("Clichés")),r.getToggle("Complex Expression",(0,y.translate)("Complex Phrases")),r.getToggle("Diacritical Marks",(0,y.translate)("Diacritical Marks")),r.getToggle("Double Negative",(0,y.translate)("Double Negatives")),r.getToggle("Hidden Verbs",(0,y.translate)("Hidden Verbs")),r.getToggle("Jargon Language",(0,y.translate)("Jargon")),r.getToggle("Passive voice",(0,y.translate)("Passive Voice")),r.getToggle("Phrases to Avoid",(0,y.translate)("Phrases to Avoid")),r.getToggle("Redundant Expression",(0,y.translate)("Redundant Phrases"))),g.default.createElement(O.FormFieldset,null,g.default.createElement(O.FormLegend,null,(0,y.translate)("Ignored Phrases")),g.default.createElement(j.default,{name:"ignored_phrases",disabled:!r.props.getOptionValue("after-the-deadline"),placeholder:(0,y.translate)("Add a phrase"),value:void 0!==e&&""!==e?e.split(","):[],onChange:r.props.onOptionChange}),g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,y.translate)("Confirm each new phrase you add by pressing enter."))))},r.updateFormStateByMarkdown=function(e){return r.props.getSettingCurrentValue("wpcom_publish_comments_with_markdown",e)?r.props.updateFormStateModuleOption(e,"wpcom_publish_posts_with_markdown"):r.props.updateFormStateModuleOption(e,"wpcom_publish_posts_with_markdown",!0)},r.trackOpenCard=function(){C.default.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"atd"})},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("after-the-deadline"),t=this.props.isModuleFound("markdown");if(!t&&!e)return null;var n=this.props.module("markdown"),r=this.props.module("after-the-deadline"),a=this.props.isUnavailableInDevMode("after-the-deadline"),o=g.default.createElement(q.default,{module:n,support:{text:(0,y.translate)("Allows you to compose content with links, lists, and other styles using the Markdown syntax."),link:"https://jetpack.com/support/markdown/"}},g.default.createElement(O.FormFieldset,null,g.default.createElement(N.ModuleToggle,{slug:"markdown",activated:!!this.props.getOptionValue("wpcom_publish_posts_with_markdown","markdown"),toggling:this.props.isSavingAnyOption(["markdown","wpcom_publish_posts_with_markdown"]),disabled:this.props.isSavingAnyOption(["markdown","wpcom_publish_posts_with_markdown"]),toggleModule:this.updateFormStateByMarkdown},g.default.createElement("span",{className:"jp-form-toggle-explanation"},n.description)))),s=g.default.createElement(k.default,{onOpen:this.trackOpenCard,className:(0,L.default)("jp-foldable-card__main-settings",{"jp-foldable-settings-disable":a}),header:this.props.userCanManageModules?g.default.createElement(N.ModuleToggle,{slug:"after-the-deadline",compact:!0,disabled:a,activated:this.props.getOptionValue("after-the-deadline"),toggling:this.props.isSavingAnyOption("after-the-deadline"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},r.description)):g.default.createElement("span",{className:"jp-form-toggle-explanation"},r.description)},this.getAtdSettings());return g.default.createElement(Y.default,(0,i.default)({},this.props,{header:(0,y.translate)("Composing",{context:"Settings header"}),hideButton:!e,module:"composing",saveDisabled:this.props.isSavingAnyOption("ignored_phrases")}),t&&o,e&&s)}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,P.getModule)(e,t)},isModuleFound:function(t){return(0,z.isModuleFound)(e,t)}}})((0,D.ModuleSettingsForm)(B))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(1136),M=r(_),b=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={tags:r.props.value||[]},r.handleChange=function(e){r.setState({tags:e}),r.props.onChange&&r.props.onChange({target:{name:r.props.name,value:e.join(",")}})},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement(M.default,{disabled:this.props.disabled,inputProps:{placeholder:this.props.placeholder},onChange:this.handleChange,value:this.state.tags})}}]),t}(m.default.Component);t.default=b,e.exports=t.default},function(e,t,n){var r,a,i;!function(o,s){a=[e,t,n(1),n(7)],r=s,void 0!==(i="function"==typeof r?r.apply(t,a):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function l(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}function d(e){return window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData?e.clipboardData.getData("text/plain"):""}function f(e){var t=e.tag,n=e.key,r=e.disabled,a=e.onRemove,i=e.classNameRemove,o=e.getTagDisplayValue,s=u(e,["tag","key","disabled","onRemove","classNameRemove","getTagDisplayValue"]);return _.default.createElement("span",b({key:n},s),o(t),!r&&_.default.createElement("a",{className:i,onClick:function(e){return a(n)}}))}function p(e){var t=(e.addTag,u(e,["addTag"])),n=t.onChange,r=t.value,a=u(t,["onChange","value"]);return _.default.createElement("input",b({type:"text",onChange:n,value:r},a))}function h(e,t){return _.default.createElement("span",null,e,t)}function m(e){return e.split(" ").map(function(e){return e.trim()})}Object.defineProperty(t,"__esModule",{value:!0});var _=a(n),M=(a(r),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g={className:"react-tagsinput-input",placeholder:"Add a tag"},v=function(e){function t(){o(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={tag:"",isFocused:!1},e.focus=e.focus.bind(e),e.blur=e.blur.bind(e),e}return c(t,e),M(t,[{key:"_getTagDisplayValue",value:function(e){var t=this.props.tagDisplayProp;return t?e[t]:e}},{key:"_makeTag",value:function(e){var t=this.props.tagDisplayProp;return t?i({},t,e):e}},{key:"_removeTag",value:function(e){var t=this.props.value.concat([]);if(e>-1&&e<t.length){var n=t.splice(e,1);this.props.onChange(t,n,[e])}}},{key:"_clearInput",value:function(){this.hasControlledInput()?this.props.onChangeInput(""):this.setState({tag:""})}},{key:"_tag",value:function(){return this.hasControlledInput()?this.props.inputValue:this.state.tag}},{key:"_addTags",value:function(e){var t=this,n=this.props,r=n.validationRegex,a=n.onChange,i=n.onValidationReject,o=n.onlyUnique,s=n.maxTags,c=n.value;o&&(e=l(e),e=e.filter(function(e){return c.every(function(n){return t._getTagDisplayValue(n)!==t._getTagDisplayValue(e)})}));var u=e.filter(function(e){return!r.test(t._getTagDisplayValue(e))});if(e=e.filter(function(e){return r.test(t._getTagDisplayValue(e))}),e=e.filter(function(e){var n=t._getTagDisplayValue(e);return"function"==typeof n.trim?n.trim().length>0:n}),s>=0){var d=Math.max(s-c.length,0);e=e.slice(0,d)}if(i&&u.length>0&&i(u),e.length>0){for(var f=c.concat(e),p=[],h=0;h<e.length;h++)p.push(c.length+h);return a(f,e,p),this._clearInput(),!0}return!(u.length>0)&&(this._clearInput(),!1)}},{key:"_shouldPreventDefaultEventOnAdd",value:function(e,t,n){return!!e||13===n&&(this.props.preventSubmit||!this.props.preventSubmit&&!t)}},{key:"focus",value:function(){this.input&&"function"==typeof this.input.focus&&this.input.focus(),this.handleOnFocus()}},{key:"blur",value:function(){this.input&&"function"==typeof this.input.blur&&this.input.blur(),this.handleOnBlur()}},{key:"accept",value:function(){var e=this._tag();return""!==e&&(e=this._makeTag(e),this._addTags([e]))}},{key:"addTag",value:function(e){return this._addTags([e])}},{key:"clearInput",value:function(){this._clearInput()}},{key:"handlePaste",value:function(e){var t=this,n=this.props,r=n.addOnPaste,a=n.pasteSplit;if(r){e.preventDefault();var i=d(e),o=a(i).map(function(e){return t._makeTag(e)});this._addTags(o)}}},{key:"handleKeyDown",value:function(e){if(!e.defaultPrevented){var t=this.props,n=t.value,r=t.removeKeys,a=t.addKeys,i=this._tag(),o=""===i,s=e.keyCode,c=e.key,u=-1!==a.indexOf(s)||-1!==a.indexOf(c),l=-1!==r.indexOf(s)||-1!==r.indexOf(c);if(u){var d=this.accept();this._shouldPreventDefaultEventOnAdd(d,o,s)&&e.preventDefault()}l&&n.length>0&&o&&(e.preventDefault(),this._removeTag(n.length-1))}}},{key:"handleClick",value:function(e){e.target===this.div&&this.focus()}},{key:"handleChange",value:function(e){var t=this.props.onChangeInput,n=this.props.inputProps.onChange,r=e.target.value;n&&n(e),this.hasControlledInput()?t(r):this.setState({tag:r})}},{key:"handleOnFocus",value:function(e){var t=this.props.inputProps.onFocus;t&&t(e),this.setState({isFocused:!0})}},{key:"handleOnBlur",value:function(e){var t=this.props.inputProps.onBlur;if(this.setState({isFocused:!1}),null!=e&&(t&&t(e),this.props.addOnBlur)){var n=this._makeTag(e.target.value);this._addTags([n])}}},{key:"handleRemove",value:function(e){this._removeTag(e)}},{key:"inputProps",value:function(){var e=this.props.inputProps,t=(e.onChange,e.onFocus,e.onBlur,u(e,["onChange","onFocus","onBlur"])),n=b({},g,t);return this.props.disabled&&(n.disabled=!0),n}},{key:"inputValue",value:function(e){return e.currentValue||e.inputValue||""}},{key:"hasControlledInput",value:function(){var e=this.props,t=e.inputValue;return"function"==typeof e.onChangeInput&&"string"==typeof t}},{key:"componentDidMount",value:function(){this.hasControlledInput()||this.setState({tag:this.inputValue(this.props)})}},{key:"componentWillReceiveProps",value:function(e){this.hasControlledInput()||this.inputValue(e)&&this.setState({tag:this.inputValue(e)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=(t.onChange,t.tagProps),a=t.renderLayout,i=t.renderTag,o=t.renderInput,s=(t.addKeys,t.removeKeys,t.className),c=t.focusedClassName,l=(t.addOnBlur,t.addOnPaste,t.inputProps,t.pasteSplit,t.onlyUnique,t.maxTags,t.validationRegex,t.disabled);t.tagDisplayProp,t.inputValue,t.onChangeInput,
|
44 |
u(t,["value","onChange","tagProps","renderLayout","renderTag","renderInput","addKeys","removeKeys","className","focusedClassName","addOnBlur","addOnPaste","inputProps","pasteSplit","onlyUnique","maxTags","validationRegex","disabled","tagDisplayProp","inputValue","onChangeInput"]);this.state.isFocused&&(s+=" "+c);var d=n.map(function(t,n){return i(b({key:n,tag:t,onRemove:e.handleRemove.bind(e),disabled:l,getTagDisplayValue:e._getTagDisplayValue.bind(e)},r))}),f=o(b({ref:function(t){e.input=t},value:this._tag(),onPaste:this.handlePaste.bind(this),onKeyDown:this.handleKeyDown.bind(this),onChange:this.handleChange.bind(this),onFocus:this.handleOnFocus.bind(this),onBlur:this.handleOnBlur.bind(this),addTag:this.addTag.bind(this)},this.inputProps()));return _.default.createElement("div",{ref:function(t){e.div=t},onClick:this.handleClick.bind(this),className:s},a(d,f))}}]),t}(_.default.Component);v.defaultProps={className:"react-tagsinput",focusedClassName:"react-tagsinput--focused",addKeys:[9,13],addOnBlur:!1,addOnPaste:!1,inputProps:{},removeKeys:[8],renderInput:p,renderTag:f,renderLayout:h,pasteSplit:m,tagProps:{className:"react-tagsinput-tag",classNameRemove:"react-tagsinput-remove"},onlyUnique:!1,maxTags:-1,validationRegex:/.*/,disabled:!1,tagDisplayProp:null,preventSubmit:!0},t.default=v,e.exports=t.default})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(44),k=r(w),T=n(47),L=n(71),S=n(52),C=n(30),O=n(40),z=r(O),N=n(36),D=r(N),P=n(23),x=n(74),j=n(61),R=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={carousel_display_exif:r.props.getOptionValue("carousel_display_exif","carousel")},r.updateOptions=function(e){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption("carousel",e))},r.handleCarouselDisplayExifChange=function(){r.updateOptions("carousel_display_exif")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("carousel"),t=this.props.isModuleFound("videopress");if(!e&&!t)return null;var n=this.props.module("carousel"),r=this.props.getOptionValue("carousel"),a=this.props.module("videopress"),o=(0,T.getPlanClass)(this.props.sitePlan.product_slug),s=g.default.createElement(D.default,{hasChild:!0,module:{module:"carousel"},support:{text:(0,y.translate)("Replaces the standard WordPress galleries with a full-screen photo browsing experience, including comments and EXIF metadata."),link:"https://jetpack.com/support/carousel"}},g.default.createElement(S.ModuleToggle,{slug:"carousel",activated:r,toggling:this.props.isSavingAnyOption("carousel"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},n.description)),g.default.createElement(L.FormFieldset,null,g.default.createElement(E.default,{checked:this.state.carousel_display_exif,disabled:!r||this.props.isSavingAnyOption(["carousel","carousel_display_exif"]),onChange:this.handleCarouselDisplayExifChange},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,y.translate)("Show photo metadata (Exif) in carousel, when available"))),g.default.createElement(L.FormLabel,null,g.default.createElement(L.FormLegend,{className:"jp-form-label-wide"},(0,y.translate)("Color scheme")),g.default.createElement(L.FormSelect,(0,i.default)({name:"carousel_background_color",value:this.props.getOptionValue("carousel_background_color"),disabled:!r||this.props.isSavingAnyOption(["carousel","carousel_background_color"])},this.props,{validValues:this.props.validValues("carousel_background_color","carousel")}))))),c=(0,k.default)(["is-premium-plan","is-business-plan"],o)&&g.default.createElement(D.default,{hasChild:!0,disableInDevMode:!0,module:a,support:{text:(0,y.translate)("Hosts your video files on the global WordPress.com servers."),link:"https://jetpack.com/support/videopress/"}},g.default.createElement(S.ModuleToggle,{slug:"videopress",disabled:this.props.isUnavailableInDevMode("videopress"),activated:this.props.getOptionValue("videopress"),toggling:this.props.isSavingAnyOption("videopress"),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},a.description))),u="inactive"===this.props.getModuleOverride("videopress");return g.default.createElement(z.default,(0,i.default)({},this.props,{header:(0,y.translate)("Media"),hideButton:!e,feature:!u&&T.FEATURE_VIDEO_HOSTING_JETPACK,saveDisabled:this.props.isSavingAnyOption("carousel_background_color")}),e&&s,t&&c)}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,P.getModule)(e,t)},isModuleFound:function(t){return(0,x.isModuleFound)(e,t)},sitePlan:(0,j.getSitePlan)(e),getModuleOverride:function(t){return(0,P.getModuleOverride)(e,t)}}})((0,C.ModuleSettingsForm)(R)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContentTypes=void 0;var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(71),k=n(30),T=n(23),L=n(74),S=n(40),C=r(S),O=n(36),z=r(O),N=t.CustomContentTypes=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.state={testimonial:r.props.getOptionValue("jetpack_testimonial","custom-content-types"),portfolio:r.props.getOptionValue("jetpack_portfolio","custom-content-types")},r.updateCPTs=function(e){var t="testimonial"===e?!(!r.state.testimonial||r.state.portfolio):!(!r.state.portfolio||r.state.testimonial);r.props.updateFormStateModuleOption("custom-content-types","jetpack_"+e,t),r.setState((0,s.default)({},e,!r.state[e]))},r.linkIfActiveCPT=function(e){return r.props.getSettingCurrentValue("jetpack_"+e,"custom-content-types")?g.default.createElement("a",{href:r.props.siteAdminUrl+"edit.php?post_type=jetpack-"+e}):g.default.createElement("span",null)},r.handleTestimonialToggleChange=function(){r.updateCPTs("testimonial")},r.handlePortfolioToggleChange=function(){r.updateCPTs("portfolio")},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){if(!this.props.isModuleFound("custom-content-types"))return null;var e=this.props.module("custom-content-types"),t="inactive"===this.props.getModuleOverride("custom-content-types"),n=t&&(0,y.translate)("This feature has been disabled by a site administrator.");return g.default.createElement(C.default,(0,i.default)({},this.props,{module:"custom-content-types",hideButton:!0}),g.default.createElement(z.default,{hasChild:!0,module:e,support:{text:(0,y.translate)("Adds the Testimonial custom post type, allowing you to collect, organize, and display testimonials on your site."),link:"https://jetpack.com/support/custom-content-types/"}},g.default.createElement(E.default,{checked:this.state.testimonial,disabled:this.props.isSavingAnyOption("jetpack_testimonial")||t,onChange:this.handleTestimonialToggleChange,disabledReason:n},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,y.translate)("Testimonials"))),g.default.createElement(w.FormFieldset,null,g.default.createElement("p",{className:"jp-form-setting-explanation"},(0,y.translate)("Add, organize, and display {{testimonialLink}}testimonials{{/testimonialLink}}. If your theme doesn’t support testimonials yet, you can display them using the shortcode\t( [testimonials] ).",{components:{testimonialLink:this.linkIfActiveCPT("testimonial")}})))),g.default.createElement(z.default,{hasChild:!0,module:e,support:{text:(0,y.translate)("Adds the Portfolio custom post type, allowing you to manage and showcase projects on your site."),link:"https://jetpack.com/support/custom-content-types/"}},g.default.createElement(E.default,{checked:this.state.portfolio,disabled:this.props.isSavingAnyOption("jetpack_portfolio")||t,onChange:this.handlePortfolioToggleChange,disabledReason:n},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,y.translate)("Portfolios"))),g.default.createElement(w.FormFieldset,null,g.default.createElement("p",{className:"jp-form-setting-explanation"},(0,y.translate)("Add, organize, and display {{portfolioLink}}portfolios{{/portfolioLink}}. If your theme doesn’t support portfolios yet, you can display them using the shortcode ( [portfolio] ).",{components:{portfolioLink:this.linkIfActiveCPT("portfolio")}})))))}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,T.getModule)(e,t)},isModuleFound:function(t){return(0,L.isModuleFound)(e,t)},getModuleOverride:function(t){return(0,T.getModuleOverride)(e,t)}}})((0,k.ModuleSettingsForm)(N))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(104),E=r(A),w=n(15),k=r(w),T=n(71),L=n(52),S=n(23),C=n(28),O=n(74),z=n(30),N=n(40),D=r(N),P=n(36),x=r(P),j=n(515),R=r(j),Y=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.getInfiniteMode=function(){return r.props.getOptionValue("infinite-scroll")?r.props.getOptionValue("infinite_scroll","infinite-scroll")?"infinite_scroll":"infinite_button":"infinite_default"},r.updateInfiniteMode=function(e){r.setState({infinite_mode:e},r.prepareOptionsToUpdate)},r.prepareOptionsToUpdate=function(){"infinite_default"===r.state.infinite_mode?r.props.updateFormStateOptionValue("infinite-scroll",!1):"infinite_scroll"!==r.state.infinite_mode&&"infinite_button"!==r.state.infinite_mode||r.props.updateFormStateOptionValue({"infinite-scroll":!0,infinite_scroll:"infinite_scroll"===r.state.infinite_mode})},r.updateOptions=function(e,t){r.setState((0,s.default)({},e,!r.state[e]),r.props.updateFormStateModuleOption(t,e))},r.trackLearnMoreIS=function(){k.default.tracks.recordJetpackClick({target:"learn-more",feature:"infinite-scroll",extra:"not-supported-link"})},r.state={infinite_mode:r.getInfiniteMode(),wp_mobile_excerpt:r.props.getOptionValue("wp_mobile_excerpt","minileven"),wp_mobile_featured_images:r.props.getOptionValue("wp_mobile_featured_images","minileven"),wp_mobile_app_promos:r.props.getOptionValue("wp_mobile_app_promos","minileven")},r.handleInfiniteScrollModeChange=function(e){return function(){return r.updateInfiniteMode(e)}},r.handleMinilevenOptionChange=function(e,t){return function(){return r.updateOptions(e,t)}},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props.isModuleFound("infinite-scroll"),n=this.props.isModuleFound("minileven");if(!t&&!n)return null;var r=this.props.getModule("infinite-scroll"),a=this.props.getModule("minileven"),o=this.props.getOptionValue(a.module),s="inactive"===this.props.getModuleOverride("infinite-scroll");return g.default.createElement(D.default,(0,i.default)({},this.props,{header:(0,y.translate)("Theme enhancements"),hideButton:!t||!this.props.isInfiniteScrollSupported}),s&&g.default.createElement(R.default,{moduleName:r.name,compact:!0}),t&&!s&&g.default.createElement(x.default,{hasChild:!0,module:{module:r.module},key:"theme_enhancement_"+r.module,support:{text:(0,y.translate)("Loads the next posts automatically when the reader approaches the bottom of the page."),link:"https://jetpack.com/support/infinite-scroll"}},g.default.createElement(T.FormLegend,{className:"jp-form-label-wide"},r.name),this.props.isInfiniteScrollSupported?[{key:"infinite_default",label:(0,y.translate)("Load more posts using the default theme behavior")},{key:"infinite_button",label:(0,y.translate)("Load more posts in page with a button")},{key:"infinite_scroll",label:(0,y.translate)("Load more posts as the reader scrolls down")}].map(function(t){return g.default.createElement(T.FormLabel,{key:r.module+"_"+t.key},g.default.createElement("input",{type:"radio",name:"infinite_mode",value:t.key,checked:t.key===e.state.infinite_mode,disabled:e.props.isSavingAnyOption([r.module,t.key]),onChange:e.handleInfiniteScrollModeChange(t.key)}),g.default.createElement("span",{className:"jp-form-toggle-explanation"},t.label))}):g.default.createElement("span",null,(0,y.translate)("Theme support required.")+" ",g.default.createElement("a",{onClick:this.trackLearnMoreIS,href:r.learn_more_button+"#theme",title:(0,y.translate)("Learn more about adding support for Infinite Scroll to your theme.")},(0,y.translate)("Learn more")))),n&&g.default.createElement(x.default,{hasChild:!0,module:{module:a.module},key:"theme_enhancement_"+a.module,support:{text:(0,y.translate)("Enables a lightweight, mobile-friendly theme that will be displayed to visitors on mobile devices."),link:"https://jetpack.com/support/mobile-theme"}},g.default.createElement(L.ModuleToggle,{slug:a.module,activated:o,toggling:this.props.isSavingAnyOption(a.module),toggleModule:this.props.toggleModuleNow},g.default.createElement("span",{className:"jp-form-toggle-explanation"},a.description)),g.default.createElement(T.FormFieldset,null,[{key:"wp_mobile_excerpt",label:(0,y.translate)("Use excerpts instead of full posts on front page and archive pages")},{key:"wp_mobile_featured_images",label:(0,y.translate)("Show featured images")},{key:"wp_mobile_app_promos",label:(0,y.translate)("Show an ad for the WordPress mobile apps in the footer of the mobile theme")}].map(function(t){return g.default.createElement(E.default,{checked:e.state[t.key],disabled:!o||e.props.isSavingAnyOption([a.module,t.key]),onChange:e.handleMinilevenOptionChange(t.key,a.module),key:a.module+"_"+t.key},g.default.createElement("span",{className:"jp-form-toggle-explanation"},t.label))}))))}}]),t}(g.default.Component);t.default=(0,v.connect)(function(e){return{module:function(t){return(0,S.getModule)(e,t)},isInfiniteScrollSupported:(0,C.currentThemeSupports)(e,"infinite-scroll"),isModuleFound:function(t){return(0,O.isModuleFound)(e,t)}}})((0,z.ModuleSettingsForm)(Y)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(41),y=r(v),A=n(1141),E=r(A),w=n(25),k=r(w),T=n(15),L=r(T),S=n(71),C=n(52),O=n(23),z=n(74),N=n(30),D=n(40),P=r(D),x=n(36),j=r(x),R=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.regeneratePostByEmailAddress=function(e){L.default.tracks.recordJetpackClick("pbe-regenerage-email"),e.preventDefault(),r.props.regeneratePostByEmailAddress()},r.address=function(){var e=r.props.getOptionValue("post_by_email_address");return!1===e||"1"===e||null===e?"":e},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){if(!this.props.isModuleFound("post-by-email"))return null;var e=this.props.getModule("post-by-email"),t=this.props.getOptionValue("post-by-email"),n=this.props.isUnavailableInDevMode("post-by-email")||!this.props.isLinked,r=this.address();return M.default.createElement(P.default,(0,i.default)({},this.props,{module:"post-by-email",hideButton:!0}),M.default.createElement(j.default,{hasChild:!0,disableInDevMode:!0,module:e,support:{text:(0,g.translate)("Allows you to publish new posts by sending an email to a special address."),link:"https://jetpack.com/support/post-by-email/"}},this.props.userCanManageModules?M.default.createElement(C.ModuleToggle,{slug:"post-by-email",compact:!0,disabled:n,activated:t,toggling:this.props.isSavingAnyOption("post-by-email"),toggleModule:this.props.toggleModuleNow},M.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.module("post-by-email").description)):M.default.createElement("span",{className:"jp-form-toggle-explanation"},this.props.module("post-by-email").description),M.default.createElement(S.FormFieldset,null,M.default.createElement(S.FormLabel,null,M.default.createElement(S.FormLegend,null,(0,g.translate)("Email Address")),M.default.createElement(E.default,{value:r,disabled:!t||n,copy:(0,g.translate)("Copy",{context:"verb"}),copied:(0,g.translate)("Copied!"),prompt:(0,g.translate)("Highlight and copy the following text to your clipboard:")})),M.default.createElement(y.default,{disabled:!t||n,onClick:this.regeneratePostByEmailAddress},r?(0,g.translate)("Regenerate address"):(0,g.translate)("Create address")))),!this.props.isUnavailableInDevMode("post-by-email")&&!this.props.isLinked&&M.default.createElement(k.default,{compact:!0,className:"jp-settings-card__configure-link",href:this.props.connectUrl+"&from=unlinked-user-pbe"},(0,g.translate)("Connect your user account to WordPress.com to use this feature")))}}]),t}(M.default.Component);t.default=(0,b.connect)(function(e){return{module:function(t){return(0,O.getModule)(e,t)},isModuleFound:function(t){return(0,z.isModuleFound)(e,t)}}})((0,N.ModuleSettingsForm)(R)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(7),M=r(_),b=n(1),g=r(b),v=n(14),y=r(v),A=n(116),E=r(A),w=n(1142),k=r(w),T=n(508),L=r(T);n(1151);var S=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.state={isCopied:!1,disabled:!1},r.showConfirmation=function(){r.setState({isCopied:!0}),r.confirmationTimeout=setTimeout(function(){r.setState({isCopied:!1})},4e3)},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentWillUnmount",value:function(){clearTimeout(this.confirmationTimeout),delete this.confirmationTimeout}},{key:"render",value:function(){var e=(0,E.default)(this.props,"className","copied","copy","isError","isValid","prompt","selectOnFocus");return g.default.createElement("span",{className:(0,y.default)("dops-clipboard-button-input",this.props.className)},g.default.createElement(L.default,(0,i.default)({},e,{type:"text",selectOnFocus:!0,readOnly:!0})),g.default.createElement(k.default,{text:this.props.value,onCopy:this.showConfirmation,disabled:this.props.disabled,prompt:this.props.prompt,compact:!0},this.state.isCopied?this.props.copied:this.props.copy))}}]),t}(g.default.Component);S.displayName="ClipboardButtonInput",S.propTypes={value:M.default.string,disabled:M.default.bool,className:M.default.string,copied:M.default.string,copy:M.default.string,prompt:M.default.string},S.defaultProps={value:""},t.default=S,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(113),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(41),g=r(b),v=n(7),y=n(149),A=n(1),E=n(1143),w=n(116),k=n(64),T=n(14),L=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.displayPrompt=function(){window.prompt(r.props.prompt,r.props.text)},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"componentDidMount",value:function(){var e=this,t=y.findDOMNode(this.refs.button);this.clipboard=new E(t,{text:function(){return e.props.text}}),this.clipboard.on("success",this.props.onCopy),this.clipboard.on("error",this.displayPrompt)}},{key:"componentWillUnmount",value:function(){this.clipboard.destroy(),delete this.clipboard}},{key:"render",value:function(){var e=T("dops-clipboard-button",this.props.className);return A.createElement(g.default,(0,i.default)({ref:"button"},w(this.props,(0,s.default)(this.constructor.propTypes)),{className:e}))}}]),t}(A.Component);L.displayName="ClipboardButton",L.propTypes={className:v.string,text:v.string,prompt:v.string,onCopy:v.func},L.defaultProps={onCopy:k},t.default=L,e.exports=t.default},function(e,t,n){var r,a,i;!function(o,s){a=[e,n(1144),n(1146),n(1147)],r=s,void 0!==(i="function"==typeof r?r.apply(t,a):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var u=a(t),l=a(n),d=a(r),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.resolveOptions(n),r.listenClick(e),r}return s(t,e),p(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===f(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,d.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return c("action",e)}},{key:"defaultTarget",value:function(e){var t=c("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return c("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}(l.default);e.exports=h})},function(e,t,n){var r,a,i;!function(o,s){a=[e,n(1145)],r=s,void 0!==(i="function"==typeof r?r.apply(t,a):r)&&(e.exports=i)}(0,function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(e){return e&&e.__esModule?e:{default:e}}(t),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":a(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=o})},function(e,t){function n(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),a=document.createRange();a.selectNodeContents(e),r.removeAllRanges(),r.addRange(a),t=r.toString()}return t}e.exports=n},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function r(){a.off(e,r),t.apply(n,arguments)}var a=this;return r._=t,this.on(e,r,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,a=n.length;for(r;r<a;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],a=[];if(r&&t)for(var i=0,o=r.length;i<o;i++)r[i].fn!==t&&r[i].fn._!==t&&a.push(r[i]);return a.length?n[e]=a:delete n[e],this}},e.exports=n},function(e,t,n){function r(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!s.string(t))throw new TypeError("Second argument must be a String");if(!s.fn(n))throw new TypeError("Third argument must be a Function");if(s.node(e))return a(e,t,n);if(s.nodeList(e))return i(e,t,n);if(s.string(e))return o(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function a(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function i(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function o(e,t,n){return c(document.body,e,t,n)}var s=n(1148),c=n(1149);e.exports=r},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e,t,n,r,a){var o=i.apply(this,arguments);return e.addEventListener(n,o,a),{destroy:function(){e.removeEventListener(n,o,a)}}}function a(e,t,n,a,i){return"function"==typeof e.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return r(e,t,n,a,i)}))}function i(e,t,n,r){return function(n){n.delegateTarget=o(n.target,t),n.delegateTarget&&r.call(e,n)}}var o=n(1150);e.exports=a},function(e,t){function n(e,t){for(;e&&e.nodeType!==r;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}var r=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var a=Element.prototype;a.matches=a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}e.exports=n},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Masterbar=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(30),A=n(40),E=r(A),w=n(36),k=r(w),T=n(52);t.Masterbar=(0,y.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.getOptionValue("masterbar"),t=this.props.isUnavailableInDevMode("masterbar"),n=this.props.isLinked;return M.default.createElement(E.default,(0,i.default)({},this.props,{header:(0,b.translate)("WordPress.com toolbar",{context:"Settings header"}),module:"masterbar",hideButton:!0}),M.default.createElement(k.default,{disableInDevMode:!0,module:{module:"masterbar"},support:{text:(0,b.translate)("Adds a toolbar with links to all your sites, notifications, your WordPress.com profile, and the Reader."),
|
45 |
link:"https://jetpack.com/support/masterbar/"}},M.default.createElement(T.ModuleToggle,{slug:"masterbar",disabled:t||!n,activated:e,toggling:this.props.isSavingAnyOption("masterbar"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Enable the WordPress.com toolbar"),M.default.createElement("span",{className:"jp-form-setting-explanation"},(0,b.translate)("The WordPress.com toolbar replaces the default admin bar and offers quick links to the Reader, all your sites, your WordPress.com profile, and notifications. Centralize your WordPress experience with a single global toolbar.")))),!this.props.isUnavailableInDevMode("masterbar")&&!this.props.isLinked&&M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:this.props.connectUrl+"&from=unlinked-user-masterbar"},(0,b.translate)("Connect your user account to WordPress.com to use this feature")))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(51),s=r(o),c=n(2),u=r(c),l=n(3),d=r(l),f=n(6),p=r(f),h=n(4),m=r(h),_=n(5),M=r(_),b=n(1),g=r(b),v=n(10),y=n(8),A=n(851),E=r(A),w=n(71),k=n(30),T=n(23),L=n(74),S=n(40),C=r(S),O=n(36),z=r(O),N=n(52),D=(0,k.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,m.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(o))),r.toggleModule=function(e,t){"photon"===e?!1==!t?r.props.updateOptions({photon:!1,"tiled-gallery":!1,tiled_galleries:!1}):r.props.updateOptions({photon:!0,"tiled-gallery":!0,tiled_galleries:!0}):r.props.updateOptions((0,s.default)({},e,!t))},a=n,(0,m.default)(r,a)}return(0,M.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props.isModuleFound("photon"),t=this.props.isModuleFound("lazy-images");if(!e&&!t)return null;var n=this.props.module("photon"),r=this.props.module("lazy-images");return g.default.createElement(C.default,(0,i.default)({},this.props,{header:(0,y.translate)("Speed up your site"),hideButton:!0}),e&&g.default.createElement(z.default,{hasChild:!0,disableInDevMode:!0,module:n,support:{text:(0,y.translate)("Hosts your image files on the global WordPress.com servers."),link:"https://jetpack.com/support/photon/"}},g.default.createElement(N.ModuleToggle,{slug:"photon",disabled:this.props.isUnavailableInDevMode("photon"),activated:this.props.getOptionValue("photon"),toggling:this.props.isSavingAnyOption("photon"),toggleModule:this.toggleModule},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,E.default)(n.description))),g.default.createElement(w.FormFieldset,null,g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,E.default)(n.long_description)))),t&&g.default.createElement(z.default,{hasChild:!0,module:r,support:{text:(0,y.translate)("Delays the loading of images until they are visible in the visitor's browser."),link:"https://jetpack.com/support/lazy-images/"}},g.default.createElement(N.ModuleToggle,{slug:"lazy-images",disabled:this.props.isUnavailableInDevMode("lazy-images"),activated:this.props.getOptionValue("lazy-images"),toggling:this.props.isSavingAnyOption("lazy-images"),toggleModule:this.toggleModule},g.default.createElement("span",{className:"jp-form-toggle-explanation"},(0,E.default)(r.description))),g.default.createElement(w.FormFieldset,null,g.default.createElement("span",{className:"jp-form-setting-explanation"},(0,E.default)(r.long_description)))))}}]),t}(b.Component));t.default=(0,v.connect)(function(e){return{module:function(t){return(0,T.getModule)(e,t)},isModuleFound:function(t){return(0,L.isModuleFound)(e,t)}}})(D),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(23),b=n(103),g=n(21),v=n(74),y=n(28),A=n(211),E=r(A),w=n(1155),k=n(1156),T=n(1157),L=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,userCanManageModules:this.props.userCanManageModules},t=this.props.isModuleFound("publicize"),n=this.props.isModuleFound("sharedaddy"),r=this.props.isModuleFound("likes");return(this.props.searchTerm||this.props.active)&&(t||n||r)?m.default.createElement("div",null,m.default.createElement(E.default,null),t&&m.default.createElement(w.Publicize,e),n&&m.default.createElement(k.ShareButtons,e),r&&m.default.createElement(T.Likes,e)):null}}]),t}(h.Component);t.default=(0,_.connect)(function(e){return{module:function(t){return(0,M.getModule)(e,t)},settings:(0,b.getSettings)(e),isDevMode:(0,g.isDevMode)(e),isUnavailableInDevMode:function(t){return(0,g.isUnavailableInDevMode)(e,t)},isModuleFound:function(t){return(0,v.isModuleFound)(e,t)},isLinked:(0,g.isCurrentUserLinked)(e),connectUrl:(0,g.getConnectUrl)(e),siteRawUrl:(0,y.getSiteRawUrl)(e),siteAdminUrl:(0,y.getSiteAdminUrl)(e),userCanManageModules:(0,y.userCanManageModules)(e)}})(L),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Publicize=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(30),w=n(40),k=r(w),T=n(36),L=r(T),S=n(52);t.Publicize=(0,E.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"trackClickConfigure",value:function(){A.default.tracks.recordJetpackClick({target:"configure-publicize",page:"sharing"})}},{key:"render",value:function(){var e=this,t=this.props.isUnavailableInDevMode("publicize"),n=this.props.isLinked,r=this.props.connectUrl,a=this.props.siteRawUrl,o=this.props.getOptionValue("publicize"),s=this.props.userCanManageModules;return s||o?M.default.createElement(k.default,(0,i.default)({},this.props,{header:(0,b.translate)("Publicize connections",{context:"Settings header"}),module:"publicize",hideButton:!0}),s&&M.default.createElement(L.default,{disableInDevMode:!0,module:{module:"publicize"},support:{text:(0,b.translate)("Allows you to automatically share your newest content on social media sites, including Facebook and Twitter."),link:"https://jetpack.com/support/publicize/"}},M.default.createElement(S.ModuleToggle,{slug:"publicize",disabled:t,activated:o,toggling:this.props.isSavingAnyOption("publicize"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Automatically share your posts to social networks"))),o&&function(){if(!t)return n?M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackClickConfigure,href:"https://wordpress.com/sharing/"+a},(0,b.translate)("Connect your social media accounts")):M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:r+"&from=unlinked-user-connect-publicize"},(0,b.translate)("Connect your user account to WordPress.com to use this feature"))}()):null}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ShareButtons=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(25),v=r(g),y=n(15),A=r(y),E=n(30),w=n(40),k=r(w),T=n(36),L=r(T),S=n(52);t.ShareButtons=(0,E.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"trackClickConfigure",value:function(){A.default.tracks.recordJetpackClick({target:"configure-sharing",page:"sharing"})}},{key:"render",value:function(){var e=this,t=this.props.isLinked,n=this.props.connectUrl,r=this.props.siteRawUrl,a=this.props.siteAdminUrl,o=this.props.isDevMode,s=this.props.getOptionValue("sharedaddy");return M.default.createElement(k.default,(0,i.default)({},this.props,{header:(0,b.translate)("Sharing buttons",{context:"Settings header"}),module:"sharing",hideButton:!0}),M.default.createElement(L.default,{disableInDevMode:!0,module:{module:"sharing"},support:{text:(0,b.translate)("Adds sharing buttons to your content so that visitors can share it on social media sites."),link:"https://jetpack.com/support/sharing/"}},M.default.createElement(S.ModuleToggle,{slug:"sharedaddy",activated:s,toggling:this.props.isSavingAnyOption("sharedaddy"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Add sharing buttons to your posts"))),s&&function(){return o?M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:a+"options-general.php?page=sharing"},(0,b.translate)("Configure your sharing buttons")):t?M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackClickConfigure,href:"https://wordpress.com/sharing/buttons/"+r},(0,b.translate)("Configure your sharing buttons")):M.default.createElement(v.default,{compact:!0,className:"jp-settings-card__configure-link",href:n+"&from=unlinked-user-connect-sharing"},(0,b.translate)("Connect your user account to WordPress.com to use this feature"))}())}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Likes=void 0;var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(8),g=n(30),v=n(40),y=r(v),A=n(36),E=r(A),w=n(52);t.Likes=(0,g.ModuleSettingsForm)(function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.isUnavailableInDevMode("likes"),t=this.props.getOptionValue("likes");return M.default.createElement(y.default,(0,i.default)({},this.props,{header:(0,b.translate)("Like buttons",{context:"Settings header"}),module:"likes",hideButton:!0}),M.default.createElement(E.default,{disableInDevMode:!0,module:{module:"likes"},support:{text:(0,b.translate)("Adds like buttons to your content so that visitors can show their appreciation or enjoyment."),link:"https://jetpack.com/support/likes/"}},M.default.createElement(w.ModuleToggle,{slug:"likes",disabled:e,activated:t,toggling:this.props.isSavingAnyOption("likes"),toggleModule:this.props.toggleModuleNow},(0,b.translate)("Allow readers to show their appreciation of your posts by adding a like button to your content"))))}}]),t}(_.Component))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SearchableModules=void 0;var a=n(51),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(7),M=r(_),b=n(1),g=r(b),v=n(10),y=n(228),A=r(y),E=n(44),w=r(E),k=n(8),T=n(850),L=r(T),S=n(30),C=n(23),O=n(74),z=n(40),N=r(z),D=n(36),P=r(D),x=n(28),j=n(21),R=t.SearchableModules=(0,S.ModuleSettingsForm)(function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var o=arguments.length,c=Array(o),l=0;l<o;l++)c[l]=arguments[l];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(c))),r.handleBannerClick=function(e){return function(){return r.props.updateOptions((0,i.default)({},e,!0))}},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this;if(!this.props.canManageModules)return null;if(this.props.searchTerm.length<3)return null;var t=["contact-form","custom-css","enhanced-distribution","json-api","latex","notes","shortcodes","shortlinks","widget-visibility","widgets"],n=this.props.modules,r=[];return(0,A.default)(n,function(n,a){if(e.props.isModuleFound(a)&&(0,w.default)(t,a)){if(e.props.isDevMode&&e.props.isUnavailableInDevMode(n.module))return r.push(g.default.createElement(Y,{key:a,moduleData:n,devMode:!0}));e.props.getOptionValue(n.module)?r.push(g.default.createElement(Y,{key:a,moduleData:n})):r.push(g.default.createElement(L.default,{className:"jp-searchable-banner",key:a,callToAction:(0,k.translate)("Activate"),description:n.description,href:"javascript:void( 0 )",icon:"cog",onClick:e.handleBannerClick(n.module),title:n.name}))}}),g.default.createElement("div",null,r)}}]),t}(b.Component));R.propTypes={searchTerm:M.default.string},R.defaultProps={searchTerm:""};var Y=function(e){function t(){return(0,u.default)(this,t),(0,p.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e=this.props.moduleData,t=this.props.devMode;return g.default.createElement(N.default,{header:e.name,action:e.module,hideButton:!0},g.default.createElement(P.default,{disableInDevMode:t,module:{module:e.module},support:{link:e.learn_more_button}},e.description))}}]),t}(b.Component);t.default=(0,v.connect)(function(e){return{modules:(0,C.getModules)(e),isModuleFound:function(t){return(0,O.isModuleFound)(e,t)},canManageModules:(0,x.userCanManageModules)(e),isUnavailableInDevMode:function(t){return(0,j.isUnavailableInDevMode)(e,t)},isDevMode:(0,j.isDevMode)(e)}})(R)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(1),M=r(_),b=n(7),g=r(b),v=n(8),y=n(10),A=n(30),E=n(104),w=r(E),k=n(40),T=r(k),L=n(36),S=r(L),C=n(474),O=r(C),z=n(498),N=n(1160),D=n(103),P=n(15),x=r(P),j=function(){return x.default.tracks.recordJetpackClick({target:"privacy-policy",feature:"privacy"})},R=function(){return x.default.tracks.recordJetpackClick({target:"what-data-jetpack-sync",feature:"privacy"})},Y=function(e){function t(){var e,n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(o))),r.isPrivacyFound=function(){return!r.props.searchTerm||[(0,v.translate)("privacy",{context:"Search term."}),(0,v.translate)("tracks",{context:"Search term."}),(0,v.translate)("data",{context:"Search term."}),(0,v.translate)("gdpr",{context:"Search term."}),(0,v.translate)("tos",{context:"Search term."}),(0,v.translate)("terms of service",{context:"Search term."})].join(" ").toLowerCase().indexOf(r.props.searchTerm.toLowerCase())>-1},r.togglePrivacy=function(){var e=r.props.trackingSettings.tracks_opt_out;r.props.setTrackingSettings(!e)},a=n,(0,p.default)(r,a)}return(0,m.default)(t,e),(0,d.default)(t,[{key:"componentWillMount",value:function(){this.props.fetchTrackingSettings()}},{key:"render",value:function(){var e=this.props,t=e.searchTerm,n=e.active;return t||n?this.isPrivacyFound()&&M.default.createElement("div",null,M.default.createElement(T.default,(0,i.default)({},this.props,{header:(0,v.translate)("Privacy Settings",{context:"Settings header"}),hideButton:!0}),M.default.createElement(S.default,{hasChild:!0},M.default.createElement("p",null,(0,v.translate)("We are committed to your privacy and security. "),M.default.createElement("br",null),(0,v.translate)("Read about how Jetpack uses your data in the {{pp}}Automattic Privacy Policy{{/pp}} and our {{js}}What Data Does Jetpack Sync?{{/js}} support document.",{components:{pp:M.default.createElement(O.default,{href:"https://automattic.com/privacy/",onClick:j,target:"_blank",rel:"noopener noreferrer"}),js:M.default.createElement(O.default,{href:"https://jetpack.com/support/what-data-does-jetpack-sync/",onClick:R,target:"_blank",rel:"noopener noreferrer"})}})),M.default.createElement("p",null,M.default.createElement(w.default,{compact:!0,checked:!this.props.trackingSettings.tracks_opt_out,disabled:this.props.isFetchingTrackingSettings||this.props.isUpdatingTrackingSettings,onChange:this.togglePrivacy,id:"privacy-settings"},(0,v.translate)("Send information to help us improve our products.")))))):null}}]),t}(M.default.Component);Y.displayName="PrivacySettings",Y.propTypes={searchTerm:g.default.string,active:g.default.bool,toggleTracking:g.default.func,getOptionValue:g.default.func,isSavingAnyOption:g.default.func},Y.defaultProps={searchTerm:"",active:!1},t.default=(0,y.connect)(function(e){return{settings:(0,D.getSettings)(e),trackingSettings:(0,z.getTrackingSettings)(e),isUpdatingTrackingSettings:(0,z.isUpdatingTrackingSettings)(e),isFetchingTrackingSettings:(0,z.isFetchingTrackingSettingsList)(e)}},function(e){return{setTrackingSettings:function(t){x.default.tracks.setOptOut(t),e((0,N.updateTrackingSettings)({tracks_opt_out:t}))},fetchTrackingSettings:function(){return e((0,N.fetchTrackingSettings)())}}})((0,A.ModuleSettingsForm)(Y)),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTrackingSettings=t.fetchTrackingSettings=void 0;var r=n(114),a=n(8),i=n(16),o=n(56),s=function(e){return e&&e.__esModule?e:{default:e}}(o);t.fetchTrackingSettings=function(){return function(e){return e({type:i.USER_TRACKING_SETTINGS_FETCH}),s.default.fetchUserTrackingSettings().then(function(t){return e({type:i.USER_TRACKING_SETTINGS_FETCH_SUCCESS,settings:t}),t}).catch(function(t){e({type:i.USER_TRACKING_SETTINGS_FETCH_FAIL,error:t})})}},t.updateTrackingSettings=function(e){return function(t){var n={progress:(0,a.translate)("Updating privacy settings…"),success:(0,a.translate)("Updated privacy settings."),error:function(e){return(0,a.translate)("Error updating privacy settings. %(error)s",{args:{error:e.message||e.code||e.name||e}})}},o=function(){return e};return t((0,r.removeNotice)("tracking-settings-update")),t((0,r.removeNotice)("tracking-settings-update-success")),t((0,r.createNotice)("is-info",n.progress,{id:"tracking-settings-update"})),t({type:i.USER_TRACKING_SETTINGS_UPDATE,updatedSettings:e}),s.default.updateUserTrackingSettings(e).then(function(e){t({type:i.USER_TRACKING_SETTINGS_UPDATE_SUCCESS,updatedSettings:o(),success:e}),t((0,r.removeNotice)("tracking-settings-update")),t((0,r.removeNotice)("tracking-settings-update-success")),t((0,r.createNotice)("is-success",n.success,{id:"tracking-settings-update-success",duration:2e3}))}).catch(function(a){t({type:i.USER_TRACKING_SETTINGS_UPDATE_FAIL,updatedSettings:e,success:!1,error:a}),t((0,r.removeNotice)("tracking-settings-update")),t((0,r.removeNotice)("tracking-settings-update-success")),t((0,r.createNotice)("is-error",n.error(a),{id:"tracking-settings-update"}))})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(10),M=n(25),b=r(M),g=n(8),v=n(915),y=r(v),A=n(21),E=n(80),w=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.default.createElement("div",{className:"jp-jetpack-connect__container"},m.default.createElement("h1",{className:"jp-jetpack-connect__container-title",title:"Welcome to Jetpack"},(0,g.translate)("Welcome to Jetpack")),m.default.createElement(b.default,{className:"jp-jetpack-connect__cta"},m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Hassle-free design, marketing, and security for your WordPress site. Connect Jetpack to a WordPress.com account to start building your own success story.")),m.default.createElement(y.default,{from:"landing-page-top"})),m.default.createElement(b.default,{className:"jp-jetpack-connect__feature jp-jetpack-connect__design"},m.default.createElement("header",{className:"jp-jetpack-connect__header"},m.default.createElement("h2",{className:"jp-jetpack-connect__container-subtitle",title:(0,g.translate)("WordPress themes and customization tools for designing your site.")},(0,g.translate)("Design the perfect website")),m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Bring your ideas to life with elegant and professional designs and code-free customization tools."))),m.default.createElement("div",{className:"jp-jetpack-connect__interior-container"},m.default.createElement("img",{src:E.imagePath+"feature-photon-med.jpg",srcSet:E.imagePath+"feature-photon-sm.jpg 600w, "+E.imagePath+"feature-photon-med.jpg 770w, "+E.imagePath+"feature-photon-lrg.jpg 1200w",className:"jp-jetpack-connect__feature-image",alt:(0,g.translate)("Jetpack's photon serves up lightning fast, optimized images")}),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's WordPress themes"),className:"dops-section-header__label"},(0,g.translate)("Professional themes")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Find the perfect design for your site from hundreds of available themes.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's customization tools"),className:"dops-section-header__label"},(0,g.translate)("Code-free customization")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Customize your site with endless widget options, image galleries, and embedded media.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's performance features"),className:"dops-section-header__label"},(0,g.translate)("Speed up your site")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Deliver blazing fast images and video and improve site load times."))))))),m.default.createElement(b.default,{className:"jp-jetpack-connect__feature jp-jetpack-connect__traffic"},m.default.createElement("header",{className:"jp-jetpack-connect__header"},m.default.createElement("h2",{className:"jp-jetpack-connect__container-subtitle",title:(0,g.translate)("Drive more traffic to your site with Jetpack")},(0,g.translate)("Increase traffic and revenue")),m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Reach more people and earn money with automated marketing tools.")),m.default.createElement("div",{className:"jp-jetpack-connect__header-img-container"},m.default.createElement("img",{src:E.imagePath+"long-clouds.svg",width:"1160",height:"63",alt:(0,g.translate)("Decoration: Jetpack clouds",{context:"Image alternate text."}),className:"jp-jetpack-connect__header-img"})," ",m.default.createElement("img",{src:E.imagePath+"stat-bars.svg",width:"400",alt:(0,g.translate)("Decoration: Jetpack bar graph",{context:"Image alternate text."}),className:"jp-jetpack-connect__header-img"}))),m.default.createElement("div",{className:"jp-jetpack-connect__interior-container"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's site stats feature"),className:"dops-section-header__label"},(0,g.translate)("Track your growth")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Keep an eye on your success with simple, concise, and mobile-friendly stats.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's publicize features"),className:"dops-section-header__label"},(0,g.translate)("Automated marketing")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Schedule social media posts in advance, show related content, and give better search results.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's ads and PayPal features"),className:"dops-section-header__label"},(0,g.translate)("Generate revenue")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Monetize your site with high-quality ads and take PayPal payments."))))))),m.default.createElement(b.default,{className:"jp-jetpack-connect__feature jp-jetpack-connect__security"},m.default.createElement("header",{className:"jp-jetpack-connect__header"},m.default.createElement("h2",{className:"jp-jetpack-connect__container-subtitle",title:(0,g.translate)("Keep your site safe, 24/7")},(0,g.translate)("Keep your site safe, 24/7")),m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Automatic defense against hacks, malware, spam, data loss, and downtime."))),m.default.createElement("div",{className:"jp-jetpack-connect__interior-container"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list"},m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's monitor feature"),className:"dops-section-header__label"},(0,g.translate)("Monitor",{context:"Header. Noun: Monitor is a module of Jetpack."})),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Be alerted about any unexpected downtime the moment it happens.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:(0,g.translate)("Jetpack's Protect features"),className:"dops-section-header__label"},(0,g.translate)("Protect",{context:"Header. Noun: Protect is a module of Jetpack."})),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Guard your site against brute force login attacks, spam, and harmfulmalware injections.")))),m.default.createElement("div",{className:"jp-jetpack-connect__feature-list-column"},m.default.createElement("h3",{title:"Jetpack's backup feature",className:"dops-section-header__label"},(0,g.translate)("Backup and restore")),m.default.createElement("div",{className:"jp-jetpack-connect__feature-content"},m.default.createElement("p",null,(0,g.translate)("Automatic, real-time backups mean your entire site is always ready to be restored."))))))),m.default.createElement(b.default,{className:"jp-jetpack-connect__cta"},m.default.createElement("p",{className:"jp-jetpack-connect__description"},(0,g.translate)("Join the millions of users who rely on Jetpack to enhance and secure their sites. We're passionate about WordPress and here to make your life easier.")),m.default.createElement(y.default,{from:"landing-page-bottom"})))}}]),t}(m.default.Component);w.displayName="JetpackConnect",t.default=(0,_.connect)(function(e){return{connectUrl:(0,A.getConnectUrl)(e)}})(w),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.JetpackDisconnectDialog=void 0;var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(10),g=n(8),v=n(41),y=r(v),A=n(25),E=r(A),w=n(65),k=r(w),T=n(1163),L=r(T),S=n(47),C=n(64),O=r(C),z=n(15),N=r(z),D=n(61),P=n(21),x=n(28),j=t.JetpackDisconnectDialog=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.getPlanFeatures=function(){switch((0,S.getPlanClass)(r.props.sitePlan.product_slug)){case"is-personal-plan":return[{text:(0,g.translate)("Daily, automated backups (unlimited storage)"),icon:"history"},{text:(0,g.translate)("Priority support"),icon:"chat"},{text:(0,g.translate)("Spam filtering"),icon:"spam"}];case"is-premium-plan":return[{text:(0,g.translate)("Daily, automated backups (unlimited storage)"),icon:"history"},{text:(0,g.translate)("Daily, automated malware scanning"),icon:"spam"},{text:(0,g.translate)("Priority support"),icon:"chat"},{text:(0,g.translate)("13Gb of high-speed video hosting"),icon:"video"}];case"is-business-plan":return[{text:(0,g.translate)("Daily, automated backups (unlimited storage)"),icon:"history"},{text:(0,g.translate)("Daily, automated malware scanning with automated resolution"),icon:"spam"},{text:(0,g.translate)("Priority support"),icon:"chat"},{text:(0,g.translate)("Unlimited high-speed video hosting"),icon:"video"},{text:(0,g.translate)("SEO preview tools"),icon:"globe"}];default:return[{text:(0,g.translate)("Site stats, related content, and sharing tools"),icon:"stats-alt"},{text:(0,g.translate)("Brute force attack protection and downtime monitoring"),icon:"lock"},{text:(0,g.translate)("Unlimited, high-speed image hosting"),icon:"image"}]}},r.closeModal=function(){N.default.tracks.recordJetpackClick({target:"manage_site_connection",button:"stay-connected"}),r.props.toggleModal()},r.disconnectSiteTrack=function(){N.default.tracks.recordJetpackClick({target:"manage_site_connection",button:"disconnect-site"}),r.props.disconnectSite()},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return this.props.show&&M.default.createElement(L.default,{className:"jp-connection-settings__modal",onRequestClose:this.props.toggleModal},M.default.createElement(E.default,{className:"jp-connection-settings__modal-body"},M.default.createElement("h2",null,(0,g.translate)("Disconnect Jetpack")),M.default.createElement("h4",null,(0,g.translate)("By disconnecting %(siteName)s from WordPress.com you will no longer have access to the following:",{args:{siteName:this.props.siteRawUrl.replace(/::/g,"/")}})),M.default.createElement("ul",null,this.getPlanFeatures().map(function(e){return M.default.createElement("li",{key:"feature_"+e.icon},M.default.createElement(k.default,{icon:e.icon,size:18}),e.text)})),M.default.createElement("div",{className:"jp-connection-settings__modal-actions"},M.default.createElement(y.default,{className:"jp-connection-settings__modal-cancel",onClick:this.closeModal},(0,g.translate)("Stay connected",{context:"A caption for a button to cancel disconnection."})),M.default.createElement(y.default,{onClick:this.disconnectSiteTrack,scary:!0,primary:!0},(0,g.translate)("Disconnect",{context:"A caption for a button to disconnect."}))),M.default.createElement("p",{className:"jp-connection-settings__modal-more"},M.default.createElement("a",{href:"https://jetpack.com/features/"},(0,g.translate)("Read more about Jetpack benefits")))))}}]),t}(M.default.Component);j.propTypes={show:m.default.bool,toggleModal:m.default.func,disconnectSite:m.default.func},j.defaultProps={show:!1,toggleModal:O.default,disconnectSite:O.default},t.default=(0,b.connect)(function(e){return{siteRawUrl:(0,x.getSiteRawUrl)(e),isDisconnecting:(0,
|
46 |
P.isDisconnectingSite)(e),sitePlan:(0,D.getSitePlan)(e)}},function(e){return{disconnectSite:function(){return e((0,P.disconnectSite)())}}})(j)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){L=!0}function i(){L=!1}var o=n(11),s=r(o),c=n(463),u=r(c),l=n(2),d=r(l),f=n(3),p=r(f),h=n(6),m=r(h),_=n(4),M=r(_),b=n(5),g=r(b),v=n(7),y=n(1),A=n(149),E=n(14),w=n(24),k=n(116),T=n(1164),L=!1;n(1166);var S=function(e){function t(){var e,n,r,a;(0,p.default)(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=(0,M.default)(this,(e=t.__proto__||(0,d.default)(t)).call.apply(e,[this].concat(o))),r.state={overlayMouseDown:!1},r.handleEscapeKey=function(e){27===e.keyCode&&r.maybeClose()},r.maybeClose=function(){r.props.onRequestClose&&!L&&r.props.onRequestClose()},r.handleMouseDownOverlay=function(e){e.preventDefault(),e.stopPropagation(),r.setState({overlayMouseDown:!0})},r.handleClickOverlay=function(e){e.preventDefault(),e.stopPropagation(),r.state.overlayMouseDown&&r.props.onRequestClose&&!L&&(r.setState({overlayMouseDown:!1}),r.props.onRequestClose())},r.handleMouseEventModal=function(e){e.stopPropagation()},a=n,(0,M.default)(r,a)}return(0,g.default)(t,e),(0,m.default)(t,[{key:"componentDidMount",value:function(){jQuery("body").addClass("dops-modal-showing").on("touchmove.dopsmodal",!1),jQuery(document).keyup(this.handleEscapeKey);try{T.activate(A.findDOMNode(this),{initialFocus:this.props.initialFocus})}catch(e){}}},{key:"componentWillUnmount",value:function(){jQuery("body").removeClass("dops-modal-showing").off("touchmove.dopsmodal",!1),jQuery(document).unbind("keyup",this.handleEscapeKey);try{T.deactivate()}catch(e){}}},{key:"render",value:function(){var e=void 0,t=this.props,n=t.style,r=t.className,a=t.width,i=t.title,o=(0,u.default)(t,["style","className","width","title"]),c=k(o,"onRequestClose"),l=c.forwardedProps;switch(a){case"wide":e={maxWidth:"inherit",width:"inherit"};break;case"medium":e={maxWidth:1050,width:"inherit"};break;default:e={}}var d=w({},n,e);return y.createElement("div",{className:"dops-modal-wrapper",onClick:this.handleClickOverlay,onMouseDown:this.handleMouseDownOverlay},y.createElement("div",(0,s.default)({className:E("dops-modal",r),style:d,onClick:this.handleMouseEventModal,onMouseDown:this.handleMouseEventModal,onMouseUp:this.handleMouseEventModal,role:"dialog","aria-label":i},l),this.props.children))}}]),t}(y.Component);S.propTypes={style:v.object,width:v.oneOf(["wide","medium","narrow"]),className:v.string,title:v.string,initialFocus:v.string,onRequestClose:v.func},S.defaultProps={style:{}},S.preventClose=a,S.allowClose=i,e.exports=S},function(e,t,n){function r(e,t){function n(e){if(!k){var t={onActivate:e&&void 0!==e.onActivate?e.onActivate:C.onActivate};return k=!0,T=!1,w=document.activeElement,t.onActivate&&t.onActivate(),l(),O}}function r(e){if(k){var t={returnFocus:e&&void 0!==e.returnFocus?e.returnFocus:C.returnFocusOnDeactivate,onDeactivate:e&&void 0!==e.onDeactivate?e.onDeactivate:C.onDeactivate};return d(),t.onDeactivate&&t.onDeactivate(),t.returnFocus&&setTimeout(function(){i(w)},0),k=!1,T=!1,this}}function c(){!T&&k&&(T=!0,d())}function u(){T&&k&&(T=!1,l())}function l(){if(k)return s&&s.pause(),s=O,g(),i(p()),document.addEventListener("focus",_,!0),document.addEventListener("click",m,!0),document.addEventListener("mousedown",h,!0),document.addEventListener("touchstart",h,!0),document.addEventListener("keydown",M,!0),O}function d(){if(k&&s===O)return document.removeEventListener("focus",_,!0),document.removeEventListener("click",m,!0),document.removeEventListener("mousedown",h,!0),document.removeEventListener("touchstart",h,!0),document.removeEventListener("keydown",M,!0),s=null,O}function f(e){var t=C[e],n=t;if(!t)return null;if("string"==typeof t&&!(n=document.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(n=t()))throw new Error("`"+e+"` did not return a node");return n}function p(){var e;if(!(e=null!==f("initialFocus")?f("initialFocus"):S.contains(document.activeElement)?document.activeElement:y[0]||f("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return e}function h(e){C.clickOutsideDeactivates&&!S.contains(e.target)&&r({returnFocus:!1})}function m(e){C.clickOutsideDeactivates||S.contains(e.target)||(e.preventDefault(),e.stopImmediatePropagation())}function _(e){S.contains(e.target)||(e.preventDefault(),e.stopImmediatePropagation(),"function"==typeof e.target.blur&&e.target.blur(),L&&v(L))}function M(e){"Tab"!==e.key&&9!==e.keyCode||b(e),!1!==C.escapeDeactivates&&a(e)&&r()}function b(e){if(g(),e.target.hasAttribute("tabindex")&&Number(e.target.getAttribute("tabindex"))<0)return L=e;e.preventDefault();var t=y.indexOf(e.target);return e.shiftKey?i(e.target===A||-1===y.indexOf(e.target)?E:y[t-1]):e.target===E?i(A):void i(y[t+1])}function g(){y=o(S),A=y[0],E=y[y.length-1]}function v(e){if(e.shiftKey)return i(E);i(A)}var y=[],A=null,E=null,w=null,k=!1,T=!1,L=null,S="string"==typeof e?document.querySelector(e):e,C=t||{};C.returnFocusOnDeactivate=!t||void 0===t.returnFocusOnDeactivate||t.returnFocusOnDeactivate,C.escapeDeactivates=!t||void 0===t.escapeDeactivates||t.escapeDeactivates;var O={activate:n,deactivate:r,pause:c,unpause:u};return O}function a(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}function i(e){e&&e.focus&&e!==document.activeElement&&(e.focus(),"input"===e.tagName.toLowerCase()&&e.select())}var o=n(1165),s=null;e.exports=r},function(e,t){function n(e){function t(r,a){if(r===e.documentElement)return!1;for(var i=0,o=n.length;i<o;i++)if(n[i][0]===r)return n[i][1];a=a||e.defaultView.getComputedStyle(r);var s=!1;return"none"===a.display?s=!0:r.parentNode&&(s=t(r.parentNode)),n.push([r,s]),s}var n=[];return function(n){if(n===e.documentElement)return!1;var r=e.defaultView.getComputedStyle(n);return!!t(n,r)||"hidden"===r.visibility}}e.exports=function(e,t){t=t||{};var r=e.ownerDocument||e,a=[],i=[],o=n(r),s=["input","select","a[href]","textarea","button","[tabindex]"],c=e.querySelectorAll(s.join(","));if(t.includeContainer){var u=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;s.some(function(t){return u.call(e,t)})&&(c=Array.prototype.slice.apply(c),c.unshift(e))}for(var l,d,f=0,p=c.length;f<p;f++)l=c[f],(d=parseInt(l.getAttribute("tabindex"),10)||l.tabIndex)<0||"INPUT"===l.tagName&&"hidden"===l.type||l.disabled||o(l,r)||(0===d?a.push(l):i.push({index:f,tabIndex:d,node:l}));var h=i.sort(function(e,t){return e.tabIndex===t.tabIndex?e.index-t.index:e.tabIndex-t.tabIndex}).map(function(e){return e.node});return Array.prototype.push.apply(h,a),h}},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return{__html:e.jumpstart_desc}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=r(i),s=n(3),c=r(s),u=n(6),l=r(u),d=n(4),f=r(d),p=n(5),h=r(p),m=n(1),_=r(m),M=n(18),b=n(10),g=n(41),v=r(g),y=n(8),A=n(916),E=n(23),w=n(80),k=n(475),T=r(k),L=function(e){function t(){var e,n,r,a;(0,c.default)(this,t);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return n=r=(0,f.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(s))),r.activateButton=function(){return _.default.createElement(v.default,{primary:!0,onClick:r.props.jumpStartActivate,disabled:r.props.isJumpstarting},r.props.isJumpstarting?(0,y.translate)("Activating recommended features…"):(0,y.translate)("Activate recommended features"))},a=n,(0,f.default)(r,a)}return(0,h.default)(t,e),(0,l.default)(t,[{key:"renderInnerContent",value:function(){var e=this.props.jumpstartFeatures.map(function(e){return _.default.createElement("div",{className:"jp-jumpstart__feature-list-column",key:"module-card_"+e.name},_.default.createElement("div",{className:"jp-jumpstart__feature-content"},_.default.createElement("h4",{className:"jp-jumpstart__feature-content-title",title:e.name},e.name),_.default.createElement("p",{dangerouslySetInnerHTML:a(e)})))});return _.default.createElement("div",{className:"jp-jumpstart"},_.default.createElement("p",null,(0,y.translate)("We're now collecting stats, securing your site, and speeding up your images. Pretty soon you'll be able to see everything going on with your site right through Jetpack! Welcome aboard.")),_.default.createElement("p",null,this.activateButton()),_.default.createElement("div",null,_.default.createElement("h2",{className:"jp-jumpstart__feature-heading"},(0,y.translate)("Jetpack's recommended features include:")),_.default.createElement("div",{className:"jp-jumpstart__feature-list"},e),this.activateButton(),_.default.createElement("p",{className:"jp-jumpstart__note"},(0,y.translate)("Features can be activated or deactivated at any time."))))}},{key:"render",value:function(){return _.default.createElement(T.default,{svg:_.default.createElement("img",{src:w.imagePath+"man-and-laptop.svg",width:"199",height:"153",alt:(0,y.translate)("Person with laptop")}),title:(0,y.translate)("Your Jetpack site is ready to go!"),content:this.renderInnerContent(),dismiss:this.props.jumpStartSkip})}}]),t}(_.default.Component);L.displayName="JumpStart",t.default=(0,b.connect)(function(e){return{isJumpstarting:(0,A.isJumpstarting)(e),jumpstartFeatures:(0,E.getModulesByFeature)(e,"Jumpstart")}},function(e){return(0,M.bindActionCreators)({jumpStartActivate:A.jumpStartActivate,jumpStartSkip:A.jumpStartSkip},e)})(L),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.jumpStartSkip=t.jumpStartActivate=void 0;var a=n(114),i=n(8),o=n(646),s=n(15),c=r(s),u=n(16),l=n(56),d=r(l),f=n(23),p=n(103),h=(t.jumpStartActivate=function(){return function(e){return e({type:u.JUMPSTART_ACTIVATE}),e((0,a.removeNotice)("jumpstart-activate")),e((0,a.createNotice)("is-info",(0,i.translate)("Activating recommended features…"),{id:"jumpstart-activate"})),d.default.jumpStart("activate").then(function(){e({type:u.JUMPSTART_ACTIVATE_SUCCESS,jumpStart:!0}),c.default.tracks.recordEvent("jetpack_wpa_jumpstart_submit",{}),e((0,a.removeNotice)("jumpstart-activate")),e((0,a.createNotice)("is-success",(0,i.translate)("Recommended features active."),{id:"jumpstart-activate",duration:2e3})),e((0,f.fetchModules)()),e((0,p.fetchSettings)())}).catch(function(t){e({type:u.JUMPSTART_ACTIVATE_FAIL,error:t}),e((0,a.removeNotice)("jumpstart-activate")),e((0,a.createNotice)("is-error",(0,i.translate)("Recommended features failed to activate. %(error)s",{args:{error:t}}),{id:"jumpstart-activate"}))})}},(0,o.createHistory)());t.jumpStartSkip=function(){return function(e){return e({type:u.JUMPSTART_SKIP}),c.default.tracks.recordEvent("jetpack_wpa_jumpstart_skip",{}),h.push(window.location.pathname+"?page=jetpack#/dashboard"),d.default.jumpStart("deactivate").then(function(){e({type:u.JUMPSTART_SKIP_SUCCESS,jumpStart:!1})}).catch(function(t){e({type:u.JUMPSTART_SKIP_FAIL,error:t})})}}},function(e,t,n){function r(e,t,n){t=(n?i(e,t,n):void 0===t)?1:c(o(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var u=0,l=0,d=Array(s(r/t));u<r;)d[l++]=a(e,u,u+=t);return d}var a=n(466),i=n(219),o=n(227),s=Math.ceil,c=Math.max;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=r(h),_=n(7),M=r(_),b=n(10),g=n(128),v=r(g),y=n(8),A=n(14),E=r(A),w=n(61),k=n(21),T=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.siteRawUrl,n=e.inDevMode,r=m.default.createElement("a",{href:"https://wordpress.com/stats/activity/"+t}),a=(0,y.translate)("{{a}}View your site's activity{{/a}} in a single feed.",{components:{a:r}});return m.default.createElement("div",{className:"jp-dash-item__interior"},m.default.createElement(v.default,{label:(0,y.translate)("Activity"),isModule:!1,className:(0,E.default)({"jp-dash-item__is-inactive":n}),pro:!1},m.default.createElement("p",{className:"jp-dash-item__description"},n?(0,y.translate)("Unavailable in Dev Mode."):a)))}}]),t}(h.Component);T.propTypes={inDevMode:M.default.bool.isRequired,siteRawUrl:M.default.string.isRequired,sitePlan:M.default.object.isRequired},T.defaultProps={inDevMode:!1,siteRawUrl:"",sitePlan:""},t.default=(0,b.connect)(function(e){return{sitePlan:(0,w.getSitePlan)(e),inDevMode:(0,k.isDevMode)(e)}})(T),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DashStats=void 0;var a=n(59),i=r(a),o=n(2),s=r(o),c=n(3),u=r(c),l=n(6),d=r(l),f=n(4),p=r(f),h=n(5),m=r(h),_=n(7),M=r(_),b=n(1),g=r(b),v=n(228),y=r(v),A=n(27),E=r(A),w=n(234),k=r(w),T=n(25),L=r(T),S=n(1173),C=r(S),O=n(10),z=n(918),N=r(z),D=n(41),P=r(D),x=n(867),j=r(x),R=n(8),Y=n(15),I=r(Y),q=n(80),B=n(21),W=n(28),U=n(1182),H=r(U),F=n(1183),X=r(F),V=n(62),K=n(23),J=n(103),G=n(515),Q=r(G),Z=t.DashStats=function(e){function t(e){(0,u.default)(this,t);var n=(0,p.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e));return n.state={emptyStatsDismissed:e.isEmptyStatsCardDismissed},n}return(0,m.default)(t,e),(0,d.default)(t,[{key:"barClick",value:function(e){e.data.link&&(I.default.tracks.recordJetpackClick("stats_bar"),window.open(e.data.link,"_blank"))}},{key:"statsChart",value:function(e){var t=this.props,n=[],r=0;return"object"!==(0,i.default)(t.statsData[e])?{chartData:n,totalViews:!1}:((0,y.default)(t.statsData[e].data,function(a){var i=a[1],o=a[0],s="",c="";r+=i,"day"===e?(s=(0,R.moment)(o).format("MMM D"),c=(0,R.moment)(o).format("MMMM Do")):"week"===e?(o=o.replace(/W/g,"-"),s=(0,R.moment)(o).format("MMM D"),c=(0,R.translate)("Week of %(date)s",{args:{date:(0,R.moment)(o).format("MMMM Do")}})):(s=(0,R.moment)(o).format("MMM"),c=(0,R.moment)(o).format("MMMM, YYYY")),n.push({label:s,value:i,nestedValue:null,className:"statsChartbar",data:{link:"https://wordpress.com/stats/"+e+"/"+t.siteRawUrl+"?startDate="+o},tooltipData:[{label:c,value:(0,R.translate)("Views: %(numberOfViews)s",{args:{numberOfViews:(0,R.numberFormat)(i)}}),className:"tooltip class"},{label:(0,R.translate)("Click to view detailed stats.")}]})}),{chartData:n,totalViews:r})}},{key:"statsErrors",value:function(){return(0,E.default)(this.props.statsData,["general","errors"],!1)}},{key:"renderStatsChart",value:function(e){return g.default.createElement("div",null,g.default.createElement("div",{className:"jp-at-a-glance__stats-chart"},g.default.createElement(C.default,{data:e,barClick:this.barClick}),0===e.length&&g.default.createElement(j.default,null)),g.default.createElement("div",{id:"stats-bottom",className:"jp-at-a-glance__stats-bottom"},g.default.createElement(X.default,{statsData:this.props.statsData,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl})))}},{key:"renderEmptyStatsCard",value:function(){var e=this,t=function(){e.setState({emptyStatsDismissed:!0}),e.props.updateOptions({dismiss_empty_stats_card:!0})};return g.default.createElement(L.default,{className:"jp-at-a-glance__stats-empty"},g.default.createElement("img",{src:q.imagePath+"stats-people.svg",width:"272",height:"144",alt:(0,R.translate)("Jetpack Stats People"),className:"jp-at-a-glance__stats-icon"}),g.default.createElement("p",null,(0,R.translate)("Hello there! Your stats have been activated."),g.default.createElement("br",null),(0,R.translate)("Just give us a little time to collect data so we can display it for you here.")),g.default.createElement(P.default,{onClick:t,primary:!0},(0,R.translate)("Okay, got it!")))}},{key:"renderStatsArea",value:function(){var e=this,t=function(){return e.props.updateOptions({stats:!0})};if(this.props.getOptionValue("stats")){if(this.statsErrors())return g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive"},g.default.createElement("span",null,(0,R.translate)("Something happened while loading stats. Please try again later or {{a}}view your stats now on WordPress.com{{/a}}",{components:{a:g.default.createElement("a",{href:"https://wordpress.com/stats/insights/"+this.props.siteRawUrl})}})));var n=this.statsChart(this.props.activeTab),r=n.chartData,a=n.totalViews,i=r.length&&a<=0&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed;return g.default.createElement("div",{className:"jp-at-a-glance__stats-container"},i?this.renderEmptyStatsCard():this.renderStatsChart(r))}return g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive"},g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-icon"},g.default.createElement("img",{src:q.imagePath+"stats.svg",width:"60",height:"60",alt:(0,R.translate)("Jetpack Stats Icon"),className:"jp-at-a-glance__stats-icon"})),g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-text"},this.props.isDevMode?(0,R.translate)("Unavailable in Dev Mode"):(0,R.translate)("{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}",{components:{a:g.default.createElement("a",{href:"javascript:void(0)",onClick:t}),a1:g.default.createElement("a",{href:"https://jetpack.com/support/wordpress-com-stats/",target:"_blank",rel:"noopener noreferrer"})}})),!this.props.isDevMode&&g.default.createElement("div",{className:"jp-at-a-glance__stats-inactive-button"},g.default.createElement(P.default,{onClick:t,primary:!0},(0,R.translate)("Activate Site Stats"))))}},{key:"maybeShowStatsTabs",value:function(){var e=this;if(!1===this.statsChart(this.props.activeTab).totalViews&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed)return!1;var t=function(){I.default.tracks.recordJetpackClick({target:"stats_switch_view",view:"day"}),e.props.switchView("day"),e.props.fetchStatsData("day")},n=function(){I.default.tracks.recordJetpackClick({target:"stats_switch_view",view:"week"}),e.props.switchView("week"),e.props.fetchStatsData("week")},r=function(){I.default.tracks.recordJetpackClick({target:"stats_switch_view",view:"month"}),e.props.switchView("month"),e.props.fetchStatsData("month")};return this.props.getOptionValue("stats")&&!this.statsErrors()?g.default.createElement("ul",{className:"jp-at-a-glance__stats-views"},g.default.createElement("li",{tabIndex:"0",className:"jp-at-a-glance__stats-view"},g.default.createElement("a",{href:"javascript:void(0)",onClick:t,className:this.getClass("day")},(0,R.translate)("Days"))),g.default.createElement("li",{tabIndex:"0",className:"jp-at-a-glance__stats-view"},g.default.createElement("a",{href:"javascript:void(0)",onClick:n,className:this.getClass("week")},(0,R.translate)("Weeks"))),g.default.createElement("li",{tabIndex:"0",className:"jp-at-a-glance__stats-view"},g.default.createElement("a",{href:"javascript:void(0)",onClick:r,className:this.getClass("month")},(0,R.translate)("Months")))):void 0}},{key:"getClass",value:function(e){return this.props.activeTab===e?"jp-at-a-glance__stats-view-link is-current":"jp-at-a-glance__stats-view-link"}},{key:"render",value:function(){return"inactive"===this.props.getModuleOverride("stats")?g.default.createElement("div",null,g.default.createElement(Q.default,{moduleName:(0,R.translate)("Site Stats")})):this.props.isModuleAvailable&&g.default.createElement("div",null,g.default.createElement(H.default,{range:this.props.activeTab}),g.default.createElement(N.default,{label:(0,R.translate)("Site Stats")},this.maybeShowStatsTabs()),g.default.createElement(L.default,{className:"jp-at-a-glance__stats-card "+(this.props.isDevMode?"is-inactive":"")},this.renderStatsArea()))}}]),t}(b.Component);Z.propTypes={isDevMode:M.default.bool.isRequired,siteRawUrl:M.default.string.isRequired,siteAdminUrl:M.default.string.isRequired,statsData:M.default.any.isRequired,isModuleAvailable:M.default.bool.isRequired},t.default=(0,O.connect)(function(e){return{isModuleAvailable:(0,K.isModuleAvailable)(e,"stats"),activeTab:(0,V.getActiveStatsTab)(e),isDevMode:(0,B.isDevMode)(e),isLinked:(0,B.isCurrentUserLinked)(e),connectUrl:(0,B.getConnectUrl)(e),statsData:(0,k.default)((0,V.getStatsData)(e))?(0,W.getInitialStateStatsData)(e):(0,V.getStatsData)(e),isEmptyStatsCardDismissed:(0,J.emptyStatsCardDismissed)(e),getModuleOverride:function(t){return(0,K.getModuleOverride)(e,t)}}},function(e){return{switchView:function(t){return e((0,V.statsSwitchTab)(t))},fetchStatsData:function(t){return e((0,V.fetchStatsData)(t))}}})(Z)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(7),_=n(64),M=n(919),b=n(1174),g=n(1180);n(1181);var v=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={maxBars:100,width:650},r.resize=function(){var e=r.refs.chart,t=e.clientWidth-82,n=void 0;g.hasTouch()?(t=t<=0?350:t,n=Math.floor(t/r.props.minTouchBarWidth)):n=Math.floor(t/r.props.minBarWidth),r.setState({maxBars:n,width:t})},r.getYAxisMax=function(e){var t=Math.max.apply(null,e),n=Math.pow(10,t.toString().length-1),r=Math.ceil((t+1)/n)*n;return r<10&&(r=10),r},r.getData=function(){var e=r.props.data;return e=e.slice(0-r.state.maxBars)},r.getValues=function(){var e=r.getData();return e=e.map(function(e){return e.value},r)},r.isEmptyChart=function(e){return e=e.filter(function(e){return e>0},r),0===e.length},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){this.resize=M(this.resize,400),window.addEventListener("resize",this.resize),this.resize()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"componentWillReceiveProps",value:function(e){this.props.loading&&!e.loading&&this.resize()}},{key:"render",value:function(){var e=this.getValues(),t=this.getYAxisMax(e),n=this.getData(),r=void 0;return e.length&&this.isEmptyChart(e)&&(r=h.createElement("div",{className:"dops-chart__empty"},h.createElement("span",{className:"dops-chart__empty_notice"},"No activity this period"))),h.createElement("div",{ref:"chart",className:"dops-chart"},h.createElement("div",{className:"dops-chart__y-axis-markers"},h.createElement("div",{className:"dops-chart__y-axis-marker is-hundred"}),h.createElement("div",{className:"dops-chart__y-axis-marker is-fifty"}),h.createElement("div",{className:"dops-chart__y-axis-marker is-zero"})),h.createElement("div",{className:"dops-chart__y-axis"},h.createElement("div",{className:"dops-chart__y-axis-width-fix"},new Number(1e5).toLocaleString()),h.createElement("div",{className:"dops-chart__y-axis-label is-hundred"},t.toLocaleString()),h.createElement("div",{className:"dops-chart__y-axis-label is-fifty"},(t/2).toLocaleString()),h.createElement("div",{className:"dops-chart__y-axis-label is-zero"},0)),h.createElement(b,{barClick:this.props.barClick,data:n,yAxisMax:t,chartWidth:this.state.width,isTouch:g.hasTouch()}),r)}}]),t}(h.Component);v.displayName="ModuleChart",v.propTypes={loading:m.bool,data:m.array,minTouchBarWidth:m.number,minBarWidth:m.number,barClick:m.func},v.defaultProps={minTouchBarWidth:42,minBarWidth:15,barClick:_},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(1175),M=n(1178),b=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.buildBars=function(e){var t=r.props.data.length,n=r.props.chartWidth,a=n/t,i="bottom right";return r.props.data.map(function(r,o){var s=a*(o+1);return s+230>n&&s+a-230>0&&(i="bottom left"),m.createElement(_,{index:o,key:o,isTouch:this.props.isTouch,tooltipPosition:i,className:r.className,clickHandler:this.props.barClick,data:r,max:e,count:t})},r)},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return m.createElement("div",null,m.createElement("div",{className:"dops-chart__bars"},this.buildBars(this.props.yAxisMax)),m.createElement(M,{data:this.props.data,labelWidth:42}))}}]),t}(m.Component);b.displayName="ModuleChartBarContainer",b.propTypes={isTouch:h.bool,data:h.array,yAxisMax:h.number,width:h.number,barClick:h.func},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=n(14),M=n(1176),b=n(65),g=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={showPopover:!1},r.buildSections=function(){var e=r.props.data.value,t=r.props.max,n=t?Math.ceil(e/t*1e4)/100:0,a=100-n,i=Math.max(1,Math.floor(a)),o=[],s=r.props.data.nestedValue,c={"dops-chart__bar-section":!0,"is-spacer":!0,"is-ghost":100===a&&!r.props.active},u=void 0,l=void 0,d=void 0,f={height:i+"%"};o.push(m.createElement("div",{key:"spacer",className:_(c),style:f}));var p={top:i+"%"};return s&&(l=e?Math.ceil(s/e*1e4)/100:0,d={height:l+"%"},u=m.createElement("div",{key:"nestedValue",className:"dops-chart__bar-section-inner",style:d})),o.push(m.createElement("div",{ref:"valueBar",key:"value",className:"dops-chart__bar-section is-bar",style:p},u)),o.push(m.createElement("div",{key:"label",className:"dops-chart__bar-label"},r.props.label)),o},r.clickHandler=function(){"function"==typeof r.props.clickHandler&&r.props.clickHandler(r.props.data)},r.mouseEnter=function(){r.setState({showPopover:!0})},r.mouseLeave=function(){r.setState({showPopover:!1})},r.renderTooltip=function(){if(!r.props.data.tooltipData||!r.props.data.tooltipData.length||r.props.isTouch)return null;var e=r.props.data.tooltipData,t=e.map(function(e,t){var n=["module-content-list-item"],r=void 0;return e.icon&&(r=m.createElement(b,{icon:e.icon,size:18})),n.push(e.className),m.createElement("li",{key:t,className:n.join(" ")},m.createElement("span",{className:"dops-wrapper"},m.createElement("span",{className:"value"},e.value),m.createElement("span",{className:"label"},r,e.label)))});return m.createElement(M,{className:"dops-chart__tooltip",id:"popover__chart-bar",showDelay:200,context:r.refs&&r.refs.valueBar,isVisible:r.state.showPopover,position:r.props.tooltipPosition},m.createElement("ul",null,t))},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props.count||1,t={"dops-chart__bar":!0};this.props.className&&(t[this.props.className]=!0);var n={width:1/e*100+"%"};return m.createElement("div",{onClick:this.clickHandler,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,className:_(t),style:n},this.buildSections(),m.createElement("div",{className:"dops-chart__bar-marker is-hundred"}),m.createElement("div",{className:"dops-chart__bar-marker is-fifty"}),m.createElement("div",{className:"dops-chart__bar-marker is-zero"}),this.renderTooltip())}}]),t}(m.Component);g.displayName="ModuleChartBar",g.propTypes={isTouch:h.bool,tooltipPosition:h.string,className:h.string,clickHandler:h.func,data:h.object.isRequired,max:h.number,count:h.number},t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=r(h),_=n(1),M=r(_),b=n(14),g=r(b),v=n(833),y=r(v),A=n(808),E=r(A);n(1177);var w=function(){},k=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){if(!this.props.showOnMobile&&E.default.isMobile())return null;var e=(0,g.default)("dops-popover","dops-tooltip","is-"+this.props.position,this.props.className);return M.default.createElement(y.default,{autoPosition:this.props.autoPosition,className:e,rootClassName:this.props.rootClassName,context:this.props.context,id:this.props.id,isVisible:this.props.isVisible,onClose:w,position:this.props.position,showDelay:this.props.showDelay},this.props.children)}}]),t}(_.Component);k.propTypes={autoPosition:m.default.bool,className:m.default.string,id:m.default.string,isVisible:m.default.bool,position:m.default.string,rootClassName:m.default.string,status:m.default.string,showDelay:m.default.number,showOnMobile:m.default.bool},k.defaultProps={showDelay:100,position:"top",showOnMobile:!1},t.default=k,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(1),m=n(7),_=n(919),M=n(1179),b=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=(0,d.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.state={divisor:1,spacing:r.props.labelWidth},r.resize=function(e){var t=r.props,n=r.refs.axis;!e||e instanceof Event||(t=e),n.style.overflow="hidden";var a=n.clientWidth;n.style.overflow="visible";var i=t.data.length||1,o=a/i,s=t.labelWidth,c=Math.ceil(s/o);r.setState({divisor:c,spacing:o})},a=n,(0,d.default)(r,a)}return(0,p.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){this.resizeThrottled=_(this.resize,400),window.addEventListener("resize",this.resizeThrottled),this.resize()}},{key:"componentWillUnmount",value:function(){this.resizeThrottled.cancel&&this.resizeThrottled.cancel(),window.removeEventListener("resize",this.resizeThrottled)}},{key:"componentWillReceiveProps",value:function(e){this.resize(e)}},{key:"render",value:function(){var e=this.props.data,t=e.map(function(t,n){var r=n*this.state.spacing+(this.state.spacing-this.props.labelWidth)/2,a=e.length-n-1,i=void 0;return a%this.state.divisor==0&&(i=h.createElement(M,{key:n,label:t.label,width:this.props.labelWidth,x:r})),i},this);return h.createElement("div",{ref:"axis",className:"dops-chart__x-axis"},t)}}]),t}(h.Component);b.displayName="ModuleChartXAxis",b.propTypes={labelWidth:m.number.isRequired,data:m.array.isRequired},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(3),s=r(o),c=n(6),u=r(c),l=n(4),d=r(l),f=n(5),p=r(f),h=n(7),m=n(1),_=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e={width:this.props.width+"px"};return e.left=this.props.x+"px",m.createElement("div",{className:"dops-chart__x-axis-label",style:e},this.props.label)}}]),t}(m.Component);_.displayName="ModuleChartLabel",_.propTypes={width:h.number.isRequired,x:h.number.isRequired,label:h.string.isRequired},t.default=_,e.exports=t.default},function(e,t,n){"use strict";e.exports={hasTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}}
|
_inc/build/infinite-scroll/infinity.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
/* Do not modify this file directly. It is compiled from other files. */
|
2 |
!function($){// Open closure
|
3 |
// Local vars
|
4 |
-
var Scroller,ajaxurl,stats,type,text,totop,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE)var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/),IEVersion=parseInt(IEVersion[1]);"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=$(document.body),this.window=$(window),this.element=$("#"+e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.handle='<div id="infinite-handle"><span><button>'+text.replace("\\","")+"</button></span></div>",this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.pageCache={},this.footer=$("#infinite-footer"),this.footer.wrap=e.footer,this.wpMediaelement=null,"scroll"==type?(this.window.bind("scroll.infinity",function(){this.throttle=!0}),t.gotop(),setInterval(function(){this.throttle&&(this.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.bind("post-load",{self:t},t.checkViewportOnLoad)):"click"==type&&(this.click_handle&&this.element.append(this.handle),this.body.delegate("#infinite-handle","click.infinity",function(){t.click_handle&&$("#infinite-handle").remove(),t.refresh()})),this.body.bind("post-load",{self:t},t.initializeMejs)},Scroller.prototype.check=function(){var e=this.element.offset();return"object"==typeof e&&this.window.scrollTop()+this.window.height()>e.top+this.element.outerHeight(!1)-2*this.window.height()},Scroller.prototype.render=function(e){this.body.addClass("infinity-success"),this.element.append(e.html),this.body.trigger("post-load",e),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.gotop=function(){var e=$("#infinity-blog-title");e.attr("title",totop),e.bind("click",function(e){$("html, body").animate({scrollTop:0},"fast"),e.preventDefault()})},Scroller.prototype.thefooter=function(){var e,t=this;"string"===$.type(this.footer.wrap)&&(e=$("body #"+this.footer.wrap).outerWidth(!1))>479&&this.footer.find(".container").css("width",e),this.window.scrollTop()>=350?t.footer.animate({bottom:0},"fast"):this.window.scrollTop()<350&&t.footer.animate({bottom:"-50px"},"fast")},Scroller.prototype.refresh=function(){var self=this,query,jqxhr,load,loader,color,customized;if(!this.disabled&&this.ready&&this.check()){if(this.ready=!1,this.click_handle){loader='<span class="infinite-loader"></span>',this.element.append(loader),loader=this.element.find(".infinite-loader"),color=loader.css("color");try{loader.spin("medium-left",color)}catch(e){}}return query=$.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),jqxhr=$.post(infiniteScroll.settings.ajaxurl,query),jqxhr.fail(function(){self.click_handle&&loader.hide(),self.ready=!0}),jqxhr.done(function(response){if(self.click_handle&&loader.hide(),response&&response.type&&"success"==response.type&&(response.scripts&&$(response.scripts).each(function(){var e=this.footer?"body":"head";if(window.infiniteScroll.settings.scripts.push(this.handle),this.extra_data){var t=document.createElement("script"),i=document.createTextNode("//<![CDATA[ \n"+this.extra_data+"\n//]]>");t.type="text/javascript",t.appendChild(i),document.getElementsByTagName(e)[0].appendChild(t)}var s=document.createElement("script");s.type="text/javascript",s.src=this.src,s.id=this.handle,"wp-mediaelement"===this.handle&&self.body.unbind("post-load",self.initializeMejs),"wp-mediaelement"===this.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=s,self.wpMediaelement.element=e,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(e)[0].appendChild(s)}),response.styles&&$(response.styles).each(function(){window.infiniteScroll.settings.styles.push(this.handle);var style=document.createElement("link");if(style.rel="stylesheet",style.href=this.src,style.id=this.handle+"-css",this.conditional&&(!isIE||!eval(this.conditional.replace(/%ver/g,IEVersion))))var style=!1;style&&document.getElementsByTagName("head")[0].appendChild(style)}),self.pageCache[self.page+self.offset]=response,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=$.extend(WPCOM_sharing_counts,response.postflair)),self.render.apply(self,arguments),"click"==type?response.lastbatch?self.click_handle?($("#infinite-handle").remove(),self.body.addClass("infinity-end").removeClass("infinity-success")):self.body.trigger("infinite-scroll-posts-end"):self.click_handle?self.element.append(self.handle):self.body.trigger("infinite-scroll-posts-more"):response.lastbatch&&(self.disabled=!0,self.body.addClass("infinity-end").removeClass("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}}),jqxhr}},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs,250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.bind("post-load",{self:this},this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e,t){!t.html||-1===t.html.indexOf("wp-audio-shortcode")&&-1===t.html.indexOf("wp-video-shortcode")||"undefined"!=typeof mejs&&$(function(){var e={};"undefined"!=typeof _wpmejsSettings&&(e.pluginPath=_wpmejsSettings.pluginPath),e.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},$(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(e)})},Scroller.prototype.ensureFilledViewport=function(){var e=this,t=e.window.height(),i=e.element.height(),s=0,o=0;if(0===i&&($(e.element.selector+" > li").each(function(){i+=$(this).height()}),0===i))return void e.body.unbind("post-load",e.checkViewportOnLoad);$("."+e.wrapperClass).each(function(){s+=$(this).height(),o++}),o>0?s/=o:s=0,i<t&&i+s<t?(e.ready=!0,e.refresh()):e.body.unbind("post-load",e.checkViewportOnLoad)},Scroller.prototype.checkViewportOnLoad=function(e){e.data.self.ensureFilledViewport()},Scroller.prototype.determineURL=function(){var e=this,t=$(window).scrollTop(),i=t+$(window).height(),s=i-t,o=[],n=[],l=!1;if($("."+e.wrapperClass).each(function(){var e=$(this).attr("id"),s=$(this).offset().top,l=$(this).outerHeight(!1),r=0,a=$(this).data("page-num");0===l&&$("> *",this).each(function(){l+=$(this).outerHeight(!1)}),r=s+l,s<t&&r>i?o.push({id:e,top:s,bottom:r,pageNum:a}):s>t&&s<i?o.push({id:e,top:s,bottom:r,pageNum:a}):r>t&&r<i?o.push({id:e,top:s,bottom:r,pageNum:a}):n.push({id:e,top:s,bottom:r,pageNum:a})}),$.each(n,function(){var t=$("#"+this.id);t.hasClass("is--replaced")||(e.pageCache[this.pageNum].html=t.html(),t.css("min-height",this.bottom-this.top+"px").addClass("is--replaced").empty())}),$.each(o,function(){var t=$("#"+this.id);t.hasClass("is--replaced")&&(t.css("min-height","").removeClass("is--replaced"),this.pageNum in e.pageCache&&(t.html(e.pageCache[this.pageNum].html),e.body.trigger("post-load",e.pageCache[this.pageNum])))}),0==o.length)l=-1;else if(1==o.length){var r=o.pop();l=(i-r.top)/s<.5?-1:r.pageNum}else{var a=0;$.each(o,function(e,o){var n=0,r=0,d=0;o.top>t&&o.top<i&&(n=(i-o.top)/s),o.bottom>t&&o.bottom<i&&(r=(o.bottom-t)/s),n>=r?d=n:r>=n&&(d=r),d>a&&(l=o.pageNum,a=d)})}"number"==typeof l&&e.updateURL(l)},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this,i=-1==e?t.origURL:window.location.protocol+"//"+t.history.host+t.history.path.replace(/%d/,e)+t.history.parameters;window.location.href!=i&&history.pushState(null,null,i)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},$(document).ready(function(){if("object"==typeof infiniteScroll){if($(document.body).addClass(infiniteScroll.settings.body_class),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type){var e=null;$(window).bind("scroll",function(){e||(e=setTimeout(function(){infiniteScroll.scroller.determineURL(),e=null},250))})}"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&(wp.customize.selectiveRefresh.bind("partial-content-rendered",function(e){var t;"string"==typeof e.addedContent?t=e.addedContent:e.container&&(t=$(e.container).html()),t&&$(document.body).trigger("post-load",{html:t})}),"undefined"==typeof MutationObserver&&$(document.body).on("post-load",function(e,t){var i=null;t.html&&-1!==t.html.indexOf("data-customize-partial")&&(infiniteScroll.settings.id&&(i=$("#"+infiniteScroll.settings.id)),wp.customize.selectiveRefresh.addPartials(i))}))}})}(jQuery);
|
1 |
/* Do not modify this file directly. It is compiled from other files. */
|
2 |
!function($){// Open closure
|
3 |
// Local vars
|
4 |
+
var Scroller,ajaxurl,stats,type,text,totop,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE)var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/),IEVersion=parseInt(IEVersion[1]);"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=$(document.body),this.window=$(window),this.element=$("#"+e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.handle='<div id="infinite-handle"><span><button>'+text.replace("\\","")+"</button></span></div>",this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.pageCache={},this.footer=$("#infinite-footer"),this.footer.wrap=e.footer,this.wpMediaelement=null,"scroll"==type?(this.window.bind("scroll.infinity",function(){this.throttle=!0}),t.gotop(),setInterval(function(){this.throttle&&(this.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.bind("post-load",{self:t},t.checkViewportOnLoad)):"click"==type&&(this.click_handle&&this.element.append(this.handle),this.body.delegate("#infinite-handle","click.infinity",function(){t.click_handle&&$("#infinite-handle").remove(),t.refresh()})),this.body.bind("post-load",{self:t},t.initializeMejs)},Scroller.prototype.check=function(){var e=this.element.offset();return"object"==typeof e&&this.window.scrollTop()+this.window.height()>e.top+this.element.outerHeight(!1)-2*this.window.height()},Scroller.prototype.render=function(e){this.body.addClass("infinity-success"),this.element.append(e.html),this.body.trigger("post-load",e),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.gotop=function(){var e=$("#infinity-blog-title");e.attr("title",totop),e.bind("click",function(e){$("html, body").animate({scrollTop:0},"fast"),e.preventDefault()})},Scroller.prototype.thefooter=function(){var e,t=this;"string"===$.type(this.footer.wrap)&&(e=$("body #"+this.footer.wrap).outerWidth(!1))>479&&this.footer.find(".container").css("width",e),this.window.scrollTop()>=350?t.footer.animate({bottom:0},"fast"):this.window.scrollTop()<350&&t.footer.animate({bottom:"-50px"},"fast")},Scroller.prototype.refresh=function(){var self=this,query,jqxhr,load,loader,color,customized;if(!this.disabled&&this.ready&&this.check()){if(this.ready=!1,this.click_handle){loader='<span class="infinite-loader"></span>',this.element.append(loader),loader=this.element.find(".infinite-loader"),color=loader.css("color");try{loader.spin("medium-left",color)}catch(e){}}return query=$.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),jqxhr=$.post(infiniteScroll.settings.ajaxurl,query),jqxhr.fail(function(){self.click_handle&&loader.hide(),self.ready=!0}),jqxhr.done(function(response){if(self.click_handle&&loader.hide(),response&&response.type&&"success"==response.type&&(response.scripts&&$(response.scripts).each(function(){var e=this.footer?"body":"head";if(window.infiniteScroll.settings.scripts.push(this.handle),this.extra_data){var t=document.createElement("script"),i=document.createTextNode("//<![CDATA[ \n"+this.extra_data+"\n//]]>");t.type="text/javascript",t.appendChild(i),document.getElementsByTagName(e)[0].appendChild(t)}var s=document.createElement("script");s.type="text/javascript",s.src=this.src,s.id=this.handle,"wp-mediaelement"===this.handle&&self.body.unbind("post-load",self.initializeMejs),"wp-mediaelement"===this.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=s,self.wpMediaelement.element=e,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(e)[0].appendChild(s)}),response.styles&&$(response.styles).each(function(){window.infiniteScroll.settings.styles.push(this.handle);var style=document.createElement("link");if(style.rel="stylesheet",style.href=this.src,style.id=this.handle+"-css",this.conditional&&(!isIE||!eval(this.conditional.replace(/%ver/g,IEVersion))))var style=!1;style&&document.getElementsByTagName("head")[0].appendChild(style)}),self.pageCache[self.page+self.offset]=response,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=$.extend(WPCOM_sharing_counts,response.postflair)),self.render.apply(self,arguments),"click"==type?response.lastbatch?self.click_handle?($("#infinite-handle").remove(),self.body.addClass("infinity-end").removeClass("infinity-success")):self.body.trigger("infinite-scroll-posts-end"):self.click_handle?self.element.append(self.handle):self.body.trigger("infinite-scroll-posts-more"):response.lastbatch&&(self.disabled=!0,self.body.addClass("infinity-end").removeClass("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}}),jqxhr}},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs,250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.bind("post-load",{self:this},this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e,t){!t.html||-1===t.html.indexOf("wp-audio-shortcode")&&-1===t.html.indexOf("wp-video-shortcode")||"undefined"!=typeof mejs&&$(function(){var e={};"undefined"!=typeof _wpmejsSettings&&(e.pluginPath=_wpmejsSettings.pluginPath),e.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},$(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(e)})},Scroller.prototype.ensureFilledViewport=function(){var e=this,t=e.window.height(),i=e.element.height(),s=0,o=0;if(0===i&&($(e.element.selector+" > li").each(function(){i+=$(this).height()}),0===i))return void e.body.unbind("post-load",e.checkViewportOnLoad);$("."+e.wrapperClass).each(function(){s+=$(this).height(),o++}),o>0?s/=o:s=0,i<t&&i+s<t?(e.ready=!0,e.refresh()):e.body.unbind("post-load",e.checkViewportOnLoad)},Scroller.prototype.checkViewportOnLoad=function(e){e.data.self.ensureFilledViewport()},Scroller.prototype.determineURL=function(){var e=this,t=$(window).scrollTop(),i=t+$(window).height(),s=i-t,o=[],n=[],l=!1;if($("."+e.wrapperClass).each(function(){var e=$(this).attr("id"),s=$(this).offset().top,l=$(this).outerHeight(!1),r=0,a=$(this).data("page-num");0===l&&$("> *",this).each(function(){l+=$(this).outerHeight(!1)}),r=s+l,s<t&&r>i?o.push({id:e,top:s,bottom:r,pageNum:a}):s>t&&s<i?o.push({id:e,top:s,bottom:r,pageNum:a}):r>t&&r<i?o.push({id:e,top:s,bottom:r,pageNum:a}):n.push({id:e,top:s,bottom:r,pageNum:a})}),$.each(n,function(){var t=$("#"+this.id);t.hasClass("is--replaced")||(e.pageCache[this.pageNum].html=t.html(),t.css("min-height",this.bottom-this.top+"px").addClass("is--replaced").empty())}),$.each(o,function(){var t=$("#"+this.id);t.hasClass("is--replaced")&&(t.css("min-height","").removeClass("is--replaced"),this.pageNum in e.pageCache&&(t.html(e.pageCache[this.pageNum].html),e.body.trigger("post-load",e.pageCache[this.pageNum])))}),0==o.length)l=-1;else if(1==o.length){var r=o.pop();l=(i-r.top)/s<.5?-1:r.pageNum}else{var a=0;$.each(o,function(e,o){var n=0,r=0,d=0;o.top>t&&o.top<i&&(n=(i-o.top)/s),o.bottom>t&&o.bottom<i&&(r=(o.bottom-t)/s),n>=r?d=n:r>=n&&(d=r),d>a&&(l=o.pageNum,a=d)})}"number"==typeof l&&e.updateURL(l)},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this,i=-1==e?t.origURL:window.location.protocol+"//"+t.history.host+t.history.path.replace(/%d/,e)+t.history.parameters;window.location.href!=i&&history.pushState(null,null,i)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},$(document).ready(function(){if("object"==typeof infiniteScroll){if($(document.body).addClass(infiniteScroll.settings.body_class),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type){var e=null;$(window).bind("scroll",function(){e||(e=setTimeout(function(){infiniteScroll.scroller.determineURL(),e=null},250))})}"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&(wp.customize.selectiveRefresh.bind("partial-content-rendered",function(e){var t;"string"==typeof e.addedContent?t=e.addedContent:e.container&&(t=$(e.container).html()),t&&$(document.body).trigger("post-load",{html:t})}),"undefined"==typeof MutationObserver&&$(document.body).on("post-load",function(e,t){var i=null;t.html&&-1!==t.html.indexOf("data-customize-partial")&&(infiniteScroll.settings.id&&(i=$("#"+infiniteScroll.settings.id)),wp.customize.selectiveRefresh.addPartials(i))}))}})}(jQuery);
|
_inc/build/lazy-images/js/lazy-images.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/* Do not modify this file directly. It is compiled from other files. */
|
2 |
/* globals IntersectionObserver, jQuery */
|
3 |
-
var jetpackLazyImagesModule=function(t){function e(){if(
|
4 |
* The following is an Intersection observer polyfill which is licensed under
|
5 |
* the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE and can be found at:
|
6 |
* https://github.com/w3c/IntersectionObserver/tree/master/polyfill
|
@@ -13,4 +13,4 @@ var jetpackLazyImagesModule=function(t){function e(){if(o=document.querySelector
|
|
13 |
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
14 |
*
|
15 |
*/
|
16 |
-
!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||u(),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,r=this.intersectionRect,
|
1 |
/* Do not modify this file directly. It is compiled from other files. */
|
2 |
/* globals IntersectionObserver, jQuery */
|
3 |
+
var jetpackLazyImagesModule=function(t){function e(){if(i=document.querySelectorAll("img[data-lazy-src]"),u=i.length,s&&s.disconnect(),"IntersectionObserver"in window)for(s=new IntersectionObserver(r,h),a=0;a<i.length;a++)c=i[a],c.getAttribute("data-lazy-loaded")||s.observe(c);else n(i)}function n(t){var e;for(e=0;e<t.length;e++){o(t[e])}}function r(t){var e;for(0===u&&s.disconnect(),e=0;e<t.length;e++){var n=t[e];n.intersectionRatio>0&&(u--,s.unobserve(n.target),o(n.target))}}function o(e){var n,r,o,i,s=t(e);s.length&&(n=s.attr("data-lazy-src"))&&(r=s.attr("data-lazy-srcset"),o=s.attr("data-lazy-sizes"),i=s.clone(),i.removeAttr("data-lazy-src"),i.removeAttr("data-lazy-srcset"),i.removeAttr("data-lazy-sizes"),i.addClass("jetpack-lazy-image--handled"),i.attr("data-lazy-src",1),i.attr("src",n),r&&i.attr("srcset",r),o&&i.attr("sizes",o),s.replaceWith(i),i.trigger("jetpack-lazy-loaded-image"))}var i,s,c,a,h={rootMargin:"200px 0px",threshold:.01},u=0;t(document).ready(function(){e(),t("body").bind("post-load",e)})};/**
|
4 |
* The following is an Intersection observer polyfill which is licensed under
|
5 |
* the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE and can be found at:
|
6 |
* https://github.com/w3c/IntersectionObserver/tree/master/polyfill
|
13 |
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
14 |
*
|
15 |
*/
|
16 |
+
!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||u(),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,r=this.intersectionRect,o=r.width*r.height;this.intersectionRatio=n?o/n:this.isIntersecting?1:0}function r(t,e){var n=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=i(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function o(){return t.performance&&performance.now&&performance.now()}function i(t,e){var n=null;return function(){n||(n=setTimeout(function(){t(),n=null},e))}}function s(t,e,n,r){"function"==typeof t.addEventListener?t.addEventListener(e,n,r||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function c(t,e,n,r){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,r||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function a(t,e){var n=Math.max(t.top,e.top),r=Math.min(t.bottom,e.bottom),o=Math.max(t.left,e.left),i=Math.min(t.right,e.right),s=i-o,c=r-n;return s>=0&&c>=0&&{top:n,bottom:r,left:o,right:i,width:s,height:c}}function h(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):u()}function u(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t,e){for(var n=e;n;){if(n==t)return!0;n=d(n)}return!1}function d(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)return void("isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}));var p=[];r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},r.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},r.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},r.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,c(t,"resize",this._checkForIntersections,!0),c(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():u();this._observationTargets.forEach(function(r){var i=r.element,s=h(i),c=this._rootContainsTarget(i),a=r.entry,u=t&&c&&this._computeTargetAndRootIntersection(i,e),l=r.entry=new n({time:o(),target:i,boundingClientRect:s,rootBounds:e,intersectionRect:u});a?t&&c?this._hasCrossedThreshold(a,l)&&this._queuedEntries.push(l):a&&a.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(n,r){if("none"!=t.getComputedStyle(n).display){for(var o=h(n),i=o,s=d(n),c=!1;!c;){var u=null,l=1==s.nodeType?t.getComputedStyle(s):{};if("none"==l.display)return;if(s==this.root||s==e?(c=!0,u=r):s!=e.body&&s!=e.documentElement&&"visible"!=l.overflow&&(u=h(s)),u&&!(i=a(u,i)))break;s=d(s)}return i}},r.prototype._getRootRect=function(){var t;if(this.root)t=h(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},r.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,r=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==r)for(var o=0;o<this.thresholds.length;o++){var i=this.thresholds[o];if(i==n||i==r||i<n!=i<r)return!0}},r.prototype._rootIsInDom=function(){return!this.root||l(e,this.root)},r.prototype._rootContainsTarget=function(t){return l(this.root||e,t)},r.prototype._registerInstance=function(){p.indexOf(this)<0&&p.push(this)},r.prototype._unregisterInstance=function(){var t=p.indexOf(this);-1!=t&&p.splice(t,1)},t.IntersectionObserver=r,t.IntersectionObserverEntry=n}(window,document),jetpackLazyImagesModule(jQuery);
|
class.jetpack.php
CHANGED
@@ -1460,23 +1460,20 @@ class Jetpack {
|
|
1460 |
global $active_plan_cache;
|
1461 |
|
1462 |
// this can be expensive to compute so we cache for the duration of a request
|
1463 |
-
if ( $active_plan_cache ) {
|
1464 |
return $active_plan_cache;
|
1465 |
}
|
1466 |
|
1467 |
$plan = get_option( 'jetpack_active_plan', array() );
|
1468 |
|
1469 |
// Set the default options
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
'
|
1475 |
-
|
1476 |
-
|
1477 |
-
),
|
1478 |
-
) );
|
1479 |
-
}
|
1480 |
|
1481 |
$supports = array();
|
1482 |
|
1460 |
global $active_plan_cache;
|
1461 |
|
1462 |
// this can be expensive to compute so we cache for the duration of a request
|
1463 |
+
if ( is_array( $active_plan_cache ) && ! empty( $active_plan_cache ) ) {
|
1464 |
return $active_plan_cache;
|
1465 |
}
|
1466 |
|
1467 |
$plan = get_option( 'jetpack_active_plan', array() );
|
1468 |
|
1469 |
// Set the default options
|
1470 |
+
$plan = wp_parse_args( $plan, array(
|
1471 |
+
'product_slug' => 'jetpack_free',
|
1472 |
+
'class' => 'free',
|
1473 |
+
'features' => array(
|
1474 |
+
'active' => array()
|
1475 |
+
),
|
1476 |
+
) );
|
|
|
|
|
|
|
1477 |
|
1478 |
$supports = array();
|
1479 |
|
css/jetpack-rtl.css
CHANGED
@@ -22,9 +22,6 @@ div[class^=gr_custom_container]{border:1px solid gray;border-radius:10px;padding
|
|
22 |
.jetpack-image-container:after{clear:both}.jetpack-image-container:after,.jetpack-image-container:before{display:table;content:""}
|
23 |
.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:100% 0;clear:none;float:right;margin:0 0 -3px -5px;padding:0 0 6px 8px;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:100% 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widget_jetpack_my_community .avatar-240,.widget_jetpack_my_community .avatar-48{max-width:48px;max-height:48px}
|
24 |
.widget.widget_authors li>ul,.widget_authors>ul{margin-right:inherit;padding-right:0}.widget_authors ul li li{padding-right:0}.widget_authors>ul>li{margin-bottom:1em;list-style:none}.widget_authors>ul>li+li{border-top:0}.widget.widget_authors img{margin-left:5px;margin-bottom:5px;vertical-align:middle;box-shadow:none}
|
25 |
-
/*!
|
26 |
-
* Do not modify this file directly. It is compiled SASS code.
|
27 |
-
*/#wp-admin-bar-jetpack-idc.hide{display:none}#wp-admin-bar-jetpack-idc .jp-idc-admin-bar{background:#fff;border-radius:2px;color:#23282d;padding:4px 8px;font-size:12px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{color:#23282d;font-family:dashicons}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:16px}#wpadminbar #wp-admin-bar-jetpack-idc:hover .ab-item{background:inherit}#wpadminbar #wp-admin-bar-jetpack-idc:hover .jp-idc-admin-bar{background:#eee}
|
28 |
.wpcnt{text-align:center;line-height:2}.wpa{position:relative;overflow:hidden;display:inline-block;max-width:100%}.wpa-about{position:absolute;top:5px;right:0;left:0;display:block;margin-top:0;color:#888;font:10px/1 "Open Sans",Arial,sans-serif!important;text-align:right!important;text-decoration:none!important;opacity:.85;border-bottom:none!important;box-shadow:none!important}.wpa .u>div{display:block;margin-top:5px;margin-bottom:1em}div.wpa>div{margin-top:20px}.wpa .u .adsbygoogle{display:block;margin-top:17px;margin-bottom:1em;background-color:transparent}
|
29 |
.widget_eu_cookie_law_widget.widget{border:none;bottom:1em;display:none;right:1em;margin:0;padding:0;position:fixed;left:1em;width:auto;z-index:50001}#eu-cookie-law{background-color:#fff;border:1px solid #dedede;color:#2e4467;font-size:12px;line-height:1.5;overflow:hidden;padding:6px 15px 6px 6px;position:relative}#eu-cookie-law a,#eu-cookie-law a:active,#eu-cookie-law a:visited{color:inherit;cursor:inherit;text-decoration:underline}#eu-cookie-law a:hover{cursor:pointer;text-decoration:none}#eu-cookie-law.negative{background-color:#000;border:none;color:#fff}#eu-cookie-law input,#eu-cookie-law input:focus,#eu-cookie-law input:hover{background:#f3f3f3;border:1px solid #dedede;border-radius:4px;-moz-border-radius:3px;-webkit-border-radius:3px;color:#2e4453;cursor:pointer;display:inline;float:left;font-family:inherit;font-size:14px;font-weight:inherit;line-height:inherit;margin:0 5% 0 0;padding:8px 12px;position:static;text-transform:none}#eu-cookie-law.negative input,#eu-cookie-law.negative input:focus,#eu-cookie-law.negative input:hover{background:#282828;border-color:#535353;color:#fff}@media (max-width:600px){#eu-cookie-law{padding-bottom:55px}#eu-cookie-law input.accept{bottom:8px;position:absolute;left:8px}}
|
30 |
.flickr-images{text-align:center}.flickr-size-thumbnail .flickr-images{-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-pack:center;justify-content:center}.flickr-images img{max-width:100%;margin:5px}
|
22 |
.jetpack-image-container:after{clear:both}.jetpack-image-container:after,.jetpack-image-container:before{display:table;content:""}
|
23 |
.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:100% 0;clear:none;float:right;margin:0 0 -3px -5px;padding:0 0 6px 8px;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:100% 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widget_jetpack_my_community .avatar-240,.widget_jetpack_my_community .avatar-48{max-width:48px;max-height:48px}
|
24 |
.widget.widget_authors li>ul,.widget_authors>ul{margin-right:inherit;padding-right:0}.widget_authors ul li li{padding-right:0}.widget_authors>ul>li{margin-bottom:1em;list-style:none}.widget_authors>ul>li+li{border-top:0}.widget.widget_authors img{margin-left:5px;margin-bottom:5px;vertical-align:middle;box-shadow:none}
|
|
|
|
|
|
|
25 |
.wpcnt{text-align:center;line-height:2}.wpa{position:relative;overflow:hidden;display:inline-block;max-width:100%}.wpa-about{position:absolute;top:5px;right:0;left:0;display:block;margin-top:0;color:#888;font:10px/1 "Open Sans",Arial,sans-serif!important;text-align:right!important;text-decoration:none!important;opacity:.85;border-bottom:none!important;box-shadow:none!important}.wpa .u>div{display:block;margin-top:5px;margin-bottom:1em}div.wpa>div{margin-top:20px}.wpa .u .adsbygoogle{display:block;margin-top:17px;margin-bottom:1em;background-color:transparent}
|
26 |
.widget_eu_cookie_law_widget.widget{border:none;bottom:1em;display:none;right:1em;margin:0;padding:0;position:fixed;left:1em;width:auto;z-index:50001}#eu-cookie-law{background-color:#fff;border:1px solid #dedede;color:#2e4467;font-size:12px;line-height:1.5;overflow:hidden;padding:6px 15px 6px 6px;position:relative}#eu-cookie-law a,#eu-cookie-law a:active,#eu-cookie-law a:visited{color:inherit;cursor:inherit;text-decoration:underline}#eu-cookie-law a:hover{cursor:pointer;text-decoration:none}#eu-cookie-law.negative{background-color:#000;border:none;color:#fff}#eu-cookie-law input,#eu-cookie-law input:focus,#eu-cookie-law input:hover{background:#f3f3f3;border:1px solid #dedede;border-radius:4px;-moz-border-radius:3px;-webkit-border-radius:3px;color:#2e4453;cursor:pointer;display:inline;float:left;font-family:inherit;font-size:14px;font-weight:inherit;line-height:inherit;margin:0 5% 0 0;padding:8px 12px;position:static;text-transform:none}#eu-cookie-law.negative input,#eu-cookie-law.negative input:focus,#eu-cookie-law.negative input:hover{background:#282828;border-color:#535353;color:#fff}@media (max-width:600px){#eu-cookie-law{padding-bottom:55px}#eu-cookie-law input.accept{bottom:8px;position:absolute;left:8px}}
|
27 |
.flickr-images{text-align:center}.flickr-size-thumbnail .flickr-images{-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-pack:center;justify-content:center}.flickr-images img{max-width:100%;margin:5px}
|
css/jetpack.css
CHANGED
@@ -22,9 +22,6 @@ div[class^=gr_custom_container]{border:1px solid gray;border-radius:10px;padding
|
|
22 |
.jetpack-image-container:after{clear:both}.jetpack-image-container:after,.jetpack-image-container:before{display:table;content:""}
|
23 |
.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:0 0;clear:none;float:left;margin:0 -5px -3px 0;padding:0 8px 6px 0;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:0 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widget_jetpack_my_community .avatar-240,.widget_jetpack_my_community .avatar-48{max-width:48px;max-height:48px}
|
24 |
.widget.widget_authors li>ul,.widget_authors>ul{margin-left:inherit;padding-left:0}.widget_authors ul li li{padding-left:0}.widget_authors>ul>li{margin-bottom:1em;list-style:none}.widget_authors>ul>li+li{border-top:0}.widget.widget_authors img{margin-right:5px;margin-bottom:5px;vertical-align:middle;box-shadow:none}
|
25 |
-
/*!
|
26 |
-
* Do not modify this file directly. It is compiled SASS code.
|
27 |
-
*/#wp-admin-bar-jetpack-idc.hide{display:none}#wp-admin-bar-jetpack-idc .jp-idc-admin-bar{background:#fff;border-radius:2px;color:#23282d;padding:4px 8px;font-size:12px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{color:#23282d;font-family:dashicons}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:16px}#wpadminbar #wp-admin-bar-jetpack-idc:hover .ab-item{background:inherit}#wpadminbar #wp-admin-bar-jetpack-idc:hover .jp-idc-admin-bar{background:#eee}
|
28 |
.wpcnt{text-align:center;line-height:2}.wpa{position:relative;overflow:hidden;display:inline-block;max-width:100%}.wpa-about{position:absolute;top:5px;left:0;right:0;display:block;margin-top:0;color:#888;font:10px/1 "Open Sans",Arial,sans-serif!important;text-align:left!important;text-decoration:none!important;opacity:.85;border-bottom:none!important;box-shadow:none!important}.wpa .u>div{display:block;margin-top:5px;margin-bottom:1em}div.wpa>div{margin-top:20px}.wpa .u .adsbygoogle{display:block;margin-top:17px;margin-bottom:1em;background-color:transparent}
|
29 |
.widget_eu_cookie_law_widget.widget{border:none;bottom:1em;display:none;left:1em;margin:0;padding:0;position:fixed;right:1em;width:auto;z-index:50001}#eu-cookie-law{background-color:#fff;border:1px solid #dedede;color:#2e4467;font-size:12px;line-height:1.5;overflow:hidden;padding:6px 6px 6px 15px;position:relative}#eu-cookie-law a,#eu-cookie-law a:active,#eu-cookie-law a:visited{color:inherit;cursor:inherit;text-decoration:underline}#eu-cookie-law a:hover{cursor:pointer;text-decoration:none}#eu-cookie-law.negative{background-color:#000;border:none;color:#fff}#eu-cookie-law input,#eu-cookie-law input:focus,#eu-cookie-law input:hover{background:#f3f3f3;border:1px solid #dedede;border-radius:4px;-moz-border-radius:3px;-webkit-border-radius:3px;color:#2e4453;cursor:pointer;display:inline;float:right;font-family:inherit;font-size:14px;font-weight:inherit;line-height:inherit;margin:0 0 0 5%;padding:8px 12px;position:static;text-transform:none}#eu-cookie-law.negative input,#eu-cookie-law.negative input:focus,#eu-cookie-law.negative input:hover{background:#282828;border-color:#535353;color:#fff}@media (max-width:600px){#eu-cookie-law{padding-bottom:55px}#eu-cookie-law input.accept{bottom:8px;position:absolute;right:8px}}
|
30 |
.flickr-images{text-align:center}.flickr-size-thumbnail .flickr-images{-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-pack:center;justify-content:center}.flickr-images img{max-width:100%;margin:5px}
|
22 |
.jetpack-image-container:after{clear:both}.jetpack-image-container:after,.jetpack-image-container:before{display:table;content:""}
|
23 |
.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:0 0;clear:none;float:left;margin:0 -5px -3px 0;padding:0 8px 6px 0;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:0 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widget_jetpack_my_community .avatar-240,.widget_jetpack_my_community .avatar-48{max-width:48px;max-height:48px}
|
24 |
.widget.widget_authors li>ul,.widget_authors>ul{margin-left:inherit;padding-left:0}.widget_authors ul li li{padding-left:0}.widget_authors>ul>li{margin-bottom:1em;list-style:none}.widget_authors>ul>li+li{border-top:0}.widget.widget_authors img{margin-right:5px;margin-bottom:5px;vertical-align:middle;box-shadow:none}
|
|
|
|
|
|
|
25 |
.wpcnt{text-align:center;line-height:2}.wpa{position:relative;overflow:hidden;display:inline-block;max-width:100%}.wpa-about{position:absolute;top:5px;left:0;right:0;display:block;margin-top:0;color:#888;font:10px/1 "Open Sans",Arial,sans-serif!important;text-align:left!important;text-decoration:none!important;opacity:.85;border-bottom:none!important;box-shadow:none!important}.wpa .u>div{display:block;margin-top:5px;margin-bottom:1em}div.wpa>div{margin-top:20px}.wpa .u .adsbygoogle{display:block;margin-top:17px;margin-bottom:1em;background-color:transparent}
|
26 |
.widget_eu_cookie_law_widget.widget{border:none;bottom:1em;display:none;left:1em;margin:0;padding:0;position:fixed;right:1em;width:auto;z-index:50001}#eu-cookie-law{background-color:#fff;border:1px solid #dedede;color:#2e4467;font-size:12px;line-height:1.5;overflow:hidden;padding:6px 6px 6px 15px;position:relative}#eu-cookie-law a,#eu-cookie-law a:active,#eu-cookie-law a:visited{color:inherit;cursor:inherit;text-decoration:underline}#eu-cookie-law a:hover{cursor:pointer;text-decoration:none}#eu-cookie-law.negative{background-color:#000;border:none;color:#fff}#eu-cookie-law input,#eu-cookie-law input:focus,#eu-cookie-law input:hover{background:#f3f3f3;border:1px solid #dedede;border-radius:4px;-moz-border-radius:3px;-webkit-border-radius:3px;color:#2e4453;cursor:pointer;display:inline;float:right;font-family:inherit;font-size:14px;font-weight:inherit;line-height:inherit;margin:0 0 0 5%;padding:8px 12px;position:static;text-transform:none}#eu-cookie-law.negative input,#eu-cookie-law.negative input:focus,#eu-cookie-law.negative input:hover{background:#282828;border-color:#535353;color:#fff}@media (max-width:600px){#eu-cookie-law{padding-bottom:55px}#eu-cookie-law input.accept{bottom:8px;position:absolute;right:8px}}
|
27 |
.flickr-images{text-align:center}.flickr-size-thumbnail .flickr-images{-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-pack:center;justify-content:center}.flickr-images img{max-width:100%;margin:5px}
|
jetpack.php
CHANGED
@@ -83,6 +83,7 @@ require_once( JETPACK__PLUGIN_DIR . '_inc/lib/class.core-rest-api-endpoints.php'
|
|
83 |
|
84 |
register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) );
|
85 |
register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) );
|
|
|
86 |
add_action( 'updating_jetpack_version', array( 'Jetpack', 'do_version_bump' ), 10, 2 );
|
87 |
add_action( 'init', array( 'Jetpack', 'init' ) );
|
88 |
add_action( 'plugins_loaded', array( 'Jetpack', 'plugin_textdomain' ), 99 );
|
83 |
|
84 |
register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) );
|
85 |
register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) );
|
86 |
+
|
87 |
add_action( 'updating_jetpack_version', array( 'Jetpack', 'do_version_bump' ), 10, 2 );
|
88 |
add_action( 'init', array( 'Jetpack', 'init' ) );
|
89 |
add_action( 'plugins_loaded', array( 'Jetpack', 'plugin_textdomain' ), 99 );
|
modules/infinite-scroll/infinity.js
CHANGED
@@ -70,7 +70,7 @@ Scroller = function( settings ) {
|
|
70 |
self.thefooter();
|
71 |
// Fire the refresh
|
72 |
self.refresh();
|
73 |
-
self.determineURL(); // determine the url
|
74 |
}
|
75 |
}, 250 );
|
76 |
|
@@ -131,13 +131,14 @@ Scroller.prototype.render = function( response ) {
|
|
131 |
*/
|
132 |
Scroller.prototype.query = function() {
|
133 |
return {
|
134 |
-
page
|
135 |
-
currentday
|
136 |
-
order
|
137 |
-
scripts
|
138 |
-
styles
|
139 |
-
query_args
|
140 |
-
|
|
|
141 |
};
|
142 |
};
|
143 |
|
70 |
self.thefooter();
|
71 |
// Fire the refresh
|
72 |
self.refresh();
|
73 |
+
self.determineURL(); // determine the url
|
74 |
}
|
75 |
}, 250 );
|
76 |
|
131 |
*/
|
132 |
Scroller.prototype.query = function() {
|
133 |
return {
|
134 |
+
page : this.page + this.offset, // Load the next page.
|
135 |
+
currentday : this.currentday,
|
136 |
+
order : this.order,
|
137 |
+
scripts : window.infiniteScroll.settings.scripts,
|
138 |
+
styles : window.infiniteScroll.settings.styles,
|
139 |
+
query_args : window.infiniteScroll.settings.query_args,
|
140 |
+
query_before : window.infiniteScroll.settings.query_before,
|
141 |
+
last_post_date: window.infiniteScroll.settings.last_post_date
|
142 |
};
|
143 |
};
|
144 |
|
modules/infinite-scroll/infinity.php
CHANGED
@@ -629,9 +629,9 @@ class The_Neverending_Home_Page {
|
|
629 |
}
|
630 |
|
631 |
/**
|
632 |
-
* Create a where clause that will make sure post queries
|
633 |
-
*
|
634 |
-
*
|
635 |
*
|
636 |
* @global $wpdb
|
637 |
* @param string $where
|
@@ -645,18 +645,19 @@ class The_Neverending_Home_Page {
|
|
645 |
global $wpdb;
|
646 |
|
647 |
$sort_field = self::get_query_sort_field( $query );
|
648 |
-
if ( false == $sort_field )
|
649 |
-
return $where;
|
650 |
|
651 |
-
$
|
652 |
-
// Sanitize timestamp
|
653 |
-
if ( empty( $last_post_date ) || !preg_match( '|\d{4}\-\d{2}\-\d{2}|', $last_post_date ) )
|
654 |
return $where;
|
|
|
|
|
|
|
655 |
|
656 |
-
|
|
|
|
|
657 |
|
658 |
// Construct the date query using our timestamp
|
659 |
-
$clause = $wpdb->prepare( " AND {$wpdb->posts}.
|
660 |
|
661 |
/**
|
662 |
* Filter Infinite Scroll's SQL date query making sure post queries
|
@@ -667,10 +668,12 @@ class The_Neverending_Home_Page {
|
|
667 |
*
|
668 |
* @param string $clause SQL Date query.
|
669 |
* @param object $query Query.
|
670 |
-
* @param string $operator Query operator.
|
671 |
-
* @param string $last_post_date Last Post Date timestamp.
|
672 |
*/
|
673 |
-
$
|
|
|
|
|
674 |
}
|
675 |
|
676 |
return $where;
|
@@ -839,6 +842,7 @@ class The_Neverending_Home_Page {
|
|
839 |
'parameters' => self::get_request_parameters(),
|
840 |
),
|
841 |
'query_args' => self::get_query_vars(),
|
|
|
842 |
'last_post_date' => self::get_last_post_date(),
|
843 |
'body_class' => self::body_class(),
|
844 |
);
|
@@ -1200,17 +1204,6 @@ class The_Neverending_Home_Page {
|
|
1200 |
$previousday = $_REQUEST['currentday'];
|
1201 |
}
|
1202 |
|
1203 |
-
$sticky = get_option( 'sticky_posts' );
|
1204 |
-
$post__not_in = self::wp_query()->get( 'post__not_in' );
|
1205 |
-
|
1206 |
-
//we have to take post__not_in args into consideration here not only sticky posts
|
1207 |
-
if ( true === isset( $_REQUEST['query_args']['post__not_in'] ) ) {
|
1208 |
-
$post__not_in = array_merge( $post__not_in, array_map( 'intval', (array) $_REQUEST['query_args']['post__not_in'] ) );
|
1209 |
-
}
|
1210 |
-
|
1211 |
-
if ( ! empty( $post__not_in ) )
|
1212 |
-
$sticky = array_unique( array_merge( $sticky, $post__not_in ) );
|
1213 |
-
|
1214 |
$post_status = array( 'publish' );
|
1215 |
if ( current_user_can( 'read_private_posts' ) )
|
1216 |
array_push( $post_status, 'private' );
|
@@ -1221,7 +1214,6 @@ class The_Neverending_Home_Page {
|
|
1221 |
'paged' => $page,
|
1222 |
'post_status' => $post_status,
|
1223 |
'posts_per_page' => self::posts_per_page(),
|
1224 |
-
'post__not_in' => ( array ) $sticky,
|
1225 |
'order' => $order
|
1226 |
) );
|
1227 |
|
@@ -1246,7 +1238,6 @@ class The_Neverending_Home_Page {
|
|
1246 |
*/
|
1247 |
$query_args = apply_filters( 'infinite_scroll_query_args', $query_args );
|
1248 |
|
1249 |
-
// Add query filter that checks for posts below the date
|
1250 |
add_filter( 'posts_where', array( $this, 'query_time_filter' ), 10, 2 );
|
1251 |
|
1252 |
$GLOBALS['wp_the_query'] = $GLOBALS['wp_query'] = $infinite_scroll_query = new WP_Query();
|
629 |
}
|
630 |
|
631 |
/**
|
632 |
+
* Create a where clause that will make sure post queries return posts
|
633 |
+
* in the correct order, without duplicates, if a new post is added
|
634 |
+
* and we're sorting by post date.
|
635 |
*
|
636 |
* @global $wpdb
|
637 |
* @param string $where
|
645 |
global $wpdb;
|
646 |
|
647 |
$sort_field = self::get_query_sort_field( $query );
|
|
|
|
|
648 |
|
649 |
+
if ( 'post_date' !== $sort_field || 'DESC' !== $_REQUEST['query_args']['order'] ) {
|
|
|
|
|
650 |
return $where;
|
651 |
+
}
|
652 |
+
|
653 |
+
$query_before = sanitize_text_field( wp_unslash( $_REQUEST['query_before'] ) );
|
654 |
|
655 |
+
if ( empty( $query_before ) ) {
|
656 |
+
return $where;
|
657 |
+
}
|
658 |
|
659 |
// Construct the date query using our timestamp
|
660 |
+
$clause = $wpdb->prepare( " AND {$wpdb->posts}.post_date <= %s", $query_before );
|
661 |
|
662 |
/**
|
663 |
* Filter Infinite Scroll's SQL date query making sure post queries
|
668 |
*
|
669 |
* @param string $clause SQL Date query.
|
670 |
* @param object $query Query.
|
671 |
+
* @param string $operator @deprecated Query operator.
|
672 |
+
* @param string $last_post_date @deprecated Last Post Date timestamp.
|
673 |
*/
|
674 |
+
$operator = 'ASC' === $_REQUEST['query_args']['order'] ? '>' : '<';
|
675 |
+
$last_post_date = sanitize_text_field( wp_unslash( $_REQUEST['last_post_date'] ) );
|
676 |
+
$where .= apply_filters( 'infinite_scroll_posts_where', $clause, $query, $operator, $last_post_date );
|
677 |
}
|
678 |
|
679 |
return $where;
|
842 |
'parameters' => self::get_request_parameters(),
|
843 |
),
|
844 |
'query_args' => self::get_query_vars(),
|
845 |
+
'query_before' => current_time( 'mysql' ),
|
846 |
'last_post_date' => self::get_last_post_date(),
|
847 |
'body_class' => self::body_class(),
|
848 |
);
|
1204 |
$previousday = $_REQUEST['currentday'];
|
1205 |
}
|
1206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1207 |
$post_status = array( 'publish' );
|
1208 |
if ( current_user_can( 'read_private_posts' ) )
|
1209 |
array_push( $post_status, 'private' );
|
1214 |
'paged' => $page,
|
1215 |
'post_status' => $post_status,
|
1216 |
'posts_per_page' => self::posts_per_page(),
|
|
|
1217 |
'order' => $order
|
1218 |
) );
|
1219 |
|
1238 |
*/
|
1239 |
$query_args = apply_filters( 'infinite_scroll_query_args', $query_args );
|
1240 |
|
|
|
1241 |
add_filter( 'posts_where', array( $this, 'query_time_filter' ), 10, 2 );
|
1242 |
|
1243 |
$GLOBALS['wp_the_query'] = $GLOBALS['wp_query'] = $infinite_scroll_query = new WP_Query();
|
modules/lazy-images/js/lazy-images.js
CHANGED
@@ -93,30 +93,46 @@ var jetpackLazyImagesModule = function( $ ) {
|
|
93 |
* @param {object} image The image object.
|
94 |
*/
|
95 |
function applyImage( image ) {
|
96 |
-
var
|
97 |
-
|
98 |
-
|
|
|
|
|
99 |
|
|
|
|
|
|
|
|
|
|
|
100 |
if ( ! src ) {
|
101 |
return;
|
102 |
}
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
-
|
109 |
-
|
|
|
|
|
110 |
|
111 |
if ( srcset ) {
|
112 |
-
|
113 |
-
image.removeAttribute( 'data-lazy-srcset' );
|
114 |
}
|
115 |
-
|
116 |
if ( sizes ) {
|
117 |
-
|
118 |
-
image.removeAttribute( 'data-lazy-sizes' );
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
};
|
122 |
|
93 |
* @param {object} image The image object.
|
94 |
*/
|
95 |
function applyImage( image ) {
|
96 |
+
var theImage = $( image ),
|
97 |
+
src,
|
98 |
+
srcset,
|
99 |
+
sizes,
|
100 |
+
theClone;
|
101 |
|
102 |
+
if ( ! theImage.length ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
src = theImage.attr( 'data-lazy-src' );
|
107 |
if ( ! src ) {
|
108 |
return;
|
109 |
}
|
110 |
|
111 |
+
srcset = theImage.attr( 'data-lazy-srcset' );
|
112 |
+
sizes = theImage.attr( 'data-lazy-sizes' );
|
113 |
+
theClone = theImage.clone();
|
114 |
+
|
115 |
+
// Remove lazy attributes from the clone.
|
116 |
+
theClone.removeAttr( 'data-lazy-src' ),
|
117 |
+
theClone.removeAttr( 'data-lazy-srcset' ),
|
118 |
+
theClone.removeAttr( 'data-lazy-sizes' );
|
119 |
|
120 |
+
// Add the attributes we want on the finished image.
|
121 |
+
theClone.addClass( 'jetpack-lazy-image--handled' );
|
122 |
+
theClone.attr( 'data-lazy-src', 1 );
|
123 |
+
theClone.attr( 'src', src );
|
124 |
|
125 |
if ( srcset ) {
|
126 |
+
theClone.attr( 'srcset', srcset );
|
|
|
127 |
}
|
|
|
128 |
if ( sizes ) {
|
129 |
+
theClone.attr( 'sizes', sizes );
|
|
|
130 |
}
|
131 |
+
|
132 |
+
theImage.replaceWith( theClone );
|
133 |
+
|
134 |
+
// Fire an event so that third-party code can perform actions after an image is loaded.
|
135 |
+
theClone.trigger( 'jetpack-lazy-loaded-image' );
|
136 |
}
|
137 |
};
|
138 |
|
modules/markdown/easy-markdown.php
CHANGED
@@ -115,8 +115,6 @@ class WPCom_Markdown {
|
|
115 |
* @return null
|
116 |
*/
|
117 |
public function load_markdown_for_posts() {
|
118 |
-
add_filter( 'wp_kses_allowed_html', array( $this, 'wp_kses_allowed_html' ), 10, 2 );
|
119 |
-
add_action( 'after_wp_tiny_mce', array( $this, 'after_wp_tiny_mce' ) );
|
120 |
add_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );
|
121 |
add_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ), 10, 2 );
|
122 |
add_filter( 'edit_post_content', array( $this, 'edit_post_content' ), 10, 2 );
|
@@ -135,8 +133,6 @@ class WPCom_Markdown {
|
|
135 |
* @return null
|
136 |
*/
|
137 |
public function unload_markdown_for_posts() {
|
138 |
-
remove_filter( 'wp_kses_allowed_html', array( $this, 'wp_kses_allowed_html' ) );
|
139 |
-
remove_action( 'after_wp_tiny_mce', array( $this, 'after_wp_tiny_mce' ) );
|
140 |
remove_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );
|
141 |
remove_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ), 10, 2 );
|
142 |
remove_filter( 'edit_post_content', array( $this, 'edit_post_content' ), 10, 2 );
|
@@ -419,50 +415,6 @@ class WPCom_Markdown {
|
|
419 |
return $content;
|
420 |
}
|
421 |
|
422 |
-
/**
|
423 |
-
* Some tags are allowed to have a 'markdown' attribute, allowing them to contain Markdown.
|
424 |
-
* We need to tell KSES about those tags.
|
425 |
-
* @param array $tags List of tags that KSES allows.
|
426 |
-
* @param string $context The context that KSES is allowing these tags.
|
427 |
-
* @return array The tags that KSES allows, with our extra 'markdown' parameter where necessary.
|
428 |
-
*/
|
429 |
-
public function wp_kses_allowed_html( $tags, $context ) {
|
430 |
-
if ( 'post' !== $context ) {
|
431 |
-
return $tags;
|
432 |
-
}
|
433 |
-
|
434 |
-
$re = '/' . $this->get_parser()->contain_span_tags_re . '/';
|
435 |
-
foreach ( $tags as $tag => $attributes ) {
|
436 |
-
if ( preg_match( $re, $tag ) ) {
|
437 |
-
$attributes['markdown'] = true;
|
438 |
-
$tags[ $tag ] = $attributes;
|
439 |
-
}
|
440 |
-
}
|
441 |
-
|
442 |
-
return $tags;
|
443 |
-
}
|
444 |
-
|
445 |
-
/**
|
446 |
-
* TinyMCE needs to know not to strip the 'markdown' attribute. Unfortunately, it doesn't
|
447 |
-
* really offer a nice API for whitelisting attributes, so we have to manually add it
|
448 |
-
* to the schema instead.
|
449 |
-
*/
|
450 |
-
public function after_wp_tiny_mce() {
|
451 |
-
?>
|
452 |
-
<script type="text/javascript">
|
453 |
-
tinymce.on( 'AddEditor', function( event ) {
|
454 |
-
event.editor.on( 'BeforeSetContent', function( event ) {
|
455 |
-
var editor = event.target;
|
456 |
-
Object.keys( editor.schema.elements ).forEach( function( key, index ) {
|
457 |
-
editor.schema.elements[ key ].attributes['markdown'] = {};
|
458 |
-
editor.schema.elements[ key ].attributesOrder.push( 'markdown' );
|
459 |
-
} );
|
460 |
-
} );
|
461 |
-
}, true );
|
462 |
-
</script>
|
463 |
-
<?php
|
464 |
-
}
|
465 |
-
|
466 |
/**
|
467 |
* Magic happens here. Markdown is converted and stored on post_content. Original Markdown is stored
|
468 |
* in post_content_filtered so that we can continue editing as Markdown.
|
115 |
* @return null
|
116 |
*/
|
117 |
public function load_markdown_for_posts() {
|
|
|
|
|
118 |
add_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );
|
119 |
add_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ), 10, 2 );
|
120 |
add_filter( 'edit_post_content', array( $this, 'edit_post_content' ), 10, 2 );
|
133 |
* @return null
|
134 |
*/
|
135 |
public function unload_markdown_for_posts() {
|
|
|
|
|
136 |
remove_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );
|
137 |
remove_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ), 10, 2 );
|
138 |
remove_filter( 'edit_post_content', array( $this, 'edit_post_content' ), 10, 2 );
|
415 |
return $content;
|
416 |
}
|
417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
/**
|
419 |
* Magic happens here. Markdown is converted and stored on post_content. Original Markdown is stored
|
420 |
* in post_content_filtered so that we can continue editing as Markdown.
|
modules/shortcodes/wordads.php
CHANGED
@@ -21,11 +21,11 @@ class Jetpack_WordAds_Shortcode {
|
|
21 |
if ( empty( $wordads ) ) {
|
22 |
return null;
|
23 |
}
|
24 |
-
add_shortcode( '
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
-
* Our [
|
29 |
* Prints a WordAds Ad.
|
30 |
*
|
31 |
* @param array $atts Array of shortcode attributes.
|
@@ -34,10 +34,7 @@ class Jetpack_WordAds_Shortcode {
|
|
34 |
* @return string HTML for WordAds shortcode.
|
35 |
*/
|
36 |
static function wordads_shortcode( $atts, $content = '' ) {
|
37 |
-
$atts = shortcode_atts(
|
38 |
-
array(
|
39 |
-
), $atts, 'wordads'
|
40 |
-
);
|
41 |
|
42 |
return self::wordads_shortcode_html( $atts, $content );
|
43 |
}
|
21 |
if ( empty( $wordads ) ) {
|
22 |
return null;
|
23 |
}
|
24 |
+
add_shortcode( 'wordads', array( $this, 'wordads_shortcode' ) );
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
+
* Our [wordads] shortcode.
|
29 |
* Prints a WordAds Ad.
|
30 |
*
|
31 |
* @param array $atts Array of shortcode attributes.
|
34 |
* @return string HTML for WordAds shortcode.
|
35 |
*/
|
36 |
static function wordads_shortcode( $atts, $content = '' ) {
|
37 |
+
$atts = shortcode_atts( array(), $atts, 'wordads');
|
|
|
|
|
|
|
38 |
|
39 |
return self::wordads_shortcode_html( $atts, $content );
|
40 |
}
|
modules/theme-tools/compat/twentysixteen.php
CHANGED
@@ -49,3 +49,19 @@ function twentysixteen_remove_share() {
|
|
49 |
}
|
50 |
}
|
51 |
add_action( 'loop_start', 'twentysixteen_remove_share' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
}
|
51 |
add_action( 'loop_start', 'twentysixteen_remove_share' );
|
52 |
+
|
53 |
+
function twentysixteen_jetpack_lazy_images_compat() {
|
54 |
+
if ( ! function_exists( 'wp_add_inline_script' ) ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
+
// Since TwentySixteen outdents when window is resized, let's trigger a window resize
|
59 |
+
// every time we lazy load an image on the TwentySixteen theme.
|
60 |
+
wp_add_inline_script(
|
61 |
+
'jetpack-lazy-images',
|
62 |
+
"jQuery( document.body ).on( 'jetpack-lazy-loaded-image', function () { jQuery( window ).trigger( 'resize' ); } );"
|
63 |
+
);
|
64 |
+
}
|
65 |
+
|
66 |
+
// Priority needs to be 11 here so that we have already enqueued jetpack-lazy-images.
|
67 |
+
add_action( 'wp_enqueue_scripts', 'twentysixteen_jetpack_lazy_images_compat', 11 );
|
modules/wordads/php/widgets.php
CHANGED
@@ -52,7 +52,7 @@ class WordAds_Sidebar_Widget extends WP_Widget {
|
|
52 |
|
53 |
$snippet = $wordads->get_house_ad( $unit );
|
54 |
} else {
|
55 |
-
$snippet = $wordads->get_ad_snippet( $section_id, $height, $width );
|
56 |
}
|
57 |
|
58 |
echo <<< HTML
|
@@ -113,4 +113,3 @@ function jetpack_wordads_widgets_init_callback() {
|
|
113 |
}
|
114 |
|
115 |
add_action( 'widgets_init', 'jetpack_wordads_widgets_init_callback' );
|
116 |
-
|
52 |
|
53 |
$snippet = $wordads->get_house_ad( $unit );
|
54 |
} else {
|
55 |
+
$snippet = $wordads->get_ad_snippet( $section_id, $height, $width, 'widget' );
|
56 |
}
|
57 |
|
58 |
echo <<< HTML
|
113 |
}
|
114 |
|
115 |
add_action( 'widgets_init', 'jetpack_wordads_widgets_init_callback' );
|
|
modules/wordads/wordads.php
CHANGED
@@ -96,7 +96,11 @@ class WordAds {
|
|
96 |
$this->insert_adcode();
|
97 |
|
98 |
if ( '/ads.txt' === $_SERVER['REQUEST_URI'] ) {
|
99 |
-
|
|
|
|
|
|
|
|
|
100 |
|
101 |
/**
|
102 |
* Provide plugins a way of modifying the contents of the automatically-generated ads.txt file.
|
@@ -107,7 +111,7 @@ class WordAds {
|
|
107 |
*
|
108 |
* @param string WordAds_API::get_wordads_ads_txt() The contents of the ads.txt file.
|
109 |
*/
|
110 |
-
$ads_txt_content = apply_filters( 'wordads_ads_txt', $
|
111 |
|
112 |
header( 'Content-Type: text/plain; charset=utf-8' );
|
113 |
echo esc_html( $ads_txt_content );
|
@@ -269,7 +273,7 @@ HTML;
|
|
269 |
|
270 |
/**
|
271 |
* Insert an inline ad into a post content
|
272 |
-
* Used for rendering the `
|
273 |
*
|
274 |
* @since 6.1.0
|
275 |
*/
|
@@ -369,25 +373,30 @@ HTML;
|
|
369 |
function get_ad( $spot, $type = 'iponweb' ) {
|
370 |
$snippet = '';
|
371 |
if ( 'iponweb' == $type ) {
|
|
|
372 |
$width = 300;
|
373 |
$height = 250;
|
374 |
$second_belowpost = '';
|
375 |
$snippet = '';
|
376 |
if ( 'top' == $spot ) {
|
377 |
// mrec for mobile, leaderboard for desktop
|
|
|
378 |
$width = $this->params->mobile_device ? 300 : 728;
|
379 |
$height = $this->params->mobile_device ? 250 : 90;
|
380 |
-
$snippet = $this->get_ad_snippet( $height, $width, $spot );
|
381 |
} else if ( 'belowpost' == $spot ) {
|
|
|
382 |
$width = 300;
|
383 |
$height = 250;
|
384 |
|
385 |
-
$snippet = $this->get_ad_snippet( $height, $width, $spot, 'float:left;margin-right:5px;margin-top:0px;' );
|
386 |
if ( $this->option( 'wordads_second_belowpost', true ) ) {
|
387 |
-
$
|
|
|
388 |
}
|
389 |
} else if ( 'inline' === $spot ) {
|
390 |
-
$
|
|
|
391 |
}
|
392 |
} else if ( 'house' == $type ) {
|
393 |
$leaderboard = 'top' == $spot && ! $this->params->mobile_device;
|
@@ -414,6 +423,7 @@ HTML;
|
|
414 |
|
415 |
/**
|
416 |
* Returns the snippet to be inserted into the ad unit
|
|
|
417 |
* @param int $height
|
418 |
* @param int $width
|
419 |
* @param int $location
|
@@ -422,15 +432,15 @@ HTML;
|
|
422 |
*
|
423 |
* @since 5.7
|
424 |
*/
|
425 |
-
function get_ad_snippet( $height, $width, $location = '', $css = '' ) {
|
426 |
$this->ads[] = array( 'location' => $location, 'width' => $width, 'height' => $height );
|
427 |
$ad_number = count( $this->ads );
|
428 |
// Max 6 ads per page.
|
429 |
-
if ( $ad_number >
|
430 |
return;
|
431 |
}
|
432 |
$data_tags = $this->params->cloudflare ? ' data-cfasync="false"' : '';
|
433 |
-
|
434 |
return <<<HTML
|
435 |
<div style="padding-bottom:15px;width:{$width}px;height:{$height}px;$css">
|
436 |
<div id="atatags-{$ad_number}">
|
@@ -438,6 +448,7 @@ HTML;
|
|
438 |
__ATA.cmd.push(function() {
|
439 |
__ATA.initSlot('atatags-{$ad_number}', {
|
440 |
collapseEmpty: 'before',
|
|
|
441 |
location: '{$location}',
|
442 |
width: {$width},
|
443 |
height: {$height}
|
96 |
$this->insert_adcode();
|
97 |
|
98 |
if ( '/ads.txt' === $_SERVER['REQUEST_URI'] ) {
|
99 |
+
|
100 |
+
if ( false === ( $ads_txt_transient = get_transient( 'jetpack_ads_txt' ) ) ) {
|
101 |
+
$ads_txt_transient = ! is_wp_error( WordAds_API::get_wordads_ads_txt() ) ? WordAds_API::get_wordads_ads_txt() : '';
|
102 |
+
set_transient( 'jetpack_ads_txt', $ads_txt_transient, DAY_IN_SECONDS );
|
103 |
+
}
|
104 |
|
105 |
/**
|
106 |
* Provide plugins a way of modifying the contents of the automatically-generated ads.txt file.
|
111 |
*
|
112 |
* @param string WordAds_API::get_wordads_ads_txt() The contents of the ads.txt file.
|
113 |
*/
|
114 |
+
$ads_txt_content = apply_filters( 'wordads_ads_txt', $ads_txt_transient );
|
115 |
|
116 |
header( 'Content-Type: text/plain; charset=utf-8' );
|
117 |
echo esc_html( $ads_txt_content );
|
273 |
|
274 |
/**
|
275 |
* Insert an inline ad into a post content
|
276 |
+
* Used for rendering the `wordads` shortcode.
|
277 |
*
|
278 |
* @since 6.1.0
|
279 |
*/
|
373 |
function get_ad( $spot, $type = 'iponweb' ) {
|
374 |
$snippet = '';
|
375 |
if ( 'iponweb' == $type ) {
|
376 |
+
$section_id = WORDADS_API_TEST_ID;
|
377 |
$width = 300;
|
378 |
$height = 250;
|
379 |
$second_belowpost = '';
|
380 |
$snippet = '';
|
381 |
if ( 'top' == $spot ) {
|
382 |
// mrec for mobile, leaderboard for desktop
|
383 |
+
$section_id = 0 === $this->params->blog_id ? WORDADS_API_TEST_ID : $this->params->blog_id . '2';
|
384 |
$width = $this->params->mobile_device ? 300 : 728;
|
385 |
$height = $this->params->mobile_device ? 250 : 90;
|
386 |
+
$snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot );
|
387 |
} else if ( 'belowpost' == $spot ) {
|
388 |
+
$section_id = 0 === $this->params->blog_id ? WORDADS_API_TEST_ID : $this->params->blog_id . '1';
|
389 |
$width = 300;
|
390 |
$height = 250;
|
391 |
|
392 |
+
$snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot, 'float:left;margin-right:5px;margin-top:0px;' );
|
393 |
if ( $this->option( 'wordads_second_belowpost', true ) ) {
|
394 |
+
$section_id2 = 0 === $this->params->blog_id ? WORDADS_API_TEST_ID2 : $this->params->blog_id . '4';
|
395 |
+
$snippet .= $this->get_ad_snippet( $section_id2, $height, $width, $spot, 'float:left;margin-top:0px;' );
|
396 |
}
|
397 |
} else if ( 'inline' === $spot ) {
|
398 |
+
$section_id = 0 === $this->params->blog_id ? WORDADS_API_TEST_ID : $this->params->blog_id . '5';
|
399 |
+
$snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot, 'mrec', 'float:left;margin-right:5px;margin-top:0px;' );
|
400 |
}
|
401 |
} else if ( 'house' == $type ) {
|
402 |
$leaderboard = 'top' == $spot && ! $this->params->mobile_device;
|
423 |
|
424 |
/**
|
425 |
* Returns the snippet to be inserted into the ad unit
|
426 |
+
* @param int $section_id
|
427 |
* @param int $height
|
428 |
* @param int $width
|
429 |
* @param int $location
|
432 |
*
|
433 |
* @since 5.7
|
434 |
*/
|
435 |
+
function get_ad_snippet( $section_id, $height, $width, $location = '', $css = '' ) {
|
436 |
$this->ads[] = array( 'location' => $location, 'width' => $width, 'height' => $height );
|
437 |
$ad_number = count( $this->ads );
|
438 |
// Max 6 ads per page.
|
439 |
+
if ( $ad_number > 5 && 'top' !== $location ) {
|
440 |
return;
|
441 |
}
|
442 |
$data_tags = $this->params->cloudflare ? ' data-cfasync="false"' : '';
|
443 |
+
|
444 |
return <<<HTML
|
445 |
<div style="padding-bottom:15px;width:{$width}px;height:{$height}px;$css">
|
446 |
<div id="atatags-{$ad_number}">
|
448 |
__ATA.cmd.push(function() {
|
449 |
__ATA.initSlot('atatags-{$ad_number}', {
|
450 |
collapseEmpty: 'before',
|
451 |
+
sectionId: '{$section_id}',
|
452 |
location: '{$location}',
|
453 |
width: {$width},
|
454 |
height: {$height}
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Jetpack by WordPress.com ===
|
2 |
Contributors: automattic, adamkheckler, aduth, akirk, allendav, alternatekev, andy, annezazu, apeatling, azaozz, batmoo, barry, beaulebens, blobaugh, cainm, cena, cfinke, chaselivingston, chellycat, clickysteve, csonnek, danielbachhuber, davoraltman, daniloercoli, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, eliorivero, enej, eoigal, erania-pinnera, ethitter, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, jblz, jeherve, jenhooks, jenia, jgs, jkudish, jmdodd, Joen, johnjamesjacoby, jshreve, koke, kraftbj, lancewillett, lschuyler, macmanx, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, michael-arestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, obenland, oskosk, pento, professor44, rachelsquirrel, rdcoll, ryancowles, richardmuscat, richardmtl, roccotripaldi, samhotchkiss, scarstocea, sdquirk, stephdau, tmoorewp, tyxla, Viper007Bond, westi, yoavf, zinigor
|
3 |
Tags: Jetpack, WordPress.com, backup, security, related posts, CDN, speed, anti-spam, social sharing, SEO, video, stats
|
4 |
-
Stable tag: 6.
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 4.9
|
7 |
|
@@ -66,7 +66,7 @@ These include: [site stats](https://jetpack.com/features/traffic/site-stats), a
|
|
66 |
= Should I purchase a paid plan? =
|
67 |
Jetpack's paid services include real-time backups, security scanning, premium themes, spam filtering, video hosting, site monetization, SEO tools, search, priority support, and more.
|
68 |
|
69 |
-
To learn more about the essential security and WordPress services we provide,
|
70 |
|
71 |
= Why do I need a WordPress.com account? =
|
72 |
|
@@ -110,7 +110,7 @@ There are opportunities for developers at all levels to contribute. [Learn more
|
|
110 |
* Dashboard: We improved the styles of status numbers so it doesn't look like floating.
|
111 |
* JSON API: Added support for Google My Business integration available on WordPress.com.
|
112 |
* Masterbar: We removed the Next Steps link from the Account sidebar.
|
113 |
-
* Publicize: Let the user
|
114 |
* Settings: Added "Privacy Information" links to each Jetpack module/feature card.
|
115 |
* Shortcodes: Mixcloud shortcode now uses oEmbed.
|
116 |
* Stats: Added a new filter jetpack_honor_dnt_header_for_stats, which if enabled would not track stats for visitors with DNT enabled.
|
@@ -132,8 +132,8 @@ There are opportunities for developers at all levels to contribute. [Learn more
|
|
132 |
* JSON API: Fixed internationalization on embed endpoint.
|
133 |
* Theme Tools: Show featured images in WooCommerce pages when Display on blog and archives is turned off for Themes that support this feature.
|
134 |
* Publicize: Avoid adding Publicize post meta when a post transitions to publish and it is not a publicize-able post type.
|
135 |
-
* Settings:
|
136 |
-
* Slideshow: Fixed
|
137 |
* SSO: We fixed the name of a filter which contained a typo before. The filter is now named: `jetpack_sso_auth_cookie_expiration`.
|
138 |
* SSO: Fixed some cases where we were not handling secure cookies for sites running over https.
|
139 |
* Sync: Fixed Warning: Invalid argument supplied for foreach().
|
1 |
=== Jetpack by WordPress.com ===
|
2 |
Contributors: automattic, adamkheckler, aduth, akirk, allendav, alternatekev, andy, annezazu, apeatling, azaozz, batmoo, barry, beaulebens, blobaugh, cainm, cena, cfinke, chaselivingston, chellycat, clickysteve, csonnek, danielbachhuber, davoraltman, daniloercoli, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, eliorivero, enej, eoigal, erania-pinnera, ethitter, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, jblz, jeherve, jenhooks, jenia, jgs, jkudish, jmdodd, Joen, johnjamesjacoby, jshreve, koke, kraftbj, lancewillett, lschuyler, macmanx, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, michael-arestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, obenland, oskosk, pento, professor44, rachelsquirrel, rdcoll, ryancowles, richardmuscat, richardmtl, roccotripaldi, samhotchkiss, scarstocea, sdquirk, stephdau, tmoorewp, tyxla, Viper007Bond, westi, yoavf, zinigor
|
3 |
Tags: Jetpack, WordPress.com, backup, security, related posts, CDN, speed, anti-spam, social sharing, SEO, video, stats
|
4 |
+
Stable tag: 6.1
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 4.9
|
7 |
|
66 |
= Should I purchase a paid plan? =
|
67 |
Jetpack's paid services include real-time backups, security scanning, premium themes, spam filtering, video hosting, site monetization, SEO tools, search, priority support, and more.
|
68 |
|
69 |
+
To learn more about the essential security and WordPress services we provide, visit our [plan comparison page](https://jetpack.com/pricing?from=wporg).
|
70 |
|
71 |
= Why do I need a WordPress.com account? =
|
72 |
|
110 |
* Dashboard: We improved the styles of status numbers so it doesn't look like floating.
|
111 |
* JSON API: Added support for Google My Business integration available on WordPress.com.
|
112 |
* Masterbar: We removed the Next Steps link from the Account sidebar.
|
113 |
+
* Publicize: Let the user know that we are going to send emails to subscribers and publicize to the different accounts.
|
114 |
* Settings: Added "Privacy Information" links to each Jetpack module/feature card.
|
115 |
* Shortcodes: Mixcloud shortcode now uses oEmbed.
|
116 |
* Stats: Added a new filter jetpack_honor_dnt_header_for_stats, which if enabled would not track stats for visitors with DNT enabled.
|
132 |
* JSON API: Fixed internationalization on embed endpoint.
|
133 |
* Theme Tools: Show featured images in WooCommerce pages when Display on blog and archives is turned off for Themes that support this feature.
|
134 |
* Publicize: Avoid adding Publicize post meta when a post transitions to publish and it is not a publicize-able post type.
|
135 |
+
* Settings: Fixed the icon representing the minimum plan needed for SEO and Google Analytics features.
|
136 |
+
* Slideshow: Fixed an invalid argument supplied for foreach() warning.
|
137 |
* SSO: We fixed the name of a filter which contained a typo before. The filter is now named: `jetpack_sso_auth_cookie_expiration`.
|
138 |
* SSO: Fixed some cases where we were not handling secure cookies for sites running over https.
|
139 |
* Sync: Fixed Warning: Invalid argument supplied for foreach().
|
sal/class.json-api-site-jetpack.php
CHANGED
@@ -101,8 +101,7 @@ class Jetpack_Site extends Abstract_Jetpack_Site {
|
|
101 |
}
|
102 |
|
103 |
function has_wordads() {
|
104 |
-
|
105 |
-
return false;
|
106 |
}
|
107 |
|
108 |
function get_frame_nonce() {
|
101 |
}
|
102 |
|
103 |
function has_wordads() {
|
104 |
+
return Jetpack::is_module_active( 'wordads' );
|
|
|
105 |
}
|
106 |
|
107 |
function get_frame_nonce() {
|