WordPress/wp-includes/js/dist/block-library.min.js

4 lines
827 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
(()=>{var e={2321:e=>{e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var a,o,r;if(Array.isArray(t)){if((a=t.length)!=n.length)return!1;for(o=a;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((a=t.length)!=n.length)return!1;for(o=a;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((a=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,r[o]))return!1;for(o=a;0!=o--;){var l=r[o];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",:"A",:"A",:"A",:"A",:"A",Æ:"AE",:"A",:"A",Ȃ:"A",:"A",:"A",:"A",:"A",:"A",Ç:"C",:"C",È:"E",É:"E",Ê:"E",Ë:"E",:"E",:"E",:"E",:"E",:"E",Ȇ:"E",:"E",:"E",:"E",:"E",:"E",:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",:"I",Ȋ:"I",:"I",:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",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",Ǹ:"N",ǹ:"n",:"O",:"o",:"O",:"o",:"U",:"u",:"W",:"w",:"Y",:"y",Ȁ:"
/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
function ei(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ti(e){return"#"+e.map(ei).join("")}function ni(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function ai(e,t,n){for(var a=0;a<n.length;a++)if(oi(e,t,n[a]))return!0;return!1}function oi(e,t,n){switch(n.length){case 3:if(function(e,t,n){if(255!==e[t+3])return!0;if(e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2])return!0;return!1}(e,t,n))return!0;break;case 4:if(function(e,t,n){if(e[t+3]&&n[3])return e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2]&&e[t+3]===n[3];return e[t+3]===n[3]}(e,t,n))return!0;break;case 5:if(function(e,t,n){var a=n[0],o=n[1],r=n[2],l=n[3],i=n[4],s=e[t+3],c=ri(s,l,i);if(!l)return c;if(!s&&c)return!0;if(ri(e[t],a,i)&&ri(e[t+1],o,i)&&ri(e[t+2],r,i)&&c)return!0;return!1}(e,t,n))return!0;break;default:return!1}}function ri(e,t,n){return e>=t-n&&e<=t+n}function li(e,t,n){for(var a={},o=n.ignoredColor,r=n.step,l=[0,0,0,0,0],i=0;i<t;i+=r){var s=e[i],c=e[i+1],m=e[i+2],u=e[i+3];if(!o||!ai(e,i,o)){var p=Math.round(s/24)+","+Math.round(c/24)+","+Math.round(m/24);a[p]?a[p]=[a[p][0]+s*u,a[p][1]+c*u,a[p][2]+m*u,a[p][3]+u,a[p][4]+1]:a[p]=[s*u,c*u,m*u,u,1],l[4]<a[p][4]&&(l=a[p])}}var d=l[0],g=l[1],h=l[2],b=l[3],_=l[4];return b?[Math.round(d/b),Math.round(g/b),Math.round(h/b),Math.round(b/_)]:n.defaultColor}function ii(e,t,n){for(var a=0,o=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,m=0;m<t;m+=c){var u=e[m+3],p=e[m]*u,d=e[m+1]*u,g=e[m+2]*u;s&&ai(e,m,s)||(a+=p,o+=d,r+=g,l+=u,i++)}return l?[Math.round(a/l),Math.round(o/l),Math.round(r/l),Math.round(l/i)]:n.defaultColor}function si(e,t,n){for(var a=0,o=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,m=0;m<t;m+=c){var u=e[m],p=e[m+1],d=e[m+2],g=e[m+3];s&&ai(e,m,s)||(a+=u*u*g,o+=p*p*g,r+=d*d*g,l+=g,i++)}return l?[Math.round(Math.sqrt(a/l)),Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(r/l)),Math.round(l/i)]:n.defaultColor}function ci(e){return mi(e,"defaultColor",[0,0,0,0])}function mi(e,t,n){return void 0===e[t]?n:e[t]}function ui(e){if(di(e)){var t=e.naturalWidth,n=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=n=100),{width:t,height:n}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function pi(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return gi&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function di(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var gi="undefined"!=typeof OffscreenCanvas;var hi="undefined"==typeof window;function bi(e){return Error("FastAverageColor: "+e)}function _i(e,t){t||console.error(e)}var yi=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(bi("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(bi("resource as string is not supported in this environment"));var n=new Image;return n.crossOrigin=t&&t.crossOrigin||"",n.src=e,this.bindImageEvents(n,t)}if(di(e)&&!e.complete)return this.bindImageEvents(e,t);var a=this.getColor(e,t);return a.error?Promise.reject(a.error):Promise.resolve(a)},e.prototype.getColor=function(e,t){var n=ci(t=t||{});if(!e)return _i(r=bi("call .getColor(null) without resource"),t.silent),this.prepareResult(n,r);var a=function(e,t){var n,a=mi(t,"left",0),o=mi(t,"top",0),r=mi(t,"width",e.width),l=mi(t,"height",e.height),i=r,s=l;return"precision"===t.mode||(r>l?(n=r/l,i=100,s=Math.round(i/n)):(n=l/r,s=100,i=Math.round(s/n)),(i>r||s>l||i<10||s<10)&&(i=r,s=l)),{srcLeft:a,srcTop:o,srcWidth:r,srcHeight:l,destWidth:i,destHeight:s}}(ui(e),t);if(!(a.srcWidth&&a.srcHeight&&a.destWidth&&a.destHeight))return _i(r=bi('incorrect sizes for resource "'.concat(pi(e),'"')),t.silent),this.prepareResult(n,r);if(!this.canvas&&(this.canvas=hi?gi?new OffscreenCanvas(1,1):null:document.