WordPress/wp-includes/js/dist/dom.min.js
Ella Iseulde Van Dorpe 2aa1b8ff48 Block Editor: Update the WordPress Packages from Gutenberg 5.3
- @wordpress/a11y@2.2.0
 - @wordpress/annotations@1.2.0
 - @wordpress/api-fetch@3.1.0
 - @wordpress/autop@2.2.0
 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0
 - @wordpress/babel-preset-default@4.1.0
 - @wordpress/blob@2.3.0
 - @wordpress/block-editor@1.1.0
 - @wordpress/block-library@2.4.0
 - @wordpress/block-serialization-default-parser@3.1.0
 - @wordpress/blocks@6.2.0
 - @wordpress/components@7.2.0
 - @wordpress/compose@3.2.0
 - @wordpress/core-data@2.2.0
 - @wordpress/data@4.4.0
 - @wordpress/date@3.2.0
 - @wordpress/deprecated@2.2.0
 - @wordpress/docgen@1.1.0
 - @wordpress/dom-ready@2.2.0
 - @wordpress/dom@2.2.0
 - @wordpress/e2e-test-utils@1.1.0
 - @wordpress/e2e-tests@1.1.0
 - @wordpress/edit-post@3.3.0
 - @wordpress/edit-widgets@0.2.0
 - @wordpress/editor@9.2.0
 - @wordpress/element@2.3.0
 - @wordpress/escape-html@1.2.0
 - @wordpress/eslint-plugin@2.1.0
 - @wordpress/format-library@1.4.0
 - @wordpress/hooks@2.2.0
 - @wordpress/html-entities@2.2.0
 - @wordpress/i18n@3.3.0
 - @wordpress/keycodes@2.2.0
 - @wordpress/list-reusable-blocks@1.3.0
 - @wordpress/notices@1.3.0
 - @wordpress/nux@3.2.0
 - @wordpress/plugins@2.2.0
 - @wordpress/priority-queue@1.1.0
 - @wordpress/redux-routine@3.2.0
 - @wordpress/rich-text@3.2.0
 - @wordpress/scripts@3.1.0
 - @wordpress/shortcode@2.2.0
 - @wordpress/url@2.5.0
 - @wordpress/viewport@2.3.0
 - @wordpress/wordcount@2.2.0


Built from https://develop.svn.wordpress.org/trunk@44960


git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 12:48:00 +00:00

1 line
8.1 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

