芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cepali.edu.mx/wp-includes/blocks/query/wp-emoji-20241116140250-20241116190836.js
/** * wp-emoji.js is used to replace emoji with images in browsers when the browser * doesn't support emoji natively. * * @output wp-includes/js/wp-emoji.js */ ( function( window, settings ) { /** * Replaces emoji with images when browsers don't support emoji. * * @since 4.2.0 * @access private * * @class * * @see Twitter Emoji library * @link https://github.com/twitter/twemoji * * @return {Object} The wpEmoji parse and test functions. */ function wpEmoji() { var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, // Compression and maintain local scope. document = window.document, // Private. twemoji, timer, loaded = false, count = 0, ie11 = window.navigator.userAgent.indexOf( 'Trident/7.0' ) > 0; /** * Detect if the browser supports SVG. * * @since 4.6.0 * @private * * @see Modernizr * @link https://github.com/Modernizr/Modernizr/blob/master/feature-detects/svg/asimg.js * * @return {boolean} True if the browser supports svg, false if not. */ function browserSupportsSvgAsImage() { if ( !! document.implementation.hasFeature ) { return document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ); } // document.implementation.hasFeature is deprecated. It can be presumed // if future browsers remove it, the browser will support SVGs as images. return true; } /** * Runs when the document load event is fired, so we can do our first parse of * the page. * * Listens to all the DOM mutations and checks for added nodes that contain * emoji characters and replaces those with twitter emoji images. * * @since 4.2.0 * @private */ function load() { if ( loaded ) { return; } // Ensure twemoji is available on the global window before proceeding. if ( typeof window.twemoji === 'undefined' ) { // Break if waiting for longer than 30 seconds. if ( count > 600 ) { return; } // Still waiting. window.clearTimeout( timer ); timer = window.setTimeout( load, 50 ); count++; return; } twemoji = window.twemoji; loaded = true; // Initialize the mutation observer, which checks all added nodes for // replaceable emoji characters. if ( MutationObserver ) { new MutationObserver( function( mutationRecords ) { var i = mutationRecords.length, addedNodes, removedNodes, ii, node; while ( i-- ) { addedNodes = mutationRecords[ i ].addedNodes; removedNodes = mutationRecords[ i ].removedNodes; ii = addedNodes.length; /* * Checks if an image has been replaced by a text element * with the same text as the alternate description of the replaced image. * (presumably because the image could not be loaded). * If it is, do absolutely nothing. * * Node type 3 is a TEXT_NODE. * * @link https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType */ if ( ii === 1 && removedNodes.length === 1 && addedNodes[0].nodeType === 3 && removedNodes[0].nodeName === 'IMG' && addedNodes[0].data === removedNodes[0].alt && 'load-failed' === removedNodes[0].getAttribute( 'data-error' ) ) { return; } // Loop through all the added nodes. while ( ii-- ) { node = addedNodes[ ii ]; // Node type 3 is a TEXT_NODE. if ( node.nodeType === 3 ) { if ( ! node.parentNode ) { continue; } if ( ie11 ) { /* * IE 11's implementation of MutationObserver is buggy. * It unnecessarily splits text nodes when it encounters a HTML * template interpolation symbol ( "{{", for example ). So, we * join the text nodes back together as a work-around. * * Node type 3 is a TEXT_NODE. */ while( node.nextSibling && 3 === node.nextSibling.nodeType ) { node.nodeValue = node.nodeValue + node.nextSibling