WordPress/wp-includes/js/dist/editor.min.js

12 lines
258 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.editor=function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./node_modules/@wordpress/editor/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/esm/extends.js":function(e,t,r){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return o}))},"./node_modules/@wordpress/editor/build-module/index.js":function(e,t,r){"use strict";r.r(t),r.d(t,"storeConfig",(function(){return to})),r.d(t,"store",(function(){return ro})),r.d(t,"userAutocompleter",(function(){return f})),r.d(t,"AutosaveMonitor",(function(){return so})),r.d(t,"DocumentOutline",(function(){return ho})),r.d(t,"DocumentOutlineCheck",(function(){return vo})),r.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return go})),r.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return jo})),r.d(t,"EditorKeyboardShortcutsRegister",(function(){return Oo})),r.d(t,"EditorHistoryRedo",(function(){return Po})),r.d(t,"EditorHistoryUndo",(function(){return xo})),r.d(t,"EditorNotices",(function(){return Vo})),r.d(t,"EntitiesSavedStates",(function(){return Lo})),r.d(t,"ErrorBoundary",(function(){return Io})),r.d(t,"LocalAutosaveMonitor",(function(){return Uo})),r.d(t,"PageAttributesCheck",(function(){return Fo})),r.d(t,"PageAttributesOrder",(function(){return Ko})),r.d(t,"PageAttributesParent",(function(){return ts})),r.d(t,"PageTemplate",(function(){return rs})),r.d(t,"PostAuthor",(function(){return ns})),r.d(t,"PostAuthorCheck",(function(){return is})),r.d(t,"PostComments",(function(){return cs})),r.d(t,"PostExcerpt",(function(){return ls})),r.d(t,"PostExcerptCheck",(function(){return as})),r.d(t,"PostFeaturedImage",(function(){return fs})),r.d(t,"PostFeaturedImageCheck",(function(){return us})),r.d(t,"PostFormat",(function(){return Os})),r.d(t,"PostFormatCheck",(function(){return gs})),r.d(t,"PostLastRevision",(function(){return Es})),r.d(t,"PostLastRevisionCheck",(function(){return _s})),r.d(t,"PostLockedModal",(function(){return xs})),r.d(t,"PostPendingStatus",(function(){return Vs})),r.d(t,"PostPendingStatusCheck",(function(){return zs})),r.d(t,"PostPingbacks",(function(){return ks})),r.d(t,"PostPreviewButton",(function(){return Ps})),r.d(t,"PostPublishButton",(function(){return Hs})),r.d(t,"PostPublishButtonLabel",(function(){return Cs})),r.d(t,"PostPublishPanel",(function(){return ln})),r.d(t,"PostSavedState",(function(){return bn})),r.d(t,"PostSchedule",(function(){return Gs})),r.d(t,"PostScheduleCheck",(function(){return hn})),r.d(t,"PostScheduleLabel",(function(){return Ds})),r.d(t,"PostSlug",(function(){return fn})),r.d(t,"PostSlugCheck",(function(){return vn})),r.d(t,"PostSticky",(function(){return jn})),r.d(t,"PostStickyCheck",(function(){return gn})),r.d(t,"PostSwitchToDraftButton",(function(){return pn})),r.d(t,"PostTaxonomies",(function(){return En})),r.d(t,"PostTaxonomiesCheck",(function(){return Sn})),r.d(t,"PostTextEditor",(function(){return zn})),r.d(t,"PostTitle",(function(){return kn})),r.d(t,"PostTrash",(function(){return Cn})),r.d(t,"PostTrashCheck",(function(){return Tn})),r.d(
/*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*/s=[e,t],void 0===(n="function"==typeof(o=function(e,t){"use strict";var r,o,s="function"==typeof Map?new Map:(r=[],o=[],{has:function(e){return r.indexOf(e)>-1},get:function(e){return o[r.indexOf(e)]},set:function(e,t){-1===r.indexOf(e)&&(r.push(e),o.push(t))},delete:function(e){var t=r.indexOf(e);t>-1&&(r.splice(t,1),o.splice(t,1))}}),n=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){n=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!s.has(e)){var t,r=null,o=null,i=null,c=function(){e.clientWidth!==o&&u()},l=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",u,!1),e.removeEventListener("keyup",u,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",u,!1),Object.keys(t).forEach((function(r){e.style[r]=t[r]})),s.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",u,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",u,!1),e.addEventListener("autosize:update",u,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",s.set(e,{destroy:l,update:u}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),r="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(r)&&(r=0),u()}function a(t){var r=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=r,e.style.overflowY=t}function d(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),s=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+r+"px",o=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),s&&(document.documentElement.scrollTop=s)}}function u(){d();var t=Math.round(parseFloat(e.style.height)),r=window.getComputedStyle(e,null),o="content-box"===r.boxSizing?Math.round(parseFloat(r.height)):e.offsetHeight;if(o<t?"hidden"===r.overflowY&&(a("scroll"),d(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==r.overflowY&&(a("hidden"),d(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==o){i=o;var s=n("autosize:resized");try{e.dispatchEvent(s)}catch(e){}}}}function c(e){var t=s.get(e);t&&t.destroy()}function l(e){var t=s.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],c),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=a,e.exports=t.default})?o.apply(t,s):o)||(e.exports=n)},"./node_modules/classnames/index.js":function(e,t,r){var o;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var n=typeof o;if("string"===n||"number"===n)e.push(o);else if(Array.isArray(o)){if(o.length){var i=s.apply(null,o);i&&e.push(i)}}else if("object"===n)if(o.toString===Object.prototype.toString)for(var c in o)r.call(o,c)&&o[c]&&e.push(c);else e.push(o.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(o=function(){return s}.apply(t,[]))||(e.exports=o)}()},"./node_modules/computed-style/dist/computedStyle.commonjs.js":function(e,t){e.exports=function(e,t,r){return((r=window.getComputedStyle)?r(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},"./node_modules/line-height/lib/line-height.js":function(e,t,r){var o=r("./node_modules/computed-style/dist/computedStyle.commonjs.js");e.exports=function(e){var t=o(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var s=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),r=parseFloat(t,10),s?e.style.lineHeight=s:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(r*=4,r/=3):-1!==t.indexOf("mm")?(r*=96,r/=25.4):-1!==t.indexOf("cm")?(r*=96,r/=2.54):-1!==t.indexOf("in")?r*=96:-1!==t.indexOf("pc")&&(r*=16),r=Math.round(r),"normal"===t){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;","TEXTAREA"===n.toUpperCase()&&i.setAttribute("rows","1");var c=o(e,"font-size");i.style.fontSize=c,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),r=i.offsetHeight,l.removeChild(i)}return r}},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,r){"use strict";var o=r("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function s(){}function n(){}n.resetWarningCache=s,e.exports=function(){function e(e,t,r,s,n,i){if(i!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:s};return r.PropTypes=r,r}},"./node_modules/prop-types/index.js":function(e,t,r){e.exports=r("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-autosize-textarea/lib/TextareaAutosize.js":function(e,t,r){"use strict";var o,s=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},i=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&(r[o[s]]=e[o[s]])}return r};t.__esModule=!0;var c=r("react"),l=r("./node_modules/prop-types/index.js"),a=r("./node_modules/autosize/dist/autosize.js"),d=r("./node_modules/line-height/lib/line-height.js"),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:d(t.textarea)})},t.onChange=function(e){var r=t.props.onChange;t.currentValue=e.currentTarget.value,r&&r(e)},t}return s(t,e),t.prototype.componentDidMount=function(){var e=this,t=t