@spfx-extensions/package 1.4.25 → 1.5.1
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/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 +7 -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_1ed614b7d2607a62ce4e.js +1 -0
- package/dist/debug/ClientSideAssets/spfx-extension-core.js +1 -1
- package/dist/debug/ClientSideAssets/spfx-extension-coreconfigurator.js +60 -60
- package/dist/{spfx-extension-loader_1a88c5c5336cafaa736d.js → debug/ClientSideAssets/spfx-extension-loader_e83dead2a8f8f000d374.js} +1 -1
- package/dist/debug/ClientSideAssets/spfx-extensionloader-web-part_1ca10faea5832c6d6178.js +3 -0
- 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_1ed614b7d2607a62ce4e.js +1 -0
- package/dist/spfx-extension-core.js +1 -1
- package/dist/spfx-extension-coreconfigurator.js +60 -60
- package/dist/{debug/ClientSideAssets/spfx-extension-loader_1a88c5c5336cafaa736d.js → spfx-extension-loader_e83dead2a8f8f000d374.js} +1 -1
- package/dist/spfx-extensionloader-web-part_1ca10faea5832c6d6178.js +3 -0
- package/package.json +2 -2
- package/src/webparts/spfxExtensionloader/SpfxExtensionloaderWebPart.ts +225 -149
- package/dist/debug/ClientSideAssets/spfx-extension-application-customizer_493714911b44aed8a076.js +0 -1
- package/dist/debug/ClientSideAssets/spfx-extensionloader-web-part_0b7cf417167f9364b2df.js +0 -3
- package/dist/spfx-extension-application-customizer_493714911b44aed8a076.js +0 -1
- package/dist/spfx-extensionloader-web-part_0b7cf417167f9364b2df.js +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(self.
|
|
1
|
+
"use strict";(self.webpackJsonp_6cc779ad78b22e0ab7384b402525e382=self.webpackJsonp_6cc779ad78b22e0ab7384b402525e382||[]).push([[548],{364:(e,t,n)=>{n.d(t,{initCore:()=>p});var a=n(367),{getPrototypeOf:i,defineProperty:r,getOwnPropertyNames:o}=(Object.create,Object);Object.prototype.hasOwnProperty;const s=n.p+"spfx-extension-core.js?v=8055e590c853bedb98c4",c=n.p+"spfx-extension-coreconfigurator.js?v=05c161bd2996e54939f4",d=n.p+"spfx-extension-wrapper.js?v=eac83830b8c1e249f52c";let l,u=!1;async function f(){return Promise.resolve({coreUrl:s,configuratorUrl:c,wrapperUrl:d})}async function p(e,t,n){if(!l){const t="2025-08-06T22:21:03.179Z";console.info(a.Lf,"Initializing Core from SPFx Built:",t),l=async function(e,t){if(window.__SPFxExtensions?.__CorePromise)return window.__SPFxExtensions.__CorePromise;!function(e){if(!window.__SPFxExtensions){let{promise:e,resolve:t}=Promise.withResolvers();window.__SPFxExtensions={__CorePromise:e,__CorePromiseResolver:t}}if(!window.__SPFxExtensions.Utils){let{promise:t,resolve:n}=Promise.withResolvers(),{promise:a,resolve:i}=Promise.withResolvers();window.__SPFxExtensions.Utils={environmentType:e,initializedThroughSPFX:true,placeHolderProviderPromise:t,placeHolderResolver:n,appManifestPromises:[],spAppInitializationPromise:a,spAppInitializationPromiseResolver:i,fluentIconsInitialized:!1,ConfiguratorPageUrl:"/sites/appcatalog/SPFxExtensionsData/SitePages/SPFxExtensionsConfigurator.aspx"}}}(t);let n=await async function(e){let t=Number(localStorage.getItem("SPFXEXT")),n={core:"",configuratorUrl:""};if(t>0){let e=Date.now();return n.core=`https://localhost:${t}/__spfxCore.js?v=${e}`,n.configuratorUrl=`https://localhost:${t}/__spfxCoreConfigurator.js?v=${e}`,n}let{coreUrl:a,configuratorUrl:i}=await e();if(!a)throw new Error("[SPFxExtensions/Core] Unable to resolve SPFx Core location");if(!i)throw new Error("[SPFxExtensions/Core] Unable to resolve SPFx Core Configurator location");return n.core=a,n.configuratorUrl=i,console.info("[SPFxExtensions/Core]","Core location resolved to",n),n}(e);window.__SPFxExtensions.__ConfiguratorUrl=n.configuratorUrl;let a=document.createElement("script");return a.src=n.core,a.type="module",a.addEventListener("error",e=>{console.error("[SPFxExtensions/Core]","Catastrophic failure, cannot load SPFxExtensions Core from",n,e)}),document.head.appendChild(a),window.__SPFxExtensions.__CorePromise}(f,e)}await l,window.__SPFxExtensions.Utils&&!window.__SPFxExtensions.Utils.initializedThroughSPFX&&(window.__SPFxExtensions.Utils.environmentType=e,window.__SPFxExtensions.Utils.initializedThroughSPFX=!0),!u&&t&&n&&(u=!0,window.__SPFxExtensions.Utils.placeHolderResolver({placeHolderProvider:t,eventObserver:n}))}}
|
|
2
2
|
,367:(e,t,n)=>{n.d(t,{Bc:()=>r,Lf:()=>o,Ne:()=>a,oz:()=>i});const a="Select one of these web parts for this column.",i="Edit page and select webpart.",r="Webpart that loads an app of your choice.",o="[SPFxExtensions]"}
|
|
3
3
|
}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{var e=document.currentScript;define(["@microsoft/sp-core-library","@microsoft/sp-property-pane","@microsoft/sp-webpart-base","@microsoft/sp-component-base"],(t,n,a,i)=>(()=>{"use strict";var r,o,s,c={367:(e,t,n)=>{n.d(t,{Bc:()=>r,Lf:()=>o,Ne:()=>a,oz:()=>i});const a="Select one of these web parts for this column.",i="Edit page and select webpart.",r="Webpart that loads an app of your choice.",o="[SPFxExtensions]"}
|
|
2
|
+
,574:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var a,i,r=function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};!function(e){e[e.sync=0]="sync",e[e.async=1]="async"}(a||(a={})),function(e){e[e.onlyThemable=1]="onlyThemable",e[e.onlyNonThemable=2]="onlyNonThemable",e[e.all=3]="all"}(i||(i={}));var o,s,c,d="undefined"==typeof window?n.g:window,l=d&&d.CSPSettings&&d.CSPSettings.nonce,u=((c=d.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(c=r(r({},c),{perf:{count:0,duration:0},runState:{flushTimer:0,mode:a.sync,buffer:[]}})),c.registeredThemableStyles||(c=r(r({},c),{registeredThemableStyles:[]})),d.__themeState__=c,c),f=/[\'\"]\[theme:\s*(\w+)\s*(?:\,\s*default:\s*([\\"\']?[\.\,\(\)\#\-\s\w]*[\.\,\(\)\#\-\w][\"\']?))?\s*\][\'\"]/g,p=function(){return"undefined"!=typeof performance&&performance.now?performance.now():Date.now()};function m(e){var t=p();e();var n=p();u.perf.duration+=n-t}function _(e,t){u.loadStyles?u.loadStyles(h(e).styleString,e):function(e){if("undefined"!=typeof document){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),a=h(e),i=a.styleString,r=a.themable;n.setAttribute("data-load-themed-styles","true"),l&&n.setAttribute("nonce",l),n.appendChild(document.createTextNode(i)),u.perf.count++,t.appendChild(n);var o=document.createEvent("HTMLEvents");o.initEvent("styleinsert",!0,!1),o.args={newStyle:n},document.dispatchEvent(o);var s={styleElement:n,themableStyle:e};r?u.registeredThemableStyles.push(s):u.registeredStyles.push(s)}}(e)}function h(e){var t=u.theme,n=!1;return{styleString:(e||[]).map(function(e){var a=e.theme;if(a){n=!0;var i=t?t[a]:void 0,r=e.defaultValue||"inherit";return t&&!i&&console,i||r}return e.rawString}).join(""),themable:n}}o='.spfxExtensionloader_be4e0fd1{color:"[theme:bodyText, default: #323130]";color:var(--bodyText);overflow:hidden;padding:1em}.spfxExtensionloader_be4e0fd1.teams_be4e0fd1{font-family:Segoe UI,-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif}.welcome_be4e0fd1{text-align:center}.welcomeImage_be4e0fd1{max-width:420px;width:100%}.links_be4e0fd1 a{color:"[theme:link, default:#03787c]";color:var(--link);text-decoration:none}.links_be4e0fd1 a:hover{color:"[theme:linkHovered, default: #014446]";color:var(--linkHovered);text-decoration:underline}.SPFxExtensionApp_be4e0fd1 .loader_be4e0fd1{animation:rotation_be4e0fd1 1s linear infinite;border:2px solid #003755;border-bottom-color:#009fda;border-radius:50%;box-sizing:border-box;display:inline-block;height:28px;width:28px}@keyframes rotation_be4e0fd1{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.SPFxExtensionApp_be4e0fd1 .buttonLoader_be4e0fd1{align-items:center;border:none;display:flex;height:80px;justify-content:center;width:120px}.SPFxExtensionApp_be4e0fd1 .shimmerShine_be4e0fd1{-webkit-animation-duration:1s;-webkit-animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;-webkit-animation-name:placeholderShimmer_be4e0fd1;-webkit-animation-timing-function:linear;background:#f6f7f8;background-image:linear-gradient(90deg,#f6f7f8 0,#edeef1 20%,#f6f7f8 40%,#f6f7f8);background-repeat:no-repeat;background-size:200px 80px;border:none;display:block;height:80px;position:relative;width:120px}@keyframes placeholderShimmer_be4e0fd1{0%{background-position:-80px 0}to{background-position:120px 0}}.SPFxExtensionApp_be4e0fd1 .applicationListSection_be4e0fd1{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center;min-height:320px;text-align:center}.SPFxExtensionApp_be4e0fd1 .header_be4e0fd1{color:#242424;font-weight:600;letter-spacing:1px;line-height:32px;padding:0 12px}.SPFxExtensionApp_be4e0fd1 .icon_be4e0fd1{font-size:28px;font-style:normal;height:28px;line-height:28px;min-width:28px;width:28px}.SPFxExtensionApp_be4e0fd1 .icon_be4e0fd1>img,.SPFxExtensionApp_be4e0fd1 .icon_be4e0fd1>svg{height:auto;width:100%}.SPFxExtensionApp_be4e0fd1 .iconFont_be4e0fd1{background-color:#f6f7f8}.SPFxExtensionApp_be4e0fd1 .appButtonsContainer_be4e0fd1{align-items:center;display:flex;flex-wrap:wrap;height:100%;justify-content:center}.SPFxExtensionApp_be4e0fd1 .appButtonsWrapper_be4e0fd1{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;height:100%;justify-content:flex-start;width:100%}.SPFxExtensionApp_be4e0fd1 .appButton_be4e0fd1{align-items:center;background-color:unset;border:none;display:flex;flex-direction:column;height:80px;padding-top:14px;width:120px}.SPFxExtensionApp_be4e0fd1 .appButton_be4e0fd1:hover{background-color:#c8e3fa}',void 0===(s=!0)&&(s=!1),m(function(){var e=Array.isArray(o)?o:function(e){var t=[];if(e){for(var n=0,a=void 0;a=f.exec(e);){var i=a.index;i>n&&t.push({rawString:e.substring(n,i)}),t.push({theme:a[1],defaultValue:a[2]}),n=f.lastIndex}t.push({rawString:e.substring(n)})}return t}(o),t=u.runState,n=t.mode,i=t.buffer,r=t.flushTimer;s||n===a.async?(i.push(e),r||(u.runState.flushTimer=self.setTimeout(function(){u.runState.flushTimer=0,m(function(){var e=u.runState.buffer.slice();u.runState.buffer=[];var t=[].concat.apply([],e);t.length>0&&_(t)})},0))):_(e)});const b={spfxExtensionloader_be4e0fd1:"spfxExtensionloader_be4e0fd1",teams_be4e0fd1:"teams_be4e0fd1",welcome_be4e0fd1:"welcome_be4e0fd1",welcomeImage_be4e0fd1:"welcomeImage_be4e0fd1",links_be4e0fd1:"links_be4e0fd1",SPFxExtensionApp_be4e0fd1:"SPFxExtensionApp_be4e0fd1",loader_be4e0fd1:"loader_be4e0fd1",rotation_be4e0fd1:"rotation_be4e0fd1",buttonLoader_be4e0fd1:"buttonLoader_be4e0fd1",shimmerShine_be4e0fd1:"shimmerShine_be4e0fd1",placeholderShimmer_be4e0fd1:"placeholderShimmer_be4e0fd1",applicationListSection_be4e0fd1:"applicationListSection_be4e0fd1",header_be4e0fd1:"header_be4e0fd1",icon_be4e0fd1:"icon_be4e0fd1",iconFont_be4e0fd1:"iconFont_be4e0fd1",appButtonsContainer_be4e0fd1:"appButtonsContainer_be4e0fd1",appButtonsWrapper_be4e0fd1:"appButtonsWrapper_be4e0fd1",appButton_be4e0fd1:"appButton_be4e0fd1"}}
|
|
3
|
+
,962:e=>{e.exports=i},676:e=>{e.exports=t},877:e=>{e.exports=n},642:e=>{e.exports=a}},d={};function l(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return c[e](n,n.exports,l),n.exports}l.m=c,l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce((t,n)=>(l.f[n](e,t),t),[])),l.u=e=>"spfx-extension-loader_e83dead2a8f8f000d374.js",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="6cc779ad78b22e0ab7384b402525e382:",l.l=(e,t,n,a)=>{if(r[e])r[e].push(t);else{var i,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+n){i=u;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,l.nc&&i.setAttribute("nonce",l.nc),i.setAttribute("data-webpack",o+n),i.src=e,0!==i.src.indexOf(window.location.origin+"/")&&(i.crossOrigin="anonymous")),r[e]=[t];var f=(t,n)=>{i.onerror=i.onload=null,clearTimeout(p);var a=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s=e?e.src:"",l.p=s.slice(0,s.lastIndexOf("/")+1),(()=>{var e={650:0};l.f.j=(t,n)=>{var a=l.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=l.p+l.u(t),o=new Error;l.l(r,n=>{if(l.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,s]=n,c=0;if(r.some(t=>0!==e[t])){for(a in o)l.o(o,a)&&(l.m[a]=o[a]);s&&s(l)}for(t&&t(n);c<r.length;c++)i=r[c],l.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackJsonp_6cc779ad78b22e0ab7384b402525e382=self.webpackJsonp_6cc779ad78b22e0ab7384b402525e382||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var u={};return(()=>{l.r(u),l.d(u,{default:()=>r});var e=l(676),t=l(877),n=l(642),a=l(367),i=l(962);l(574);class r extends n.BaseClientSideWebPart{SPFxExtensionInstance;allApps=[];appCatalogUrl="/sites/appcatalog";dropDownProps={options:[],selectedKey:"",disabled:!0};appDescription="";hideAppSelectorWhenAppLoaded=!1;hideConfiguratorButton=!1;configDomElement;themeProvider;serviceScope;appButtonElements=[];webpartSectionElement=document.createElement("section");webpartSectionTitle=document.createElement("header");appButtonsWrapper=document.createElement("div");appButtonsContainer=document.createElement("div");async onInit(){const t=e.Environment.type===e.EnvironmentType.SharePoint?"SharePoint":"ClassicSharePoint";this.themeProvider=this.context.serviceScope.consume(i.ThemeProvider.serviceKey),this.serviceScope=this.context.serviceScope;const{initCore:n}=await l.e(548).then(l.bind(l,364));await n(t),this.appCatalogUrl=window.__SPFxExtensions.Utils.ConfiguratorPageUrl}openPropertyPane(){this.context.propertyPane.open()}closePropertyPane(){this.context.propertyPane.close()}isPropertyPaneOpen(){return this.context.propertyPane.isPropertyPaneOpen()}saveConfigValue(e,t=!0){this.properties.SPFxExtensionAppConfiguration=e,t&&this.SPFxExtensionInstance?.executeListeners("onConfigurationChange",e)}getConfigValue(e){if(e){let t=this.properties[e];return void 0===t&&(t=this.properties.SPFxExtensionAppConfiguration),t}return this.properties.SPFxExtensionAppConfiguration}getSearchData(){return{searchableText:this.properties.searchableText,searchableHtml:this.properties.searchableHtml}}setSearchData(e){this.properties.searchableText=e.searchableText,this.properties.searchableHtml=e.searchableHtml}getTopActions(){return this.properties.topActions??[]}setTopActions(e){this.properties.topActions=e??[]}getThemeProvider(){return this.themeProvider}getConfigDomElement(){return this.configDomElement}getContext(){return this.context}getServiceScope(){return this.serviceScope}async mountApp(e){this.domElement.innerHTML="";try{const t={domElement:this.domElement,webpart:this,openPropertyPane:()=>{this.openPropertyPane()},closePropertyPane:()=>{this.closePropertyPane()},isPropertyPaneOpen:()=>this.isPropertyPaneOpen(),saveConfigValue:(e,t=!0)=>{this.saveConfigValue(e,t)},getConfigValue:e=>this.getConfigValue(e),getSearchableData:()=>this.getSearchData(),setSearchableData:e=>{this.setSearchData(e)},setTopActions:e=>{this.setTopActions(e)},getTopActions:()=>this.getTopActions(),getThemeProvider:()=>this.getThemeProvider(),getConfigDomElement:()=>this.getConfigDomElement(),getContext:()=>this.getContext(),getServiceScope:()=>this.getServiceScope()};if(this.SPFxExtensionInstance=await window.__SPFxExtensions.InstantiateApp(e,t),!this.SPFxExtensionInstance)return void console.warn(a.Lf,"App instance is undefined, cannot mount app",e);const n=window.__SPFxExtensions.Apps.find(t=>t.id===e);n&&(this.appDescription=n.description)}catch(t){return console.error(a.Lf,"Error while mounting appid",e,t),new Error(`${t}`)}}unmountApp(){this.SPFxExtensionInstance&&this.SPFxExtensionInstance.unmount?.(),this.SPFxExtensionInstance=void 0,this.domElement.innerHTML=""}generateIconElement(e){const t=document.createElement("i");if(t.classList.add("icon_be4e0fd1"),!e)return t.innerHTML='<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M20.84 2.66a2.25 2.25 0 0 0-3.18 0L13.5 6.8v-.56c0-1.24-1-2.25-2.25-2.25h-7C3.01 4 2 5.01 2 6.25v18c0 .97.78 1.75 1.75 1.75h18c1.24 0 2.25-1 2.25-2.25v-7c0-1.24-1-2.25-2.25-2.25h-.56l4.16-4.15c.88-.88.88-2.3 0-3.19l-4.5-4.5ZM17.31 14.5H13.5v-3.8l3.8 3.8Zm1.41-10.78c.3-.3.77-.3 1.06 0l4.5 4.5c.3.3.3.77 0 1.06l-4.5 4.51c-.3.3-.77.3-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.07l4.5-4.5ZM12 6.25v8.25H3.5V6.25c0-.41.34-.75.75-.75h7c.41 0 .75.34.75.75Zm-8.5 17.5V16H12v8.5H4.25a.75.75 0 0 1-.75-.75Zm10-7.75h8.25c.41 0 .75.34.75.75v7c0 .42-.34.75-.75.75H13.5V16Z" fill="currentColor"></path></svg>',t;if("font"===e.iconType&&e.fontFamily&&(t.style.fontFamily=e.fontFamily,t.classList.add("iconFont_be4e0fd1")),"url"===e.iconType){const n=document.createElement("img");n.src=e.iconData,t.appendChild(n)}return"svg"===e.iconType&&(t.innerHTML=e.iconData),t}createAndAppendAppButtons(e){const t=document.createElement("button");t.title=a.Bc,t.ariaLabel=a.Bc,t.className="appButton_be4e0fd1";const n=this.generateIconElement(e.icon);t.append(n,e.name),t.title=e.name,t.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),this.properties.selectedApp=e.id,this.webpartSectionElement.remove(),this.mountApp(e.id).catch(()=>{})}),this.appButtonsContainer.appendChild(t)}createWebpartSection(e){this.webpartSectionElement.className="applicationListSection_be4e0fd1",this.webpartSectionTitle.className="header_be4e0fd1",this.webpartSectionElement.appendChild(this.webpartSectionTitle),e&&this.webpartSectionElement.appendChild(this.appButtonsWrapper)}renderDisplayMode(){this.webpartSectionElement.ariaLabel=a.oz,this.webpartSectionTitle.textContent=a.oz,this.createWebpartSection(),this.domElement.appendChild(this.webpartSectionElement)}async renderEditMode(){this.webpartSectionElement.ariaLabel=a.Ne,this.webpartSectionTitle.textContent=a.Ne,this.createWebpartSection(!0),this.appButtonsContainer.className="appButtonsContainer_be4e0fd1",this.appButtonsWrapper.appendChild(this.appButtonsContainer),this.appButtonsWrapper.className="appButtonsWrapper_be4e0fd1",this.domElement.appendChild(this.webpartSectionElement),window.__SPFxExtensions.AddAppEventListener("appAdded",e=>{e.isWebPartApp&&this.createAndAppendAppButtons(e)}),window.__SPFxExtensions.Apps.filter(e=>e.registrationCompleted).forEach(e=>{e.isWebPartApp&&this.createAndAppendAppButtons(e)});try{await window.__SPFxExtensions.Utils.spAppInitializationPromise,window.__SPFxExtensions.Utils.appManifestPromises.forEach(e=>{const t=document.createElement("div"),n=document.createElement("span");t.className="buttonLoader_be4e0fd1",n.className="loader_be4e0fd1",t.appendChild(n),this.appButtonsContainer.append(t),e.catch(()=>{}).finally(()=>{t.remove()})})}catch(e){return console.error(a.Lf,"Error while awaiting app initialization",e),new Error(`Error while awaiting app initialization: ${e}`)}}async renderEmptyApp(){if(this.domElement.innerHTML="",this.domElement.className="SPFxExtensionApp_be4e0fd1",this.displayMode!==e.DisplayMode.Read)return this.renderEditMode();this.renderDisplayMode()}async render(){let e;try{if(this.SPFxExtensionInstance){if(!this.SPFxExtensionInstance.unmountOnRender)return void this.SPFxExtensionInstance.executeListeners("onRender",void 0);this.unmountApp()}if(this.properties.selectedApp&&!this.SPFxExtensionInstance)return void(e=await this.mountApp(this.properties.selectedApp));e=await this.renderEmptyApp()}finally{this.renderCompleted(e,!0)}}renderCompleted(e,t){super.renderCompleted(e,t)}get isRenderAsync(){return!0}get propertiesMetadata(){return{searchableText:{isSearchablePlainText:!0},searchableHtml:{isHtmlString:!0}}}CustomWebpartConfigurationField(e){return{type:t.PropertyPaneFieldType.Custom,targetProperty:e,properties:{key:e,onRender:(e,t,n)=>{this.configDomElement=e,this.SPFxExtensionInstance?.instanceLoadPromise.then(()=>{this.SPFxExtensionInstance?.executeListeners("onConfigurationRender",{domElement:e})}).catch(e=>{console.error(a.Lf,"Error while awaiting app to load",e)})},onDispose:(e,t)=>{this.SPFxExtensionInstance?.executeListeners("onConfigurationClose",{domElement:e}),this.configDomElement=void 0}}}}onPropertyPaneConfigurationStart(){window.__SPFxExtensions.AllAppAssetsLoadedPromise.then(()=>{const e=window.__SPFxExtensions.Apps.find(e=>e.id===this.properties.selectedApp);e&&(this.appDescription=e.description,this.hideAppSelectorWhenAppLoaded=e.hideAppSelectorWhenAppLoaded??!1,this.hideConfiguratorButton=e.hideConfiguratorButton??!1),this.dropDownProps.options?.splice(0,this.dropDownProps.options?.length);const t=window.__SPFxExtensions.Apps.filter(e=>e.isWebPartApp).map(e=>({key:e.id,text:e.name}));this.dropDownProps.options?.push(...t),this.dropDownProps.selectedKey=this.properties.selectedApp,this.dropDownProps.disabled=!1,this.context.propertyPane.refresh()}).catch(e=>{console.error(a.Lf,"Error while awaiting all app assets to load",e)})}getPropertyPaneConfiguration(){const e={groupFields:[(0,t.PropertyPaneLabel)("spfxExtensionLoaderLabel",{text:"App not working? Try refreshing the page. Or go to the configuration page."}),(0,t.PropertyPaneButton)("configuratorButton",{text:"Open Configurator",buttonType:1,onClick:()=>{window.open(`${this.appCatalogUrl}?web=${this.context.pageContext.web.absoluteUrl}`,"_blank")}})]},n=this.hideConfiguratorButton?[]:[e],a={groupFields:[(0,t.PropertyPaneDropdown)("selectedApp",{label:"App",disabled:this.dropDownProps.disabled,options:this.dropDownProps.options,selectedKey:this.dropDownProps.selectedKey}),(0,t.PropertyPaneLabel)("selectedAppDecription",{text:this.appDescription})]};return{pages:[{groups:[...n,...this.hideAppSelectorWhenAppLoaded?[]:[a],{groupFields:[this.CustomWebpartConfigurationField("SPFxExtensionAppConfiguration")]}]}]}}getTopActionsConfiguration(){return{topActions:this.properties.topActions??[],onExecute:(e,t)=>{this.SPFxExtensionInstance?.executeListeners("onTopActionExecute",{actionName:e,updatedValue:t})}}}onPropertyPaneConfigurationComplete(){!this.context.propertyPane.isPropertyPaneOpen()&&this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onConfigurationClose",{domElement:this.configDomElement})}onPropertyPaneFieldChanged(e,t,n){if("selectedApp"===e){if(t&&t!==n&&this.SPFxExtensionInstance){if(!confirm("You are about to switch app, this will erase all previous app configuration. Are you sure?"))return void(this.properties[e]=t);this.unmountApp()}n&&(this.webpartSectionElement.remove(),this.mountApp(n).catch(()=>{}))}}onDisplayModeChanged(t){const n=t===e.DisplayMode.Edit?"Read":"Edit";this.SPFxExtensionInstance?.executeListeners("onDisplayModeChange",n)}onAfterPropertyPaneChangesApplied(){this.SPFxExtensionInstance?.executeListeners("onPropertyPaneChangesApplied",void 0)}onAfterResize(e){this.SPFxExtensionInstance?.executeListeners("onAfterResize",{newWidth:e})}onDispose(){this.unmountApp(),this.appButtonElements.forEach(e=>{e.remove()}),this.appButtonElements.splice(0,this.appButtonElements.length),this.webpartSectionElement.remove(),this.webpartSectionTitle.remove(),this.appButtonsWrapper.remove(),this.appButtonsContainer.remove()}onThemeChanged(e){this.SPFxExtensionInstance?.executeListeners("onThemeChange",e)}get dataVersion(){return e.Version.parse("1.0")}}})(),u})())})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Client Side Assets" Description="A feature that help deploy client side component assets to SharePoint Online." Id="
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Client Side Assets" Description="A feature that help deploy client side component assets to SharePoint Online." Id="58874ae2-2c44-40f3-babf-cdda9523cac5" Version="1.0.0.0" Scope="Web" Hidden="FALSE"></Feature>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><AppPartConfig xmlns="http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration"><Id>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><AppPartConfig xmlns="http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration"><Id>0726c4dc-2951-4a89-a5df-bf4ae63e58b0</Id></AppPartConfig>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/partconfiguration" Target="/ClientSideAssets.xml.config.xml" Id="r6"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extension-application-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/partconfiguration" Target="/ClientSideAssets.xml.config.xml" Id="r6"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extension-application-customizer_1ed614b7d2607a62ce4e.js" Id="r7"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extension-core.js" Id="r8"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extension-coreconfigurator.js" Id="r9"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extension-loader_e83dead2a8f8f000d374.js" Id="r10"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extension-wrapper.js" Id="r11"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/spfx-extensionloader-web-part_1ca10faea5832c6d6178.js" Id="r12"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/3be36e80-4431-4b52-99c5-0a339b4e696e_color.png" Id="r13"></Relationship><Relationship Type="http://schemas.microsoft.com/sharepoint/2012/app/relationships/clientsideasset" Target="/ClientSideAssets/3be36e80-4431-4b52-99c5-0a339b4e696e_outline.png" Id="r14"></Relationship></Relationships>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Application Extension - Deployment of custom action" Description="Deploys a custom action with ClientSideComponentId association" Id="83e13c11-682e-4eaa-9ae0-74617ca28f96" Version="1.
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Application Extension - Deployment of custom action" Description="Deploys a custom action with ClientSideComponentId association" Id="83e13c11-682e-4eaa-9ae0-74617ca28f96" Version="1.5.1.0" Scope="Web" Hidden="FALSE"></Feature>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><AppPartConfig xmlns="http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration"><Id>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><AppPartConfig xmlns="http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration"><Id>c3bf27a7-a9e7-4bf2-bb24-31708d7ad5ea</Id></AppPartConfig>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e=document.currentScript;define("8d1029da-85e6-48cc-aaaf-37a5bbc0b9be_1.5.1",["@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_e83dead2a8f8f000d374.js",s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},a="6cc779ad78b22e0ab7384b402525e382:",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_6cc779ad78b22e0ab7384b402525e382=self.webpackJsonp_6cc779ad78b22e0ab7384b402525e382||[];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 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-17T11:52:36.045Z"},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-17T11:52:36.045Z")x=await v(!0),E({Title:"Version",Data:"2025-07-17T11:52:36.045Z",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-17T11:52:36.045Z"),await s1();try{await window.__SPFxExtensions.RegisterApp(kw)}catch(w){z("Error registering configurator app",w)}}Dw();
|
|
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",{domElement: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-08-06T21:59:15.673Z"},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-08-06T21:59:15.673Z")x=await v(!0),E({Title:"Version",Data:"2025-08-06T21:59:15.673Z",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-08-06T21:59:15.673Z"),await s1();try{await window.__SPFxExtensions.RegisterApp(kw)}catch(w){z("Error registering configurator app",w)}}Dw();
|