WordPress/wp-includes/js/dist/rich-text.min.js

2 lines
34 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{__UNSTABLE_LINE_SEPARATOR:function(){return _},__experimentalRichText:function(){return at},__unstableCanIndentListItems:function(){return je},__unstableCanOutdentListItems:function(){return Ie},__unstableChangeListType:function(){return He},__unstableCreateElement:function(){return w},__unstableFormatEdit:function(){return ot},__unstableIndentListItems:function(){return Pe},__unstableInsertLineSeparator:function(){return ee},__unstableIsActiveListType:function(){return H},__unstableIsEmptyLine:function(){return U},__unstableIsListRootSelected:function(){return K},__unstableOutdentListItems:function(){return Ke},__unstableRemoveLineSeparator:function(){return te},__unstableToDom:function(){return be},__unstableUseRichText:function(){return rt},applyFormat:function(){return x},concat:function(){return M},create:function(){return L},getActiveFormat:function(){return j},getActiveObject:function(){return I},getTextContent:function(){return P},insert:function(){return Z},insertObject:function(){return ne},isCollapsed:function(){return B},isEmpty:function(){return z},join:function(){return q},registerFormatType:function(){return X},remove:function(){return J},removeFormat:function(){return Y},replace:function(){return Q},slice:function(){return re},split:function(){return ae},store:function(){return y},toHTMLString:function(){return we},toggleFormat:function(){return Me},unregisterFormatType:function(){return $e},useAnchorRef:function(){return ze}});var n={};e.r(n),e.d(n,{getFormatType:function(){return m},getFormatTypeForBareElement:function(){return p},getFormatTypeForClassName:function(){return g},getFormatTypes:function(){return d}});var r={};e.r(r),e.d(r,{addFormatTypes:function(){return h},removeFormatTypes:function(){return v}});var a=window.wp.data,o=window.lodash;var i,s,c=(0,a.combineReducers)({formatTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...(0,o.keyBy)(t.formatTypes,"name")};case"REMOVE_FORMAT_TYPES":return(0,o.omit)(e,t.names)}return e}});function l(e){return[e]}function u(){var e={clear:function(){e.head=null}};return e}function f(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}i={},s="undefined"!=typeof WeakMap;const d=function(e,t){var n,r;function a(){n=s?new WeakMap:u()}function o(){var n,a,o,i,s,c=arguments.length;for(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];for(s=t.apply(null,i),(n=r(s)).isUniqueByDependants||(n.lastDependants&&!f(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),a=n.head;a;){if(f(a.args,i,1))return a!==n.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n.head,a.prev=null,n.head.prev=a,n.head=a),a.val;a=a.next}return a={val:e.apply(null,i)},i[0]=null,a.args=i,n.head&&(n.head.prev=a,a.next=n.head),n.head=a,a.val}return t||(t=l),r=s?function(e){var t,r,a,o,s,c=n,l=!0;for(t=0;t<e.length;t++){if(r=e[t],!(s=r)||"object"!=typeof s){l=!1;break}c.has(r)?c=c.get(r):(a=new WeakMap,c.set(r,a),c=a)}return c.has(i)||((o=u()).isUniqueByDependants=l,c.set(i,o)),c.get(i)}:function(){return n},o.getDependants=t,o.clear=a,a(),o}((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function m(e,t){return e.formatTypes[t]}function p(e,t){return(0,o.find)(d(e),(e=>{let{className:n,tagName:r}=e;return null===n&&t===r}))}function g(e,t){return(0,o.find)(d(e),(e=>{let{className:n}=e;return null!==n&&` ${t} `.indexOf(` ${n} `)>=0}))}function h(e){return{type:"ADD_FORMAT_TYPES",formatTypes:(0,o.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:(0,o.castArray)(e)}}const y=(0,a.createReduxStore)("core/rich