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

14 lines
375 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=418)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.blocks}()},109:function(e,t,r){"use strict";var n=r(154),o=r(156);function c(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=v(e));return e instanceof c?e.format():c.prototype.format.call(e)},t.Url=c;var a=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),b=["%","/","?",";","#"].concat(u),m=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=r(157);function v(e,t,r){if(e&&o.isObject(e)&&e instanceof c)return e;var n=new c;return n.parse(e,t,r),n}c.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var c=e.indexOf("?"),i=-1!==c&&c<e.indexOf("#")?"?":"#",s=e.split(i);s[0]=s[0].replace(/\\/g,"/");var v=e=s.join(i);if(v=v.trim(),!r&&1===e.split("#").length){var j=l.exec(v);if(j)return this.path=v,this.href=v,this.pathname=j[1],j[2]?(this.search=j[2],this.query=t?O.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=a.exec(v);if(y){var w=(y=y[0]).toLowerCase();this.protocol=w,v=v.substr(y.length)}if(r||y||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===v.substr(0,2);!k||y&&g[y]||(v=v.substr(2),this.slashes=!0)}if(!g[y]&&(k||y&&!f[y])){for(var C,_,E=-1,x=0;x<m.length;x++){-1!==(S=v.indexOf(m[x]))&&(-1===E||S<E)&&(E=S)}-1!==(_=-1===E?v.lastIndexOf("@"):v.lastIndexOf("@",E))&&(C=v.slice(0,_),v=v.slice(_+1),this.auth=decodeURIComponent(C)),E=-1;for(x=0;x<b.length;x++){var S;-1!==(S=v.indexOf(b[x]))&&(-1===E||S<E)&&(E=S)}-1===E&&(E=v.length),this.host=v.slice(0,E),v=v.slice(E),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var T=this.hostname.split(/\./),N=(x=0,T.length);x<N;x++){var B=T[x];if(B&&!B.match(d)){for(var A="",R=0,M=B.length;R<M;R++)B.charCodeAt(R)>127?A+="x":A+=B[R];if(!A.match(d)){var z=T.slice(0,x),I=T.slice(x+1),L=B.match(p);L&&(z.push(L[1]),I.unshift(L[2])),I.length&&(v="/"+I.join(".")+v),this.hostname=z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var H=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+H,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!h[w])for(x=0,N=u.length;x<N;x++){var V=u[x];if(-1!==v.indexOf(V)){var F=
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===c)for(var i in n)r.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},115:function(e,t,r){"use strict";var n=r(0),o=r(9),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}));t.a=c},12:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},13:function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,"a",(function(){return o}))},14:function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(32),o=r(7);function c(e,t){return!t||"object"!==Object(n.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},153:function(e,t,r){"use strict";var n=r(0),o=r(9),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M17.74 2.76c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-1.12 1.12-2.7 1.47-4.14 1.09l2.62-2.61.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-3.38 3.38c-.37-1.44-.02-3.02 1.1-4.14l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM8.59 13.43l5.34-5.34c.42-.42.42-1.1 0-1.52-.44-.43-1.13-.39-1.53 0l-5.33 5.34c-.42.42-.42 1.1 0 1.52.44.43 1.13.39 1.52 0zm-.76 2.29l4.14-4.15c.38 1.44.03 3.02-1.09 4.14l-1.52 1.53c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.53-1.52c1.12-1.12 2.7-1.47 4.14-1.1l-4.14 4.15c-.85.84-.85 2.2 0 3.05.84.84 2.2.84 3.04 0z"}));t.a=c},154:function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(c){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var i,l=2147483647,s=36,u=1,b=26,m=38,d=700,p=72,h=128,g="-",f=/^xn--/,O=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=s-u,w=Math.floor,k=String.fromCharCode;function C(e){throw RangeError(j[e])}function _(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function E(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+_((e=e.replace(v,".")).split("."),t).join(".")}function x(e){for(var t,r,n=[],o=0,c=e.length;o<c;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<c?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function S(e){return _(e,(function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)})).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?w(e/d):e>>1,e+=w(e/t);e>y*b>>1;n+=s)e=w(e/y);return w(n+(y+1)*e/(e+m))}function N(e){var t,r,n,o,c,a,i,m,d,f,O,v=[],j=e.length,y=0,k=h,_=p;for((r=e.lastIndexOf(g))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&C("not-basic"),v.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<j;){for(c=y,a=1,i=s;o>=j&&C("invalid-input"),((m=(O=e.charCodeAt(o++))-48<10?O-22:O-65<26?O-65:O-97<26?O-97:s)>=s||m>w((l-y)/a))&&C("overflow"),y+=m*a,!(m<(d=i<=_?u:i>=_+b?b:i-_));i+=s)a>w(l/(f=s-d))&&C("overflow"),a*=f;_=T(y-c,t=v.length+1,0==c),w(y/t)>l-k&&C("overflow
/*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
e.exports=function(){"use strict";function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw c}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}return function(){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r)}var n,o,c;return n=r,(o=[{key:"getColorAsync",value:function(e,t,r){e.complete?t.call(e,this.getColor(e,r),r&&r.data):this._bindImageEvents(e,t,r)}},{key:"getColor",value:function(e,t){t=t||{};var r=this._getDefaultColor(t),n=this._getOriginalSize(e),o=this._prepareSizeAndPosition(n,t),c=null,a=r;if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return this._prepareResult(r,new Error("FastAverageColor: Incorrect sizes."));if(!this._ctx&&(this._canvas=this._makeCanvas(),this._ctx=this._canvas.getContext&&this._canvas.getContext("2d"),!this._ctx))return this._prepareResult(r,new Error("FastAverageColor: Canvas Context 2D is not supported in this browser."));this._canvas.width=o.destWidth,this._canvas.height=o.destHeight;try{this._ctx.clearRect(0,0,o.destWidth,o.destHeight),this._ctx.drawImage(e,o.srcLeft,o.srcTop,o.srcWidth,o.srcHeight,0,0,o.destWidth,o.destHeight);var i=this._ctx.getImageData(0,0,o.destWidth,o.destHeight).data;a=this.getColorFromArray4(i,t)}catch(e){c=e}return this._prepareResult(a,c)}},{key:"getColorFromArray4",value:function(e,t){t=t||{};var r=e.length;if(r<4)return this._getDefaultColor(t);var n=r-r%4,o=4*(t.step||1),c="_"+(t.algorithm||"sqrt")+"Algorithm";if("function"!=typeof this[c])throw new Error("FastAverageColor: ".concat(t.algorithm," is unknown algorithm."));return this[c](e,n,o)}},{key:"destroy",value:function(){delete this._canvas,delete this._ctx}},{key:"_getDefaultColor",value:function(e){return this._getOption(e,"defaultColor",[255,255,255,255])}},{key:"_getOption",value:function(e,t,r){return void 0===e[t]?r:e[t]}},{key:"_prepareSizeAndPosition",value:function(e,t){var r,n=this._getOption(t,"left",0),o=this._getOption(t,"top",0),c=this._getOption(t,"width",e.width),a=this._getOption(t,"height",e.height),i=c,l=a;return"precision"===t.mode?{srcLeft:n,srcTop:o,srcWidth:c,srcHeight:a,destWidth:i,destHeight:l}:(c>a?(r=c/a,i=100,l=Math.round(i/r)):(r=a/c,l=100,i=Math.round(l/r)),(i>c||l>a||i<10||l<10)&&(i=c,l=a),{srcLeft:n,srcTop:o,srcWidth:c,srcHeight:a,destWidth:i,destHeight:l})}},{key:"_simpleAlgorithm",value:function(e,t,r){for(var n=0,o=0,c=0,a=0,i=0,l=0;l<t;l+=r){var s=e[l+3];n+=e[l]*s,o+=e[l+1]*s,c+=e[l+2]*s,a+=s,i++}return a?[Math.round(n/a),Math.round(o/a),Math.round(c/a),Math.round(a/i)]:[0,0,0,0]}},{key:"_sqrtAlgorithm",value:function(e,t,r){for(var n=0,o=0,c=0,a=0,i=0,l=0;l<t;l+=r){var s=e[l],u=e[l+1],b=e[l+2],m=e[l+3];n+=s*s*m,o+=u*u*m,c+=b*b*m,a+=m,i++}return a?[Math.round(Math.sqrt(n/a)),Math.round(Math.sqrt(o/a)),Math.round(Math.sqrt(c/a)),Math.round(a/i)]:[0,0,0,0]}},{key:"_dominantAlgorithm",value:function(e,r,n){for(var o={},c=0;c<r;c+=n){var a=e[c],i=e[c+1],l=e[c+2],s=e[c+3],u=Math.round(a/24)+","+Math.round(i/24)+","+Math.round(l/24);o[u]?o[u]=[o[u][0]+a*s,o[u][1]+i*s,o[u][2]+l*s,o[u][3]+s,o[u][4]+1]:o[u]=[a*s,i*s,l*s,s,1]}var b=t(Object.keys(o).map((function(e){return o[e]})).sort((function(e,t){var r=e[4],n=t[4];return r>n?-1:r===n?0:1}))[0],5),m=b[0],d=b[1],p=b[2],h=b[3],g=b[4];return h?[Math.round(m/h),Math.round(d/h),Math.round(p/h),Math.round(h/g)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,r){var n=this,o=(r=r||{})&&r.data,c=this._getDefaultColor(r),a=function(){s(),t.call(e,n.getColor(e,r),o)},i=function(){s(),t.call(e,n._prepareResult(c,new Error("Image error")),o)},l=function(){s(),t.call(e,n._prepareResult(c,new Error("Im
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var r=t.length,n=0;n<r;++n)o(e,t[n])}e.prototype=Object.create(null);var r={}.hasOwnProperty;var n=/\s+/;function o(e,o){if(o){var c=typeof o;"string"===c?function(e,t){for(var r=t.split(n),o=r.length,c=0;c<o;++c)e[r[c]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===c?function(e,t){for(var n in t)r.call(t,n)&&(e[n]=!!t[n])}(e,o):"number"===c&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var c=new e;t(c,n);var a=[];for(var i in c)c[i]&&a.push(i);return a.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},9:function(e,t){!function(){e.exports=this.wp.primitives}()}});