@spfx-extensions/package 1.4.20 → 1.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -42
- package/config/package-solution.json +2 -2
- package/dist/8d1029da-85e6-48cc-aaaf-37a5bbc0b9be.manifest.json +2 -2
- package/dist/d6ca1fc2-0591-4c6d-8a25-cae3262c017b.manifest.json +2 -2
- package/dist/debug/83e13c11-682e-4eaa-9ae0-74617ca28f96/Extension_8d1029da-85e6-48cc-aaaf-37a5bbc0b9be.xml +1 -1
- package/dist/debug/83e13c11-682e-4eaa-9ae0-74617ca28f96/WebPart_d6ca1fc2-0591-4c6d-8a25-cae3262c017b.xml +1 -1
- package/dist/debug/AppManifest.xml +1 -1
- package/dist/debug/ClientSideAssets/{spfx-extension-application-customizer_743b6ff6d353e6efb2ba.js → spfx-extension-application-customizer_e90a93cf21d9adfcc45b.js} +1 -1
- package/dist/debug/ClientSideAssets/spfx-extension-core.js +1 -1
- package/dist/debug/ClientSideAssets/spfx-extension-coreconfigurator.js +142 -138
- package/dist/{spfx-extension-loader_a1a02cd56857faf2a239.js → debug/ClientSideAssets/spfx-extension-loader_944f3883e9eef3d9f938.js} +1 -1
- package/dist/{spfx-extensionloader-web-part_e001d8c5e0a272bd6efc.js → debug/ClientSideAssets/spfx-extensionloader-web-part_d27efb9f612eb007f672.js} +1 -1
- package/dist/debug/ClientSideAssets.xml +1 -1
- package/dist/debug/ClientSideAssets.xml.config.xml +1 -1
- package/dist/debug/_rels/ClientSideAssets.xml.rels +1 -1
- package/dist/debug/feature_83e13c11-682e-4eaa-9ae0-74617ca28f96.xml +1 -1
- package/dist/debug/feature_83e13c11-682e-4eaa-9ae0-74617ca28f96.xml.config.xml +1 -1
- package/dist/deploy/sp-fx-extensions.sppkg +0 -0
- package/dist/{spfx-extension-application-customizer_743b6ff6d353e6efb2ba.js → spfx-extension-application-customizer_e90a93cf21d9adfcc45b.js} +1 -1
- package/dist/spfx-extension-core.js +1 -1
- package/dist/spfx-extension-coreconfigurator.js +142 -138
- package/dist/{debug/ClientSideAssets/spfx-extension-loader_a1a02cd56857faf2a239.js → spfx-extension-loader_944f3883e9eef3d9f938.js} +1 -1
- package/dist/{debug/ClientSideAssets/spfx-extensionloader-web-part_e001d8c5e0a272bd6efc.js → spfx-extensionloader-web-part_d27efb9f612eb007f672.js} +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,38 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SPFx Extensions Framework
|
|
2
2
|
|
|
3
3
|
## Summary
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A SharePoint Framework (SPFx) extension solution that provides a framework-agnostic wrapper for building modern SharePoint applications. This solution contains both a web part and an application customizer that can be installed tenant-wide, enabling developers to break free from the traditional SPFx ecosystem limitations.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The solution acts as a wrapper around the `@spfx-extensions/core` package, allowing you to use any modern bundler (Bun, esbuild, Vite, etc.) and the latest Node.js versions for your SharePoint solutions.
|
|
8
8
|
|
|
9
9
|
## Used SharePoint Framework Version
|
|
10
10
|
|
|
11
|
-

|
|
12
12
|
|
|
13
13
|
## Applies to
|
|
14
|
-
|
|
15
|
-
- [SharePoint Framework](https://aka.ms/spfx)
|
|
16
|
-
- [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant)
|
|
14
|
+
- SharePoint Online
|
|
17
15
|
|
|
18
16
|
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram)
|
|
19
17
|
|
|
20
18
|
## Prerequisites
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| Solution | Author(s) |
|
|
27
|
-
| ----------- | ------------------------------------------------------- |
|
|
28
|
-
| folder name | Author details (name, company, twitter alias with link) |
|
|
29
|
-
|
|
30
|
-
## Version history
|
|
31
|
-
|
|
32
|
-
| Version | Date | Comments |
|
|
33
|
-
| ------- | ---------------- | --------------- |
|
|
34
|
-
| 1.1 | March 10, 2021 | Update comment |
|
|
35
|
-
| 1.0 | January 29, 2021 | Initial release |
|
|
20
|
+
- SharePoint Online tenant
|
|
21
|
+
- App Catalog site collection
|
|
22
|
+
- Global administrator or SharePoint administrator permissions for tenant-wide deployment
|
|
23
|
+
- Node.js 22.14.0 or higher (but less than 23.0.0)
|
|
36
24
|
|
|
37
25
|
## Disclaimer
|
|
38
26
|
|
|
@@ -42,27 +30,132 @@ Short summary on functionality and used technologies.
|
|
|
42
30
|
|
|
43
31
|
## Minimal Path to Awesome
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
33
|
+
### Installation
|
|
34
|
+
|
|
35
|
+
1. **Clone this repository**
|
|
36
|
+
```bash
|
|
37
|
+
git clone https://github.com/SPWizard01/spfx-extensions
|
|
38
|
+
cd spfx-extensions
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
2. **Install dependencies**
|
|
42
|
+
```bash
|
|
43
|
+
npm install
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. **Build the solution**
|
|
47
|
+
```bash
|
|
48
|
+
npm run build
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
4. **Package for deployment**
|
|
52
|
+
```bash
|
|
53
|
+
npm run release
|
|
54
|
+
```
|
|
55
|
+
If you would like to change the name of the webpart to use your own then use `--change-name` argument
|
|
56
|
+
```bash
|
|
57
|
+
npm run release --change-name My Awesome Webpart
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
5. **Deploy to App Catalog**
|
|
61
|
+
- Upload the generated `.sppkg` file from `./dist/deploy/` to your tenant's App Catalog
|
|
62
|
+
- Deploy the solution tenant-wide when prompted
|
|
63
|
+
- The solution will automatically create the required subsite and configuration infrastructure
|
|
64
|
+
|
|
65
|
+
### Post-Installation
|
|
66
|
+
|
|
67
|
+
After successful deployment, you can:
|
|
68
|
+
|
|
69
|
+
- Navigate to `/sites/appcatalog/SPFxExtensionsData/SitePages/SPFxExtensionsConfigurator.aspx` for global configuration
|
|
70
|
+

|
|
71
|
+
- Add the SPFx Extensions Loader web part to any SharePoint page
|
|
72
|
+

|
|
73
|
+
- Then configure which app the webpart should load
|
|
74
|
+

|
|
75
|
+
- Configure applications at different scopes (Global, Hub, Site, Web) as needed
|
|
76
|
+

|
|
77
|
+
- Add webs where you want to add the apps
|
|
78
|
+

|
|
79
|
+
- Configure the app/upload necessary files
|
|
80
|
+

