[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 /******/ (() => { // webpackBootstrap 2 /******/ "use strict"; 3 /******/ // The require scope 4 /******/ var __webpack_require__ = {}; 5 /******/ 6 /************************************************************************/ 7 /******/ /* webpack/runtime/define property getters */ 8 /******/ (() => { 9 /******/ // define getter functions for harmony exports 10 /******/ __webpack_require__.d = (exports, definition) => { 11 /******/ for(var key in definition) { 12 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 13 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 14 /******/ } 15 /******/ } 16 /******/ }; 17 /******/ })(); 18 /******/ 19 /******/ /* webpack/runtime/hasOwnProperty shorthand */ 20 /******/ (() => { 21 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 22 /******/ })(); 23 /******/ 24 /******/ /* webpack/runtime/make namespace object */ 25 /******/ (() => { 26 /******/ // define __esModule on exports 27 /******/ __webpack_require__.r = (exports) => { 28 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 29 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 30 /******/ } 31 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 32 /******/ }; 33 /******/ })(); 34 /******/ 35 /************************************************************************/ 36 var __webpack_exports__ = {}; 37 // ESM COMPAT FLAG 38 __webpack_require__.r(__webpack_exports__); 39 40 // EXPORTS 41 __webpack_require__.d(__webpack_exports__, { 42 compileCSS: () => (/* binding */ compileCSS), 43 getCSSRules: () => (/* binding */ getCSSRules), 44 getCSSValueFromRawStyle: () => (/* reexport */ getCSSValueFromRawStyle) 45 }); 46 47 ;// ./node_modules/tslib/tslib.es6.mjs 48 /****************************************************************************** 49 Copyright (c) Microsoft Corporation. 50 51 Permission to use, copy, modify, and/or distribute this software for any 52 purpose with or without fee is hereby granted. 53 54 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 55 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 56 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 57 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 58 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 59 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 60 PERFORMANCE OF THIS SOFTWARE. 61 ***************************************************************************** */ 62 /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ 63 64 var extendStatics = function(d, b) { 65 extendStatics = Object.setPrototypeOf || 66 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 67 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 68 return extendStatics(d, b); 69 }; 70 71 function __extends(d, b) { 72 if (typeof b !== "function" && b !== null) 73 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 74 extendStatics(d, b); 75 function __() { this.constructor = d; } 76 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 77 } 78 79 var __assign = function() { 80 __assign = Object.assign || function __assign(t) { 81 for (var s, i = 1, n = arguments.length; i < n; i++) { 82 s = arguments[i]; 83 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; 84 } 85 return t; 86 } 87 return __assign.apply(this, arguments); 88 } 89 90 function __rest(s, e) { 91 var t = {}; 92 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) 93 t[p] = s[p]; 94 if (s != null && typeof Object.getOwnPropertySymbols === "function") 95 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { 96 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) 97 t[p[i]] = s[p[i]]; 98 } 99 return t; 100 } 101 102 function __decorate(decorators, target, key, desc) { 103 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 104 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 105 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 106 return c > 3 && r && Object.defineProperty(target, key, r), r; 107 } 108 109 function __param(paramIndex, decorator) { 110 return function (target, key) { decorator(target, key, paramIndex); } 111 } 112 113 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { 114 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } 115 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; 116 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; 117 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); 118 var _, done = false; 119 for (var i = decorators.length - 1; i >= 0; i--) { 120 var context = {}; 121 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; 122 for (var p in contextIn.access) context.access[p] = contextIn.access[p]; 123 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; 124 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); 125 if (kind === "accessor") { 126 if (result === void 0) continue; 127 if (result === null || typeof result !== "object") throw new TypeError("Object expected"); 128 if (_ = accept(result.get)) descriptor.get = _; 129 if (_ = accept(result.set)) descriptor.set = _; 130 if (_ = accept(result.init)) initializers.unshift(_); 131 } 132 else if (_ = accept(result)) { 133 if (kind === "field") initializers.unshift(_); 134 else descriptor[key] = _; 135 } 136 } 137 if (target) Object.defineProperty(target, contextIn.name, descriptor); 138 done = true; 139 }; 140 141 function __runInitializers(thisArg, initializers, value) { 142 var useValue = arguments.length > 2; 143 for (var i = 0; i < initializers.length; i++) { 144 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); 145 } 146 return useValue ? value : void 0; 147 }; 148 149 function __propKey(x) { 150 return typeof x === "symbol" ? x : "".concat(x); 151 }; 152 153 function __setFunctionName(f, name, prefix) { 154 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; 155 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); 156 }; 157 158 function __metadata(metadataKey, metadataValue) { 159 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); 160 } 161 162 function __awaiter(thisArg, _arguments, P, generator) { 163 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 164 return new (P || (P = Promise))(function (resolve, reject) { 165 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 166 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 167 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 168 step((generator = generator.apply(thisArg, _arguments || [])).next()); 169 }); 170 } 171 172 function __generator(thisArg, body) { 173 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); 174 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 175 function verb(n) { return function (v) { return step([n, v]); }; } 176 function step(op) { 177 if (f) throw new TypeError("Generator is already executing."); 178 while (g && (g = 0, op[0] && (_ = 0)), _) try { 179 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 180 if (y = 0, t) op = [op[0] & 2, t.value]; 181 switch (op[0]) { 182 case 0: case 1: t = op; break; 183 case 4: _.label++; return { value: op[1], done: false }; 184 case 5: _.label++; y = op[1]; op = [0]; continue; 185 case 7: op = _.ops.pop(); _.trys.pop(); continue; 186 default: 187 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 188 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 189 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 190 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 191 if (t[2]) _.ops.pop(); 192 _.trys.pop(); continue; 193 } 194 op = body.call(thisArg, _); 195 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 196 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 197 } 198 } 199 200 var __createBinding = Object.create ? (function(o, m, k, k2) { 201 if (k2 === undefined) k2 = k; 202 var desc = Object.getOwnPropertyDescriptor(m, k); 203 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 204 desc = { enumerable: true, get: function() { return m[k]; } }; 205 } 206 Object.defineProperty(o, k2, desc); 207 }) : (function(o, m, k, k2) { 208 if (k2 === undefined) k2 = k; 209 o[k2] = m[k]; 210 }); 211 212 function __exportStar(m, o) { 213 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); 214 } 215 216 function __values(o) { 217 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; 218 if (m) return m.call(o); 219 if (o && typeof o.length === "number") return { 220 next: function () { 221 if (o && i >= o.length) o = void 0; 222 return { value: o && o[i++], done: !o }; 223 } 224 }; 225 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); 226 } 227 228 function __read(o, n) { 229 var m = typeof Symbol === "function" && o[Symbol.iterator]; 230 if (!m) return o; 231 var i = m.call(o), r, ar = [], e; 232 try { 233 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); 234 } 235 catch (error) { e = { error: error }; } 236 finally { 237 try { 238 if (r && !r.done && (m = i["return"])) m.call(i); 239 } 240 finally { if (e) throw e.error; } 241 } 242 return ar; 243 } 244 245 /** @deprecated */ 246 function __spread() { 247 for (var ar = [], i = 0; i < arguments.length; i++) 248 ar = ar.concat(__read(arguments[i])); 249 return ar; 250 } 251 252 /** @deprecated */ 253 function __spreadArrays() { 254 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; 255 for (var r = Array(s), k = 0, i = 0; i < il; i++) 256 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) 257 r[k] = a[j]; 258 return r; 259 } 260 261 function __spreadArray(to, from, pack) { 262 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { 263 if (ar || !(i in from)) { 264 if (!ar) ar = Array.prototype.slice.call(from, 0, i); 265 ar[i] = from[i]; 266 } 267 } 268 return to.concat(ar || Array.prototype.slice.call(from)); 269 } 270 271 function __await(v) { 272 return this instanceof __await ? (this.v = v, this) : new __await(v); 273 } 274 275 function __asyncGenerator(thisArg, _arguments, generator) { 276 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 277 var g = generator.apply(thisArg, _arguments || []), i, q = []; 278 return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; 279 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } 280 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } 281 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } 282 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } 283 function fulfill(value) { resume("next", value); } 284 function reject(value) { resume("throw", value); } 285 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } 286 } 287 288 function __asyncDelegator(o) { 289 var i, p; 290 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; 291 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } 292 } 293 294 function __asyncValues(o) { 295 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 296 var m = o[Symbol.asyncIterator], i; 297 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); 298 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } 299 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } 300 } 301 302 function __makeTemplateObject(cooked, raw) { 303 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 304 return cooked; 305 }; 306 307 var __setModuleDefault = Object.create ? (function(o, v) { 308 Object.defineProperty(o, "default", { enumerable: true, value: v }); 309 }) : function(o, v) { 310 o["default"] = v; 311 }; 312 313 var ownKeys = function(o) { 314 ownKeys = Object.getOwnPropertyNames || function (o) { 315 var ar = []; 316 for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; 317 return ar; 318 }; 319 return ownKeys(o); 320 }; 321 322 function __importStar(mod) { 323 if (mod && mod.__esModule) return mod; 324 var result = {}; 325 if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); 326 __setModuleDefault(result, mod); 327 return result; 328 } 329 330 function __importDefault(mod) { 331 return (mod && mod.__esModule) ? mod : { default: mod }; 332 } 333 334 function __classPrivateFieldGet(receiver, state, kind, f) { 335 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); 336 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); 337 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); 338 } 339 340 function __classPrivateFieldSet(receiver, state, value, kind, f) { 341 if (kind === "m") throw new TypeError("Private method is not writable"); 342 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); 343 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); 344 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; 345 } 346 347 function __classPrivateFieldIn(state, receiver) { 348 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); 349 return typeof state === "function" ? receiver === state : state.has(receiver); 350 } 351 352 function __addDisposableResource(env, value, async) { 353 if (value !== null && value !== void 0) { 354 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); 355 var dispose, inner; 356 if (async) { 357 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); 358 dispose = value[Symbol.asyncDispose]; 359 } 360 if (dispose === void 0) { 361 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); 362 dispose = value[Symbol.dispose]; 363 if (async) inner = dispose; 364 } 365 if (typeof dispose !== "function") throw new TypeError("Object not disposable."); 366 if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; 367 env.stack.push({ value: value, dispose: dispose, async: async }); 368 } 369 else if (async) { 370 env.stack.push({ async: true }); 371 } 372 return value; 373 } 374 375 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { 376 var e = new Error(message); 377 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; 378 }; 379 380 function __disposeResources(env) { 381 function fail(e) { 382 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; 383 env.hasError = true; 384 } 385 var r, s = 0; 386 function next() { 387 while (r = env.stack.pop()) { 388 try { 389 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); 390 if (r.dispose) { 391 var result = r.dispose.call(r.value); 392 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); 393 } 394 else s |= 1; 395 } 396 catch (e) { 397 fail(e); 398 } 399 } 400 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); 401 if (env.hasError) throw env.error; 402 } 403 return next(); 404 } 405 406 function __rewriteRelativeImportExtension(path, preserveJsx) { 407 if (typeof path === "string" && /^\.\.?\//.test(path)) { 408 return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { 409 return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); 410 }); 411 } 412 return path; 413 } 414 415 /* harmony default export */ const tslib_es6 = ({ 416 __extends, 417 __assign, 418 __rest, 419 __decorate, 420 __param, 421 __esDecorate, 422 __runInitializers, 423 __propKey, 424 __setFunctionName, 425 __metadata, 426 __awaiter, 427 __generator, 428 __createBinding, 429 __exportStar, 430 __values, 431 __read, 432 __spread, 433 __spreadArrays, 434 __spreadArray, 435 __await, 436 __asyncGenerator, 437 __asyncDelegator, 438 __asyncValues, 439 __makeTemplateObject, 440 __importStar, 441 __importDefault, 442 __classPrivateFieldGet, 443 __classPrivateFieldSet, 444 __classPrivateFieldIn, 445 __addDisposableResource, 446 __disposeResources, 447 __rewriteRelativeImportExtension, 448 }); 449 450 ;// ./node_modules/lower-case/dist.es2015/index.js 451 /** 452 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt 453 */ 454 var SUPPORTED_LOCALE = { 455 tr: { 456 regexp: /\u0130|\u0049|\u0049\u0307/g, 457 map: { 458 İ: "\u0069", 459 I: "\u0131", 460 İ: "\u0069", 461 }, 462 }, 463 az: { 464 regexp: /\u0130/g, 465 map: { 466 İ: "\u0069", 467 I: "\u0131", 468 İ: "\u0069", 469 }, 470 }, 471 lt: { 472 regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, 473 map: { 474 I: "\u0069\u0307", 475 J: "\u006A\u0307", 476 Į: "\u012F\u0307", 477 Ì: "\u0069\u0307\u0300", 478 Í: "\u0069\u0307\u0301", 479 Ĩ: "\u0069\u0307\u0303", 480 }, 481 }, 482 }; 483 /** 484 * Localized lower case. 485 */ 486 function localeLowerCase(str, locale) { 487 var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; 488 if (lang) 489 return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); 490 return lowerCase(str); 491 } 492 /** 493 * Lower case as a function. 494 */ 495 function lowerCase(str) { 496 return str.toLowerCase(); 497 } 498 499 ;// ./node_modules/no-case/dist.es2015/index.js 500 501 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). 502 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; 503 // Remove all non-word characters. 504 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; 505 /** 506 * Normalize the string into something other libraries can manipulate easier. 507 */ 508 function noCase(input, options) { 509 if (options === void 0) { options = {}; } 510 var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; 511 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); 512 var start = 0; 513 var end = result.length; 514 // Trim the delimiter from around the output string. 515 while (result.charAt(start) === "\0") 516 start++; 517 while (result.charAt(end - 1) === "\0") 518 end--; 519 // Transform each token independently. 520 return result.slice(start, end).split("\0").map(transform).join(delimiter); 521 } 522 /** 523 * Replace `re` in the input string with the replacement value. 524 */ 525 function replace(input, re, value) { 526 if (re instanceof RegExp) 527 return input.replace(re, value); 528 return re.reduce(function (input, re) { return input.replace(re, value); }, input); 529 } 530 531 ;// ./node_modules/dot-case/dist.es2015/index.js 532 533 534 function dotCase(input, options) { 535 if (options === void 0) { options = {}; } 536 return noCase(input, __assign({ delimiter: "." }, options)); 537 } 538 539 ;// ./node_modules/param-case/dist.es2015/index.js 540 541 542 function paramCase(input, options) { 543 if (options === void 0) { options = {}; } 544 return dotCase(input, __assign({ delimiter: "-" }, options)); 545 } 546 547 ;// ./node_modules/@wordpress/style-engine/build-module/styles/constants.js 548 const VARIABLE_REFERENCE_PREFIX = 'var:'; 549 const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|'; 550 const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--'; 551 552 ;// ./node_modules/@wordpress/style-engine/build-module/styles/utils.js 553 /* wp:polyfill */ 554 /** 555 * External dependencies 556 */ 557 558 559 /** 560 * Internal dependencies 561 */ 562 563 564 565 /** 566 * Helper util to return a value from a certain path of the object. 567 * Path is specified as an array of properties, like `[ 'x', 'y' ]`. 568 * 569 * @param object Input object. 570 * @param path Path to the object property. 571 * @return Value of the object property at the specified path. 572 */ 573 const getStyleValueByPath = (object, path) => { 574 let value = object; 575 path.forEach(fieldName => { 576 value = value?.[fieldName]; 577 }); 578 return value; 579 }; 580 581 /** 582 * Returns a JSON representation of the generated CSS rules. 583 * 584 * @param style Style object. 585 * @param options Options object with settings to adjust how the styles are generated. 586 * @param path An array of strings representing the path to the style value in the style object. 587 * @param ruleKey A CSS property key. 588 * 589 * @return GeneratedCSSRule[] CSS rules. 590 */ 591 function generateRule(style, options, path, ruleKey) { 592 const styleValue = getStyleValueByPath(style, path); 593 return styleValue ? [{ 594 selector: options?.selector, 595 key: ruleKey, 596 value: getCSSValueFromRawStyle(styleValue) 597 }] : []; 598 } 599 600 /** 601 * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left. 602 * 603 * @param style Style object. 604 * @param options Options object with settings to adjust how the styles are generated. 605 * @param path An array of strings representing the path to the style value in the style object. 606 * @param ruleKeys An array of CSS property keys and patterns. 607 * @param individualProperties The "sides" or individual properties for which to generate rules. 608 * 609 * @return GeneratedCSSRule[] CSS rules. 610 */ 611 function generateBoxRules(style, options, path, ruleKeys, individualProperties = ['top', 'right', 'bottom', 'left']) { 612 const boxStyle = getStyleValueByPath(style, path); 613 if (!boxStyle) { 614 return []; 615 } 616 const rules = []; 617 if (typeof boxStyle === 'string') { 618 rules.push({ 619 selector: options?.selector, 620 key: ruleKeys.default, 621 value: boxStyle 622 }); 623 } else { 624 const sideRules = individualProperties.reduce((acc, side) => { 625 const value = getCSSValueFromRawStyle(getStyleValueByPath(boxStyle, [side])); 626 if (value) { 627 acc.push({ 628 selector: options?.selector, 629 key: ruleKeys?.individual.replace('%s', upperFirst(side)), 630 value 631 }); 632 } 633 return acc; 634 }, []); 635 rules.push(...sideRules); 636 } 637 return rules; 638 } 639 640 /** 641 * Returns a WordPress CSS custom var value from incoming style preset value, 642 * if one is detected. 643 * 644 * The preset value is a string and follows the pattern `var:description|context|slug`. 645 * 646 * Example: 647 * 648 * `getCSSValueFromRawStyle( 'var:preset|color|heavenlyBlue' )` // returns 'var(--wp--preset--color--heavenly-blue)' 649 * 650 * @param styleValue A string representing a raw CSS value. Non-strings won't be processed. 651 * 652 * @return A CSS custom var value if the incoming style value is a preset value. 653 */ 654 655 function getCSSValueFromRawStyle(styleValue) { 656 if (typeof styleValue === 'string' && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) { 657 const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(presetVariable => paramCase(presetVariable, { 658 splitRegexp: [/([a-z0-9])([A-Z])/g, 659 // fooBar => foo-bar, 3Bar => 3-bar 660 /([0-9])([a-z])/g, 661 // 3bar => 3-bar 662 /([A-Za-z])([0-9])/g, 663 // Foo3 => foo-3, foo3 => foo-3 664 /([A-Z])([A-Z][a-z])/g // FOOBar => foo-bar 665 ] 666 })).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE); 667 return `var(--wp--$variable})`; 668 } 669 return styleValue; 670 } 671 672 /** 673 * Capitalizes the first letter in a string. 674 * 675 * @param string The string whose first letter the function will capitalize. 676 * 677 * @return String with the first letter capitalized. 678 */ 679 function upperFirst(string) { 680 const [firstLetter, ...rest] = string; 681 return firstLetter.toUpperCase() + rest.join(''); 682 } 683 684 /** 685 * Converts an array of strings into a camelCase string. 686 * 687 * @param strings The strings to join into a camelCase string. 688 * 689 * @return camelCase string. 690 */ 691 function camelCaseJoin(strings) { 692 const [firstItem, ...rest] = strings; 693 return firstItem.toLowerCase() + rest.map(upperFirst).join(''); 694 } 695 696 /** 697 * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if 698 * `decodeURI` throws an error. 699 * 700 * @param {string} uri URI to decode. 701 * 702 * @example 703 * ```js 704 * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z' 705 * ``` 706 * 707 * @return {string} Decoded URI if possible. 708 */ 709 function safeDecodeURI(uri) { 710 try { 711 return decodeURI(uri); 712 } catch (uriError) { 713 return uri; 714 } 715 } 716 717 ;// ./node_modules/@wordpress/style-engine/build-module/styles/border/index.js 718 /** 719 * Internal dependencies 720 */ 721 722 723 724 /** 725 * Creates a function for generating CSS rules when the style path is the same as the camelCase CSS property used in React. 726 * 727 * @param path An array of strings representing the path to the style value in the style object. 728 * 729 * @return A function that generates CSS rules. 730 */ 731 function createBorderGenerateFunction(path) { 732 return (style, options) => generateRule(style, options, path, camelCaseJoin(path)); 733 } 734 735 /** 736 * Creates a function for generating border-{top,bottom,left,right}-{color,style,width} CSS rules. 737 * 738 * @param edge The edge to create CSS rules for. 739 * 740 * @return A function that generates CSS rules. 741 */ 742 function createBorderEdgeGenerateFunction(edge) { 743 return (style, options) => { 744 return ['color', 'style', 'width'].flatMap(key => { 745 const path = ['border', edge, key]; 746 return createBorderGenerateFunction(path)(style, options); 747 }); 748 }; 749 } 750 const color = { 751 name: 'color', 752 generate: createBorderGenerateFunction(['border', 'color']) 753 }; 754 const radius = { 755 name: 'radius', 756 generate: (style, options) => { 757 return generateBoxRules(style, options, ['border', 'radius'], { 758 default: 'borderRadius', 759 individual: 'border%sRadius' 760 }, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']); 761 } 762 }; 763 const borderStyle = { 764 name: 'style', 765 generate: createBorderGenerateFunction(['border', 'style']) 766 }; 767 const width = { 768 name: 'width', 769 generate: createBorderGenerateFunction(['border', 'width']) 770 }; 771 const borderTop = { 772 name: 'borderTop', 773 generate: createBorderEdgeGenerateFunction('top') 774 }; 775 const borderRight = { 776 name: 'borderRight', 777 generate: createBorderEdgeGenerateFunction('right') 778 }; 779 const borderBottom = { 780 name: 'borderBottom', 781 generate: createBorderEdgeGenerateFunction('bottom') 782 }; 783 const borderLeft = { 784 name: 'borderLeft', 785 generate: createBorderEdgeGenerateFunction('left') 786 }; 787 /* harmony default export */ const border = ([color, borderStyle, width, radius, borderTop, borderRight, borderBottom, borderLeft]); 788 789 ;// ./node_modules/@wordpress/style-engine/build-module/styles/color/background.js 790 /** 791 * Internal dependencies 792 */ 793 794 795 const background = { 796 name: 'background', 797 generate: (style, options) => { 798 return generateRule(style, options, ['color', 'background'], 'backgroundColor'); 799 } 800 }; 801 /* harmony default export */ const color_background = (background); 802 803 ;// ./node_modules/@wordpress/style-engine/build-module/styles/color/gradient.js 804 /** 805 * Internal dependencies 806 */ 807 808 809 const gradient = { 810 name: 'gradient', 811 generate: (style, options) => { 812 return generateRule(style, options, ['color', 'gradient'], 'background'); 813 } 814 }; 815 /* harmony default export */ const color_gradient = (gradient); 816 817 ;// ./node_modules/@wordpress/style-engine/build-module/styles/color/text.js 818 /** 819 * Internal dependencies 820 */ 821 822 823 const text_text = { 824 name: 'text', 825 generate: (style, options) => { 826 return generateRule(style, options, ['color', 'text'], 'color'); 827 } 828 }; 829 /* harmony default export */ const color_text = (text_text); 830 831 ;// ./node_modules/@wordpress/style-engine/build-module/styles/color/index.js 832 /** 833 * Internal dependencies 834 */ 835 836 837 838 /* harmony default export */ const styles_color = ([color_text, color_gradient, color_background]); 839 840 ;// ./node_modules/@wordpress/style-engine/build-module/styles/dimensions/index.js 841 /** 842 * Internal dependencies 843 */ 844 845 846 const minHeight = { 847 name: 'minHeight', 848 generate: (style, options) => { 849 return generateRule(style, options, ['dimensions', 'minHeight'], 'minHeight'); 850 } 851 }; 852 const aspectRatio = { 853 name: 'aspectRatio', 854 generate: (style, options) => { 855 return generateRule(style, options, ['dimensions', 'aspectRatio'], 'aspectRatio'); 856 } 857 }; 858 /* harmony default export */ const dimensions = ([minHeight, aspectRatio]); 859 860 ;// ./node_modules/@wordpress/style-engine/build-module/styles/background/index.js 861 /** 862 * Internal dependencies 863 */ 864 865 866 const backgroundImage = { 867 name: 'backgroundImage', 868 generate: (style, options) => { 869 const _backgroundImage = style?.background?.backgroundImage; 870 871 /* 872 * The background image can be a string or an object. 873 * If the background image is a string, it could already contain a url() function, 874 * or have a linear-gradient value. 875 */ 876 if (typeof _backgroundImage === 'object' && _backgroundImage?.url) { 877 return [{ 878 selector: options.selector, 879 key: 'backgroundImage', 880 // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string. 881 value: `url( '$encodeURI(safeDecodeURI(_backgroundImage.url))}' )` 882 }]; 883 } 884 return generateRule(style, options, ['background', 'backgroundImage'], 'backgroundImage'); 885 } 886 }; 887 const backgroundPosition = { 888 name: 'backgroundPosition', 889 generate: (style, options) => { 890 return generateRule(style, options, ['background', 'backgroundPosition'], 'backgroundPosition'); 891 } 892 }; 893 const backgroundRepeat = { 894 name: 'backgroundRepeat', 895 generate: (style, options) => { 896 return generateRule(style, options, ['background', 'backgroundRepeat'], 'backgroundRepeat'); 897 } 898 }; 899 const backgroundSize = { 900 name: 'backgroundSize', 901 generate: (style, options) => { 902 return generateRule(style, options, ['background', 'backgroundSize'], 'backgroundSize'); 903 } 904 }; 905 const backgroundAttachment = { 906 name: 'backgroundAttachment', 907 generate: (style, options) => { 908 return generateRule(style, options, ['background', 'backgroundAttachment'], 'backgroundAttachment'); 909 } 910 }; 911 /* harmony default export */ const styles_background = ([backgroundImage, backgroundPosition, backgroundRepeat, backgroundSize, backgroundAttachment]); 912 913 ;// ./node_modules/@wordpress/style-engine/build-module/styles/shadow/index.js 914 /** 915 * Internal dependencies 916 */ 917 918 919 const shadow = { 920 name: 'shadow', 921 generate: (style, options) => { 922 return generateRule(style, options, ['shadow'], 'boxShadow'); 923 } 924 }; 925 /* harmony default export */ const styles_shadow = ([shadow]); 926 927 ;// ./node_modules/@wordpress/style-engine/build-module/styles/outline/index.js 928 /** 929 * Internal dependencies 930 */ 931 932 933 const outline_color = { 934 name: 'color', 935 generate: (style, options, path = ['outline', 'color'], ruleKey = 'outlineColor') => { 936 return generateRule(style, options, path, ruleKey); 937 } 938 }; 939 const offset = { 940 name: 'offset', 941 generate: (style, options, path = ['outline', 'offset'], ruleKey = 'outlineOffset') => { 942 return generateRule(style, options, path, ruleKey); 943 } 944 }; 945 const outlineStyle = { 946 name: 'style', 947 generate: (style, options, path = ['outline', 'style'], ruleKey = 'outlineStyle') => { 948 return generateRule(style, options, path, ruleKey); 949 } 950 }; 951 const outline_width = { 952 name: 'width', 953 generate: (style, options, path = ['outline', 'width'], ruleKey = 'outlineWidth') => { 954 return generateRule(style, options, path, ruleKey); 955 } 956 }; 957 /* harmony default export */ const outline = ([outline_color, outlineStyle, offset, outline_width]); 958 959 ;// ./node_modules/@wordpress/style-engine/build-module/styles/spacing/padding.js 960 /** 961 * Internal dependencies 962 */ 963 964 965 const padding = { 966 name: 'padding', 967 generate: (style, options) => { 968 return generateBoxRules(style, options, ['spacing', 'padding'], { 969 default: 'padding', 970 individual: 'padding%s' 971 }); 972 } 973 }; 974 /* harmony default export */ const spacing_padding = (padding); 975 976 ;// ./node_modules/@wordpress/style-engine/build-module/styles/spacing/margin.js 977 /** 978 * Internal dependencies 979 */ 980 981 982 const margin = { 983 name: 'margin', 984 generate: (style, options) => { 985 return generateBoxRules(style, options, ['spacing', 'margin'], { 986 default: 'margin', 987 individual: 'margin%s' 988 }); 989 } 990 }; 991 /* harmony default export */ const spacing_margin = (margin); 992 993 ;// ./node_modules/@wordpress/style-engine/build-module/styles/spacing/index.js 994 /** 995 * Internal dependencies 996 */ 997 998 999 /* harmony default export */ const spacing = ([spacing_margin, spacing_padding]); 1000 1001 ;// ./node_modules/@wordpress/style-engine/build-module/styles/typography/index.js 1002 /** 1003 * Internal dependencies 1004 */ 1005 1006 1007 const fontSize = { 1008 name: 'fontSize', 1009 generate: (style, options) => { 1010 return generateRule(style, options, ['typography', 'fontSize'], 'fontSize'); 1011 } 1012 }; 1013 const fontStyle = { 1014 name: 'fontStyle', 1015 generate: (style, options) => { 1016 return generateRule(style, options, ['typography', 'fontStyle'], 'fontStyle'); 1017 } 1018 }; 1019 const fontWeight = { 1020 name: 'fontWeight', 1021 generate: (style, options) => { 1022 return generateRule(style, options, ['typography', 'fontWeight'], 'fontWeight'); 1023 } 1024 }; 1025 const fontFamily = { 1026 name: 'fontFamily', 1027 generate: (style, options) => { 1028 return generateRule(style, options, ['typography', 'fontFamily'], 'fontFamily'); 1029 } 1030 }; 1031 const letterSpacing = { 1032 name: 'letterSpacing', 1033 generate: (style, options) => { 1034 return generateRule(style, options, ['typography', 'letterSpacing'], 'letterSpacing'); 1035 } 1036 }; 1037 const lineHeight = { 1038 name: 'lineHeight', 1039 generate: (style, options) => { 1040 return generateRule(style, options, ['typography', 'lineHeight'], 'lineHeight'); 1041 } 1042 }; 1043 const textColumns = { 1044 name: 'textColumns', 1045 generate: (style, options) => { 1046 return generateRule(style, options, ['typography', 'textColumns'], 'columnCount'); 1047 } 1048 }; 1049 const textDecoration = { 1050 name: 'textDecoration', 1051 generate: (style, options) => { 1052 return generateRule(style, options, ['typography', 'textDecoration'], 'textDecoration'); 1053 } 1054 }; 1055 const textTransform = { 1056 name: 'textTransform', 1057 generate: (style, options) => { 1058 return generateRule(style, options, ['typography', 'textTransform'], 'textTransform'); 1059 } 1060 }; 1061 const writingMode = { 1062 name: 'writingMode', 1063 generate: (style, options) => { 1064 return generateRule(style, options, ['typography', 'writingMode'], 'writingMode'); 1065 } 1066 }; 1067 /* harmony default export */ const typography = ([fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textColumns, textDecoration, textTransform, writingMode]); 1068 1069 ;// ./node_modules/@wordpress/style-engine/build-module/styles/index.js 1070 /** 1071 * Internal dependencies 1072 */ 1073 1074 1075 1076 1077 1078 1079 1080 1081 const styleDefinitions = [...border, ...styles_color, ...dimensions, ...outline, ...spacing, ...typography, ...styles_shadow, ...styles_background]; 1082 1083 ;// ./node_modules/@wordpress/style-engine/build-module/index.js 1084 /* wp:polyfill */ 1085 /** 1086 * External dependencies 1087 */ 1088 1089 1090 /** 1091 * Internal dependencies 1092 */ 1093 1094 1095 1096 /** 1097 * Generates a stylesheet for a given style object and selector. 1098 * 1099 * @since 6.1.0 Introduced in WordPress core. 1100 * 1101 * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json 1102 * @param options Options object with settings to adjust how the styles are generated. 1103 * 1104 * @return A generated stylesheet or inline style declarations. 1105 */ 1106 function compileCSS(style, options = {}) { 1107 const rules = getCSSRules(style, options); 1108 1109 // If no selector is provided, treat generated rules as inline styles to be returned as a single string. 1110 if (!options?.selector) { 1111 const inlineRules = []; 1112 rules.forEach(rule => { 1113 inlineRules.push(`$paramCase(rule.key)}: $rule.value};`); 1114 }); 1115 return inlineRules.join(' '); 1116 } 1117 const groupedRules = rules.reduce((acc, rule) => { 1118 const { 1119 selector 1120 } = rule; 1121 if (!selector) { 1122 return acc; 1123 } 1124 if (!acc[selector]) { 1125 acc[selector] = []; 1126 } 1127 acc[selector].push(rule); 1128 return acc; 1129 }, {}); 1130 const selectorRules = Object.keys(groupedRules).reduce((acc, subSelector) => { 1131 acc.push(`$subSelector} { $groupedRules[subSelector].map(rule => `$paramCase(rule.key)}: $rule.value};`).join(' ')} }`); 1132 return acc; 1133 }, []); 1134 return selectorRules.join('\n'); 1135 } 1136 1137 /** 1138 * Returns a JSON representation of the generated CSS rules. 1139 * 1140 * @since 6.1.0 Introduced in WordPress core. 1141 * 1142 * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json 1143 * @param options Options object with settings to adjust how the styles are generated. 1144 * 1145 * @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value. 1146 */ 1147 function getCSSRules(style, options = {}) { 1148 const rules = []; 1149 styleDefinitions.forEach(definition => { 1150 if (typeof definition.generate === 'function') { 1151 rules.push(...definition.generate(style, options)); 1152 } 1153 }); 1154 return rules; 1155 } 1156 1157 // Export style utils. 1158 1159 1160 (window.wp = window.wp || {}).styleEngine = __webpack_exports__; 1161 /******/ })() 1162 ;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Sat Feb 22 08:20:01 2025 | Cross-referenced by PHPXref |