PluginProbe
Gutenberg / 8.5.1
Gutenberg v8.5.1
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | build/url/index.js +1 -887 12.6.0 → 8.5.1 View file →
@@ -1,887 +1 @@
1 -/******/ (function() { // webpackBootstrap
2 -/******/ "use strict";
3 -/******/ // The require scope
4 -/******/ var __webpack_require__ = {};
5 -/******/
6 -/************************************************************************/
7 -/******/ /* webpack/runtime/define property getters */
8 -/******/ !function() {
9 -/******/ // define getter functions for harmony exports
10 -/******/ __webpack_require__.d = function(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 -/******/ !function() {
21 -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
22 -/******/ }();
23 -/******/
24 -/******/ /* webpack/runtime/make namespace object */
25 -/******/ !function() {
26 -/******/ // define __esModule on exports
27 -/******/ __webpack_require__.r = function(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 - "addQueryArgs": function() { return /* reexport */ addQueryArgs; },
43 - "buildQueryString": function() { return /* reexport */ buildQueryString; },
44 - "cleanForSlug": function() { return /* reexport */ cleanForSlug; },
45 - "filterURLForDisplay": function() { return /* reexport */ filterURLForDisplay; },
46 - "getAuthority": function() { return /* reexport */ getAuthority; },
47 - "getFilename": function() { return /* reexport */ getFilename; },
48 - "getFragment": function() { return /* reexport */ getFragment; },
49 - "getPath": function() { return /* reexport */ getPath; },
50 - "getPathAndQueryString": function() { return /* reexport */ getPathAndQueryString; },
51 - "getProtocol": function() { return /* reexport */ getProtocol; },
52 - "getQueryArg": function() { return /* reexport */ getQueryArg; },
53 - "getQueryArgs": function() { return /* reexport */ getQueryArgs; },
54 - "getQueryString": function() { return /* reexport */ getQueryString; },
55 - "hasQueryArg": function() { return /* reexport */ hasQueryArg; },
56 - "isEmail": function() { return /* reexport */ isEmail; },
57 - "isURL": function() { return /* reexport */ isURL; },
58 - "isValidAuthority": function() { return /* reexport */ isValidAuthority; },
59 - "isValidFragment": function() { return /* reexport */ isValidFragment; },
60 - "isValidPath": function() { return /* reexport */ isValidPath; },
61 - "isValidProtocol": function() { return /* reexport */ isValidProtocol; },
62 - "isValidQueryString": function() { return /* reexport */ isValidQueryString; },
63 - "normalizePath": function() { return /* reexport */ normalizePath; },
64 - "prependHTTP": function() { return /* reexport */ prependHTTP; },
65 - "removeQueryArgs": function() { return /* reexport */ removeQueryArgs; },
66 - "safeDecodeURI": function() { return /* reexport */ safeDecodeURI; },
67 - "safeDecodeURIComponent": function() { return /* reexport */ safeDecodeURIComponent; }
68 -});
69 -
70 -;// CONCATENATED MODULE: ./packages/url/build-module/is-url.js
71 -/**
72 - * Determines whether the given string looks like a URL.
73 - *
74 - * @param {string} url The string to scrutinise.
75 - *
76 - * @example
77 - * ```js
78 - * const isURL = isURL( 'https://wordpress.org' ); // true
79 - * ```
80 - *
81 - * @see https://url.spec.whatwg.org/
82 - * @see https://url.spec.whatwg.org/#valid-url-string
83 - *
84 - * @return {boolean} Whether or not it looks like a URL.
85 - */
86 -function isURL(url) {
87 - // A URL can be considered value if the `URL` constructor is able to parse
88 - // it. The constructor throws an error for an invalid URL.
89 - try {
90 - new URL(url);
91 - return true;
92 - } catch {
93 - return false;
94 - }
95 -}
96 -//# sourceMappingURL=is-url.js.map
97 -;// CONCATENATED MODULE: ./packages/url/build-module/is-email.js
98 -const EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
99 -/**
100 - * Determines whether the given string looks like an email.
101 - *
102 - * @param {string} email The string to scrutinise.
103 - *
104 - * @example
105 - * ```js
106 - * const isEmail = isEmail( '[email protected]' ); // true
107 - * ```
108 - *
109 - * @return {boolean} Whether or not it looks like an email.
110 - */
111 -
112 -function isEmail(email) {
113 - return EMAIL_REGEXP.test(email);
114 -}
115 -//# sourceMappingURL=is-email.js.map
116 -;// CONCATENATED MODULE: ./packages/url/build-module/get-protocol.js
117 -/**
118 - * Returns the protocol part of the URL.
119 - *
120 - * @param {string} url The full URL.
121 - *
122 - * @example
123 - * ```js
124 - * const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:'
125 - * const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'
126 - * ```
127 - *
128 - * @return {string|void} The protocol part of the URL.
129 - */
130 -function getProtocol(url) {
131 - const matches = /^([^\s:]+:)/.exec(url);
132 -
133 - if (matches) {
134 - return matches[1];
135 - }
136 -}
137 -//# sourceMappingURL=get-protocol.js.map
138 -;// CONCATENATED MODULE: ./packages/url/build-module/is-valid-protocol.js
139 -/**
140 - * Tests if a url protocol is valid.
141 - *
142 - * @param {string} protocol The url protocol.
143 - *
144 - * @example
145 - * ```js
146 - * const isValid = isValidProtocol( 'https:' ); // true
147 - * const isNotValid = isValidProtocol( 'https :' ); // false
148 - * ```
149 - *
150 - * @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
151 - */
152 -function isValidProtocol(protocol) {
153 - if (!protocol) {
154 - return false;
155 - }
156 -
157 - return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
158 -}
159 -//# sourceMappingURL=is-valid-protocol.js.map
160 -;// CONCATENATED MODULE: ./packages/url/build-module/get-authority.js
161 -/**
162 - * Returns the authority part of the URL.
163 - *
164 - * @param {string} url The full URL.
165 - *
166 - * @example
167 - * ```js
168 - * const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org'
169 - * const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'
170 - * ```
171 - *
172 - * @return {string|void} The authority part of the URL.
173 - */
174 -function getAuthority(url) {
175 - const matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
176 -
177 - if (matches) {
178 - return matches[1];
179 - }
180 -}
181 -//# sourceMappingURL=get-authority.js.map
182 -;// CONCATENATED MODULE: ./packages/url/build-module/is-valid-authority.js
183 -/**
184 - * Checks for invalid characters within the provided authority.
185 - *
186 - * @param {string} authority A string containing the URL authority.
187 - *
188 - * @example
189 - * ```js
190 - * const isValid = isValidAuthority( 'wordpress.org' ); // true
191 - * const isNotValid = isValidAuthority( 'wordpress#org' ); // false
192 - * ```
193 - *
194 - * @return {boolean} True if the argument contains a valid authority.
195 - */
196 -function isValidAuthority(authority) {
197 - if (!authority) {
198 - return false;
199 - }
200 -
201 - return /^[^\s#?]+$/.test(authority);
202 -}
203 -//# sourceMappingURL=is-valid-authority.js.map
204 -;// CONCATENATED MODULE: ./packages/url/build-module/get-path.js
205 -/**
206 - * Returns the path part of the URL.
207 - *
208 - * @param {string} url The full URL.
209 - *
210 - * @example
211 - * ```js
212 - * const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test'
213 - * const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
214 - * ```
215 - *
216 - * @return {string|void} The path part of the URL.
217 - */
218 -function getPath(url) {
219 - const matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
220 -
221 - if (matches) {
222 - return matches[1];
223 - }
224 -}
225 -//# sourceMappingURL=get-path.js.map
226 -;// CONCATENATED MODULE: ./packages/url/build-module/is-valid-path.js
227 -/**
228 - * Checks for invalid characters within the provided path.
229 - *
230 - * @param {string} path The URL path.
231 - *
232 - * @example
233 - * ```js
234 - * const isValid = isValidPath( 'test/path/' ); // true
235 - * const isNotValid = isValidPath( '/invalid?test/path/' ); // false
236 - * ```
237 - *
238 - * @return {boolean} True if the argument contains a valid path
239 - */
240 -function isValidPath(path) {
241 - if (!path) {
242 - return false;
243 - }
244 -
245 - return /^[^\s#?]+$/.test(path);
246 -}
247 -//# sourceMappingURL=is-valid-path.js.map
248 -;// CONCATENATED MODULE: ./packages/url/build-module/get-query-string.js
249 -/**
250 - * Returns the query string part of the URL.
251 - *
252 - * @param {string} url The full URL.
253 - *
254 - * @example
255 - * ```js
256 - * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'
257 - * ```
258 - *
259 - * @return {string|void} The query string part of the URL.
260 - */
261 -function getQueryString(url) {
262 - let query;
263 -
264 - try {
265 - query = new URL(url, 'http://example.com').search.substring(1);
266 - } catch (error) {}
267 -
268 - if (query) {
269 - return query;
270 - }
271 -}
272 -//# sourceMappingURL=get-query-string.js.map
273 -;// CONCATENATED MODULE: ./packages/url/build-module/build-query-string.js
274 -/**
275 - * Generates URL-encoded query string using input query data.
276 - *
277 - * It is intended to behave equivalent as PHP's `http_build_query`, configured
278 - * with encoding type PHP_QUERY_RFC3986 (spaces as `%20`).
279 - *
280 - * @example
281 - * ```js
282 - * const queryString = buildQueryString( {
283 - * simple: 'is ok',
284 - * arrays: [ 'are', 'fine', 'too' ],
285 - * objects: {
286 - * evenNested: {
287 - * ok: 'yes',
288 - * },
289 - * },
290 - * } );
291 - * // "simple=is%20ok&arrays%5B0%5D=are&arrays%5B1%5D=fine&arrays%5B2%5D=too&objects%5BevenNested%5D%5Bok%5D=yes"
292 - * ```
293 - *
294 - * @param {Record<string,*>} data Data to encode.
295 - *
296 - * @return {string} Query string.
297 - */
298 -function buildQueryString(data) {
299 - let string = '';
300 - const stack = Object.entries(data);
301 - let pair;
302 -
303 - while (pair = stack.shift()) {
304 - let [key, value] = pair; // Support building deeply nested data, from array or object values.
305 -
306 - const hasNestedData = Array.isArray(value) || value && value.constructor === Object;
307 -
308 - if (hasNestedData) {
309 - // Push array or object values onto the stack as composed of their
310 - // original key and nested index or key, retaining order by a
311 - // combination of Array#reverse and Array#unshift onto the stack.
312 - const valuePairs = Object.entries(value).reverse();
313 -
314 - for (const [member, memberValue] of valuePairs) {
315 - stack.unshift([`${key}[${member}]`, memberValue]);
316 - }
317 - } else if (value !== undefined) {
318 - // Null is treated as special case, equivalent to empty string.
319 - if (value === null) {
320 - value = '';
321 - }
322 -
323 - string += '&' + [key, value].map(encodeURIComponent).join('=');
324 - }
325 - } // Loop will concatenate with leading `&`, but it's only expected for all
326 - // but the first query parameter. This strips the leading `&`, while still
327 - // accounting for the case that the string may in-fact be empty.
328 -
329 -
330 - return string.substr(1);
331 -}
332 -//# sourceMappingURL=build-query-string.js.map
333 -;// CONCATENATED MODULE: ./packages/url/build-module/is-valid-query-string.js
334 -/**
335 - * Checks for invalid characters within the provided query string.
336 - *
337 - * @param {string} queryString The query string.
338 - *
339 - * @example
340 - * ```js
341 - * const isValid = isValidQueryString( 'query=true&another=false' ); // true
342 - * const isNotValid = isValidQueryString( 'query=true?another=false' ); // false
343 - * ```
344 - *
345 - * @return {boolean} True if the argument contains a valid query string.
346 - */
347 -function isValidQueryString(queryString) {
348 - if (!queryString) {
349 - return false;
350 - }
351 -
352 - return /^[^\s#?\/]+$/.test(queryString);
353 -}
354 -//# sourceMappingURL=is-valid-query-string.js.map
355 -;// CONCATENATED MODULE: ./packages/url/build-module/get-path-and-query-string.js
356 -/**
357 - * Internal dependencies
358 - */
359 -
360 -/**
361 - * Returns the path part and query string part of the URL.
362 - *
363 - * @param {string} url The full URL.
364 - *
365 - * @example
366 - * ```js
367 - * const pathAndQueryString1 = getPathAndQueryString( 'http://localhost:8080/this/is/a/test?query=true' ); // '/this/is/a/test?query=true'
368 - * const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'
369 - * ```
370 - *
371 - * @return {string} The path part and query string part of the URL.
372 - */
373 -
374 -function getPathAndQueryString(url) {
375 - const path = getPath(url);
376 - const queryString = getQueryString(url);
377 - let value = '/';
378 - if (path) value += path;
379 - if (queryString) value += `?${queryString}`;
380 - return value;
381 -}
382 -//# sourceMappingURL=get-path-and-query-string.js.map
383 -;// CONCATENATED MODULE: ./packages/url/build-module/get-fragment.js
384 -/**
385 - * Returns the fragment part of the URL.
386 - *
387 - * @param {string} url The full URL
388 - *
389 - * @example
390 - * ```js
391 - * const fragment1 = getFragment( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // '#fragment'
392 - * const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment'
393 - * ```
394 - *
395 - * @return {string|void} The fragment part of the URL.
396 - */
397 -function getFragment(url) {
398 - const matches = /^\S+?(#[^\s\?]*)/.exec(url);
399 -
400 - if (matches) {
401 - return matches[1];
402 - }
403 -}
404 -//# sourceMappingURL=get-fragment.js.map
405 -;// CONCATENATED MODULE: ./packages/url/build-module/is-valid-fragment.js
406 -/**
407 - * Checks for invalid characters within the provided fragment.
408 - *
409 - * @param {string} fragment The url fragment.
410 - *
411 - * @example
412 - * ```js
413 - * const isValid = isValidFragment( '#valid-fragment' ); // true
414 - * const isNotValid = isValidFragment( '#invalid-#fragment' ); // false
415 - * ```
416 - *
417 - * @return {boolean} True if the argument contains a valid fragment.
418 - */
419 -function isValidFragment(fragment) {
420 - if (!fragment) {
421 - return false;
422 - }
423 -
424 - return /^#[^\s#?\/]*$/.test(fragment);
425 -}
426 -//# sourceMappingURL=is-valid-fragment.js.map
427 -;// CONCATENATED MODULE: ./packages/url/build-module/get-query-args.js
428 -/**
429 - * Internal dependencies
430 - */
431 -
432 -/** @typedef {import('./get-query-arg').QueryArgParsed} QueryArgParsed */
433 -
434 -/**
435 - * @typedef {Record<string,QueryArgParsed>} QueryArgs
436 - */
437 -
438 -/**
439 - * Sets a value in object deeply by a given array of path segments. Mutates the
440 - * object reference.
441 - *
442 - * @param {Record<string,*>} object Object in which to assign.
443 - * @param {string[]} path Path segment at which to set value.
444 - * @param {*} value Value to set.
445 - */
446 -
447 -function setPath(object, path, value) {
448 - const length = path.length;
449 - const lastIndex = length - 1;
450 -
451 - for (let i = 0; i < length; i++) {
452 - let key = path[i];
453 -
454 - if (!key && Array.isArray(object)) {
455 - // If key is empty string and next value is array, derive key from
456 - // the current length of the array.
457 - key = object.length.toString();
458 - } // If the next key in the path is numeric (or empty string), it will be
459 - // created as an array. Otherwise, it will be created as an object.
460 -
461 -
462 - const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));
463 - object[key] = i === lastIndex ? // If at end of path, assign the intended value.
464 - value : // Otherwise, advance to the next object in the path, creating
465 - // it if it does not yet exist.
466 - object[key] || (isNextKeyArrayIndex ? [] : {});
467 -
468 - if (Array.isArray(object[key]) && !isNextKeyArrayIndex) {
469 - // If we current key is non-numeric, but the next value is an
470 - // array, coerce the value to an object.
471 - object[key] = { ...object[key]
472 - };
473 - } // Update working reference object to the next in the path.
474 -
475 -
476 - object = object[key];
477 - }
478 -}
479 -/**
480 - * Returns an object of query arguments of the given URL. If the given URL is
481 - * invalid or has no querystring, an empty object is returned.
482 - *
483 - * @param {string} url URL.
484 - *
485 - * @example
486 - * ```js
487 - * const foo = getQueryArgs( 'https://wordpress.org?foo=bar&bar=baz' );
488 - * // { "foo": "bar", "bar": "baz" }
489 - * ```
490 - *
491 - * @return {QueryArgs} Query args object.
492 - */
493 -
494 -
495 -function getQueryArgs(url) {
496 - return (getQueryString(url) || '' // Normalize space encoding, accounting for PHP URL encoding
497 - // corresponding to `application/x-www-form-urlencoded`.
498 - //
499 - // See: https://tools.ietf.org/html/rfc1866#section-8.2.1
500 - ).replace(/\+/g, '%20').split('&').reduce((accumulator, keyValue) => {
501 - const [key, value = ''] = keyValue.split('=') // Filtering avoids decoding as `undefined` for value, where
502 - // default is restored in destructuring assignment.
503 - .filter(Boolean).map(decodeURIComponent);
504 -
505 - if (key) {
506 - const segments = key.replace(/\]/g, '').split('[');
507 - setPath(accumulator, segments, value);
508 - }
509 -
510 - return accumulator;
511 - }, {});
512 -}
513 -//# sourceMappingURL=get-query-args.js.map
514 -;// CONCATENATED MODULE: ./packages/url/build-module/add-query-args.js
515 -/**
516 - * Internal dependencies
517 - */
518 -
519 -
520 -/**
521 - * Appends arguments as querystring to the provided URL. If the URL already
522 - * includes query arguments, the arguments are merged with (and take precedent
523 - * over) the existing set.
524 - *
525 - * @param {string} [url=''] URL to which arguments should be appended. If omitted,
526 - * only the resulting querystring is returned.
527 - * @param {Object} [args] Query arguments to apply to URL.
528 - *
529 - * @example
530 - * ```js
531 - * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
532 - * ```
533 - *
534 - * @return {string} URL with arguments applied.
535 - */
536 -
537 -function addQueryArgs() {
538 - let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
539 - let args = arguments.length > 1 ? arguments[1] : undefined;
540 -
541 - // If no arguments are to be appended, return original URL.
542 - if (!args || !Object.keys(args).length) {
543 - return url;
544 - }
545 -
546 - let baseUrl = url; // Determine whether URL already had query arguments.
547 -
548 - const queryStringIndex = url.indexOf('?');
549 -
550 - if (queryStringIndex !== -1) {
551 - // Merge into existing query arguments.
552 - args = Object.assign(getQueryArgs(url), args); // Change working base URL to omit previous query arguments.
553 -
554 - baseUrl = baseUrl.substr(0, queryStringIndex);
555 - }
556 -
557 - return baseUrl + '?' + buildQueryString(args);
558 -}
559 -//# sourceMappingURL=add-query-args.js.map
560 -;// CONCATENATED MODULE: ./packages/url/build-module/get-query-arg.js
561 -/**
562 - * Internal dependencies
563 - */
564 -
565 -/**
566 - * @typedef {{[key: string]: QueryArgParsed}} QueryArgObject
567 - */
568 -
569 -/**
570 - * @typedef {string|string[]|QueryArgObject} QueryArgParsed
571 - */
572 -
573 -/**
574 - * Returns a single query argument of the url
575 - *
576 - * @param {string} url URL.
577 - * @param {string} arg Query arg name.
578 - *
579 - * @example
580 - * ```js
581 - * const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
582 - * ```
583 - *
584 - * @return {QueryArgParsed|void} Query arg value.
585 - */
586 -
587 -function getQueryArg(url, arg) {
588 - return getQueryArgs(url)[arg];
589 -}
590 -//# sourceMappingURL=get-query-arg.js.map
591 -;// CONCATENATED MODULE: ./packages/url/build-module/has-query-arg.js
592 -/**
593 - * Internal dependencies
594 - */
595 -
596 -/**
597 - * Determines whether the URL contains a given query arg.
598 - *
599 - * @param {string} url URL.
600 - * @param {string} arg Query arg name.
601 - *
602 - * @example
603 - * ```js
604 - * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
605 - * ```
606 - *
607 - * @return {boolean} Whether or not the URL contains the query arg.
608 - */
609 -
610 -function hasQueryArg(url, arg) {
611 - return getQueryArg(url, arg) !== undefined;
612 -}
613 -//# sourceMappingURL=has-query-arg.js.map
614 -;// CONCATENATED MODULE: ./packages/url/build-module/remove-query-args.js
615 -/**
616 - * Internal dependencies
617 - */
618 -
619 -
620 -/**
621 - * Removes arguments from the query string of the url
622 - *
623 - * @param {string} url URL.
624 - * @param {...string} args Query Args.
625 - *
626 - * @example
627 - * ```js
628 - * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
629 - * ```
630 - *
631 - * @return {string} Updated URL.
632 - */
633 -
634 -function removeQueryArgs(url) {
635 - const queryStringIndex = url.indexOf('?');
636 -
637 - if (queryStringIndex === -1) {
638 - return url;
639 - }
640 -
641 - const query = getQueryArgs(url);
642 - const baseURL = url.substr(0, queryStringIndex);
643 -
644 - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
645 - args[_key - 1] = arguments[_key];
646 - }
647 -
648 - args.forEach(arg => delete query[arg]);
649 - const queryString = buildQueryString(query);
650 - return queryString ? baseURL + '?' + queryString : baseURL;
651 -}
652 -//# sourceMappingURL=remove-query-args.js.map
653 -;// CONCATENATED MODULE: ./packages/url/build-module/prepend-http.js
654 -/**
655 - * Internal dependencies
656 - */
657 -
658 -const USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
659 -/**
660 - * Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
661 - *
662 - * @param {string} url The URL to test.
663 - *
664 - * @example
665 - * ```js
666 - * const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org
667 - * ```
668 - *
669 - * @return {string} The updated URL.
670 - */
671 -
672 -function prependHTTP(url) {
673 - if (!url) {
674 - return url;
675 - }
676 -
677 - url = url.trim();
678 -
679 - if (!USABLE_HREF_REGEXP.test(url) && !isEmail(url)) {
680 - return 'http://' + url;
681 - }
682 -
683 - return url;
684 -}
685 -//# sourceMappingURL=prepend-http.js.map
686 -;// CONCATENATED MODULE: ./packages/url/build-module/safe-decode-uri.js
687 -/**
688 - * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
689 - * `decodeURI` throws an error.
690 - *
691 - * @param {string} uri URI to decode.
692 - *
693 - * @example
694 - * ```js
695 - * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'
696 - * ```
697 - *
698 - * @return {string} Decoded URI if possible.
699 - */
700 -function safeDecodeURI(uri) {
701 - try {
702 - return decodeURI(uri);
703 - } catch (uriError) {
704 - return uri;
705 - }
706 -}
707 -//# sourceMappingURL=safe-decode-uri.js.map
708 -;// CONCATENATED MODULE: ./packages/url/build-module/safe-decode-uri-component.js
709 -/**
710 - * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
711 - * `decodeURIComponent` throws an error.
712 - *
713 - * @param {string} uriComponent URI component to decode.
714 - *
715 - * @return {string} Decoded URI component if possible.
716 - */
717 -function safeDecodeURIComponent(uriComponent) {
718 - try {
719 - return decodeURIComponent(uriComponent);
720 - } catch (uriComponentError) {
721 - return uriComponent;
722 - }
723 -}
724 -//# sourceMappingURL=safe-decode-uri-component.js.map
725 -;// CONCATENATED MODULE: ./packages/url/build-module/filter-url-for-display.js
726 -/**
727 - * Returns a URL for display.
728 - *
729 - * @param {string} url Original URL.
730 - * @param {number|null} maxLength URL length.
731 - *
732 - * @example
733 - * ```js
734 - * const displayUrl = filterURLForDisplay( 'https://www.wordpress.org/gutenberg/' ); // wordpress.org/gutenberg
735 - * const imageUrl = filterURLForDisplay( 'https://www.wordpress.org/wp-content/uploads/img.png', 20 ); // …ent/uploads/img.png
736 - * ```
737 - *
738 - * @return {string} Displayed URL.
739 - */
740 -function filterURLForDisplay(url) {
741 - let maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
742 - // Remove protocol and www prefixes.
743 - let filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it.
744 -
745 - if (filteredURL.match(/^[^\/]+\/$/)) {
746 - filteredURL = filteredURL.replace('/', '');
747 - }
748 -
749 - const mediaRegexp = /([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/;
750 -
751 - if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(mediaRegexp)) {
752 - return filteredURL;
753 - } // If the file is not greater than max length, return last portion of URL.
754 -
755 -
756 - filteredURL = filteredURL.split('?')[0];
757 - const urlPieces = filteredURL.split('/');
758 - const file = urlPieces[urlPieces.length - 1];
759 -
760 - if (file.length <= maxLength) {
761 - return '…' + filteredURL.slice(-maxLength);
762 - } // If the file is greater than max length, truncate the file.
763 -
764 -
765 - const index = file.lastIndexOf('.');
766 - const [fileName, extension] = [file.slice(0, index), file.slice(index + 1)];
767 - const truncatedFile = fileName.slice(-3) + '.' + extension;
768 - return file.slice(0, maxLength - truncatedFile.length - 1) + '…' + truncatedFile;
769 -}
770 -//# sourceMappingURL=filter-url-for-display.js.map
771 -;// CONCATENATED MODULE: external "lodash"
772 -var external_lodash_namespaceObject = window["lodash"];
773 -;// CONCATENATED MODULE: ./packages/url/build-module/clean-for-slug.js
774 -/**
775 - * External dependencies
776 - */
777 -
778 -/**
779 - * Performs some basic cleanup of a string for use as a post slug.
780 - *
781 - * This replicates some of what `sanitize_title()` does in WordPress core, but
782 - * is only designed to approximate what the slug will be.
783 - *
784 - * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin
785 - * letters. Removes combining diacritical marks. Converts whitespace, periods,
786 - * and forward slashes to hyphens. Removes any remaining non-word characters
787 - * except hyphens. Converts remaining string to lowercase. It does not account
788 - * for octets, HTML entities, or other encoded characters.
789 - *
790 - * @param {string} string Title or slug to be processed.
791 - *
792 - * @return {string} Processed string.
793 - */
794 -
795 -function cleanForSlug(string) {
796 - if (!string) {
797 - return '';
798 - }
799 -
800 - return (0,external_lodash_namespaceObject.trim)((0,external_lodash_namespaceObject.deburr)(string).replace(/[\s\./]+/g, '-').replace(/[^\w-]+/g, '').toLowerCase(), '-');
801 -}
802 -//# sourceMappingURL=clean-for-slug.js.map
803 -;// CONCATENATED MODULE: ./packages/url/build-module/get-filename.js
804 -/**
805 - * Returns the filename part of the URL.
806 - *
807 - * @param {string} url The full URL.
808 - *
809 - * @example
810 - * ```js
811 - * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg'
812 - * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png'
813 - * ```
814 - *
815 - * @return {string|void} The filename part of the URL.
816 - */
817 -function getFilename(url) {
818 - let filename;
819 -
820 - try {
821 - filename = new URL(url, 'http://example.com').pathname.split('/').pop();
822 - } catch (error) {}
823 -
824 - if (filename) {
825 - return filename;
826 - }
827 -}
828 -//# sourceMappingURL=get-filename.js.map
829 -;// CONCATENATED MODULE: ./packages/url/build-module/normalize-path.js
830 -/**
831 - * Given a path, returns a normalized path where equal query parameter values
832 - * will be treated as identical, regardless of order they appear in the original
833 - * text.
834 - *
835 - * @param {string} path Original path.
836 - *
837 - * @return {string} Normalized path.
838 - */
839 -function normalizePath(path) {
840 - const splitted = path.split('?');
841 - const query = splitted[1];
842 - const base = splitted[0];
843 -
844 - if (!query) {
845 - return base;
846 - } // 'b=1&c=2&a=5'
847 -
848 -
849 - return base + '?' + query // [ 'b=1', 'c=2', 'a=5' ]
850 - .split('&') // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]
851 - .map(entry => entry.split('=')) // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]
852 - .sort((a, b) => a[0].localeCompare(b[0])) // [ 'a=5', 'b=1', 'c=2' ]
853 - .map(pair => pair.join('=')) // 'a=5&b=1&c=2'
854 - .join('&');
855 -}
856 -//# sourceMappingURL=normalize-path.js.map
857 -;// CONCATENATED MODULE: ./packages/url/build-module/index.js
858 -
859 -
860 -
861 -
862 -
863 -
864 -
865 -
866 -
867 -
868 -
869 -
870 -
871 -
872 -
873 -
874 -
875 -
876 -
877 -
878 -
879 -
880 -
881 -
882 -
883 -
884 -//# sourceMappingURL=index.js.map
885 -(window.wp = window.wp || {}).url = __webpack_exports__;
886 -/******/ })()
887 -;
1 +this.wp=this.wp||{},this.wp.url=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=386)}({109:function(e,r,t){"use strict";var n=t(374),o=t(375),i=t(238);e.exports={formats:i,parse:o,stringify:n}},2:function(e,r){!function(){e.exports=this.lodash}()},237:function(e,r,t){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),i=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(t[n]=e[n]);return t};e.exports={arrayToObject:i,assign:function(e,r){return Object.keys(r).reduce((function(e,t){return e[t]=r[t],e}),e)},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;n<r.length;++n)for(var o=r[n],i=o.obj[o.prop],c=Object.keys(i),a=0;a<c.length;++a){var u=c[a],l=i[u];"object"==typeof l&&null!==l&&-1===t.indexOf(l)&&(r.push({obj:i,prop:u}),t.push(l))}return function(e){for(var r;e.length;){var t=e.pop();if(r=t.obj[t.prop],Array.isArray(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}return r}(r)},decode:function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(r){return e}},encode:function(e){if(0===e.length)return e;for(var r="string"==typeof e?e:String(e),t="",n=0;n<r.length;++n){var i=r.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?t+=r.charAt(n):i<128?t+=o[i]:i<2048?t+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?t+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(n)),t+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return t},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(r,t,o){if(!t)return r;if("object"!=typeof t){if(Array.isArray(r))r.push(t);else{if("object"!=typeof r)return[r,t];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,t))&&(r[t]=!0)}return r}if("object"!=typeof r)return[r].concat(t);var c=r;return Array.isArray(r)&&!Array.isArray(t)&&(c=i(r,o)),Array.isArray(r)&&Array.isArray(t)?(t.forEach((function(t,i){n.call(r,i)?r[i]&&"object"==typeof r[i]?r[i]=e(r[i],t,o):r.push(t):r[i]=t})),r):Object.keys(t).reduce((function(r,i){var c=t[i];return n.call(r,i)?r[i]=e(r[i],c,o):r[i]=c,r}),c)}}},238:function(e,r,t){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},374:function(e,r,t){"use strict";var n=t(237),o=t(238),i={brackets:function(e){return e+"[]"},indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},c=Date.prototype.toISOString,a={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(r,t,o,i,c,u,l,f,s,d,p,y){var b=r;if("function"==typeof l)b=l(t,b);else if(b instanceof Date)b=d(b);else if(null===b){if(i)return u&&!y?u(t,a.encoder):t;b=""}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b||n.isBuffer(b))return u?[p(y?t:u(t,a.encoder))+"="+p(u(b,a.encoder))]:[p(t)+"="+p(String(b))];var g,v=[];if(void 0===b)return v;if(Array.isArray(l))g=l;else{var h=Object.keys(b);g=f?h.sort(f):h}for(var m=0;m<g.length;++m){var O=g[m];c&&null===b[O]||(v=Array.isArray(b)?v.concat(e(b[O],o(t,O),o,i,c,u,l,f,s,d,p,y)):v.concat(e(b[O],t+(s?"."+O:"["+O+"]"),o,i,c,u,l,f,s,d,p,y)))}return v};e.exports=function(e,r){var t=e,c=r?n.assign({},r):{};if(null!==c.encoder&&void 0!==c.encoder&&"function"!=typeof c.encoder)throw new TypeError("Encoder has to be a function.");var l=void 0===c.delimiter?a.delimiter:c.delimiter,f="boolean"==typeof c.strictNullHandling?c.strictNullHandling:a.strictNullHandling,s="boolean"==typeof c.skipNulls?c.skipNulls:a.skipNulls,d="boolean"==typeof c.encode?c.encode:a.encode,p="function"==typeof c.encoder?c.encoder:a.encoder,y="function"==typeof c.sort?c.sort:null,b=void 0!==c.allowDots&&c.allowDots,g="function"==typeof c.serializeDate?c.serializeDate:a.serializeDate,v="boolean"==typeof c.encodeValuesOnly?c.encodeValuesOnly:a.encodeValuesOnly;if(void 0===c.format)c.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,c.format))throw new TypeError("Unknown format option provided.");var h,m,O=o.formatters[c.format];"function"==typeof c.filter?t=(m=c.filter)("",t):Array.isArray(c.filter)&&(h=m=c.filter);var j,w=[];if("object"!=typeof t||null===t)return"";j=c.arrayFormat in i?c.arrayFormat:"indices"in c?c.indices?"indices":"repeat":"indices";var A=i[j];h||(h=Object.keys(t)),y&&h.sort(y);for(var x=0;x<h.length;++x){var P=h[x];s&&null===t[P]||(w=w.concat(u(t[P],P,A,f,s,d?p:null,m,y,b,g,O,v)))}var S=w.join(l),R=!0===c.addQueryPrefix?"?":"";return S.length>0?R+S:""}},375:function(e,r,t){"use strict";var n=t(237),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},c=function(e,r,t){if(e){var n=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,c=/(\[[^[\]]*])/.exec(n),a=c?n.slice(0,c.index):n,u=[];if(a){if(!t.plainObjects&&o.call(Object.prototype,a)&&!t.allowPrototypes)return;u.push(a)}for(var l=0;null!==(c=i.exec(n))&&l<t.depth;){if(l+=1,!t.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!t.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+n.slice(c.index)+"]"),function(e,r,t){for(var n=r,o=e.length-1;o>=0;--o){var i,c=e[o];if("[]"===c)i=(i=[]).concat(n);else{i=t.plainObjects?Object.create(null):{};var a="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(a,10);!isNaN(u)&&c!==a&&String(u)===a&&u>=0&&t.parseArrays&&u<=t.arrayLimit?(i=[])[u]=n:i[a]=n}n=i}return n}(u,r,t)}};e.exports=function(e,r){var t=r?n.assign({},r):{};if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(t.ignoreQueryPrefix=!0===t.ignoreQueryPrefix,t.delimiter="string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:i.delimiter,t.depth="number"==typeof t.depth?t.depth:i.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:i.arrayLimit,t.parseArrays=!1!==t.parseArrays,t.decoder="function"==typeof t.decoder?t.decoder:i.decoder,t.allowDots="boolean"==typeof t.allowDots?t.allowDots:i.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:i.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:i.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:i.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:i.strictNullHandling,""===e||null==e)return t.plainObjects?Object.create(null):{};for(var a="string"==typeof e?function(e,r){for(var t={},n=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=r.parameterLimit===1/0?void 0:r.parameterLimit,a=n.split(r.delimiter,c),u=0;u<a.length;++u){var l,f,s=a[u],d=s.indexOf("]="),p=-1===d?s.indexOf("="):d+1;-1===p?(l=r.decoder(s,i.decoder),f=r.strictNullHandling?null:""):(l=r.decoder(s.slice(0,p),i.decoder),f=r.decoder(s.slice(p+1),i.decoder)),o.call(t,l)?t[l]=[].concat(t[l]).concat(f):t[l]=f}return t}(e,t):e,u=t.plainObjects?Object.create(null):{},l=Object.keys(a),f=0;f<l.length;++f){var s=l[f],d=c(s,a[s],t);u=n.merge(u,d,t)}return n.compact(u)}},386:function(e,r,t){"use strict";function n(e){try{return new URL(e),!0}catch(e){return!1}}t.r(r),t.d(r,"isURL",(function(){return n})),t.d(r,"isEmail",(function(){return i})),t.d(r,"getProtocol",(function(){return c})),t.d(r,"isValidProtocol",(function(){return a})),t.d(r,"getAuthority",(function(){return u})),t.d(r,"isValidAuthority",(function(){return l})),t.d(r,"getPath",(function(){return f})),t.d(r,"isValidPath",(function(){return s})),t.d(r,"getQueryString",(function(){return d})),t.d(r,"isValidQueryString",(function(){return p})),t.d(r,"getPathAndQueryString",(function(){return y})),t.d(r,"getFragment",(function(){return b})),t.d(r,"isValidFragment",(function(){return g})),t.d(r,"addQueryArgs",(function(){return h})),t.d(r,"getQueryArg",(function(){return m})),t.d(r,"hasQueryArg",(function(){return O})),t.d(r,"removeQueryArgs",(function(){return j})),t.d(r,"prependHTTP",(function(){return A})),t.d(r,"safeDecodeURI",(function(){return x})),t.d(r,"safeDecodeURIComponent",(function(){return P})),t.d(r,"filterURLForDisplay",(function(){return S})),t.d(r,"cleanForSlug",(function(){return D}));var o=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function i(e){return o.test(e)}function c(e){var r=/^([^\s:]+:)/.exec(e);if(r)return r[1]}function a(e){return!!e&&/^[a-z\-.\+]+[0-9]*:$/i.test(e)}function u(e){var r=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(r)return r[1]}function l(e){return!!e&&/^[^\s#?]+$/.test(e)}function f(e){var r=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(r)return r[1]}function s(e){return!!e&&/^[^\s#?]+$/.test(e)}function d(e){var r;try{r=new URL(e).search.substring(1)}catch(e){}if(r)return r}function p(e){return!!e&&/^[^\s#?\/]+$/.test(e)}function y(e){var r=f(e),t=d(e),n="/";return r&&(n+=r),t&&(n+="?".concat(t)),n}function b(e){var r=/^\S+?(#[^\s\?]*)/.exec(e);if(r)return r[1]}function g(e){return!!e&&/^#[^\s#?\/]*$/.test(e)}var v=t(109);function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;if(!r||!Object.keys(r).length)return e;var t=e,n=e.indexOf("?");return-1!==n&&(r=Object.assign(Object(v.parse)(e.substr(n+1)),r),t=t.substr(0,n)),t+"?"+Object(v.stringify)(r)}function m(e,r){var t=e.indexOf("?");return(-1!==t?Object(v.parse)(e.substr(t+1)):{})[r]}function O(e,r){return void 0!==m(e,r)}function j(e){for(var r=e.indexOf("?"),t=-1!==r?Object(v.parse)(e.substr(r+1)):{},n=-1!==r?e.substr(0,r):e,o=arguments.length,i=new Array(o>1?o-1:0),c=1;c<o;c++)i[c-1]=arguments[c];return i.forEach((function(e){return delete t[e]})),n+"?"+Object(v.stringify)(t)}var w=/^(?:[a-z]+:|#|\?|\.|\/)/i;function A(e){return e?(e=e.trim(),w.test(e)||i(e)?e:"http://"+e):e}function x(e){try{return decodeURI(e)}catch(r){return e}}function P(e){try{return decodeURIComponent(e)}catch(r){return e}}function S(e){var r=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");return r.match(/^[^\/]+\/$/)?r.replace("/",""):r}var R=t(2);function D(e){return e?Object(R.trim)(Object(R.deburr)(e).replace(/[\s\./]+/g,"-").replace(/[^\w-]+/g,"").toLowerCase(),"-"):""}}});