|
|
81
|
+
- Enable or disable the app at specific scope
|
|
82
|
+
## Development Commands
|
|
83
|
+
|
|
84
|
+
| Command | Description |
|
|
85
|
+
| ------- | ----------- |
|
|
86
|
+
| `npm run build` | Build the solution in development mode |
|
|
87
|
+
| `npm run serve` | Start the local development server |
|
|
88
|
+
| `npm run release` | Build and package for production deployment |
|
|
89
|
+
| `npm run clean` | Clean build artifacts |
|
|
90
|
+
| `npm test` | Run tests |
|
|
91
|
+
|
|
92
|
+
## What This Solution Does
|
|
93
|
+
|
|
94
|
+
When deployed to your SharePoint tenant, this solution:
|
|
95
|
+
|
|
96
|
+
1. **Creates Infrastructure**: Automatically provisions a special subsite at `/sites/appcatalog/SPFxExtensionsData`
|
|
97
|
+
2. **Configuration Management**: Sets up application-specific configuration lists in the subsite
|
|
98
|
+
3. **Global Configuration Page**: Creates a configuration page at `SitePages/SPFxExtensionsConfigurator.aspx`
|
|
99
|
+
4. **Multi-Scope Support**: Enables configuration for Global, Hub, Site, and Web scoped solutions
|
|
100
|
+
5. **Framework Freedom**: Acts as a wrapper around `@spfx-extensions/core`, freeing you from SPFx ecosystem constraints
|
|
101
|
+
|
|
102
|
+
## Key Benefits
|
|
103
|
+
|
|
104
|
+
### 🚀 **Modern Development Stack**
|
|
105
|
+
- Use any bundler you prefer: **Bun**, **esbuild**, **Vite**, **Webpack**, or others
|
|
106
|
+
- Support for the latest Node.js versions (not limited to SPFx-supported versions)
|
|
107
|
+
- Modern JavaScript/TypeScript features without SPFx limitations
|
|
108
|
+
|
|
109
|
+
### 🔧 **Flexible Architecture**
|
|
110
|
+
- Framework-agnostic development approach
|
|
111
|
+
- Break free from Microsoft's SPFx app ecosystem constraints
|
|
112
|
+
- Maintain full control over your build pipeline and dependencies
|
|
113
|
+
|
|
114
|
+
### 🎯 **Enterprise-Ready**
|
|
115
|
+
- Tenant-wide deployment capability
|
|
116
|
+
- Centralized configuration management
|
|
117
|
+
- Support for multiple scoping levels (Global/Hub/Site/Web)
|
|
118
|
+
|
|
119
|
+
## Architecture Overview
|
|
120
|
+
|
|
121
|
+
This solution consists of two main components:
|
|
122
|
+
|
|
123
|
+
### 1. Application Customizer (`SpfxExtensionApplicationCustomizer`)
|
|
124
|
+
- Deployed tenant-wide for global functionality
|
|
125
|
+
- Initializes the core framework on every SharePoint page
|
|
126
|
+
- Manages application lifecycle and placeholder handling
|
|
127
|
+
|
|
128
|
+
### 2. Web Part (`SpfxExtensionloaderWebPart`)
|
|
129
|
+
- Provides a configurable interface for loading custom applications
|
|
130
|
+
- Integrates with the centralized configuration system
|
|
131
|
+
- Supports dynamic app loading and configuration
|
|
132
|
+
|
|
133
|
+
Both components leverage the `@spfx-extensions/core` package to provide the underlying framework functionality.
|
|
134
|
+
## Technical Details
|
|
135
|
+
|
|
136
|
+
### Core Dependencies
|
|
137
|
+
- **@spfx-extensions/core**: The foundational package that provides framework-agnostic capabilities
|
|
138
|
+
- **SharePoint Framework 1.21.0**: Base SPFx framework for SharePoint integration
|
|
139
|
+
- **TypeScript**: Full TypeScript support with modern language features
|
|
140
|
+
|
|
141
|
+
### Infrastructure Created
|
|
142
|
+
- **Subsite**: `/sites/appcatalog/SPFxExtensionsData`
|
|
143
|
+
- **Configuration Lists**: `SPFxExtensionsWhiteList`, `SPFxExtensionsConfiguration`
|
|
144
|
+
- **Configuration Page**: `SitePages/SPFxExtensionsConfigurator.aspx`
|
|
145
|
+
|
|
146
|
+
### Supported Scopes
|
|
147
|
+
- **Global**: Tenant-wide configurations
|
|
148
|
+
- **Hub**: Hub site specific configurations
|
|
149
|
+
- **Site**: Site collection specific configurations
|
|
150
|
+
- **Web**: Individual web specific configurations
|
|
151
|
+
|
|
152
|
+
## Contributing
|
|
153
|
+
|
|
154
|
+
This project welcomes contributions and suggestions. Please feel free to submit issues and enhancement requests.
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.
|
|
66
159
|
|
|
67
160
|
## References
|
|
68
161
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"solution": {
|
|
4
4
|
"name": "SPFx Extensions",
|
|
5
5
|
"id": "7d56fff0-e90e-40a7-98cf-fcdbc63a9b01",
|
|
6
|
-
"version": "1.4.
|
|
6
|
+
"version": "1.4.23.0",
|
|
7
7
|
"includeClientSideAssets": true,
|
|
8
8
|
"skipFeatureDeployment": true,
|
|
9
9
|
"isDomainIsolated": false,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"title": "Application Extension - Deployment of custom action",
|
|
35
35
|
"description": "Deploys a custom action with ClientSideComponentId association",
|
|
36
36
|
"id": "83e13c11-682e-4eaa-9ae0-74617ca28f96",
|
|
37
|
-
"version": "1.4.
|
|
37
|
+
"version": "1.4.23.0",
|
|
38
38
|
"assets": {
|
|
39
39
|
"elementManifests": [
|
|
40
40
|
"elements.xml",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"alias": "SpfxExtensionApplicationCustomizer",
|
|
4
4
|
"componentType": "Extension",
|
|
5
5
|
"extensionType": "ApplicationCustomizer",
|
|
6
|
-
"version": "1.4.
|
|
6
|
+
"version": "1.4.23",
|
|
7
7
|
"manifestVersion": 2,
|
|
8
8
|
"requiresCustomScript": false,
|
|
9
9
|
"loaderConfig": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"scriptResources": {
|
|
15
15
|
"spfx-extension-application-customizer": {
|
|
16
16
|
"type": "path",
|
|
17
|
-
"path": "spfx-extension-application-
|
|
17
|
+
"path": "spfx-extension-application-customizer_e90a93cf21d9adfcc45b.js"
|
|
18
18
|
},
|
|
19
19
|
"@microsoft/sp-application-base": {
|
|
20
20
|
"type": "component",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "d6ca1fc2-0591-4c6d-8a25-cae3262c017b",
|
|
3
3
|
"alias": "SpfxExtensionloaderWebPart",
|
|
4
4
|
"componentType": "WebPart",
|
|
5
|
-
"version": "1.4.
|
|
5
|
+
"version": "1.4.23",
|
|
6
6
|
"manifestVersion": 2,
|
|
7
7
|
"requiresCustomScript": false,
|
|
8
8
|
"supportedHosts": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"scriptResources": {
|
|
40
40
|
"spfx-extensionloader-web-part": {
|
|
41
41
|
"type": "path",
|
|
42
|
-
"path": "spfx-extensionloader-web-
|
|
42
|
+
"path": "spfx-extensionloader-web-part_d27efb9f612eb007f672.js"
|
|
43
43
|
},
|
|
44
44
|
"@microsoft/sp-core-library": {
|
|
45
45
|
"type": "component",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ClientSideComponent Name="SpfxExtensionApplicationCustomizer" Id="8d1029da-85e6-48cc-aaaf-37a5bbc0b9be" ComponentManifest="{"id":"8d1029da-85e6-48cc-aaaf-37a5bbc0b9be","alias":"SpfxExtensionApplicationCustomizer","componentType":"Extension","extensionType":"ApplicationCustomizer","version":"1.4.
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ClientSideComponent Name="SpfxExtensionApplicationCustomizer" Id="8d1029da-85e6-48cc-aaaf-37a5bbc0b9be" ComponentManifest="{"id":"8d1029da-85e6-48cc-aaaf-37a5bbc0b9be","alias":"SpfxExtensionApplicationCustomizer","componentType":"Extension","extensionType":"ApplicationCustomizer","version":"1.4.23","manifestVersion":2,"loaderConfig":{"internalModuleBaseUrls":["HTTPS://SPCLIENTSIDEASSETLIBRARY/"],"entryModuleId":"spfx-extension-application-customizer","scriptResources":{"spfx-extension-application-customizer":{"type":"path","path":"spfx-extension-application-customizer_e90a93cf21d9adfcc45b.js"},"@microsoft/sp-application-base":{"type":"component","id":"4df9bb86-ab0a-4aab-ab5f-48bf167048fb","version":"1.21.1"}}}}" Type="Extension"></ClientSideComponent></Elements>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ClientSideComponent Name="SPFx Extension Loader" Id="d6ca1fc2-0591-4c6d-8a25-cae3262c017b" ComponentManifest="{"id":"d6ca1fc2-0591-4c6d-8a25-cae3262c017b","alias":"SpfxExtensionloaderWebPart","componentType":"WebPart","version":"1.4.
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ClientSideComponent Name="SPFx Extension Loader" Id="d6ca1fc2-0591-4c6d-8a25-cae3262c017b" ComponentManifest="{"id":"d6ca1fc2-0591-4c6d-8a25-cae3262c017b","alias":"SpfxExtensionloaderWebPart","componentType":"WebPart","version":"1.4.23","manifestVersion":2,"supportedHosts":["SharePointWebPart","TeamsPersonalApp","TeamsTab","SharePointFullPage"],"supportsThemeVariants":true,"supportsFullBleed":true,"preconfiguredEntries":[{"groupId":"5c03119e-3074-46fd-976b-c60198311f70","group":{"default":"Advanced"},"title":{"default":"SPFx Extension Loader"},"description":{"default":"Allows you to add a custom developed app"},"officeFabricIconFontName":"Page","properties":{"description":"Select an app to load from the dropdown below"}}],"loaderConfig":{"internalModuleBaseUrls":["HTTPS://SPCLIENTSIDEASSETLIBRARY/"],"entryModuleId":"spfx-extensionloader-web-part","scriptResources":{"spfx-extensionloader-web-part":{"type":"path","path":"spfx-extensionloader-web-part_d27efb9f612eb007f672.js"},"@microsoft/sp-core-library":{"type":"component","id":"7263c7d0-1d6a-45ec-8d85-d4d1d234171b","version":"1.21.1"},"@microsoft/sp-property-pane":{"type":"component","id":"f9e737b7-f0df-4597-ba8c-3060f82380db","version":"1.21.1"},"@microsoft/sp-webpart-base":{"type":"component","id":"974a7777-0990-4136-8fa6-95d80114c2e0","version":"1.21.1"}}}}" Type="WebPart"></ClientSideComponent><Module Name="SPFx Extension Loader" Url="_catalogs/wp" List="113"></Module></Elements>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="SPFx Extensions" ProductID="7d56fff0-e90e-40a7-98cf-fcdbc63a9b01" SharePointMinVersion="16.0.0.0" IsClientSideSolution="true" Version="1.4.
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="SPFx Extensions" ProductID="7d56fff0-e90e-40a7-98cf-fcdbc63a9b01" SharePointMinVersion="16.0.0.0" IsClientSideSolution="true" Version="1.4.23.0" SkipFeatureDeployment="true" IsDomainIsolated="false"><Properties><Title>SPFx Extensions</Title><DeveloperProperties>{"name":"SPWizard01","websiteUrl":"https://github.com/SPWizard01/spfx-extensions","privacyUrl":"https://github.com/SPWizard01/spfx-extensions/blob/main/README.md","termsOfUseUrl":"https://github.com/SPWizard01/spfx-extensions/blob/main/LICENSE","mpnId":"Undefined-1.21.0"}</DeveloperProperties><ShortDescription><LocalizedString CultureName="default">SPFxExtensions App allows you to develop framework agnostic apps.</LocalizedString></ShortDescription><LongDescription><LocalizedString CultureName="default">SPFxExtensions App is a SharePoint Framework (SPFx) extension that allows developers to create framework-agnostic applications. This solution provides a streamlined way to deploy extensions and client-side components, enhancing the functionality and user experience of SharePoint sites. With this extension, developers can easily integrate their custom solutions into SharePoint, leveraging the power of SPFx to build robust and scalable applications.</LocalizedString></LongDescription><CategoryID>Content management,Productivity,Site Design</CategoryID><Screenshots></Screenshots></Properties></App>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e=document.currentScript;define("8d1029da-85e6-48cc-aaaf-37a5bbc0b9be_1.4.
|
|
1
|
+
(()=>{var e=document.currentScript;define("8d1029da-85e6-48cc-aaaf-37a5bbc0b9be_1.4.23",["@microsoft/sp-application-base"],t=>(()=>{"use strict";var n,a,i,r={841:e=>{e.exports=t}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.m=r,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>"spfx-extension-loader_944f3883e9eef3d9f938.js",s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},a="ee77545d7b339c1ec78e7d44e6310871:",s.l=(e,t,i,r)=>{if(n[e])n[e].push(t);else{var o,c;if(void 0!==i)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var u=d[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==a+i){o=u;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",a+i),o.src=e,0!==o.src.indexOf(window.location.origin+"/")&&(o.crossOrigin="anonymous")),n[e]=[t];var f=(t,a)=>{o.onerror=o.onload=null,clearTimeout(p);var i=n[e];if(delete n[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(a)),t)return t(a)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=f.bind(null,o.onerror),o.onload=f.bind(null,o.onload),c&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i=e?e.src:"",s.p=i.slice(0,i.lastIndexOf("/")+1),(()=>{var e={39:0};s.f.j=(t,n)=>{var a=s.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var i=new Promise((n,i)=>a=e[t]=[n,i]);n.push(a[2]=i);var r=s.p+s.u(t),o=new Error;s.l(r,n=>{if(s.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",o.name="ChunkLoadError",o.type=i,o.request=r,a[1](o)}},"chunk-"+t,t)}};var t=(t,n)=>{var a,i,[r,o,c]=n,d=0;if(r.some(t=>0!==e[t])){for(a in o)s.o(o,a)&&(s.m[a]=o[a]);c&&c(s)}for(t&&t(n);d<r.length;d++)i=r[d],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackJsonp_ee77545d7b339c1ec78e7d44e6310871=self.webpackJsonp_ee77545d7b339c1ec78e7d44e6310871||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var c={};return(()=>{s.r(c),s.d(c,{default:()=>t});var e=s(841);class t extends e.BaseApplicationCustomizer{async onInit(){const{initCore:e}=await s.e(548).then(s.bind(s,364));await e("SharePoint",this.context.placeholderProvider,this)}async onPlaceholdersChanged(e){const{initCore:t}=await s.e(548).then(s.bind(s,364));await t("SharePoint",e,this),window.__SPFxExtensions.Apps.forEach(t=>{t.instances.forEach(t=>{t.executeListeners("onPlaceholdersChanged",e)})})}onDispose(){window.__SPFxExtensions?.Apps?.forEach(e=>{e.instances.forEach(e=>{e.executeListeners("onAppCustomizerDisposed",void 0)})})}}})(),c})())})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var s1=Object.create;var{getPrototypeOf:l1,defineProperty:Wx,getOwnPropertyNames:r1}=Object;var a1=Object.prototype.hasOwnProperty;var Dw=(x,w,y)=>{y=x!=null?s1(l1(x)):{};let $=w||!x||!x.__esModule?Wx(y,"default",{value:x,enumerable:!0}):y;for(let Q of r1(x))if(!a1.call($,Q))Wx($,Q,{get:()=>x[Q],enumerable:!0});return $};var Gw=(x,w)=>()=>(w||x((w={exports:{}}).exports,w),w.exports);var Ow=(x,w)=>{for(var y in w)Wx(x,y,{get:w[y],enumerable:!0,configurable:!0,set:($)=>w[y]=()=>$})};var Rw=(x,w)=>()=>(x&&(w=x(x=0)),w);var qx="d6ca1fc2-0591-4c6d-8a25-cae3262c017b",A="45e75137-13c5-4bb2-a2b3-8ab6382682ee",cx="SPFxExtensionsConfigurator",t="SitePages/SPFxExtensionsConfigurator.aspx",E="manifest.txt",F="collectionconfig.txt",Hx="Loading...",v="SPFxExtensionsConfiguration",U="SPFxExtensionsWhiteList",Xw="SPFxExtensions",g="/SPFxExtensions/",k="SPFxExtensionsData",L="[SPFxExtensionCore]",kx={appDefinitionMap:[],appRelativeEntryPointUrls:[],isESM:!0},_w={enabledEverywhere:!1,excludedHubIds:[],excludedIds:[],includedHubIds:[],includedIds:[]},Dx={enabledAppCollections:[],urlMap:[]},p="00000000-0000-0000-0000-000000000000";function B(x,w,y=x){return($)=>{let Q=""+$,Z=Q.indexOf(w,x.length);return~Z?x+e1(Q,w,y,Z)+w:x+Q+w}}function e1(x,w,y,$){let Q="",Z=0;do Q+=x.substring(Z,$)+y,Z=$+w.length,$=x.indexOf(w,Z);while(~$);return Q+x.substring(Z)}var Lw=B("\x1B[0m","\x1B[0m"),nw=B("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),mw=B("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),Ew=B("\x1B[3m","\x1B[23m"),hw=B("\x1B[4m","\x1B[24m"),Aw=B("\x1B[7m","\x1B[27m"),dw=B("\x1B[8m","\x1B[28m"),Sw=B("\x1B[9m","\x1B[29m"),Mw=B("\x1B[30m","\x1B[39m"),vw=B("\x1B[31m","\x1B[39m"),Uw=B("\x1B[32m","\x1B[39m"),gw=B("\x1B[33m","\x1B[39m"),fw=B("\x1B[34m","\x1B[39m"),Cw=B("\x1B[35m","\x1B[39m"),Nw=B("\x1B[36m","\x1B[39m"),ow=B("\x1B[37m","\x1B[39m"),uw=B("\x1B[90m","\x1B[39m"),Iw=B("\x1B[40m","\x1B[49m"),Tw=B("\x1B[41m","\x1B[49m"),cw=B("\x1B[42m","\x1B[49m"),tw=B("\x1B[43m","\x1B[49m"),pw=B("\x1B[44m","\x1B[49m"),iw=B("\x1B[45m","\x1B[49m"),sw=B("\x1B[46m","\x1B[49m"),lw=B("\x1B[47m","\x1B[49m"),rw=B("\x1B[90m","\x1B[39m"),aw=B("\x1B[91m","\x1B[39m"),i=B("\x1B[92m","\x1B[39m"),ew=B("\x1B[93m","\x1B[39m"),x3=B("\x1B[94m","\x1B[39m"),w3=B("\x1B[95m","\x1B[39m"),y3=B("\x1B[96m","\x1B[39m"),$3=B("\x1B[97m","\x1B[39m"),Q3=B("\x1B[100m","\x1B[49m"),Z3=B("\x1B[101m","\x1B[49m"),V3=B("\x1B[102m","\x1B[49m"),z3=B("\x1B[103m","\x1B[49m"),Y3=B("\x1B[104m","\x1B[49m"),B3=B("\x1B[105m","\x1B[49m"),j3=B("\x1B[106m","\x1B[49m"),K3=B("\x1B[107m","\x1B[49m");function z(...x){console.error(i(L),(/*@__PURE__*/new Date()).toISOString(),...x)}function R(...x){console.warn(i(L),(/*@__PURE__*/new Date()).toISOString(),...x)}function b(...x){console.info(i(L),(/*@__PURE__*/new Date()).toISOString(),...x)}function W(...x){}function Gx(x,w,y){z("Error while executing onInstanceRequested for app",x.id,"with name",x.name,y?`Additional Data: ${y}`:"",w)}function f(){return R("The app instance event was called before app instance was initialized."),()=>{}}var Ox=window.crypto.randomUUID();function s(){return Ox}function tx(){return Ox=window.crypto.randomUUID(),Ox}function Rx(x){return x.replace("{","").replace("}","")}function k3(x){return JSON.parse(JSON.stringify(x))}function x9(x,w,y){let $=x.instances.findIndex((Q)=>Q.key===w);if($>-1){let Q=x.instances.splice($,1);if(Q.length<1)return;let Z=Q[0];Z.executeListeners("onConfigurationClose",void 0),Z.allEventListeners.splice(0,Z.allEventListeners.length),y?.()}}async function px(x){let w=window.__SPFxExtensions.Apps.filter((y)=>!y.isWebPartApp&&!y.keepOnContextChange&&y.id!==A);for(let y of w)for(let $ of y.instances.filter((Q)=>Q.contextId!==x))if($.instanceExecuted)$.unmount()}function l(x,w){if(w.instanceRequested)return;try{w.instanceRequested=!0,x.onInstanceRequested(w).then((y)=>{w.unmount=()=>{x9(x,w.key,y)},w.instanceLoadPromiseResolver(),w.instanceExecuted=!0}).catch((y)=>{Gx(x,y)})}catch(y){Gx(x,y)}}function w9(x){W("Executing appAdded event for",x.id),window.__SPFxExtensions.AppEventListeners.filter((w)=>w.eventName==="appAdded").forEach((w)=>{try{w.handler(x)}catch(y){z("Error executing appAdded event",y)}})}function Fx(x){let w=window.__SPFxExtensions.Apps.find((y)=>y.id===x);if(!w)W("Registering new app",x),w={id:x,name:Hx,description:Hx,isWebPartApp:!1,unmountOnRender:!0,keepOnContextChange:!1,autoExecute:!1,maxInstances:1/0,hideAppSelectorWhenAppLoaded:!1,hideConfiguratorButton:!1,registrationCompleted:!1,instances:[],async onInstanceRequested(){return f}},window.__SPFxExtensions.Apps.push(w);return w}function ix(){if(!window.__SPFxExtensions.Apps)window.__SPFxExtensions.Apps=[];if(!window.__SPFxExtensions.RegisterApp)window.__SPFxExtensions.RegisterApp=async(x)=>{let w=Fx(x.id);if(w.registrationCompleted)return w;return w.name=x.name,w.description=x.description,w.isWebPartApp=x.isWebPartApp,w.keepOnContextChange=x.keepOnContextChange??!1,w.autoExecute=x.autoExecute??!1,w.unmountOnRender=x.unmountOnRender??!0,w.maxInstances=x.maxInstances??1/0,w.hideAppSelectorWhenAppLoaded=x.hideAppSelectorWhenAppLoaded??!1,w.hideConfiguratorButton=x.hideConfiguratorButton??!1,w.icon=x.icon,w.onInstanceRequested=x.onInstanceRequested,w.registrationCompleted=!0,w9(w),w.instances.forEach((y)=>{l(w,y)}),w};if(!window.__SPFxExtensions.UnregisterApp)window.__SPFxExtensions.UnregisterApp=async(x)=>{let w=window.__SPFxExtensions.Apps.findIndex(($)=>$.id===x);if(w<0)return;let y=window.__SPFxExtensions.Apps.splice(w,1);if(y.length<1)return;return W("Unregistering app",y[0].id,y[0].name),y[0].instances.forEach(($)=>{if($.instanceExecuted)$.unmount()}),y[0]}}function y9(x){let w=(Q)=>{let Z=x.allEventListeners.findIndex((V)=>V.key===Q.key);if(Z>-1)W("Removing event listener",Q),x.allEventListeners.splice(Z,1)},y=(Q,Z)=>{let V={key:window.crypto.randomUUID(),eventName:Q,handler:Z};return x.allEventListeners.push(V),()=>{w(V)}},$=(Q,Z)=>{for(let V of x.allEventListeners){if(V.eventName!=Q)continue;if(V.handler)V.handler(Z)}};x.addEventListener=y,x.executeListeners=$}function $9(x,w){W("Executing instanceAdded event for app",x.id,"instance",w.key),window.__SPFxExtensions.AppEventListeners.filter((y)=>y.eventName==="instanceAdded").forEach((y)=>{try{y.handler({app:x,instance:w})}catch($){z("Error executing instanceAdded event",$)}})}function Q9(x){let{promise:w,resolve:y}=Promise.withResolvers(),$={...x,key:window.crypto.randomUUID(),contextId:s(),instanceRequested:!1,instanceExecuted:!1,unmountOnRender:!0,unmount:f,allEventListeners:[],addEventListener:f,executeListeners:f,instanceLoadPromise:w,instanceLoadPromiseResolver:y};return y9($),$}function sx(){if(!window.__SPFxExtensions.InstantiateApp)window.__SPFxExtensions.InstantiateApp=async(x,w)=>{let y=Fx(x);W("Creating app instance for app",x);let $=Q9(w);if($.unmountOnRender=y.unmountOnRender??!0,y.instances.push($),$9(y,$),y.registrationCompleted)l(y,$);return $}}async function C(x,w=0){let $=(/*@__PURE__*/new TextEncoder()).encode(x),Q=await window.crypto.subtle.digest("SHA-1",$),V=Array.from(new Uint8Array(Q)).map((K)=>K.toString(16).padStart(2,"0")).join("");return w>0?V.substring(0,w):V}var Px=(x,w)=>w.some((y)=>x instanceof y),lx,rx;function Z9(){return lx||(lx=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function V9(){return rx||(rx=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Lx=/*@__PURE__*/new WeakMap,Xx=/*@__PURE__*/new WeakMap,r=/*@__PURE__*/new WeakMap;function z9(x){let w=new Promise((y,$)=>{let Q=()=>{x.removeEventListener("success",Z),x.removeEventListener("error",V)},Z=()=>{y(d(x.result)),Q()},V=()=>{$(x.error),Q()};x.addEventListener("success",Z),x.addEventListener("error",V)});return r.set(w,x),w}function Y9(x){if(Lx.has(x))return;let w=new Promise((y,$)=>{let Q=()=>{x.removeEventListener("complete",Z),x.removeEventListener("error",V),x.removeEventListener("abort",V)},Z=()=>{y(),Q()},V=()=>{$(x.error||new DOMException("AbortError","AbortError")),Q()};x.addEventListener("complete",Z),x.addEventListener("error",V),x.addEventListener("abort",V)});Lx.set(x,w)}var nx={get(x,w,y){if(x instanceof IDBTransaction){if(w==="done")return Lx.get(x);if(w==="store")return y.objectStoreNames[1]?void 0:y.objectStore(y.objectStoreNames[0])}return d(x[w])},set(x,w,y){return x[w]=y,!0},has(x,w){if(x instanceof IDBTransaction&&(w==="done"||w==="store"))return!0;return w in x}};function w1(x){nx=x(nx)}function B9(x){if(V9().includes(x))return function(...w){return x.apply(mx(this),w),d(this.request)};return function(...w){return d(x.apply(mx(this),w))}}function j9(x){if(typeof x==="function")return B9(x);if(x instanceof IDBTransaction)Y9(x);if(Px(x,Z9()))return new Proxy(x,nx);return x}function d(x){if(x instanceof IDBRequest)return z9(x);if(Xx.has(x))return Xx.get(x);let w=j9(x);if(w!==x)Xx.set(x,w),r.set(w,x);return w}var mx=(x)=>r.get(x);function y1(x,w,{blocked:y,upgrade:$,blocking:Q,terminated:Z}={}){let V=indexedDB.open(x,w),K=d(V);if($)V.addEventListener("upgradeneeded",(Y)=>{$(d(V.result),Y.oldVersion,Y.newVersion,d(V.transaction),Y)});if(y)V.addEventListener("blocked",(Y)=>y(Y.oldVersion,Y.newVersion,Y));return K.then((Y)=>{if(Z)Y.addEventListener("close",()=>Z());if(Q)Y.addEventListener("versionchange",(j)=>Q(j.oldVersion,j.newVersion,j))}).catch(()=>{}),K}function $1(x,{blocked:w}={}){let y=indexedDB.deleteDatabase(x);if(w)y.addEventListener("blocked",($)=>w($.oldVersion,$));return d(y).then(()=>{return})}var K9=["get","getKey","getAll","getAllKeys","count"],b9=["put","add","delete","clear"],_x=/*@__PURE__*/new Map;function ax(x,w){if(!(x instanceof IDBDatabase&&!(w in x)&&typeof w==="string"))return;if(_x.get(w))return _x.get(w);let y=w.replace(/FromIndex$/,""),$=w!==y,Q=b9.includes(y);if(!(y in($?IDBIndex:IDBObjectStore).prototype)||!(Q||K9.includes(y)))return;let Z=async function(V,...K){let Y=this.transaction(V,Q?"readwrite":"readonly"),j=Y.store;if($)j=j.index(K.shift());return(await Promise.all([j[y](...K),Q&&Y.done]))[0]};return _x.set(w,Z),Z}w1((x)=>({...x,get:(w,y,$)=>ax(w,y)||x.get(w,y,$),has:(w,y)=>!!ax(w,y)||x.has(w,y)}));var J9=["continue","continuePrimaryKey","advance"],ex={},Ex=/*@__PURE__*/new WeakMap,Q1=/*@__PURE__*/new WeakMap,W9={get(x,w){if(!J9.includes(w))return x[w];let y=ex[w];if(!y)y=ex[w]=function(...$){Ex.set(this,Q1.get(this)[w](...$))};return y}};async function*q9(...x){let w=this;if(!(w instanceof IDBCursor))w=await w.openCursor(...x);if(!w)return;w=w;let y=new Proxy(w,W9);Q1.set(y,w),r.set(y,mx(w));while(w)yield y,w=await(Ex.get(y)||w.continue()),Ex.delete(y)}function x1(x,w){return w===Symbol.asyncIterator&&Px(x,[IDBIndex,IDBObjectStore,IDBCursor])||w==="iterate"&&Px(x,[IDBIndex,IDBObjectStore])}w1((x)=>({...x,get(w,y,$){if(x1(w,y))return q9;return x.get(w,y,$)},has(w,y){return x1(w,y)||x.has(w,y)}}));var h={SPFXEXT:"SPFXEXT_",SPFXEXT_CORE:"SPFXEXT"};function H9(){return Object.keys(localStorage).some((x)=>x.indexOf(h.SPFXEXT)>-1&&Number(localStorage[x])>0)}function Z1(x){return x.hostname.toLowerCase()==="localhost"}function V1(x){return Number(localStorage.getItem(`${h.SPFXEXT}${x}`))>0}var n=H9();var J={AppFolderManifestCache:"AppFolderManifestCache",AppCollectionManifestCache:"AppCollectionManifestCache",AllowedApps:"AllowedApps",HubSiteData:"HubSiteData",SPFxExtensionConfig:"SPFxExtensionConfig"},z1=`${h.SPFXEXT}COREDB`,Y1=y1(z1,1,{blocking(x,w,y){O.close(),alert("A new version of this page is ready. Please reload the page.")},async upgrade(x,w,y,$,Q){if(w===0)x.createObjectStore(J.AppFolderManifestCache,{keyPath:"url"}),x.createObjectStore(J.AppCollectionManifestCache,{keyPath:"url"}),x.createObjectStore(J.AllowedApps,{keyPath:"Id"}),x.createObjectStore(J.HubSiteData,{keyPath:"SiteId"}),x.createObjectStore(J.SPFxExtensionConfig,{keyPath:"Title"})}});Y1.catch((x)=>{throw z("Error opening database for Core, please contact your administrator."),$1(z1).then(()=>{window.location.reload()}),x});var O=await Y1;function N(x){let w=/*@__PURE__*/new Date;return w.setMinutes(w.getMinutes()+x),{expires:w.toISOString()}}async function o(x,w){let y=await O.getAll(x),$=/*@__PURE__*/new Date,Q=y.filter((V)=>{let K=new Date(V.expires);return $>=K}),Z=Q.length;if(Z>0){let V=O.transaction(x,"readwrite"),K=V.objectStore(x);Q.forEach((Y)=>K.delete(Y[w])),await V.done,R(`Evicted ${Z} items from ${x} cache.`)}return Z}async function hx(){return await o(J.SPFxExtensionConfig,"Title"),O.getAll(J.SPFxExtensionConfig)}async function S(x){return await o(J.SPFxExtensionConfig,"Title"),O.get(J.SPFxExtensionConfig,x)}async function m(x,w=60){await O.put(J.SPFxExtensionConfig,{...x,...N(w)})}function B1(x,w){let y=O.transaction(J.SPFxExtensionConfig,"readwrite"),$=y.objectStore(J.SPFxExtensionConfig);return x.forEach((Q)=>$.put({...Q,...N(w)})),y.done}async function j1(){return O.getAll(J.AllowedApps)}async function Ax(x){return O.get(J.AppFolderManifestCache,x)}async function dx(x){return O.get(J.AppCollectionManifestCache,x)}async function K1(x){return O.get(J.HubSiteData,x)}async function b1(x,w=60){await O.put(J.HubSiteData,{...x,...N(w)})}async function k9(x,w=60){await O.put(J.AppCollectionManifestCache,{...x,...N(w)})}async function D9(x,w=60){await O.put(J.AppFolderManifestCache,{...x,...N(w)})}async function J1(x,w=5){let y=N(w),$=O.transaction(J.AllowedApps,"readwrite"),Q=$.objectStore(J.AllowedApps);return x.forEach((Z)=>Q.put({...y,...Z})),$.done}function G9(x){return O.delete(J.AppCollectionManifestCache,x)}function O9(x){return O.delete(J.AppFolderManifestCache,x)}async function R9(){return o(J.AppCollectionManifestCache,"url")}async function F9(){return o(J.AppFolderManifestCache,"url")}async function W1(){return o(J.AllowedApps,"Id")}async function q1(){return o(J.HubSiteData,"SiteId")}async function a(x){if(x){let w=await Ax(x.url);if(w){if(w.hash!==x.hash)await O9(x.url),R(`Evicted ${E} ${w.url} from cache. Because of hash mismatch.`)}}return F9()}async function e(x){if(x){let w=await dx(x.url);if(w){if(w.hash!==x.hash)await G9(x.url),R(`Evicted ${F} ${w.url} from cache. Because of hash mismatch.`)}}return R9()}async function H1(x){if(await a(),n)return;return Ax(x)}async function k1(x,w){await a(x);let y=await Ax(x.url);if(y&&y.hash===x.hash&&!n)return;await D9(x,w)}async function D1(x,w){await e(x);let y=await dx(x.url);if(y&&y.hash===x.hash&&!n)return;await k9(x,w)}async function G1(x){if(await e(),n)return;return dx(x)}var Sx=/*@__PURE__*/new Map;async function O1(x,w=!1){let y="";if(Sx.has(x)&&!w)y=Sx.get(x)||"";if(y)return y;let $=await fetch(`${x}/_api/contextinfo`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json"}});if($.status===200){let Z=(await $.json()).d.GetContextWebInformation.FormDigestValue;return Sx.set(x,Z),Z}else z("Error while getting digest",$.status);return""}var Mx=(x)=>{},xx;async function wx(x=""){if(xx)return xx;xx=new Promise((w)=>{Mx=w});try{let $=(await(await fetch(`${x}/_api/SP_TenantSettings_Current`,{headers:{Accept:"application/json;odata=verbose"}})).json()).d.CorporateCatalogUrl;Mx($)}catch(w){z("Error while getting app catalog url. Trying default /sites/appcatalog",w);let y=`${window.location.origin}/sites/appcatalog`;Mx(y)}return xx}async function R1(x=""){let w=await S("AppCatalogUrl");if(w?.Data)return w.Data;let y=await wx(x);return await m({Title:"AppCatalogUrl",Data:y,date:"",expires:""},240),y}async function X(x=""){let y=`${await R1()}${x?`/${x}`:""}`;return O1(y)}var X9=await R1(),q=`${X9}/${k}`;var X1={Status:"Status",RootCDNLocation:"RootCDNLocation",InterceptHistory:"InterceptHistory",EnableAppWhiteList:"EnableAppWhiteList",AppCatalogUrl:"AppCatalogUrl",SPFxDataSite:"SPFxDataSite",ConfiguratorPageData:"ConfiguratorPageData",AppWhiteList:"AppWhiteList",Version:"2025-05-16T13:25:19.571Z"},F1=[{Title:"Status",Data:"Installed"},{Title:"InterceptHistory",Data:"true"},{Title:"EnableAppWhiteList",Data:"false"},{Title:"RootCDNLocation",Data:`/sites/appcatalog/${k}`}];function _1(x){let w=F1.find((y)=>y.Title==="RootCDNLocation");if(w)w.Data=x;return F1}var _9=Object.keys(X1).length,yx;async function P9(){let x=`${q}/_api/web/lists/GetByTitle('${v}')/fields`;try{let w=await fetch(x,{headers:{Accept:"application/json;odata=verbose"}});if(w.status===200){let $=(await w.json()).d.results,Q=$.map((V)=>V.InternalName),Z=$.find((V)=>V.InternalName==="Title");if(!Z){z("Title field not found.");return}if(!Z.EnforceUniqueValues){let V=await X(k);if((await fetch(`${q}/_api/web/lists/GetByTitle('${v}')/fields('${Z.Id}')`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":V,"X-HTTP-Method":"MERGE","If-Match":"*"},body:JSON.stringify({__metadata:{type:"SP.Field"},Indexed:!0,EnforceUniqueValues:!0})})).status===204)b("Title field updated successfully.");else z("Unable to update Title field.")}if(!Q.includes("Data")){let V=await X(k);if((await fetch(x,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":V},body:JSON.stringify({__metadata:{type:"SP.Field"},Title:"Data",FieldTypeKind:2,Required:!0})})).status===201)b("Data field added successfully.");else z("Unable to add Data field.")}}}catch(w){z("Error while ensuring configuration list data fields.",w)}}async function L9(){let x=!1;try{if(x=(await fetch(`${q}/_api/web/lists/GetByTitle('${v}')`)).status===404,x){let y=await X(k);if(b("Creating configuration list."),(await fetch(`${q}/_api/web/lists`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":y},body:JSON.stringify({__metadata:{type:"SP.List"},BaseTemplate:100,Title:"SPFxExtensionsConfiguration",Description:"Configuration list for SPFxExtensions"})})).status===201)b("Configuration list created successfully.");else z("Unable to create configuration list.")}await P9()}catch(w){z("Error while ensuring configuration list.",w)}return x}async function P1(){let x=`${q}/_api/web/lists/GetByTitle('${v}')/items?$select=Title,Data`,y=await fetch(x,{...{headers:{Accept:"application/json;odata=verbose"}}});if(y.status!==200)return z("Unable to fetch configuration list items."),[];return(await y.json()).d.results}async function n9(){let x=await X(k);for(let w of _1(q))if((await fetch(`${q}/_api/web/lists/GetByTitle('${v}')/items`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":x},body:JSON.stringify({__metadata:{type:"SP.Data.SPFxExtensionsConfigurationListItem"},...w})})).status===201)b(`Item ${w.Title} added successfully.`);else z(`Unable to add item ${w.Title}.`)}function L1(x=!1){if(x)return P1();if(yx)return yx;return yx=m9(),yx}async function m9(){let x=await hx();if(x.length<_9){if(await L9())await n9();let y=await P1();await B1(y,240),x=await hx()}return x}async function E9(x){let w=await wx(),y=await X(),$=await fetch(`${w}/_api/web/webs/add`,{method:"POST",headers:{Accept:"application/json;odata=nometadata","Content-Type":"application/json","X-RequestDigest":y},body:JSON.stringify({parameters:{Description:"Site that stores SPFxExtensions Data and global apps",Language:1033,Title:"SPFxExtensions Data",Url:x,UseSamePermissionsAsParentSite:!0,WebTemplate:"STS"}})});if(!$.ok)throw new Error(`Failed to create SPFxExtensionsData web in ${w}`);return await $.json()}async function h9(){let x=await wx(),w=await X(),y=await fetch(`${x}/${k}/_api/web`,{method:"GET",headers:{Accept:"application/json;odata=nometadata","X-RequestDigest":w}});if(!y.ok){if(y.status===404)return{data:void 0,isError:!1,error:"",warnings:[`SPFxExtensionsData web not found in ${x}`]};return z(`Failed to fetch data from ${x}/${k}/_api/web`),{data:void 0,isError:!0,error:`Failed to fetch data from ${x}/${k}/_api/web`,warnings:[]}}return{data:await y.json(),isError:!1,error:"",warnings:[]}}async function A9(){return(await S("SPFxDataSite"))?.Data}var $x;function n1(){if($x)return $x;return $x=d9(),$x}async function d9(){let x=await A9();if(!x){let w=await h9();if(!w.isError&&!w.data){let y=await E9(k);w.data=y}return await m({Title:"SPFxDataSite",Data:w.data,date:"",expires:""},240),w.data}return x}var vx="f3ab710f-2c08-422e-a7ad-5d93eb51e7a3",Qx={accept:"application/json"},S9={"Content-Type":"application/json"};async function M9(){let w={"X-RequestDigest":await X(k)};return(await(await fetch(`${q}/_api/sitepages/pages`,{headers:{...Qx,...w,...S9},body:JSON.stringify({PageLayoutType:"SingleWebPartAppPage",PromotedState:0}),method:"POST"})).json()).Id}async function Ux(){let x=await fetch(`${q}/_api/sitepages/pages/GetByUrl('${t}')`,{headers:{...Qx},method:"GET"});if(x.status===404)return;return await x.json()}var v9=[{dataVersion:"1.4",description:"Title Region Description",id:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",instanceId:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",properties:{authorByline:[],authors:[],layoutType:"FullWidthImage",showPublishDate:!1,showTopicHeader:!1,textAlignment:"Left",title:"SPFx Extensions Configurator",topicHeader:"",enableGradientEffect:!0},reservedHeight:280,serverProcessedContent:{htmlStrings:{},searchablePlainTexts:{},imageSources:{},links:{}},title:"Title area"}],U9=[{addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:vx,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:{dataVersion:"1.0",description:"Allows you to add a custom developed app",id:qx,instanceId:vx,properties:{description:"Select an app to load from the dropdown below",selectedApp:A,SPFxExtensionAppConfiguration:void 0},title:"SPFx Extension Loader"},webPartId:qx},{controlType:0,pageSettingsSlice:{isDefaultDescription:!0,isDefaultThumbnail:!0}}],g9={CanvasContent1:`${JSON.stringify(U9)}`,LayoutWebpartsContent:`${JSON.stringify(v9)}`,Title:cx};async function m1(x){let y={"X-RequestDigest":await X(k)};await fetch(`${q}/_api/sitepages/pages(${x})/savepage`,{headers:{"Content-Type":"application/json",...Qx,...y},body:JSON.stringify(g9),method:"POST"}),await fetch(`${q}/_api/sitepages/pages(${x})/publish`,{headers:{...Qx,...y},method:"POST"})}async function f9(){let x=await M9();return await m1(x),Ux()}async function C9(){let x=await S("ConfiguratorPageData");if(x?.Data)return x.Data;let w=await Ux();if(w)await m({Title:"ConfiguratorPageData",Data:w,date:"",expires:""},480);return w}async function E1(){let x=await C9();if(!x)return f9();if(x.CanvasContent1.indexOf(vx)===-1){await m1(x.Id);let w=await Ux();return await m({Title:"ConfiguratorPageData",Data:w,date:"",expires:""},480),w}return x}async function N9(){let x=`${q}/_api/web/lists/GetByTitle('${U}')/fields`;try{let w=await fetch(x,{headers:{Accept:"application/json;odata=verbose"}});if(w.status===200){if(!(await w.json()).d.results.map((Z)=>Z.InternalName).some((Z)=>Z==="EntryPointUrl"))await o9(x,"EntryPointUrl","Full URL to the Entrypoint JS file, if * is specified all entries will be allowed.",!0)}}catch(w){z("Error while ensuring list fields.",w)}}async function o9(x,w,y,$){let Q=await X(k);if((await fetch(x,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":Q},body:JSON.stringify({__metadata:{type:"SP.Field"},Title:w,FieldTypeKind:3,Required:$,Description:y})})).status===201)b(w,"field added successfully.");else z(w,"Unable to add field.")}async function u9(){try{let x=await fetch(`${q}/_api/web/lists/GetByTitle('${U}')?$select=*`,{method:"GET",headers:{Accept:"application/json;odata=verbose"}});if(x.status===404){b("Creating app white list.");let y=await X(k),$=await fetch(`${q}/_api/web/lists`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":y},body:JSON.stringify({__metadata:{type:"SP.List"},BaseTemplate:100,Title:U,Description:"App whitelist for SPFxExtensions"})});if($.status===201)return b("App whitelist created successfully."),$.json();else{z("Unable to create app whitelist.");return}}return await N9(),x.json()}catch(x){z("Error while ensuring app whitelist.",x)}return}async function h1(){let x=await S("AppWhiteList");if(x?.Data)return x.Data;let w=await u9();if(w)await m({Title:"AppWhiteList",Data:w,date:"",expires:""},480);return w}var Zx;async function gx(){if(Zx)return Zx;return Zx=I9(),Zx}async function I9(){await n1(),await h1(),await E1(),window.__SPFxExtensions.Utils.ConfiguratorPageUrl=`${q}/${t}`}async function M(x=!1){return await gx(),L1(x)}async function A1(){return`${`${(await M()).find(($)=>$.Title==="RootCDNLocation")?.Data??`${q}`}${g}`}${F}`}async function d1(){let x=await M(),w=["spfxextensions","ff36e5d0-f7c7-421d-9e21-0a422626209a"];if(x.find((y)=>y.Title==="Version")?.Data!=="2025-05-16T13:25:19.571Z"){x=await M(!0),m({Title:"Version",Data:"2025-05-16T13:25:19.571Z",date:"",expires:""},240);let y=await caches.keys(),$=!1;for(let Q of y){let Z=await caches.open(Q),V=await Z.keys(),K=[];for(let Y of V){let j=Y.url.toLowerCase();if(w.some((P)=>j.indexOf(P)>-1))W("Deleting cache key",Y),$=!0,K.push(Z.delete(Y,{ignoreMethod:!0,ignoreSearch:!0}))}await Promise.allSettled(K)}if($)window.location.reload()}}function L4(){return C(`${Date.now()}`,13)}var T9=c9();async function c9(){try{let x=await W1(),w=await j1();if(w.length>0&&!x)return w;if(w.length>0)b("Cache mismatch, loading allowed apps data...");let y=await S1();return await J1(y,5),y}catch(x){return z("Unable to load allowed apps data...",x),[]}}async function S1(x=!1){if((await M(x)).find(($)=>$.Title==="EnableAppWhiteList")?.Data!=="true")return[{Id:1,Title:"All apps allowed",EntryPointUrl:"*",date:(/*@__PURE__*/new Date()).toISOString(),expires:(/*@__PURE__*/new Date()).toISOString()}];return t9()}async function t9(){let x=`${q}/_api/web/lists/getByTitle('${U}')/Items?$select=Id,Title,EntryPointUrl&$top=1000`;return await p9(x)}async function p9(x){let w=x,y=[];while(w){let Q=await(await fetch(w,{method:"GET",headers:{Accept:"application/json;odata=verbose"}})).json();if(Q.error)throw new Error(JSON.stringify(Q.error));y.push(...Q.d.results),w=Q.d.__next}return y}function i9(x,w){if(w.some((Q)=>Q.EntryPointUrl==="*"))return!0;let $=(x.origin+x.pathname).toLowerCase();return w.some((Q)=>{try{let Z=new URL(Q.EntryPointUrl),V=Z.origin+Z.pathname;return $===V.toLowerCase()}catch(Z){return z("Error while parsing allowed entry URL",Q.EntryPointUrl,Z),!1}})}async function M1(x,w,y=!1){if(Z1(x))return!0;let $=y?await S1(y):await T9;if(!i9(x,$))return R("File",x,`is not allowed to be executed. Please add it to whitelist @ ${q}.`),R(`If you are a developer you can enable this app by adding localStorage item ${h.SPFXEXT}${w} with a number value corresponding to development port of the localhost server.`),!1;return!0}async function v4(){if(window.moduleLoaderPromise)return(await window.moduleLoaderPromise)?.context;console.error("Unable to retrieve Modern SP Context...")}async function v1(){if(window.moduleLoaderPromise){let x=await window.moduleLoaderPromise;if(x?.context?.pageContext)return{contextType:"SPOModernContext",context:x.context.pageContext};throw"It seems this is a modern page, however it was not possible to retrieve SP Context..."}if(window._spPageContextInfo)return{contextType:"ClassicContext",context:window._spPageContextInfo};throw"It was not possible to retrieve SP Context either through modern or through classic means..."}var D=await v1();function U1(){return D.contextType==="SPOModernContext"?D.context.web.id.toString():Rx(D.context.webId)}function fx(){return(D.contextType==="SPOModernContext"?D.context.web.absoluteUrl:D.context.webAbsoluteUrl).replace(/\/$/,"")}function Vx(){return D.contextType==="SPOModernContext"?D.context.site.id.toString():Rx(D.context.siteId)}function T(){return D.contextType==="SPOModernContext"?D.context.site.absoluteUrl:D.context.siteAbsoluteUrl}function zx(){return(D.contextType==="SPOModernContext"?D.context.legacyPageContext.hubSiteId?.toString():D.context.hubSiteId)??p}function g1(){return D.contextType==="SPOModernContext"?D.context.legacyPageContext.isHubSite:D.context.isHubSite}function s9(x){if(!Array.isArray(x.enabledAppCollections))throw`${L} ${F} enabledAppCollections should be an array`;if(!Array.isArray(x.urlMap))throw`${L} ${F} urlMap should be an array`}async function Yx(x,w,y,$,Q=!1,Z=60){let V=Dx,K=x.toLowerCase();if(!Q&&!n){let H=await G1(K);if(H)return H.isHubFetch=$,H}let Y=`${K}?v=${Date.now()}`;try{W(`Fetching ${F} from`,Y);let u=await(await fetch(Y)).text();V=JSON.parse(u)}catch(H){R(`Unable to fetch ${F} from`,Y,H)}try{s9(V)}catch(H){z(`Error while parsing ${F} from`,Y,H),V=Dx}let j=await C(JSON.stringify(V)),_={manifest:V,...{name:w,url:K,type:y,hash:j}};return await D1(_,n?1:Z),_.isHubFetch=$,_}async function Bx(x,w,y,$=!1){let Q=[],Z=await A1();Q.push(Yx(Z,"apps","root",!0,$));let V=x+g;if(Q.push(Yx(`${V}${F}`,"apps","site",!1,$)),y){let H=y+g;Q.push(Yx(`${H}${F}`,"apps","site",!0,$))}let Y=`${w+g}${F}`,j=x.toLowerCase()===w.toLowerCase(),P=Y.toLowerCase()===Z.toLowerCase();if(!j&&!P)Q.push(Yx(Y,"apps","web",!1,$));return await Promise.all(Q)}function l9(x){if(Array.isArray(x)||typeof x!=="object")throw`${L} App manifest has to be an object.`;if(!x.appRelativeEntryPointUrls)throw z("Manifest does not have appRelativeEntryPointUrl property.",x),`${L} Manifest does not have appRelativeEntryPointUrl property.`;if(!x.appDefinitionMap)throw z("Manifest does not have enabledApps property.",x),`${L} Manifest does not have enabledApps property.`}async function r9(x,w,y,$,Q=!1,Z=60){let V={...kx},K=x.toLowerCase();if(!Q&&!n){let H=await H1(K);if(H)return H.isHubFetch=$,H}let Y=`${K}?v=${Date.now()}`;try{W(`Fetching ${E} from`,Y);let u=await(await fetch(Y)).text();V=JSON.parse(u)}catch(H){R(`Unable to fetch ${E} from`,Y,H)}try{l9(V)}catch(H){z(`Error while parsing ${E} from`,Y,H),V={...kx}}let j=await C(JSON.stringify(V)),_={manifest:V,...{name:w,url:K,type:y,hash:j}};return await k1(_,n?1:Z),_.isHubFetch=$,_}function a9(x,w){let y=`${x}${w}/${E}`,$=`${h.SPFXEXT}${w}`,Q=Number(localStorage.getItem($));if(Q>0){let Z=`https://localhost:${Q}/${E}`;return b(`<${w}> App is in debug mode, loading from`,Z),Z}return y}function Cx(x,w=!1){if(x.length===0)return[];let y=[];for(let $ of x){let Q=$.url.toLowerCase().replace(F.toLowerCase(),"");for(let Z of $.manifest.enabledAppCollections){let V=a9(Q,Z);y.push(r9(V,Z,$.type,$.isHubFetch??!1,w))}}return y}function jx(x,w=!1){let y=x.filter((j)=>j.type==="root"),$=Cx(y,w),Q=x.filter((j)=>j.type==="site"),Z=Cx(Q,w),V=x.filter((j)=>j.type==="web"),K=Cx(V,w);return[...$,...Z,...K]}var ox=!1,Kx=[];async function e9(x,w,y){if(!y.isESM){let $=y.appDefinitionMap.find((Z)=>Z.appId===w);if(!$){let Z=`Could not find app configuration item for non-ESM app ${w}`;return z(Z),[]}if(!f1($))return b(`App ${w} is not enabled in current context. Skipping...`),[];try{R("Non-ESM module detected. Make sure to call window.__SPFxExtensions.RegisterApp and window.__SPFxExtensions.InstantiateApp in code.",x),await import(x)}catch(Z){let V=`Error while importing or executing ${x} ${Z}`;return z(V),[]}return[]}else try{let Q=(await import(x)).default;if(!Q)return z(`No default export found in ${x}, only ESM modules are supported.`),[];return yw(Q,y,x)}catch($){return z("Error while importing or executing",x,$),[]}}async function Nx(x){let w=[],y=x.url.replace(E,"");W("Parsing",x.type,"manifest:",x.manifest);for(let $ of x.manifest.appRelativeEntryPointUrls){let Q=$.replace(/\.\.\/?/g,"./").replace(/^\.\//,""),Z=`${y}${Q}`.toLowerCase();W("EntryPoint JS: ",Z);let V=new URL(Z);if(x.manifest.cacheString&&x.manifest.enableCaching){let _=V1(x.name)?`${(/*@__PURE__*/new Date()).getTime()}`:x.manifest.cacheString;V.searchParams.set("v",`${_}`)}if(!await M1(V,x.name))continue;let Y=`${V.origin}${V.pathname}`,j=`${V}`;if(Kx.includes(Y)){b("EntryPoint already loaded:",j);continue}Kx.push(Y),w.push(e9(j,$,x.manifest))}return w}async function ux(x,w,y,$,Q=!1){if(Q)xw($);if(ox)return;ox=!0;let Z=await Bx(x,w,y),V=jx(Z);window.__SPFxExtensions.Utils.appManifestPromises=V,window.__SPFxExtensions.Utils.spAppInitializationPromiseResolver();let Y=(await Promise.allSettled(V)).filter((G)=>G.status==="fulfilled"),j=[],P=Y.filter((G)=>G.value.type==="root"),_=Y.filter((G)=>G.value.type==="site"),H=Y.filter((G)=>G.value.type==="web");for(let G of P){let I=await Nx(G.value);j.push(...I)}W("Root apps loaded.");for(let G of _){let I=await Nx(G.value);j.push(...I)}W("Site apps loaded.");for(let G of H){let I=await Nx(G.value);j.push(...I)}W("SiteWeb apps loaded.");let u=(await Promise.allSettled(j)).filter((G)=>G.status==="fulfilled").flatMap((G)=>G.value);await ww(u),window.__SPFxExtensions.AllAppAssetsLoadedResolver(),b("SPFx Extensions Core Components Loaded.")}function xw(x){ox=!1,Kx.splice(0,Kx.length),px(x);let{promise:w,resolve:y}=Promise.withResolvers();window.__SPFxExtensions.AllAppAssetsLoadedPromise=w,window.__SPFxExtensions.AllAppAssetsLoadedResolver=y}async function ww(x){let w=[];for(let y of window.__SPFxExtensions.Apps)if(!x.find((Q)=>Q.id===y.id)&&y.id!==A)w.push(y.id);for(let y of w){let $=await window.__SPFxExtensions.UnregisterApp(y);if($)R(`Unregistered App ${$.id} (${$.name}) as it does not belong in this context`)}}async function yw(x,w,y){if(!Array.isArray(x))z("Default export of entry point should be an array of App definitions. TODO: add documentation url",y);let $=[];for(let Q of x){if(!Q.id){z("App definition does not have an id. Make sure that returned array is in proper format. TODO: add documentation url",y,Q);continue}let Z=w.appDefinitionMap.find((j)=>j.appId.toLowerCase()===Q.id.toLowerCase()),V=`App with id ${Q.id} (${Q.name}) is not enabled for current web. Skipping...`;if(!Z){b(V);continue}if(!f1(Z)){b(V);continue}let Y=await window.__SPFxExtensions.RegisterApp(Q);if($.push(Q),!Q.isWebPartApp&&Q.autoExecute){if(Y.instances.length<(Q.maxInstances??1/0))window.__SPFxExtensions.InstantiateApp(Q.id,{})}}return $}function f1(x){let w=U1().toLowerCase(),y=Vx().toLowerCase(),$=zx().toLowerCase(),Q=x.config.enabledEverywhere,Z=x.config.excludedIds.indexOf(w)===-1&&x.config.excludedIds.indexOf(y)===-1&&x.config.excludedHubIds.indexOf($)===-1,V=x.config.includedIds.indexOf(w)!==-1||x.config.includedIds.indexOf(y)!==-1||x.config.includedHubIds.indexOf($)!==-1;return Q?Z:V}var C1=!1;function o1(){if(window.moduleLoaderPromise&&!C1)C1=!0,window.moduleLoaderPromise.then((x)=>{let w=x.context.pageContext.initialize;x.context.pageContext.initialize=function(y,$){let Q=x.context.pageContext._initializationData;w.call(this,y,$);let Z={initializationData:y,legacyContext:$};if(Q.web.id===y.web.id){N1("contextRefresh",Z);return}N1("contextChange",Z)}})}function N1(x,w){let y=new CustomEvent(x,{detail:w});window.dispatchEvent(y),window.__SPFxExtensions.Apps.forEach(($)=>{$.instances.forEach((Q)=>{Q.executeListeners(x,w)})})}function u1(){if(!window.__SPFxExtensions.AppEventListeners)window.__SPFxExtensions.AppEventListeners=[];if(!window.__SPFxExtensions.AddAppEventListener)window.__SPFxExtensions.AddAppEventListener=(x,w)=>{let y={key:window.crypto.randomUUID(),eventName:x,handler:w};return window.__SPFxExtensions.AppEventListeners.push(y),y};if(!window.__SPFxExtensions.RemoveAppEventListener)window.__SPFxExtensions.RemoveAppEventListener=(x)=>{let w=window.__SPFxExtensions.AppEventListeners.findIndex((y)=>y.key===x.key);if(w>-1)window.__SPFxExtensions.AppEventListeners.splice(w,1)}}var $w=window.history.pushState,Qw=window.history.replaceState,Zw=window.history.back,Vw=window.history.forward,zw=window.history.go;function Yw(){let x=window.history.state,w=window.location.href;return{currentState:x,previousUrl:w}}function c(x,w){let y={...Yw(),...w},$=new CustomEvent(x,{detail:y});window.dispatchEvent($)}function Bw(){function x(w,y,$){$w.call(this,w,y,$),c("historyPush",{newState:w,newUrl:$})}window.history.pushState=x}function jw(){function x(w,y,$){Qw.call(this,w,y,$),c("historyReplace",{newState:w,newUrl:$})}window.history.replaceState=x}function Kw(){function x(){Zw.call(this),c("historyBack",{})}window.history.back=x}function bw(){function x(){Vw.call(this),c("historyForward",{})}window.history.forward=x}function Jw(){function x(w){zw.call(this,w),c("historyGo",{delta:w})}window.history.go=x}var I1=!1;function T1(){if(I1)return;I1=!0,jw(),Bw(),bw(),Kw(),Jw()}async function Ix(){if(g1())return"";let x=zx(),w=Vx();if(!x||x===p||x===w)return"";await q1();let y=await K1(x);if(!y){let $=T();b("Getting Hub data for HubSiteId:",x);try{let Z=await(await fetch(`${$}/_api/hubsites/GetById?hubSiteId='${x}'`,{headers:{accept:"application/json;odata=nometadata"}})).json();return await b1(Z),Z.SiteUrl}catch(Q){return z("Error fetching hub site data.",Q),""}}return y.SiteUrl}var c1="CORE_MANIFEST_CHECK",p1=Number(localStorage.getItem(h.SPFXEXT_CORE))>0?1e5:60000,bx=0;function Tx(x,w,y,$=!1){if($)window.clearInterval(bx),bx=0;if(bx>0)return;bx=window.setInterval(t1,p1,x,w,y),t1(x,w,y)}async function t1(x,w,y){try{let Q=localStorage.getItem(c1);if(Q){let K=new Date(Q),j=(/*@__PURE__*/new Date()).getTime()-K.getTime(),P=p1-2000;if(j<P){W("Manifest check already performed recently, skipping.",`${j} < ${P}`);return}}b("Checking for manifest updates across all locations..."),await Promise.all([e(),a()]);let Z=await Bx(x,w,y,!0),V=jx(Z,!0);await Promise.allSettled(V)}catch(Q){z("Error checking for manifest updates",Q)}let $=(/*@__PURE__*/new Date()).toISOString();W("Setting next manifest check to",$),localStorage.setItem(c1,$)}var Jx;async function Ww(){if(Jx)return Jx;return Jx=qw(),Jx}async function qw(){if(await gx(),(await M()).find((Q)=>Q.Title==="InterceptHistory")?.Data==="true")T1();o1(),u1(),ix(),sx();let{promise:y,resolve:$}=Promise.withResolvers();if(!window.__SPFxExtensions.AllAppAssetsLoadedPromise)window.__SPFxExtensions.AllAppAssetsLoadedPromise=y,window.__SPFxExtensions.AllAppAssetsLoadedResolver=$}async function i1(){await d1(),await Ww(),window.__SPFxExtensions.__CorePromiseResolver?.();let x=T(),w=fx(),y=await Ix();await ux(x,w,y,s()),window.addEventListener("contextChange",async()=>{b("Context changed, reloading apps...");let $=T(),Q=fx(),Z=await Ix(),V=tx();await ux($,Q,Z,V,!0),Tx($,Q,Z,!0)}),Tx(x,w,y),b("SPFx Extensions Core Has Been initialized.")}var Hw={id:A,description:"Allows configuring custom apps",isWebPartApp:!1,hideAppSelectorWhenAppLoaded:!0,hideConfiguratorButton:!0,name:"SPFx Extensions Configurator",async onInstanceRequested(x){let w=import.meta.url.indexOf("localhost")>-1;if(w)W("Core is in debug mode");let y=w?import.meta.resolve(`./__spfxCoreConfigurator.js?v=${Date.now()}`):window.__SPFxExtensions.__ConfiguratorUrl;try{return(await import(y)).launch(x)}catch($){if(z("Error launching configurator app",$),x.domElement)x.domElement.innerHTML=`<div style="text-align: center; padding: 20px; color: red;">Error launching configurator app. ${$}</div>`;return()=>{}}}};async function kw(){b("Initializing Core Services Built:","2025-05-16T13:25:19.571Z"),await i1();try{await window.__SPFxExtensions.RegisterApp(Hw)}catch(w){z("Error registering configurator app",w)}}kw();
|
|
1
|
+
var l1=Object.create;var{getPrototypeOf:r1,defineProperty:qx,getOwnPropertyNames:a1}=Object;var e1=Object.prototype.hasOwnProperty;var Gw=(x,w,y)=>{y=x!=null?l1(r1(x)):{};let $=w||!x||!x.__esModule?qx(y,"default",{value:x,enumerable:!0}):y;for(let Q of a1(x))if(!e1.call($,Q))qx($,Q,{get:()=>x[Q],enumerable:!0});return $};var Ow=(x,w)=>()=>(w||x((w={exports:{}}).exports,w),w.exports);var Rw=(x,w)=>{for(var y in w)qx(x,y,{get:w[y],enumerable:!0,configurable:!0,set:($)=>w[y]=()=>$})};var Fw=(x,w)=>()=>(x&&(w=x(x=0)),w);var Hx="d6ca1fc2-0591-4c6d-8a25-cae3262c017b",d="45e75137-13c5-4bb2-a2b3-8ab6382682ee",tx="SPFxExtensionsConfigurator",t="SitePages/SPFxExtensionsConfigurator.aspx",L="manifest.txt",F="collectionconfig.txt",kx="Loading...",M="SPFxExtensionsConfiguration",U="SPFxExtensionsWhiteList",_w="SPFxExtensions",f="/SPFxExtensions/",k="SPFxExtensionsData",n="[SPFxExtensionCore]",Dx={appDefinitionMap:[],appRelativeEntryPointUrls:[],isESM:!0},Pw={enabledEverywhere:!1,excludedHubIds:[],excludedIds:[],includedHubIds:[],includedIds:[]},Gx={enabledAppCollections:[],urlMap:[]},p="00000000-0000-0000-0000-000000000000";function B(x,w,y=x){return($)=>{let Q=""+$,Z=Q.indexOf(w,x.length);return~Z?x+x9(Q,w,y,Z)+w:x+Q+w}}function x9(x,w,y,$){let Q="",Z=0;do Q+=x.substring(Z,$)+y,Z=$+w.length,$=x.indexOf(w,Z);while(~$);return Q+x.substring(Z)}var nw=B("\x1B[0m","\x1B[0m"),mw=B("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),Ew=B("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),hw=B("\x1B[3m","\x1B[23m"),dw=B("\x1B[4m","\x1B[24m"),Aw=B("\x1B[7m","\x1B[27m"),Sw=B("\x1B[8m","\x1B[28m"),vw=B("\x1B[9m","\x1B[29m"),Mw=B("\x1B[30m","\x1B[39m"),Uw=B("\x1B[31m","\x1B[39m"),fw=B("\x1B[32m","\x1B[39m"),gw=B("\x1B[33m","\x1B[39m"),Cw=B("\x1B[34m","\x1B[39m"),Nw=B("\x1B[35m","\x1B[39m"),ow=B("\x1B[36m","\x1B[39m"),uw=B("\x1B[37m","\x1B[39m"),Iw=B("\x1B[90m","\x1B[39m"),Tw=B("\x1B[40m","\x1B[49m"),cw=B("\x1B[41m","\x1B[49m"),tw=B("\x1B[42m","\x1B[49m"),pw=B("\x1B[43m","\x1B[49m"),iw=B("\x1B[44m","\x1B[49m"),sw=B("\x1B[45m","\x1B[49m"),lw=B("\x1B[46m","\x1B[49m"),rw=B("\x1B[47m","\x1B[49m"),aw=B("\x1B[90m","\x1B[39m"),ew=B("\x1B[91m","\x1B[39m"),i=B("\x1B[92m","\x1B[39m"),x0=B("\x1B[93m","\x1B[39m"),w0=B("\x1B[94m","\x1B[39m"),y0=B("\x1B[95m","\x1B[39m"),$0=B("\x1B[96m","\x1B[39m"),Q0=B("\x1B[97m","\x1B[39m"),Z0=B("\x1B[100m","\x1B[49m"),V0=B("\x1B[101m","\x1B[49m"),z0=B("\x1B[102m","\x1B[49m"),Y0=B("\x1B[103m","\x1B[49m"),B0=B("\x1B[104m","\x1B[49m"),j0=B("\x1B[105m","\x1B[49m"),K0=B("\x1B[106m","\x1B[49m"),b0=B("\x1B[107m","\x1B[49m");function z(...x){console.error(i(n),(/*@__PURE__*/new Date()).toISOString(),...x)}function R(...x){console.warn(i(n),(/*@__PURE__*/new Date()).toISOString(),...x)}function b(...x){console.info(i(n),(/*@__PURE__*/new Date()).toISOString(),...x)}function W(...x){}function Ox(x,w,y){z("Error while executing onInstanceRequested for app",x.id,"with name",x.name,y?`Additional Data: ${y}`:"",w)}function g(){return R("The app instance event was called before app instance was initialized."),()=>{}}var Rx=window.crypto.randomUUID();function s(){return Rx}function px(){return Rx=window.crypto.randomUUID(),Rx}function Fx(x){return x.replace("{","").replace("}","")}function D0(x){return JSON.parse(JSON.stringify(x))}function w9(x,w,y){let $=x.instances.findIndex((Q)=>Q.key===w);if($>-1){let Q=x.instances.splice($,1);if(Q.length<1)return;let Z=Q[0];Z.executeListeners("onConfigurationClose",void 0),Z.allEventListeners.splice(0,Z.allEventListeners.length),y?.()}}async function ix(x){let w=window.__SPFxExtensions.Apps.filter((y)=>!y.isWebPartApp&&!y.keepOnContextChange&&y.id!==d);for(let y of w)for(let $ of y.instances.filter((Q)=>Q.contextId!==x))if($.instanceExecuted)$.unmount()}function l(x,w){if(w.instanceRequested)return;try{w.instanceRequested=!0,x.onInstanceRequested(w).then((y)=>{w.unmount=()=>{w9(x,w.key,y)},w.instanceLoadPromiseResolver(),w.instanceExecuted=!0}).catch((y)=>{Ox(x,y)})}catch(y){Ox(x,y)}}function y9(x){W("Executing appAdded event for",x.id),window.__SPFxExtensions.AppEventListeners.filter((w)=>w.eventName==="appAdded").forEach((w)=>{try{w.handler(x)}catch(y){z("Error executing appAdded event",y)}})}function Xx(x){let w=window.__SPFxExtensions.Apps.find((y)=>y.id===x);if(!w)W("Registering new app",x),w={id:x,name:kx,description:kx,isWebPartApp:!1,unmountOnRender:!0,keepOnContextChange:!1,autoExecute:!1,maxInstances:1/0,hideAppSelectorWhenAppLoaded:!1,hideConfiguratorButton:!1,registrationCompleted:!1,instances:[],async onInstanceRequested(){return g}},window.__SPFxExtensions.Apps.push(w);return w}function sx(){if(!window.__SPFxExtensions.Apps)window.__SPFxExtensions.Apps=[];if(!window.__SPFxExtensions.RegisterApp)window.__SPFxExtensions.RegisterApp=async(x)=>{let w=Xx(x.id);if(w.registrationCompleted)return w;return w.name=x.name,w.description=x.description,w.isWebPartApp=x.isWebPartApp,w.keepOnContextChange=x.keepOnContextChange??!1,w.autoExecute=x.autoExecute??!1,w.unmountOnRender=x.unmountOnRender??!0,w.maxInstances=x.maxInstances??1/0,w.hideAppSelectorWhenAppLoaded=x.hideAppSelectorWhenAppLoaded??!1,w.hideConfiguratorButton=x.hideConfiguratorButton??!1,w.icon=x.icon,w.onInstanceRequested=x.onInstanceRequested,w.registrationCompleted=!0,y9(w),w.instances.forEach((y)=>{l(w,y)}),w};if(!window.__SPFxExtensions.UnregisterApp)window.__SPFxExtensions.UnregisterApp=async(x)=>{let w=window.__SPFxExtensions.Apps.findIndex(($)=>$.id===x);if(w<0)return;let y=window.__SPFxExtensions.Apps.splice(w,1);if(y.length<1)return;return W("Unregistering app",y[0].id,y[0].name),y[0].instances.forEach(($)=>{if($.instanceExecuted)$.unmount()}),y[0]}}function $9(x){let w=(Q)=>{let Z=x.allEventListeners.findIndex((V)=>V.key===Q.key);if(Z>-1)W("Removing event listener",Q),x.allEventListeners.splice(Z,1)},y=(Q,Z)=>{let V={key:window.crypto.randomUUID(),eventName:Q,handler:Z};return x.allEventListeners.push(V),()=>{w(V)}},$=(Q,Z)=>{for(let V of x.allEventListeners){if(V.eventName!=Q)continue;if(V.handler)V.handler(Z)}};x.addEventListener=y,x.executeListeners=$}function Q9(x,w){W("Executing instanceAdded event for app",x.id,"instance",w.key),window.__SPFxExtensions.AppEventListeners.filter((y)=>y.eventName==="instanceAdded").forEach((y)=>{try{y.handler({app:x,instance:w})}catch($){z("Error executing instanceAdded event",$)}})}function Z9(x){let{promise:w,resolve:y}=Promise.withResolvers(),$={...x,key:window.crypto.randomUUID(),contextId:s(),instanceRequested:!1,instanceExecuted:!1,unmountOnRender:!0,unmount:g,allEventListeners:[],addEventListener:g,executeListeners:g,instanceLoadPromise:w,instanceLoadPromiseResolver:y};return $9($),$}function lx(){if(!window.__SPFxExtensions.InstantiateApp)window.__SPFxExtensions.InstantiateApp=async(x,w)=>{let y=Xx(x);W("Creating app instance for app",x);let $=Z9(w);if($.unmountOnRender=y.unmountOnRender??!0,y.instances.push($),Q9(y,$),y.registrationCompleted)l(y,$);return $}}async function C(x,w=0){let $=(/*@__PURE__*/new TextEncoder()).encode(x),Q=await window.crypto.subtle.digest("SHA-1",$),V=Array.from(new Uint8Array(Q)).map((K)=>K.toString(16).padStart(2,"0")).join("");return w>0?V.substring(0,w):V}var Lx=(x,w)=>w.some((y)=>x instanceof y),rx,ax;function V9(){return rx||(rx=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function z9(){return ax||(ax=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var nx=/*@__PURE__*/new WeakMap,_x=/*@__PURE__*/new WeakMap,r=/*@__PURE__*/new WeakMap;function Y9(x){let w=new Promise((y,$)=>{let Q=()=>{x.removeEventListener("success",Z),x.removeEventListener("error",V)},Z=()=>{y(A(x.result)),Q()},V=()=>{$(x.error),Q()};x.addEventListener("success",Z),x.addEventListener("error",V)});return r.set(w,x),w}function B9(x){if(nx.has(x))return;let w=new Promise((y,$)=>{let Q=()=>{x.removeEventListener("complete",Z),x.removeEventListener("error",V),x.removeEventListener("abort",V)},Z=()=>{y(),Q()},V=()=>{$(x.error||new DOMException("AbortError","AbortError")),Q()};x.addEventListener("complete",Z),x.addEventListener("error",V),x.addEventListener("abort",V)});nx.set(x,w)}var mx={get(x,w,y){if(x instanceof IDBTransaction){if(w==="done")return nx.get(x);if(w==="store")return y.objectStoreNames[1]?void 0:y.objectStore(y.objectStoreNames[0])}return A(x[w])},set(x,w,y){return x[w]=y,!0},has(x,w){if(x instanceof IDBTransaction&&(w==="done"||w==="store"))return!0;return w in x}};function y1(x){mx=x(mx)}function j9(x){if(z9().includes(x))return function(...w){return x.apply(Ex(this),w),A(this.request)};return function(...w){return A(x.apply(Ex(this),w))}}function K9(x){if(typeof x==="function")return j9(x);if(x instanceof IDBTransaction)B9(x);if(Lx(x,V9()))return new Proxy(x,mx);return x}function A(x){if(x instanceof IDBRequest)return Y9(x);if(_x.has(x))return _x.get(x);let w=K9(x);if(w!==x)_x.set(x,w),r.set(w,x);return w}var Ex=(x)=>r.get(x);function $1(x,w,{blocked:y,upgrade:$,blocking:Q,terminated:Z}={}){let V=indexedDB.open(x,w),K=A(V);if($)V.addEventListener("upgradeneeded",(Y)=>{$(A(V.result),Y.oldVersion,Y.newVersion,A(V.transaction),Y)});if(y)V.addEventListener("blocked",(Y)=>y(Y.oldVersion,Y.newVersion,Y));return K.then((Y)=>{if(Z)Y.addEventListener("close",()=>Z());if(Q)Y.addEventListener("versionchange",(j)=>Q(j.oldVersion,j.newVersion,j))}).catch(()=>{}),K}function Q1(x,{blocked:w}={}){let y=indexedDB.deleteDatabase(x);if(w)y.addEventListener("blocked",($)=>w($.oldVersion,$));return A(y).then(()=>{return})}var b9=["get","getKey","getAll","getAllKeys","count"],J9=["put","add","delete","clear"],Px=/*@__PURE__*/new Map;function ex(x,w){if(!(x instanceof IDBDatabase&&!(w in x)&&typeof w==="string"))return;if(Px.get(w))return Px.get(w);let y=w.replace(/FromIndex$/,""),$=w!==y,Q=J9.includes(y);if(!(y in($?IDBIndex:IDBObjectStore).prototype)||!(Q||b9.includes(y)))return;let Z=async function(V,...K){let Y=this.transaction(V,Q?"readwrite":"readonly"),j=Y.store;if($)j=j.index(K.shift());return(await Promise.all([j[y](...K),Q&&Y.done]))[0]};return Px.set(w,Z),Z}y1((x)=>({...x,get:(w,y,$)=>ex(w,y)||x.get(w,y,$),has:(w,y)=>!!ex(w,y)||x.has(w,y)}));var W9=["continue","continuePrimaryKey","advance"],x1={},hx=/*@__PURE__*/new WeakMap,Z1=/*@__PURE__*/new WeakMap,q9={get(x,w){if(!W9.includes(w))return x[w];let y=x1[w];if(!y)y=x1[w]=function(...$){hx.set(this,Z1.get(this)[w](...$))};return y}};async function*H9(...x){let w=this;if(!(w instanceof IDBCursor))w=await w.openCursor(...x);if(!w)return;w=w;let y=new Proxy(w,q9);Z1.set(y,w),r.set(y,Ex(w));while(w)yield y,w=await(hx.get(y)||w.continue()),hx.delete(y)}function w1(x,w){return w===Symbol.asyncIterator&&Lx(x,[IDBIndex,IDBObjectStore,IDBCursor])||w==="iterate"&&Lx(x,[IDBIndex,IDBObjectStore])}y1((x)=>({...x,get(w,y,$){if(w1(w,y))return H9;return x.get(w,y,$)},has(w,y){return w1(w,y)||x.has(w,y)}}));var h={SPFXEXT:"SPFXEXT_",SPFXEXT_CORE:"SPFXEXT"};function k9(){return Object.keys(localStorage).some((x)=>x.indexOf(h.SPFXEXT)>-1&&Number(localStorage[x])>0)}function V1(x){return x.hostname.toLowerCase()==="localhost"}function z1(x){return Number(localStorage.getItem(`${h.SPFXEXT}${x}`))>0}var m=k9();var J={AppFolderManifestCache:"AppFolderManifestCache",AppCollectionManifestCache:"AppCollectionManifestCache",AllowedApps:"AllowedApps",HubSiteData:"HubSiteData",SPFxExtensionConfig:"SPFxExtensionConfig"},Y1=`${h.SPFXEXT}COREDB`,B1=$1(Y1,1,{blocking(x,w,y){O.close(),alert("A new version of this page is ready. Please reload the page.")},async upgrade(x,w,y,$,Q){if(w===0)x.createObjectStore(J.AppFolderManifestCache,{keyPath:"url"}),x.createObjectStore(J.AppCollectionManifestCache,{keyPath:"url"}),x.createObjectStore(J.AllowedApps,{keyPath:"Id"}),x.createObjectStore(J.HubSiteData,{keyPath:"SiteId"}),x.createObjectStore(J.SPFxExtensionConfig,{keyPath:"Title"})}});B1.catch((x)=>{throw z("Error opening database for Core, please contact your administrator."),Q1(Y1).then(()=>{window.location.reload()}),x});var O=await B1;function N(x){let w=/*@__PURE__*/new Date;return w.setMinutes(w.getMinutes()+x),{expires:w.toISOString()}}async function o(x,w){let y=await O.getAll(x),$=/*@__PURE__*/new Date,Q=y.filter((V)=>{let K=new Date(V.expires);return $>=K}),Z=Q.length;if(Z>0){let V=O.transaction(x,"readwrite"),K=V.objectStore(x);Q.forEach((Y)=>K.delete(Y[w])),await V.done,R(`Evicted ${Z} items from ${x} cache.`)}return Z}async function dx(){return await o(J.SPFxExtensionConfig,"Title"),O.getAll(J.SPFxExtensionConfig)}async function S(x){return await o(J.SPFxExtensionConfig,"Title"),O.get(J.SPFxExtensionConfig,x)}async function E(x,w=60){await O.put(J.SPFxExtensionConfig,{...x,...N(w)})}function j1(x,w){let y=O.transaction(J.SPFxExtensionConfig,"readwrite"),$=y.objectStore(J.SPFxExtensionConfig);return x.forEach((Q)=>$.put({...Q,...N(w)})),y.done}async function K1(){return O.getAll(J.AllowedApps)}async function Ax(x){return O.get(J.AppFolderManifestCache,x)}async function Sx(x){return O.get(J.AppCollectionManifestCache,x)}async function b1(x){return O.get(J.HubSiteData,x)}async function J1(x,w=60){await O.put(J.HubSiteData,{...x,...N(w)})}async function D9(x,w=60){await O.put(J.AppCollectionManifestCache,{...x,...N(w)})}async function G9(x,w=60){await O.put(J.AppFolderManifestCache,{...x,...N(w)})}async function W1(x,w=5){let y=N(w),$=O.transaction(J.AllowedApps,"readwrite"),Q=$.objectStore(J.AllowedApps);return x.forEach((Z)=>Q.put({...y,...Z})),$.done}function O9(x){return O.delete(J.AppCollectionManifestCache,x)}function R9(x){return O.delete(J.AppFolderManifestCache,x)}async function F9(){return o(J.AppCollectionManifestCache,"url")}async function X9(){return o(J.AppFolderManifestCache,"url")}async function q1(){return o(J.AllowedApps,"Id")}async function H1(){return o(J.HubSiteData,"SiteId")}async function a(x){if(x){let w=await Ax(x.url);if(w){if(w.hash!==x.hash){await R9(x.url);let y=x.url.toLowerCase().replace(`/${L}`,"");await xx([y],!1),R(`Evicted ${L} ${w.url} from cache. Because of hash mismatch.`)}}}return X9()}async function e(x){if(x){let w=await Sx(x.url);if(w){if(w.hash!==x.hash)await O9(x.url),await xx([x.url],!1),R(`Evicted ${F} ${w.url} from cache. Because of hash mismatch.`)}}return F9()}async function k1(x){if(await a(),m)return;return Ax(x)}async function D1(x,w){await a(x);let y=await Ax(x.url);if(y&&y.hash===x.hash&&!m)return;await G9(x,w)}async function G1(x,w){await e(x);let y=await Sx(x.url);if(y&&y.hash===x.hash&&!m)return;await D9(x,w)}async function O1(x){if(await e(),m)return;return Sx(x)}var vx=/*@__PURE__*/new Map;async function R1(x,w=!1){let y="";if(vx.has(x)&&!w)y=vx.get(x)||"";if(y)return y;let $=await fetch(`${x}/_api/contextinfo`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json"}});if($.status===200){let Z=(await $.json()).d.GetContextWebInformation.FormDigestValue;return vx.set(x,Z),Z}else z("Error while getting digest",$.status);return""}var Mx=(x)=>{},wx;async function yx(x=""){if(wx)return wx;wx=new Promise((w)=>{Mx=w});try{let $=(await(await fetch(`${x}/_api/SP_TenantSettings_Current`,{headers:{Accept:"application/json;odata=verbose"}})).json()).d.CorporateCatalogUrl;Mx($)}catch(w){z("Error while getting app catalog url. Trying default /sites/appcatalog",w);let y=`${window.location.origin}/sites/appcatalog`;Mx(y)}return wx}async function F1(x=""){let w=await S("AppCatalogUrl");if(w?.Data)return w.Data;let y=await yx(x);return await E({Title:"AppCatalogUrl",Data:y,date:"",expires:""},240),y}async function X(x=""){let y=`${await F1()}${x?`/${x}`:""}`;return R1(y)}var _9=await F1(),q=`${_9}/${k}`;var _1={Status:"Status",RootCDNLocation:"RootCDNLocation",InterceptHistory:"InterceptHistory",EnableAppWhiteList:"EnableAppWhiteList",AppCatalogUrl:"AppCatalogUrl",SPFxDataSite:"SPFxDataSite",ConfiguratorPageData:"ConfiguratorPageData",AppWhiteList:"AppWhiteList",Version:"2025-07-01T17:39:47.631Z"},X1=[{Title:"Status",Data:"Installed"},{Title:"InterceptHistory",Data:"true"},{Title:"EnableAppWhiteList",Data:"false"},{Title:"RootCDNLocation",Data:`/sites/appcatalog/${k}`}];function P1(x){let w=X1.find((y)=>y.Title==="RootCDNLocation");if(w)w.Data=x;return X1}var P9=Object.keys(_1).length,$x;async function L9(){let x=`${q}/_api/web/lists/GetByTitle('${M}')/fields`;try{let w=await fetch(x,{headers:{Accept:"application/json;odata=verbose"}});if(w.status===200){let $=(await w.json()).d.results,Q=$.map((V)=>V.InternalName),Z=$.find((V)=>V.InternalName==="Title");if(!Z){z("Title field not found.");return}if(!Z.EnforceUniqueValues){let V=await X(k);if((await fetch(`${q}/_api/web/lists/GetByTitle('${M}')/fields('${Z.Id}')`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":V,"X-HTTP-Method":"MERGE","If-Match":"*"},body:JSON.stringify({__metadata:{type:"SP.Field"},Indexed:!0,EnforceUniqueValues:!0})})).status===204)b("Title field updated successfully.");else z("Unable to update Title field.")}if(!Q.includes("Data")){let V=await X(k);if((await fetch(x,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":V},body:JSON.stringify({__metadata:{type:"SP.Field"},Title:"Data",FieldTypeKind:2,Required:!0})})).status===201)b("Data field added successfully.");else z("Unable to add Data field.")}}}catch(w){z("Error while ensuring configuration list data fields.",w)}}async function n9(){let x=!1;try{if(x=(await fetch(`${q}/_api/web/lists/GetByTitle('${M}')`)).status===404,x){let y=await X(k);if(b("Creating configuration list."),(await fetch(`${q}/_api/web/lists`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":y},body:JSON.stringify({__metadata:{type:"SP.List"},BaseTemplate:100,Title:"SPFxExtensionsConfiguration",Description:"Configuration list for SPFxExtensions"})})).status===201)b("Configuration list created successfully.");else z("Unable to create configuration list.")}await L9()}catch(w){z("Error while ensuring configuration list.",w)}return x}async function L1(){let x=`${q}/_api/web/lists/GetByTitle('${M}')/items?$select=Title,Data`,y=await fetch(x,{...{headers:{Accept:"application/json;odata=verbose"}}});if(y.status!==200)return z("Unable to fetch configuration list items."),[];return(await y.json()).d.results}async function m9(){let x=await X(k);for(let w of P1(q))if((await fetch(`${q}/_api/web/lists/GetByTitle('${M}')/items`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":x},body:JSON.stringify({__metadata:{type:"SP.Data.SPFxExtensionsConfigurationListItem"},...w})})).status===201)b(`Item ${w.Title} added successfully.`);else z(`Unable to add item ${w.Title}.`)}function n1(x=!1){if(x)return L1();if($x)return $x;return $x=E9(),$x}async function E9(){let x=await dx();if(x.length<P9){if(await n9())await m9();let y=await L1();await j1(y,240),x=await dx()}return x}async function h9(x){let w=await yx(),y=await X(),$=await fetch(`${w}/_api/web/webs/add`,{method:"POST",headers:{Accept:"application/json;odata=nometadata","Content-Type":"application/json","X-RequestDigest":y},body:JSON.stringify({parameters:{Description:"Site that stores SPFxExtensions Data and global apps",Language:1033,Title:"SPFxExtensions Data",Url:x,UseSamePermissionsAsParentSite:!0,WebTemplate:"STS"}})});if(!$.ok)throw new Error(`Failed to create SPFxExtensionsData web in ${w}`);return await $.json()}async function d9(){let x=await yx(),w=await X(),y=await fetch(`${x}/${k}/_api/web`,{method:"GET",headers:{Accept:"application/json;odata=nometadata","X-RequestDigest":w}});if(!y.ok){if(y.status===404)return{data:void 0,isError:!1,error:"",warnings:[`SPFxExtensionsData web not found in ${x}`]};return z(`Failed to fetch data from ${x}/${k}/_api/web`),{data:void 0,isError:!0,error:`Failed to fetch data from ${x}/${k}/_api/web`,warnings:[]}}return{data:await y.json(),isError:!1,error:"",warnings:[]}}async function A9(){return(await S("SPFxDataSite"))?.Data}var Qx;function m1(){if(Qx)return Qx;return Qx=S9(),Qx}async function S9(){let x=await A9();if(!x){let w=await d9();if(!w.isError&&!w.data){let y=await h9(k);w.data=y}return await E({Title:"SPFxDataSite",Data:w.data,date:"",expires:""},240),w.data}return x}var Ux="f3ab710f-2c08-422e-a7ad-5d93eb51e7a3",Zx={accept:"application/json"},v9={"Content-Type":"application/json"};async function M9(){let w={"X-RequestDigest":await X(k)};return(await(await fetch(`${q}/_api/sitepages/pages`,{headers:{...Zx,...w,...v9},body:JSON.stringify({PageLayoutType:"SingleWebPartAppPage",PromotedState:0}),method:"POST"})).json()).Id}async function fx(){let x=await fetch(`${q}/_api/sitepages/pages/GetByUrl('${t}')`,{headers:{...Zx},method:"GET"});if(x.status===404)return;return await x.json()}var U9=[{dataVersion:"1.4",description:"Title Region Description",id:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",instanceId:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",properties:{authorByline:[],authors:[],layoutType:"FullWidthImage",showPublishDate:!1,showTopicHeader:!1,textAlignment:"Left",title:"SPFx Extensions Configurator",topicHeader:"",enableGradientEffect:!0},reservedHeight:280,serverProcessedContent:{htmlStrings:{},searchablePlainTexts:{},imageSources:{},links:{}},title:"Title area"}],f9=[{addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:Ux,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:{dataVersion:"1.0",description:"Allows you to add a custom developed app",id:Hx,instanceId:Ux,properties:{description:"Select an app to load from the dropdown below",selectedApp:d,SPFxExtensionAppConfiguration:void 0},title:"SPFx Extension Loader"},webPartId:Hx},{controlType:0,pageSettingsSlice:{isDefaultDescription:!0,isDefaultThumbnail:!0}}],g9={CanvasContent1:`${JSON.stringify(f9)}`,LayoutWebpartsContent:`${JSON.stringify(U9)}`,Title:tx};async function E1(x){let y={"X-RequestDigest":await X(k)};await fetch(`${q}/_api/sitepages/pages(${x})/savepage`,{headers:{"Content-Type":"application/json",...Zx,...y},body:JSON.stringify(g9),method:"POST"}),await fetch(`${q}/_api/sitepages/pages(${x})/publish`,{headers:{...Zx,...y},method:"POST"})}async function C9(){let x=await M9();return await E1(x),fx()}async function N9(){let x=await S("ConfiguratorPageData");if(x?.Data)return x.Data;let w=await fx();if(w)await E({Title:"ConfiguratorPageData",Data:w,date:"",expires:""},480);return w}async function h1(){let x=await N9();if(!x)return C9();if(x.CanvasContent1.indexOf(Ux)===-1){await E1(x.Id);let w=await fx();return await E({Title:"ConfiguratorPageData",Data:w,date:"",expires:""},480),w}return x}async function o9(){let x=`${q}/_api/web/lists/GetByTitle('${U}')/fields`;try{let w=await fetch(x,{headers:{Accept:"application/json;odata=verbose"}});if(w.status===200){if(!(await w.json()).d.results.map((Z)=>Z.InternalName).some((Z)=>Z==="EntryPointUrl"))await u9(x,"EntryPointUrl","Full URL to the Entrypoint JS file, if * is specified all entries will be allowed.",!0)}}catch(w){z("Error while ensuring list fields.",w)}}async function u9(x,w,y,$){let Q=await X(k);if((await fetch(x,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":Q},body:JSON.stringify({__metadata:{type:"SP.Field"},Title:w,FieldTypeKind:3,Required:$,Description:y})})).status===201)b(w,"field added successfully.");else z(w,"Unable to add field.")}async function I9(){try{let x=await fetch(`${q}/_api/web/lists/GetByTitle('${U}')?$select=*`,{method:"GET",headers:{Accept:"application/json;odata=verbose"}});if(x.status===404){b("Creating app white list.");let y=await X(k),$=await fetch(`${q}/_api/web/lists`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":y},body:JSON.stringify({__metadata:{type:"SP.List"},BaseTemplate:100,Title:U,Description:"App whitelist for SPFxExtensions"})});if($.status===201)return b("App whitelist created successfully."),$.json();else{z("Unable to create app whitelist.");return}}return await o9(),x.json()}catch(x){z("Error while ensuring app whitelist.",x)}return}async function d1(){let x=await S("AppWhiteList");if(x?.Data)return x.Data;let w=await I9();if(w)await E({Title:"AppWhiteList",Data:w,date:"",expires:""},480);return w}var Vx;async function gx(){if(Vx)return Vx;return Vx=T9(),Vx}async function T9(){await m1(),await d1(),await h1(),window.__SPFxExtensions.Utils.ConfiguratorPageUrl=`${q}/${t}`}async function v(x=!1){return await gx(),n1(x)}async function A1(){return`${`${(await v()).find(($)=>$.Title==="RootCDNLocation")?.Data??`${q}`}${f}`}${F}`}async function S1(){let x=await v(),w=["7d56fff0-e90e-40a7-98cf-fcdbc63a9b01"];if(x.find((y)=>y.Title==="Version")?.Data!=="2025-07-01T17:39:47.631Z")x=await v(!0),E({Title:"Version",Data:"2025-07-01T17:39:47.631Z",date:"",expires:""},240),await xx(w,!0)}async function xx(x,w){let y=await window.caches.keys(),$=!1;for(let Q of y){let Z=await window.caches.open(Q),V=await Z.keys(),K=[];for(let Y of V){let j=Y.url.toLowerCase();if(x.some((P)=>j.indexOf(P.toLowerCase())>-1))b("Deleting cache key",Y,"from",Q),$=!0,K.push(Z.delete(Y,{ignoreMethod:!0,ignoreSearch:!0,ignoreVary:!0}))}await Promise.allSettled(K)}if($&&w)window.location.reload()}function m3(){return C(`${Date.now()}`,13)}var c9=t9();async function t9(){try{let x=await q1(),w=await K1();if(w.length>0&&!x)return w;if(w.length>0)b("Cache mismatch, loading allowed apps data...");let y=await v1();return await W1(y,5),y}catch(x){return z("Unable to load allowed apps data...",x),[]}}async function v1(x=!1){if((await v(x)).find(($)=>$.Title==="EnableAppWhiteList")?.Data!=="true")return[{Id:1,Title:"All apps allowed",EntryPointUrl:"*",date:(/*@__PURE__*/new Date()).toISOString(),expires:(/*@__PURE__*/new Date()).toISOString()}];return p9()}async function p9(){let x=`${q}/_api/web/lists/getByTitle('${U}')/Items?$select=Id,Title,EntryPointUrl&$top=1000`;return await i9(x)}async function i9(x){let w=x,y=[];while(w){let Q=await(await fetch(w,{method:"GET",headers:{Accept:"application/json;odata=verbose"}})).json();if(Q.error)throw new Error(JSON.stringify(Q.error));y.push(...Q.d.results),w=Q.d.__next}return y}function s9(x,w){if(w.some((Q)=>Q.EntryPointUrl==="*"))return!0;let $=(x.origin+x.pathname).toLowerCase();return w.some((Q)=>{try{let Z=new URL(Q.EntryPointUrl),V=Z.origin+Z.pathname;return $===V.toLowerCase()}catch(Z){return z("Error while parsing allowed entry URL",Q.EntryPointUrl,Z),!1}})}async function M1(x,w,y=!1){if(V1(x))return!0;let $=y?await v1(y):await c9;if(!s9(x,$))return R("File",x,`is not allowed to be executed. Please add it to whitelist @ ${q}.`),R(`If you are a developer you can enable this app by adding localStorage item ${h.SPFXEXT}${w} with a number value corresponding to development port of the localhost server.`),!1;return!0}async function f3(){if(window.moduleLoaderPromise)return(await window.moduleLoaderPromise)?.context;console.error("Unable to retrieve Modern SP Context...")}async function U1(){if(window.moduleLoaderPromise){let x=await window.moduleLoaderPromise;if(x?.context?.pageContext)return{contextType:"SPOModernContext",context:x.context.pageContext};throw"It seems this is a modern page, however it was not possible to retrieve SP Context..."}if(window._spPageContextInfo)return{contextType:"ClassicContext",context:window._spPageContextInfo};throw"It was not possible to retrieve SP Context either through modern or through classic means..."}var D=await U1();function f1(){return D.contextType==="SPOModernContext"?D.context.web.id.toString():Fx(D.context.webId)}function Cx(){return(D.contextType==="SPOModernContext"?D.context.web.absoluteUrl:D.context.webAbsoluteUrl).replace(/\/$/,"")}function zx(){return D.contextType==="SPOModernContext"?D.context.site.id.toString():Fx(D.context.siteId)}function T(){return D.contextType==="SPOModernContext"?D.context.site.absoluteUrl:D.context.siteAbsoluteUrl}function Yx(){return(D.contextType==="SPOModernContext"?D.context.legacyPageContext.hubSiteId?.toString():D.context.hubSiteId)??p}function g1(){return D.contextType==="SPOModernContext"?D.context.legacyPageContext.isHubSite:D.context.isHubSite}function l9(x){if(!Array.isArray(x.enabledAppCollections))throw`${n} ${F} enabledAppCollections should be an array`;if(!Array.isArray(x.urlMap))throw`${n} ${F} urlMap should be an array`}async function Bx(x,w,y,$,Q=!1,Z=60){let V=Gx,K=x.toLowerCase();if(!Q&&!m){let H=await O1(K);if(H)return H.isHubFetch=$,H}let Y=`${K}?v=${Date.now()}`;try{W(`Fetching ${F} from`,Y);let u=await(await fetch(Y)).text();V=JSON.parse(u)}catch(H){R(`Unable to fetch ${F} from`,Y,H)}try{l9(V)}catch(H){z(`Error while parsing ${F} from`,Y,H),V=Gx}let j=await C(JSON.stringify(V)),_={manifest:V,...{name:w,url:K,type:y,hash:j}};return await G1(_,m?1:Z),_.isHubFetch=$,_}async function jx(x,w,y,$=!1){let Q=[],Z=await A1();Q.push(Bx(Z,"apps","root",!0,$));let V=x+f;if(Q.push(Bx(`${V}${F}`,"apps","site",!1,$)),y){let H=y+f;Q.push(Bx(`${H}${F}`,"apps","site",!0,$))}let Y=`${w+f}${F}`,j=x.toLowerCase()===w.toLowerCase(),P=Y.toLowerCase()===Z.toLowerCase();if(!j&&!P)Q.push(Bx(Y,"apps","web",!1,$));return await Promise.all(Q)}function r9(x){if(Array.isArray(x)||typeof x!=="object")throw`${n} App manifest has to be an object.`;if(!x.appRelativeEntryPointUrls)throw z("Manifest does not have appRelativeEntryPointUrl property.",x),`${n} Manifest does not have appRelativeEntryPointUrl property.`;if(!x.appDefinitionMap)throw z("Manifest does not have enabledApps property.",x),`${n} Manifest does not have enabledApps property.`}async function a9(x,w,y,$,Q=!1,Z=60){let V={...Dx},K=x.toLowerCase();if(!Q&&!m){let H=await k1(K);if(H)return H.isHubFetch=$,H}let Y=`${K}?v=${Date.now()}`;try{W(`Fetching ${L} from`,Y);let u=await(await fetch(Y)).text();V=JSON.parse(u)}catch(H){R(`Unable to fetch ${L} from`,Y,H)}try{r9(V)}catch(H){z(`Error while parsing ${L} from`,Y,H),V={...Dx}}let j=await C(JSON.stringify(V)),_={manifest:V,...{name:w,url:K,type:y,hash:j}};return await D1(_,m?1:Z),_.isHubFetch=$,_}function e9(x,w){let y=`${x}${w}/${L}`,$=`${h.SPFXEXT}${w}`,Q=Number(localStorage.getItem($));if(Q>0){let Z=`https://localhost:${Q}/${L}`;return b(`<${w}> App is in debug mode, loading from`,Z),Z}return y}function Nx(x,w=!1){if(x.length===0)return[];let y=[];for(let $ of x){let Q=$.url.toLowerCase().replace(F.toLowerCase(),"");for(let Z of $.manifest.enabledAppCollections){let V=e9(Q,Z);y.push(a9(V,Z,$.type,$.isHubFetch??!1,w))}}return y}function Kx(x,w=!1){let y=x.filter((j)=>j.type==="root"),$=Nx(y,w),Q=x.filter((j)=>j.type==="site"),Z=Nx(Q,w),V=x.filter((j)=>j.type==="web"),K=Nx(V,w);return[...$,...Z,...K]}var ux=!1,bx=[];async function xw(x,w,y){if(!y.isESM){let $=y.appDefinitionMap.find((Z)=>Z.appId===w);if(!$){let Z=`Could not find app configuration item for non-ESM app ${w}`;return z(Z),[]}if(!C1($))return b(`App ${w} is not enabled in current context. Skipping...`),[];try{R("Non-ESM module detected. Make sure to call window.__SPFxExtensions.RegisterApp and window.__SPFxExtensions.InstantiateApp in code.",x),await import(x)}catch(Z){let V=`Error while importing or executing ${x} ${Z}`;return z(V),[]}return[]}else try{let Q=(await import(x)).default;if(!Q)return z(`No default export found in ${x}, only ESM modules are supported.`),[];return $w(Q,y,x)}catch($){return z("Error while importing or executing",x,$),[]}}async function ox(x){let w=[],y=x.url.replace(L,"");W("Parsing",x.type,"manifest:",x.manifest);for(let $ of x.manifest.appRelativeEntryPointUrls){let Q=$.replace(/\.\.\/?/g,"./").replace(/^\.\//,""),Z=`${y}${Q}`.toLowerCase();W("EntryPoint JS: ",Z);let V=new URL(Z);if(x.manifest.cacheString&&x.manifest.enableCaching){let _=z1(x.name)?`${(/*@__PURE__*/new Date()).getTime()}`:x.manifest.cacheString;V.searchParams.set("v",`${_}`)}if(!await M1(V,x.name))continue;let Y=`${V.origin}${V.pathname}`,j=`${V}`;if(bx.includes(Y)){b("EntryPoint already loaded:",j);continue}bx.push(Y),w.push(xw(j,$,x.manifest))}return w}async function Ix(x,w,y,$,Q=!1){if(Q)ww($);if(ux)return;ux=!0;let Z=await jx(x,w,y),V=Kx(Z);window.__SPFxExtensions.Utils.appManifestPromises=V,window.__SPFxExtensions.Utils.spAppInitializationPromiseResolver();let Y=(await Promise.allSettled(V)).filter((G)=>G.status==="fulfilled"),j=[],P=Y.filter((G)=>G.value.type==="root"),_=Y.filter((G)=>G.value.type==="site"),H=Y.filter((G)=>G.value.type==="web");for(let G of P){let I=await ox(G.value);j.push(...I)}W("Root apps loaded.");for(let G of _){let I=await ox(G.value);j.push(...I)}W("Site apps loaded.");for(let G of H){let I=await ox(G.value);j.push(...I)}W("SiteWeb apps loaded.");let u=(await Promise.allSettled(j)).filter((G)=>G.status==="fulfilled").flatMap((G)=>G.value);await yw(u),window.__SPFxExtensions.AllAppAssetsLoadedResolver(),b("SPFx Extensions Core Components Loaded.")}function ww(x){ux=!1,bx.splice(0,bx.length),ix(x);let{promise:w,resolve:y}=Promise.withResolvers();window.__SPFxExtensions.AllAppAssetsLoadedPromise=w,window.__SPFxExtensions.AllAppAssetsLoadedResolver=y}async function yw(x){let w=[];for(let y of window.__SPFxExtensions.Apps)if(!x.find((Q)=>Q.id===y.id)&&y.id!==d)w.push(y.id);for(let y of w){let $=await window.__SPFxExtensions.UnregisterApp(y);if($)R(`Unregistered App ${$.id} (${$.name}) as it does not belong in this context`)}}async function $w(x,w,y){if(!Array.isArray(x))z("Default export of entry point should be an array of App definitions. TODO: add documentation url",y);let $=[];for(let Q of x){if(!Q.id){z("App definition does not have an id. Make sure that returned array is in proper format. TODO: add documentation url",y,Q);continue}let Z=w.appDefinitionMap.find((j)=>j.appId.toLowerCase()===Q.id.toLowerCase()),V=`App with id ${Q.id} (${Q.name}) is not enabled for current web. Skipping...`;if(!Z){b(V);continue}if(!C1(Z)){b(V);continue}let Y=await window.__SPFxExtensions.RegisterApp(Q);if($.push(Q),!Q.isWebPartApp&&Q.autoExecute){if(Y.instances.length<(Q.maxInstances??1/0))window.__SPFxExtensions.InstantiateApp(Q.id,{})}}return $}function C1(x){let w=f1().toLowerCase(),y=zx().toLowerCase(),$=Yx().toLowerCase(),Q=x.config.enabledEverywhere,Z=x.config.excludedIds.indexOf(w)===-1&&x.config.excludedIds.indexOf(y)===-1&&x.config.excludedHubIds.indexOf($)===-1,V=x.config.includedIds.indexOf(w)!==-1||x.config.includedIds.indexOf(y)!==-1||x.config.includedHubIds.indexOf($)!==-1;return Q?Z:V}var N1=!1;function u1(){if(window.moduleLoaderPromise&&!N1)N1=!0,window.moduleLoaderPromise.then((x)=>{let w=x.context.pageContext.initialize;x.context.pageContext.initialize=function(y,$){let Q=x.context.pageContext._initializationData;w.call(this,y,$);let Z={initializationData:y,legacyContext:$};if(Q.web.id===y.web.id){o1("contextRefresh",Z);return}o1("contextChange",Z)}})}function o1(x,w){let y=new CustomEvent(x,{detail:w});window.dispatchEvent(y),window.__SPFxExtensions.Apps.forEach(($)=>{$.instances.forEach((Q)=>{Q.executeListeners(x,w)})})}function I1(){if(!window.__SPFxExtensions.AppEventListeners)window.__SPFxExtensions.AppEventListeners=[];if(!window.__SPFxExtensions.AddAppEventListener)window.__SPFxExtensions.AddAppEventListener=(x,w)=>{let y={key:window.crypto.randomUUID(),eventName:x,handler:w};return window.__SPFxExtensions.AppEventListeners.push(y),y};if(!window.__SPFxExtensions.RemoveAppEventListener)window.__SPFxExtensions.RemoveAppEventListener=(x)=>{let w=window.__SPFxExtensions.AppEventListeners.findIndex((y)=>y.key===x.key);if(w>-1)window.__SPFxExtensions.AppEventListeners.splice(w,1)}}var Qw=window.history.pushState,Zw=window.history.replaceState,Vw=window.history.back,zw=window.history.forward,Yw=window.history.go;function Bw(){let x=window.history.state,w=window.location.href;return{currentState:x,previousUrl:w}}function c(x,w){let y={...Bw(),...w},$=new CustomEvent(x,{detail:y});window.dispatchEvent($)}function jw(){function x(w,y,$){Qw.call(this,w,y,$),c("historyPush",{newState:w,newUrl:$})}window.history.pushState=x}function Kw(){function x(w,y,$){Zw.call(this,w,y,$),c("historyReplace",{newState:w,newUrl:$})}window.history.replaceState=x}function bw(){function x(){Vw.call(this),c("historyBack",{})}window.history.back=x}function Jw(){function x(){zw.call(this),c("historyForward",{})}window.history.forward=x}function Ww(){function x(w){Yw.call(this,w),c("historyGo",{delta:w})}window.history.go=x}var T1=!1;function c1(){if(T1)return;T1=!0,Kw(),jw(),Jw(),bw(),Ww()}async function Tx(){if(g1())return"";let x=Yx(),w=zx();if(!x||x===p||x===w)return"";await H1();let y=await b1(x);if(!y){let $=T();b("Getting Hub data for HubSiteId:",x);try{let Z=await(await fetch(`${$}/_api/hubsites/GetById?hubSiteId='${x}'`,{headers:{accept:"application/json;odata=nometadata"}})).json();return await J1(Z),Z.SiteUrl}catch(Q){return z("Error fetching hub site data.",Q),""}}return y.SiteUrl}var t1="CORE_MANIFEST_CHECK",i1=Number(localStorage.getItem(h.SPFXEXT_CORE))>0?1e4:90000,Jx=0;function cx(x,w,y,$=!1){if($)window.clearInterval(Jx),Jx=0;if(Jx>0)return;Jx=window.setInterval(p1,i1,x,w,y),p1(x,w,y)}async function p1(x,w,y){try{let Q=localStorage.getItem(t1);if(Q){let K=new Date(Q),j=(/*@__PURE__*/new Date()).getTime()-K.getTime(),P=i1;if(j<P){W("Manifest check already performed recently, skipping.",`${j} < ${P}`);return}}b("Checking for manifest updates across all locations..."),await Promise.all([e(),a()]);let Z=await jx(x,w,y,!0),V=Kx(Z,!0);await Promise.allSettled(V)}catch(Q){z("Error checking for manifest updates",Q)}let $=(/*@__PURE__*/new Date()).toISOString();W("Setting next manifest check to",$),localStorage.setItem(t1,$)}var Wx;async function qw(){if(Wx)return Wx;return Wx=Hw(),Wx}async function Hw(){if(await gx(),(await v()).find((Q)=>Q.Title==="InterceptHistory")?.Data==="true")c1();u1(),I1(),sx(),lx();let{promise:y,resolve:$}=Promise.withResolvers();if(!window.__SPFxExtensions.AllAppAssetsLoadedPromise)window.__SPFxExtensions.AllAppAssetsLoadedPromise=y,window.__SPFxExtensions.AllAppAssetsLoadedResolver=$}async function s1(){await S1(),await qw(),window.__SPFxExtensions.__CorePromiseResolver?.();let x=T(),w=Cx(),y=await Tx();await Ix(x,w,y,s()),window.addEventListener("contextChange",async()=>{b("Context changed, reloading apps...");let $=T(),Q=Cx(),Z=await Tx(),V=px();await Ix($,Q,Z,V,!0),cx($,Q,Z,!0)}),cx(x,w,y),b("SPFx Extensions Core Has Been initialized.")}var kw={id:d,description:"Allows configuring custom apps",isWebPartApp:!1,hideAppSelectorWhenAppLoaded:!0,hideConfiguratorButton:!0,name:"SPFx Extensions Configurator",async onInstanceRequested(x){let w=import.meta.url.indexOf("localhost")>-1;if(w)W("Core is in debug mode");let y=w?import.meta.resolve(`./__spfxCoreConfigurator.js?v=${Date.now()}`):window.__SPFxExtensions.__ConfiguratorUrl;try{return(await import(y)).launch(x)}catch($){if(z("Error launching configurator app",$),x.domElement)x.domElement.innerHTML=`<div style="text-align: center; padding: 20px; color: red;">Error launching configurator app. ${$}</div>`;return()=>{}}}};async function Dw(){b("Initializing Core Services Built:","2025-07-01T17:39:47.631Z"),await s1();try{await window.__SPFxExtensions.RegisterApp(kw)}catch(w){z("Error registering configurator app",w)}}Dw();
|