| 1 |
var __create = Object.create; |
| 2 |
var __defProp = Object.defineProperty; |
| 3 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| 4 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 5 |
var __getProtoOf = Object.getPrototypeOf; |
| 6 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
| 7 |
var __commonJS = (cb, mod) => function __require() { |
| 8 |
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; |
| 9 |
}; |
| 10 |
var __copyProps = (to, from, except, desc) => { |
| 11 |
if (from && typeof from === "object" || typeof from === "function") { |
| 12 |
for (let key of __getOwnPropNames(from)) |
| 13 |
if (!__hasOwnProp.call(to, key) && key !== except) |
| 14 |
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
| 15 |
} |
| 16 |
return to; |
| 17 |
}; |
| 18 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( |
| 19 |
// If the importer is in node compatibility mode or this is not an ESM |
| 20 |
// file that has been converted to a CommonJS file using a Babel- |
| 21 |
// compatible transform (i.e. "__esModule" has not been set), then set |
| 22 |
// "default" to the CommonJS "module.exports" for node compatibility. |
| 23 |
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, |
| 24 |
mod |
| 25 |
)); |
| 26 |
|
| 27 |
// package-external:@wordpress/data |
| 28 |
var require_data = __commonJS({ |
| 29 |
"package-external:@wordpress/data"(exports, module) { |
| 30 |
module.exports = window.wp.data; |
| 31 |
} |
| 32 |
}); |
| 33 |
|
| 34 |
// package-external:@wordpress/core-data |
| 35 |
var require_core_data = __commonJS({ |
| 36 |
"package-external:@wordpress/core-data"(exports, module) { |
| 37 |
module.exports = window.wp.coreData; |
| 38 |
} |
| 39 |
}); |
| 40 |
|
| 41 |
// package-external:@wordpress/i18n |
| 42 |
var require_i18n = __commonJS({ |
| 43 |
"package-external:@wordpress/i18n"(exports, module) { |
| 44 |
module.exports = window.wp.i18n; |
| 45 |
} |
| 46 |
}); |
| 47 |
|
| 48 |
// package-external:@wordpress/private-apis |
| 49 |
var require_private_apis = __commonJS({ |
| 50 |
"package-external:@wordpress/private-apis"(exports, module) { |
| 51 |
module.exports = window.wp.privateApis; |
| 52 |
} |
| 53 |
}); |
| 54 |
|
| 55 |
// routes/identity/route.ts |
| 56 |
var import_data = __toESM(require_data()); |
| 57 |
var import_core_data = __toESM(require_core_data()); |
| 58 |
var import_i18n = __toESM(require_i18n()); |
| 59 |
|
| 60 |
// routes/lock-unlock/index.ts |
| 61 |
var import_private_apis = __toESM(require_private_apis()); |
| 62 |
var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( |
| 63 |
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", |
| 64 |
"@wordpress/routes" |
| 65 |
); |
| 66 |
|
| 67 |
// routes/identity/route.ts |
| 68 |
var VIEW_CONFIG_FIELDS = "form"; |
| 69 |
var route = { |
| 70 |
title: () => (0, import_i18n._x)("Identity", "site identity"), |
| 71 |
async canvas() { |
| 72 |
return { |
| 73 |
isPreview: true, |
| 74 |
// This route shows the site, so it shows the template around |
| 75 |
// whatever the canvas resolves to, including a static front page. |
| 76 |
renderingMode: "template-locked" |
| 77 |
}; |
| 78 |
}, |
| 79 |
loader: async () => { |
| 80 |
await Promise.all([ |
| 81 |
// The stage renders a form over the site settings, so preload them |
| 82 |
// before the surface mounts. |
| 83 |
(0, import_data.resolveSelect)(import_core_data.store).getEntityRecord("root", "site"), |
| 84 |
// Preload the form configuration the stage renders. |
| 85 |
unlock((0, import_data.resolveSelect)(import_core_data.store)).getViewConfig( |
| 86 |
"root", |
| 87 |
"site", |
| 88 |
{ |
| 89 |
fields: VIEW_CONFIG_FIELDS |
| 90 |
} |
| 91 |
) |
| 92 |
]); |
| 93 |
} |
| 94 |
}; |
| 95 |
export { |
| 96 |
route |
| 97 |
}; |
| 98 |
|