this.wp=this.wp||{},this.wp.dom=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=379)}({17:function(e,t,n){"use strict";var r=n(34);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return o})},2:function(e,t){!function(){e.exports=this.lodash}()},34:function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},379:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"find",function(){return c});var o={};n.r(o),n.d(o,"isTabbableIndex",function(){return f}),n.d(o,"find",function(){return v});var i=n(17),a=["[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",");function u(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function c(e){var t=e.querySelectorAll(a);return Object(i.a)(t).filter(function(e){return!!u(e)&&("AREA"!==e.nodeName||function(e){var t=e.closest("map[name]");if(!t)return!1;var n=document.querySelector('img[usemap="#'+t.name+'"]');return!!n&&u(n)}(e))})}var l=n(2);function d(e){var t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function f(e){return-1!==d(e)}function s(e,t){return{element:e,index:t}}function g(e){return e.element}function p(e,t){var n=d(e.element),r=d(t.element);return n===r?e.index-t.index:n-r}function v(e){return c(e).filter(f).map(s).sort(p).map(g).reduce((t={},function(e,n){var r=n.nodeName,o=n.type,i=n.checked,a=n.name;if("INPUT"!==r||"radio"!==o||!a)return e.concat(n);var u=t.hasOwnProperty(a);if(!i&&u)return e;if(u){var c=t[a];e=Object(l.without)(e,c)}return t[a]=n,e.concat(n)}),[]);var t}var m=window.getComputedStyle,b=window.Node,h=b.TEXT_NODE,C=b.ELEMENT_NODE,N=b.DOCUMENT_POSITION_PRECEDING,E=b.DOCUMENT_POSITION_FOLLOWING;function w(e){var t=e.anchorNode,n=e.focusNode,r=e.anchorOffset,o=e.focusOffset,i=t.compareDocumentPosition(n);return!(i&N)&&(!!(i&E)||(0!==i||r<=o))}function y(e,t){if(Object(l.includes)(["INPUT","TEXTAREA"],e.tagName))return e.selectionStart===e.selectionEnd&&(t?0===e.selectionStart:e.value.length===e.selectionStart);if(!e.isContentEditable)return!0;var n=window.getSelection(),r=n.getRangeAt(0).cloneRange();n.isCollapsed||r.collapse(!w(n));var o,i=r.startContainer;if(o=t?0:i.nodeValue?i.nodeValue.length:i.childNodes.length,r["".concat(t?"start":"end","Offset")]!==o)return!1;for(var a=t?"previous":"next";i!==e;){for(var u=i["".concat(a,"Sibling")];u&&u.nodeType===h&&""===u.data;)u=u["".concat(a,"Sibling")];if(u)return!1;i=i.parentNode}return!0}function S(e,t){if(Object(l.includes)(["INPUT","TEXTAREA"],e.tagName))return y(e,t);if(!e.isContentEditable)return!0;var n=window.getSelection();if(!n.isCollapsed&&w(n)===t)return!1;var r=n.rangeCount?n.getRangeAt(0):null;if(!r)return!1;var o=T(r);if(!o)return!1;var i=e.getBoundingClientRect(),a=window.getComputedStyle(e).lineHeight,u=parseInt(a,10)/2;return!(t&&o.top-u>i.top)&&!(!t&&o.bottom+u<i.bottom)}function T(e){if(!e.collapsed)return e.getBoundingClientRect();var t=e.getClientRects()[0];if(!t){var n=document.createTextNode("");e.insertNode(n),t=e.getClientRects()[0],n.parentNode.removeChild(n)}return t}function O(e){if(e.isContentEditable){var t=window.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;if(n)return T(n)}}function R(e,t){if(e){if(Object(l.includes)(["INPUT","TEXTAREA"],e.tagName))return e.focus(),void(t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0));if(e.focus(),e.isContentEditable){var n=e[t?"lastChild":"firstChild"];if(n){var r=window.getSelection(),o=document.createRange();o.selectNodeContents(n),o.collapse(!t),r.removeAllRanges(),r.addRange(o)}}}}function A(e,t,n,r){r.style.zIndex="10000";var o=function(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;var r=e.caretPositionFromPoint(t,n);if(!r)return null;var o=e.createRange();return o.setStart(r.offsetNode,r.offset),o.collapse(!0),o}(e,t,n);return r.style.zIndex=null,o}function P(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e)if(n&&e.isContentEditable){var o=n.height/2,i=e.getBoundingClientRect(),a=n.left,u=t?i.bottom-o:i.top+o,c=A(document,a,u,e);if(!c||!e.contains(c.startContainer))return!r||c&&c.startContainer&&c.startContainer.contains(e)?void R(e,t):(e.scrollIntoView(t),void P(e,t,n,!1));if(c.startContainer.nodeType===h){var l=c.startContainer.parentNode,d=l.getBoundingClientRect(),f=t?"bottom":"top",s=parseInt(m(l).getPropertyValue("padding-".concat(f)),10)||0,g=t?d.bottom-s-o:d.top+s+o;u!==g&&(c=A(document,a,g,e))}var p=window.getSelection();p.removeAllRanges(),p.addRange(c),e.focus(),p.removeAllRanges(),p.addRange(c)}else R(e,t)}function I(e){try{var t=e.nodeName,n=e.selectionStart,r=e.contentEditable;return"INPUT"===t&&null!==n||"TEXTAREA"===t||"true"===r}catch(e){return!1}}function j(){if(I(document.activeElement))return!0;var e=window.getSelection(),t=e.rangeCount?e.getRangeAt(0):null;return t&&!t.collapsed}function x(e){if(Object(l.includes)(["INPUT","TEXTAREA"],e.nodeName))return 0===e.selectionStart&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;var t=window.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;if(!n)return!0;var r=n.startContainer,o=n.endContainer,i=n.startOffset,a=n.endOffset;if(r===e&&o===e&&0===i&&a===e.childNodes.length)return!0;var u=e.lastChild,c=u.nodeType===h?u.data.length:u.childNodes.length;return r===e.firstChild&&o===e.lastChild&&0===i&&a===c}function _(e){if(e){if(e.scrollHeight>e.clientHeight){var t=window.getComputedStyle(e).overflowY;if(/(auto|scroll)/.test(t))return e}return _(e.parentNode)}}function U(e){for(var t;(t=e.parentNode)&&t.nodeType!==C;);return t?"static"!==m(t).position?t:t.offsetParent:null}function B(e,t){F(t,e.parentNode),D(e)}function D(e){e.parentNode.removeChild(e)}function F(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function H(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function M(e,t){for(var n=e.ownerDocument.createElement(t);e.firstChild;)n.appendChild(e.firstChild);return e.parentNode.replaceChild(n,e),n}function V(e,t){t.parentNode.insertBefore(e,t),e.appendChild(t)}n.d(t,"focus",function(){return X}),n.d(t,"isHorizontalEdge",function(){return y}),n.d(t,"isVerticalEdge",function(){return S}),n.d(t,"getRectangleFromRange",function(){return T}),n.d(t,"computeCaretRect",function(){return O}),n.d(t,"placeCaretAtHorizontalEdge",function(){return R}),n.d(t,"placeCaretAtVerticalEdge",function(){return P}),n.d(t,"isTextField",function(){return I}),n.d(t,"documentHasSelection",function(){return j}),n.d(t,"isEntirelySelected",function(){return x}),n.d(t,"getScrollContainer",function(){return _}),n.d(t,"getOffsetParent",function(){return U}),n.d(t,"replace",function(){return B}),n.d(t,"remove",function(){return D}),n.d(t,"insertAfter",function(){return F}),n.d(t,"unwrap",function(){return H}),n.d(t,"replaceTag",function(){return M}),n.d(t,"wrap",function(){return V});var X={focusable:r,tabbable:o}}});