11 lines
245 KiB
JavaScript
11 lines
245 KiB
JavaScript
define("abc3361f-bb2d-491f-aba3-cd51c19a299b_1.0.4",["@microsoft/decorators","@microsoft/sp-core-library","@microsoft/sp-application-base","MegaMenuApplicationCustomizerStrings","@microsoft/sp-http","@microsoft/sp-lodash-subset","@microsoft/sp-page-context"],function(e,t,n,r,o,i,s){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){"use strict";(function(e){function r(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})}function s(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&n[0]?i.return:n[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){u.label=n[1];break}if(6===n[0]&&u.label<s[1]){u.label=s[1],s=n;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(n);break}s[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function a(e){if(Object(g.r)(e))return"";var t=e.indexOf("_api/");return t<0&&(t=e.indexOf("_vti_bin/")),t>-1?e.substr(0,t):e}function u(e){var t=[],n=["odata.type","odata.editLink","__metadata","odata.metadata"];return Object(g.j)(e,n[0])&&"SP.Web"===e[n[0]]?Object(g.j)(e,n[1])?t.push(e[n[1]]):Object(g.j)(e,n[2])&&t.push(e.__metadata.uri):Object(g.j)(e,n[3])&&Object(g.j)(e,n[1])?t.push(a(e[n[3]]),"_api",e[n[1]]):Object(g.j)(e,n[1])?t.push("_api",e[n[1]]):Object(g.j)(e,n[2])&&t.push(e.__metadata.uri),t.length<1?(b.a.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",2),""):g.d.apply(void 0,t)}function c(e){return new O(e)}function l(e){g.c.extend(e)}function p(e){return new Promise(function(t){if(Object(g.m)(e))return t(e);if(null!==I.baseUrl)return t(Object(g.d)(I.baseUrl,e));if(void 0!==x._spPageContextInfo){if(Object(g.j)(x._spPageContextInfo,"webAbsoluteUrl"))return t(Object(g.d)(x._spPageContextInfo.webAbsoluteUrl,e));if(Object(g.j)(x._spPageContextInfo,"webServerRelativeUrl"))return t(Object(g.d)(x._spPageContextInfo.webServerRelativeUrl,e))}if(void 0!==x.location){var n=x.location.toString().toLowerCase();["/_layouts/","/siteassets/"].forEach(function(r){var o=n.indexOf(r);if(o>0)return t(Object(g.d)(n.substr(0,o),e))})}return t(e)})}function d(e){return{__metadata:{type:e}}}function h(e){return function(t){return function(t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.call(this,n[0],n.length>1&&void 0!==n[1]?n[1]:e)||this}return r(n,t),n}(t)}}function f(e){return e.length<1?1:Math.max.apply(null,e.map(function(e){return e.order}))+1}function y(e){for(var t=0;t<e.length;t++)e[t].order=t+1,Object(g.j)(e[t],"columns")?y(e[t].columns):Object(g.j)(e[t],"controls")&&y(e[t].controls)}n.d(t,"b",function(){return Zt}),n.d(t,"a",function(){return It});var m,g=n(3),b=n(4),v=n(12),S=n(0),T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},O=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){var t=new n.factory(u(e),null);return Object(g.f)(t,e)},n}return r(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then(function(e){var t=new n.factory(u(e),null);return Object(g.f)(t,e)})},t}(v.g),w=(function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return e.map(function(e){var t=new n.factory(u(e),null);return Object(g.f)(t,e)})},n}r(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then(function(e){return e.map(function(e){var t=new n.factory(u(e),null);return Object(g.f)(t,e)})})}}(v.g),function(){function e(){}return Object.defineProperty(e.prototype,"headers",{get:function(){var e=g.c.get("sp");return void 0!==e&&void 0!==e.headers?e.headers:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){var e=g.c.get("sp");return void 0!==e&&void 0!==e.baseUrl?e.baseUrl:void 0!==g.c.spfxContext&&null!==g.c.spfxContext?g.c.spfxContext.pageContext.web.absoluteUrl:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchClientFactory",{get:function(){var e=g.c.get("sp");return void 0!==e&&void 0!==e.fetchClientFactory?e.fetchClientFactory:function(){return new g.a}},enumerable:!0,configurable:!0}),e}()),I=new w,_=function(){function e(){}return e}(),P=new Map,C=function(){function e(e,t){void 0===t&&(t=P),this._httpClient=e,this._digests=t}return e.prototype.getDigest=function(e){var t=this,n=this._digests.get(e);if(void 0!==n){if(new Date<n.expiration)return Promise.resolve(n.value)}var r=Object(g.d)(e,"/_api/contextinfo"),o={Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"};return this._httpClient.fetchRaw(r,{cache:"no-cache",credentials:"same-origin",headers:Object(g.f)(o,I.headers,!0),method:"POST"}).then(function(e){return(new v.f).parse(e).then(function(e){return e.GetContextWebInformation})}).then(function(n){var r=new _;r.value=n.FormDigestValue;var o=n.FormDigestTimeoutSeconds,i=new Date;return i.setTime(i.getTime()+1e3*o),r.expiration=i,t._digests.set(e,r),r.value})},e.prototype.clear=function(){this._digests.clear()},e}(),E=function(){function e(e){void 0===e&&(e=I.fetchClientFactory()),this._impl=e,this._digestCache=new C(this)}return e.prototype.fetch=function(e,t){var n=this;void 0===t&&(t={});var r=Object(g.f)(t,{cache:"no-cache",credentials:"same-origin"},!0),o=new Headers;return Object(g.o)(o,I.headers),Object(g.o)(o,t.headers),o.has("Accept")||o.append("Accept","application/json"),o.has("Content-Type")||o.append("Content-Type","application/json;odata=verbose;charset=utf-8"),o.has("X-ClientService-ClientTag")||o.append("X-ClientService-ClientTag","PnPCoreJS:@pnp-1.3.11"),o.has("User-Agent")||o.append("User-Agent","NONISV|SharePointPnP|PnPCoreJS/1.3.11"),r=Object(g.f)(r,{headers:o}),!r.method||"GET"===r.method.toUpperCase()||o.has("X-RequestDigest")||o.has("Authorization")?this.fetchRaw(e,r):this._digestCache.getDigest(a(e)).then(function(t){return o.append("X-RequestDigest",t),n.fetchRaw(e,r)})},e.prototype.fetchRaw=function(e,t){var n=this;void 0===t&&(t={});var r=new Headers;Object(g.o)(r,t.headers),t=Object(g.f)(t,{headers:r});var o=function(r){var i=function(e){var t;e.headers.has("Retry-After")?t=parseInt(e.headers.get("Retry-After"),10):(t=r.delay,r.delay*=2),r.attempts++,r.retryCount<=r.attempts?r.reject(Error("Retry count exceeded ("+r.retryCount+") for request. Response status: ["+e.status+"] "+e.statusText)):setTimeout(Object(g.g)(n,o,r),t)};n._impl.fetch(e,t).then(function(e){429===e.status?i(e):r.resolve(e)}).catch(function(e){503===e.status||504===e.status?i(e):r.reject(e)})};return new Promise(function(e,t){var r={attempts:0,delay:100,reject:t,resolve:e,retryCount:7};o.call(n,r)})},e.prototype.get=function(e,t){void 0===t&&(t={});var n=Object(g.f)(t,{method:"GET"});return this.fetch(e,n)},e.prototype.post=function(e,t){void 0===t&&(t={});var n=Object(g.f)(t,{method:"POST"});return this.fetch(e,n)},e.prototype.patch=function(e,t){void 0===t&&(t={});var n=Object(g.f)(t,{method:"PATCH"});return this.fetch(e,n)},e.prototype.delete=function(e,t){void 0===t&&(t={});var n=Object(g.f)(t,{method:"DELETE"});return this.fetch(e,n)},e}(),x=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},N=function(e){function t(t,n){var r=e.call(this)||this;if(r._forceCaching=!1,"string"==typeof t)if(Object(g.m)(t)||t.lastIndexOf("/")<0)r._parentUrl=t,r._url=Object(g.d)(t,n);else if(t.lastIndexOf("/")>t.lastIndexOf("(")){var o=t.lastIndexOf("/");r._parentUrl=t.slice(0,o),n=Object(g.d)(t.slice(o),n),r._url=Object(g.d)(r._parentUrl,n)}else{var o=t.lastIndexOf("(");r._parentUrl=t.slice(0,o),r._url=Object(g.d)(t,n)}else{r.extend(t,n);var i=t.query.get("@target");void 0!==i&&r.query.set("@target",i)}return r}return r(t,e),t.prototype.as=function(e){var t=new e(this._url,null);return Object(g.f)(t,this,!0)},t.prototype.toUrlAndQuery=function(){var e=new Map(this.query),t=this.toUrl().replace(/'!(@.*?)::(.*?)'/gi,function(t,n,r){return b.a.write("Rewriting aliased parameter from match "+t+" to label: "+n+" value: "+r,0),e.set(n,"'"+r+"'"),n});if(e.size>0){t+=""+(t.indexOf("?")>-1?"&":"?")+Array.from(e).map(function(e){return e[0]+"="+e[1]}).join("&")}return t},t.prototype.select=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length>0&&this.query.set("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length>0&&this.query.set("$expand",e.join(",")),this},t.prototype.getParent=function(e,t,n,r){void 0===t&&(t=this.parentUrl);var o=new e(t,n).configureFrom(this),i="@target";return this.query.has(i)&&o.query.set(i,this.query.get(i)),void 0!==r&&(o=o.inBatch(r)),o},t.prototype.clone=function(t,n,r){void 0===r&&(r=!0);var o=e.prototype._clone.call(this,new t(this,n),{includeBatch:r}),i="@target";return this.query.has(i)&&o.query.set(i,this.query.get(i)),o},t.prototype.toRequestContext=function(e,t,n,r){var o=this;void 0===t&&(t={});var i=this.hasBatch?this._batchDependency:function(){};return p(this.toUrlAndQuery()).then(function(s){return Object(g.p)(t,o._options),{batch:o.batch,batchDependency:i,cachingOptions:o._cachingOptions,clientFactory:function(){return new E},isBatched:o.hasBatch,isCached:o._forceCaching||o._useCaching&&/^get$/i.test(e),options:t,parser:n,pipeline:r,requestAbsoluteUrl:s,requestId:Object(g.h)(),verb:e}})},t}(v.h),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.filter=function(e){return this.query.set("$filter",e),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(e+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t}(N),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype._update=function(e,t){var n=this;return function(r){return n.postCore({body:Object(g.n)(Object(g.f)(d(e),r)),headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return t(e,r)})}},t.prototype._delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},t.prototype._deleteWithETag=function(e){return void 0===e&&(e="*"),this.postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t}(N),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){return new k(this,"getById("+e+")")},t.prototype.getByEmail=function(e){return new k(this,"getByEmail('"+e+"')")},t.prototype.getByLoginName=function(e){var t=new k(this);return t.concat("('!@v::"+encodeURIComponent(e)+"')"),t},t.prototype.removeById=function(e){return this.clone(n,"removeById("+e+")").postCore()},t.prototype.removeByLoginName=function(e){var t=this.clone(n,"removeByLoginName(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.postCore()},t.prototype.add=function(e){var t=this;return this.clone(n,null).postCore({body:Object(g.n)(Object(g.f)(d("SP.User"),{LoginName:e}))}).then(function(){return t.getByLoginName(e)})};var n;return t=n=o([h("siteusers")],t)}(j),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new F(this,"groups")},enumerable:!0,configurable:!0}),t}(R),k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.User",function(e){return{data:e,user:t}}),t.delete=t._delete,t}return r(t,e),t}(U),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("currentuser")],t)}(U);!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(m||(m={}));var D,F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new M(this);return t.concat("("+e+")"),t},t.prototype.add=function(e){var t=this,n=Object(g.n)(Object(g.f)(d("SP.Group"),e));return this.postCore({body:n}).then(function(e){return{data:e,group:t.getById(e.Id)}})},t.prototype.getByName=function(e){return new M(this,"getByName('"+e+"')")},t.prototype.removeById=function(e){return this.clone(n,"removeById('"+e+"')").postCore()},t.prototype.removeByLoginName=function(e){return this.clone(n,"removeByLoginName('"+e+"')").postCore()};var n;return t=n=o([h("sitegroups")],t)}(j),M=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.update=n._update("SP.Group",function(e,r){var o=n;return Object(g.j)(r,"Title")&&(o=n.getParent(t,n.parentUrl,"getByName('"+r.Title+"')")),{data:e,group:o}}),n}return r(t,e),Object.defineProperty(t.prototype,"users",{get:function(){return new A(this,"users")},enumerable:!0,configurable:!0}),t.prototype.setUserAsOwner=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){return[2,this.clone(t,"SetUserAsOwner("+e+")").postCore()]})})},t}(R),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new q(this);return t.concat("("+e+")"),t},t.prototype.add=function(e,t){return this.clone(n,"addroleassignment(principalid="+e+", roledefid="+t+")").postCore()},t.prototype.remove=function(e,t){return this.clone(n,"removeroleassignment(principalid="+e+", roledefid="+t+")").postCore()};var n;return t=n=o([h("roleassignments")],t)}(j),q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._delete,t}return r(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new F(this,"groups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return new H(this)},enumerable:!0,configurable:!0}),t}(R),G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){return new W(this,"getById("+e+")")},t.prototype.getByName=function(e){return new W(this,"getbyname('"+e+"')")},t.prototype.getByType=function(e){return new W(this,"getbytype("+e+")")},t.prototype.add=function(e,t,n,r){var o=this,i=Object(g.n)({BasePermissions:{High:r.High.toString(),Low:r.Low.toString()},Description:t,Name:e,Order:n,__metadata:{type:"SP.RoleDefinition"}});return this.postCore({body:i}).then(function(e){return{data:e,definition:o.getById(e.Id)}})},t=o([h("roledefinitions")],t)}(j),W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._delete,t}return r(t,e),t.prototype.update=function(e){var t=this;void 0!==Object(g.j)(e,"BasePermissions")&&(e.BasePermissions=Object(g.f)({__metadata:{type:"SP.BasePermissions"}},{High:e.BasePermissions.High.toString(),Low:e.BasePermissions.Low.toString()}));var n=Object(g.n)(Object(g.f)(d("SP.RoleDefinition"),e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(n){var r=t;if(Object(g.j)(e,"Name")){r=t.getParent(G,t.parentUrl,"").getByName(e.Name)}return{data:n,definition:r}})},t}(R),H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("roledefinitionbindings")],t)}(j);!function(e){e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(D||(D={}));var K;!function(e){e[e.Invalid=0]="Invalid",e[e.Integer=1]="Integer",e[e.Text=2]="Text",e[e.Note=3]="Note",e[e.DateTime=4]="DateTime",e[e.Counter=5]="Counter",e[e.Choice=6]="Choice",e[e.Lookup=7]="Lookup",e[e.Boolean=8]="Boolean",e[e.Number=9]="Number",e[e.Currency=10]="Currency",e[e.URL=11]="URL",e[e.Computed=12]="Computed",e[e.Threading=13]="Threading",e[e.Guid=14]="Guid",e[e.MultiChoice=15]="MultiChoice",e[e.GridChoice=16]="GridChoice",e[e.Calculated=17]="Calculated",e[e.File=18]="File",e[e.Attachments=19]="Attachments",e[e.User=20]="User",e[e.Recurrence=21]="Recurrence",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.ModStat=23]="ModStat",e[e.Error=24]="Error",e[e.ContentTypeId=25]="ContentTypeId",e[e.PageSeparator=26]="PageSeparator",e[e.ThreadIndex=27]="ThreadIndex",e[e.WorkflowStatus=28]="WorkflowStatus",e[e.AllDayEvent=29]="AllDayEvent",e[e.WorkflowEventType=30]="WorkflowEventType"}(K||(K={}));var V;!function(e){e[e.DateOnly=0]="DateOnly",e[e.DateTime=1]="DateTime"}(V||(V={}));var Q;!function(e){e[e.Unspecified=0]="Unspecified",e[e.Disabled=1]="Disabled",e[e.Relative=2]="Relative"}(Q||(Q={}));var z;!function(e){e[e.DefaultValue=0]="DefaultValue",e[e.AddToDefaultContentType=1]="AddToDefaultContentType",e[e.AddToNoContentType=2]="AddToNoContentType",e[e.AddToAllContentTypes=4]="AddToAllContentTypes",e[e.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",e[e.AddFieldToDefaultView=16]="AddFieldToDefaultView",e[e.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(z||(z={}));var X;!function(e){e[e.Gregorian=1]="Gregorian",e[e.Japan=3]="Japan",e[e.Taiwan=4]="Taiwan",e[e.Korea=5]="Korea",e[e.Hijri=6]="Hijri",e[e.Thai=7]="Thai",e[e.Hebrew=8]="Hebrew",e[e.GregorianMEFrench=9]="GregorianMEFrench",e[e.GregorianArabic=10]="GregorianArabic",e[e.GregorianXLITEnglish=11]="GregorianXLITEnglish",e[e.GregorianXLITFrench=12]="GregorianXLITFrench",e[e.KoreaJapanLunar=14]="KoreaJapanLunar",e[e.ChineseLunar=15]="ChineseLunar",e[e.SakaEra=16]="SakaEra",e[e.UmAlQura=23]="UmAlQura"}(X||(X={}));var J;!function(e){e[e.Hyperlink=0]="Hyperlink",e[e.Image=1]="Image"}(J||(J={}));var Y;!function(e){e[e.EmptyMask=0]="EmptyMask",e[e.ViewListItems=1]="ViewListItems",e[e.AddListItems=2]="AddListItems",e[e.EditListItems=3]="EditListItems",e[e.DeleteListItems=4]="DeleteListItems",e[e.ApproveItems=5]="ApproveItems",e[e.OpenItems=6]="OpenItems",e[e.ViewVersions=7]="ViewVersions",e[e.DeleteVersions=8]="DeleteVersions",e[e.CancelCheckout=9]="CancelCheckout",e[e.ManagePersonalViews=10]="ManagePersonalViews",e[e.ManageLists=12]="ManageLists",e[e.ViewFormPages=13]="ViewFormPages",e[e.AnonymousSearchAccessList=14]="AnonymousSearchAccessList",e[e.Open=17]="Open",e[e.ViewPages=18]="ViewPages",e[e.AddAndCustomizePages=19]="AddAndCustomizePages",e[e.ApplyThemeAndBorder=20]="ApplyThemeAndBorder",e[e.ApplyStyleSheets=21]="ApplyStyleSheets",e[e.ViewUsageData=22]="ViewUsageData",e[e.CreateSSCSite=23]="CreateSSCSite",e[e.ManageSubwebs=24]="ManageSubwebs",e[e.CreateGroups=25]="CreateGroups",e[e.ManagePermissions=26]="ManagePermissions",e[e.BrowseDirectories=27]="BrowseDirectories",e[e.BrowseUserInfo=28]="BrowseUserInfo",e[e.AddDelPrivateWebParts=29]="AddDelPrivateWebParts",e[e.UpdatePersonalWebParts=30]="UpdatePersonalWebParts",e[e.ManageWeb=31]="ManageWeb",e[e.AnonymousSearchAccessWebLists=32]="AnonymousSearchAccessWebLists",e[e.UseClientIntegration=37]="UseClientIntegration",e[e.UseRemoteAPIs=38]="UseRemoteAPIs",e[e.ManageAlerts=39]="ManageAlerts",e[e.CreateAlerts=40]="CreateAlerts",e[e.EditMyUserInfo=41]="EditMyUserInfo",e[e.EnumeratePermissions=63]="EnumeratePermissions",e[e.FullMask=65]="FullMask"}(Y||(Y={}));var $;!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}($||($={}));var Z;!function(e){e[e.None=0]="None",e[e.UserInfoList=1]="UserInfoList",e[e.Windows=2]="Windows",e[e.MembershipProvider=4]="MembershipProvider",e[e.RoleProvider=8]="RoleProvider",e[e.All=15]="All"}(Z||(Z={}));var ee;!function(e){e[e.None=0]="None",e[e.Guest=1]="Guest",e[e.Reader=2]="Reader",e[e.Contributor=3]="Contributor",e[e.WebDesigner=4]="WebDesigner",e[e.Administrator=5]="Administrator"}(ee||(ee={}));var te;!function(e){e[e.Invalid=-1]="Invalid",e[e.DefaultView=0]="DefaultView",e[e.NormalView=1]="NormalView",e[e.DialogView=2]="DialogView",e[e.View=3]="View",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.SolutionForm=10]="SolutionForm",e[e.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(te||(te={}));var ne;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Direct=1]="Direct",e[e.OrganizationView=2]="OrganizationView",e[e.OrganizationEdit=3]="OrganizationEdit",e[e.AnonymousView=4]="AnonymousView",e[e.AnonymousEdit=5]="AnonymousEdit",e[e.Flexible=6]="Flexible"}(ne||(ne={}));var re;!function(e){e[e.None=0]="None",e[e.View=1]="View",e[e.Edit=2]="Edit",e[e.Owner=3]="Owner"}(re||(re={}));var oe;!function(e){e[e.CompletedSuccessfully=0]="CompletedSuccessfully",e[e.AccessRequestsQueued=1]="AccessRequestsQueued",e[e.NoResolvedUsers=-1]="NoResolvedUsers",e[e.AccessDenied=-2]="AccessDenied",e[e.CrossSiteRequestNotSupported=-3]="CrossSiteRequestNotSupported",e[e.UnknowError=-4]="UnknowError",e[e.EmailBodyTooLong=-5]="EmailBodyTooLong",e[e.ListUniqueScopesExceeded=-6]="ListUniqueScopesExceeded",e[e.CapabilityDisabled=-7]="CapabilityDisabled",e[e.ObjectNotSupported=-8]="ObjectNotSupported",e[e.NestedGroupsNotSupported=-9]="NestedGroupsNotSupported"}(oe||(oe={}));var ie;!function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Folder=2]="Folder",e[e.Item=3]="Item",e[e.List=4]="List",e[e.Web=5]="Web",e[e.Max=6]="Max"}(ie||(ie={}));var se;!function(e){e[e.None=0]="None",e[e.AllowList=1]="AllowList",e[e.BlockList=2]="BlockList"}(se||(se={}));var ae;!function(e){e[e.None=0]="None",e[e.ContextInfo=1]="ContextInfo",e[e.ListData=2]="ListData",e[e.ListSchema=4]="ListSchema",e[e.MenuView=8]="MenuView",e[e.ListContentType=16]="ListContentType",e[e.FileSystemItemId=32]="FileSystemItemId",e[e.ClientFormSchema=64]="ClientFormSchema",e[e.QuickLaunch=128]="QuickLaunch",e[e.Spotlight=256]="Spotlight",e[e.Visualization=512]="Visualization",e[e.ViewMetadata=1024]="ViewMetadata",e[e.DisableAutoHyperlink=2048]="DisableAutoHyperlink",e[e.EnableMediaTAUrls=4096]="EnableMediaTAUrls",e[e.ParentInfo=8192]="ParentInfo",e[e.PageContextInfo=16384]="PageContextInfo",e[e.ClientSideComponentManifest=32768]="ClientSideComponentManifest"}(ae||(ae={}));var ue;!function(e){e[e.PeopleAndGroups=1]="PeopleAndGroups",e[e.PeopleOnly=0]="PeopleOnly"}(ue||(ue={}));var ce;!function(e){e[e.Dropdown=0]="Dropdown",e[e.RadioButtons=1]="RadioButtons"}(ce||(ce={}));var le;!function(e){e[e.DefaultZone=0]="DefaultZone",e[e.Intranet=1]="Intranet",e[e.Internet=2]="Internet",e[e.Custom=3]="Custom",e[e.Extranet=4]="Extranet"}(le||(le={}));var pe,de=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"roleAssignments",{get:function(){return new B(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstUniqueAncestorSecurableObject",{get:function(){return new R(this,"FirstUniqueAncestorSecurableObject")},enumerable:!0,configurable:!0}),t.prototype.getUserEffectivePermissions=function(e){var t=this.clone(N,"getUserEffectivePermissions(@user)");return t.query.set("@user","'"+encodeURIComponent(e)+"'"),t.get().then(function(e){return Object(g.j)(e,"GetUserEffectivePermissions")?e.GetUserEffectivePermissions:e})},t.prototype.getCurrentUserEffectivePermissions=function(){return this.clone(N,"EffectiveBasePermissions").get().then(function(e){return Object(g.j)(e,"EffectiveBasePermissions")?e.EffectiveBasePermissions:e})},t.prototype.breakRoleInheritance=function(e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),this.clone(t,"breakroleinheritance(copyroleassignments="+e+", clearsubscopes="+n+")").postCore()},t.prototype.resetRoleInheritance=function(){return this.clone(t,"resetroleinheritance").postCore()},t.prototype.userHasPermissions=function(e,t){var n=this;return this.getUserEffectivePermissions(e).then(function(e){return n.hasPermissions(e,t)})},t.prototype.currentUserHasPermissions=function(e){var t=this;return this.getCurrentUserEffectivePermissions().then(function(n){return t.hasPermissions(n,e)})},t.prototype.hasPermissions=function(e,t){if(!t)return!0;if(t===Y.FullMask)return 32767==(32767&e.High)&&65535===e.Low;t-=1;var n=1;return t>=0&&t<32?(n<<=t,0!=(e.Low&n)):t>=32&&t<64&&(n<<=t-32,0!=(e.High&n))},t}(R),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getShareLink=function(e,n){void 0===n&&(n=null);var r=null!==n?n.toISOString():null;return this.clone(t,"shareLink").postCore({body:Object(g.n)({request:{createLink:!0,emailData:null,settings:{expiration:r,linkKind:e}}})})},t.prototype.shareWith=function(e,n,r,o,i){var s=this;void 0===r&&(r=!1),void 0===o&&(o=!1),Array.isArray(e)||(e=[e]);var a=Object(g.n)(e.map(function(e){return{Key:e}})),u=n===re.Edit?ee.Contributor:ee.Reader;return new j("_api/web","roledefinitions").select("Id").filter("RoleTypeKind eq "+u).get().then(function(e){if(!Array.isArray(e)||e.length<1)throw Error("Could not locate a role defintion with RoleTypeKind "+u);var n={includeAnonymousLinkInEmail:r,peoplePickerInput:a,propagateAcl:o,roleValue:"role:"+e[0].Id,useSimplifiedRoles:!0};return void 0!==i&&(n=Object(g.f)(n,{emailBody:i.body,emailSubject:void 0!==i.subject?i.subject:"",sendEmail:!0})),s.clone(t,"shareObject").postCore({body:Object(g.n)(n)})})},t.prototype.shareObject=function(e,t){var n=this;return void 0===t&&(t=!1),t?this.sendShareObjectRequest(e):(e=Object(g.f)(e,{group:null,includeAnonymousLinkInEmail:!1,propagateAcl:!1,useSimplifiedRoles:!0},!0),this.getRoleValue(e.role,e.group).then(function(t){Array.isArray(e.loginNames)||(e.loginNames=[e.loginNames]);var r=Object(g.n)(e.loginNames.map(function(e){return{Key:e}})),o={peoplePickerInput:r,roleValue:t,url:e.url};return void 0!==e.emailData&&null!==e.emailData&&(o=Object(g.f)(o,{emailBody:e.emailData.body,emailSubject:void 0!==e.emailData.subject?e.emailData.subject:"Shared with you.",sendEmail:!0})),n.sendShareObjectRequest(o)}))},t.prototype.unshareObjectWeb=function(e){return this.clone(t,"unshareObject").postCore({body:Object(g.n)({url:e})})},t.prototype.checkPermissions=function(e){return this.clone(t,"checkPermissions").postCore({body:Object(g.n)({recipients:e})})},t.prototype.getSharingInformation=function(e,n){void 0===e&&(e=null);var r=this.clone(t,"getSharingInformation");return r.expand.apply(r,n).postCore({body:Object(g.n)({request:e})})},t.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),this.clone(t,"getObjectSharingSettings").postCore({body:Object(g.n)({useSimplifiedRoles:e})})},t.prototype.unshareObject=function(){return this.clone(t,"unshareObject").postCore()},t.prototype.deleteLinkByKind=function(e){return this.clone(t,"deleteLinkByKind").postCore({body:Object(g.n)({linkKind:e})})},t.prototype.unshareLink=function(e,n){return void 0===n&&(n="00000000-0000-0000-0000-000000000000"),this.clone(t,"unshareLink").postCore({body:Object(g.n)({linkKind:e,shareId:n})})},t.prototype.getRoleValue=function(e,t){if(void 0===t||null===t){var n=e===re.Edit?ee.Contributor:ee.Reader;return new j("_api/web","roledefinitions").select("Id").top(1).filter("RoleTypeKind eq "+n).get().then(function(e){if(e.length<1)throw Error("Could not locate associated role definition for supplied role. Edit and View are supported");return"role: "+e[0].Id})}switch(t){case ee.Contributor:return new R("_api/web","associatedmembergroup").select("Id").get().then(function(e){return"group: "+e.Id});case ee.Reader:case ee.Guest:return new R("_api/web","associatedvisitorgroup").select("Id").get().then(function(e){return"group: "+e.Id});default:throw Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported")}},t.prototype.getShareObjectWeb=function(e){return Promise.resolve(new R(a(e),"/_api/SP.Web.ShareObject"))},t.prototype.sendShareObjectRequest=function(e){return this.getShareObjectWeb(this.toUrl()).then(function(n){return n.expand("UsersWithAccessRequests","GroupsSharedWith").as(t).postCore({body:Object(g.n)(e)})})},t}(N),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shareWith=function(e,t,n){var r=this;void 0===t&&(t=re.View);var o=this.addBatchDependency();return new R(a(this.toUrl()),"/_api/web/url").get().then(function(i){return o(),r.shareObject(Object(g.d)(i,"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"),e,t,n)})},t.prototype.shareObject=function(e,t,n,r,o,i,s,a){return void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===a&&(a=!0),this.clone(he,null).shareObject({emailData:r,group:o,includeAnonymousLinkInEmail:s,loginNames:t,propagateAcl:i,role:n,url:e,useSimplifiedRoles:a})},t.prototype.shareObjectRaw=function(e){return this.clone(he,null).shareObject(e,!0)},t.prototype.unshareObject=function(e){return this.clone(he,null).unshareObjectWeb(e)},t}(de),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getShareLink=function(e,t){return void 0===e&&(e=ne.OrganizationView),void 0===t&&(t=null),this.clone(he,null).getShareLink(e,t)},t.prototype.shareWith=function(e,t,n,r){return void 0===t&&(t=re.View),void 0===n&&(n=!1),this.clone(he,null).shareWith(e,t,n,!1,r)},t.prototype.checkSharingPermissions=function(e){return this.clone(he,null).checkPermissions(e)},t.prototype.getSharingInformation=function(e,t){return void 0===e&&(e=null),this.clone(he,null).getSharingInformation(e,t)},t.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),this.clone(he,null).getObjectSharingSettings(e)},t.prototype.unshare=function(){return this.clone(he,null).unshareObject()},t.prototype.deleteSharingLinkByKind=function(e){return this.clone(he,null).deleteLinkByKind(e)},t.prototype.unshareLink=function(e,t){return this.clone(he,null).unshareLink(e,t)},t}(de),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getShareLink=function(e,t){void 0===e&&(e=ne.OrganizationView),void 0===t&&(t=null);var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.getShareLink(e,t)})},t.prototype.checkSharingPermissions=function(e){var t=this.addBatchDependency();return this.getShareable().then(function(n){return t(),n.checkPermissions(e)})},t.prototype.getSharingInformation=function(e,t){void 0===e&&(e=null);var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.getSharingInformation(e,t)})},t.prototype.getObjectSharingSettings=function(e){void 0===e&&(e=!0);var t=this.addBatchDependency();return this.getShareable().then(function(n){return t(),n.getObjectSharingSettings(e)})},t.prototype.unshare=function(){var e=this.addBatchDependency();return this.getShareable().then(function(t){return e(),t.unshareObject()})},t.prototype.deleteSharingLinkByKind=function(e){var t=this.addBatchDependency();return this.getShareable().then(function(n){return t(),n.deleteLinkByKind(e)})},t.prototype.unshareLink=function(e,t){var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.unshareLink(e,t)})},t.prototype.getShareable=function(){var e=this;return this.clone(ge,"listItemAllFields",!1).select("odata.id").get().then(function(t){var n=new he(u(t));return e.hasBatch&&(n=n.inBatch(e.batch)),n})},t}(R),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shareWith=function(e,t,n,r){void 0===t&&(t=re.View),void 0===n&&(n=!1);var o=this.addBatchDependency();return this.getShareable().then(function(i){return o(),i.shareWith(e,t,n,!1,r)})},t}(me),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shareWith=function(e,t,n,r,o){void 0===t&&(t=re.View),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=this.addBatchDependency();return this.getShareable().then(function(s){return i(),s.shareWith(e,t,n,r,o)})},t}(me),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"webparts",{get:function(){return new Se(this,"webparts")},enumerable:!0,configurable:!0}),t.prototype.export=function(e){return this.clone(t,"ExportWebPart").postCore({body:Object(g.n)({webPartId:e})})},t.prototype.import=function(e){return this.clone(t,"ImportWebPart").postCore({body:Object(g.n)({webPartXml:e})})},t}(N),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){return new Te(this,"getbyid('"+e+"')")},t.prototype.getByControlId=function(e){return new Te(this,"getByControlId('"+e+"')")},t}(j),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"webpart",{get:function(){return new Oe(this)},enumerable:!0,configurable:!0}),t.prototype.saveChanges=function(){return this.clone(t,"SaveWebPartChanges").postCore()},t.prototype.moveTo=function(e,n){return this.clone(t,"MoveWebPartTo(zoneID='"+e+"', zoneIndex="+n+")").postCore()},t.prototype.close=function(){return this.clone(t,"CloseWebPart").postCore()},t.prototype.open=function(){return this.clone(t,"OpenWebPart").postCore()},t.prototype.delete=function(){return this.clone(t,"DeleteWebPart").postCore()},t}(R),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("webpart")],t)}(R),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getByName=function(e){var t=new Ie(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e){var t=this;return this.clone(n,"add('"+e+"')").postCore().then(function(n){return{data:n,folder:t.getByName(e)}})},t.prototype.addUsingPath=function(e,t){var r=this;return void 0===t&&(t=!1),this.clone(n,"addUsingPath(DecodedUrl='"+e+"',overwrite="+t+")").postCore().then(function(t){return{data:t,folder:new Ie(a(r.toUrl()),"_api/web/getFolderByServerRelativePath(decodedUrl='"+e+"')")}})};var n;return t=n=o([h("folders")],t)}(j),Ie=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.Folder",function(e){return{data:e,folder:t}}),t}return r(t,e),Object.defineProperty(t.prototype,"contentTypeOrder",{get:function(){return new j(this,"contentTypeOrder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){return new et(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return new we(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return new R(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentFolder",{get:function(){return new t(this,"parentFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return new R(this,"properties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverRelativeUrl",{get:function(){return new N(this,"serverRelativeUrl")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uniqueContentTypeOrder",{get:function(){return new j(this,"uniqueContentTypeOrder")},enumerable:!0,configurable:!0}),t.prototype.delete=function(e){return void 0===e&&(e="*"),this.clone(t,null).postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.getItem=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.listItemAllFields;return n.select.apply(n,e).get().then(function(e){return Object(g.f)(new ze(u(e)),e)})},t.prototype.moveTo=function(e){return this.select("ServerRelativeUrl").get().then(function(n){var r=n.ServerRelativeUrl,o=n["odata.id"],i=a(o),s=i.replace("://","___").split("/")[0].replace("___","://");return new t(i,"/_api/SP.MoveCopyUtil.MoveFolder()").postCore({body:Object(g.n)({destUrl:Object(g.m)(e)?e:""+s+e,srcUrl:""+s+r})})})},t.prototype.copyTo=function(e){return this.select("ServerRelativeUrl").get().then(function(n){var r=n.ServerRelativeUrl,o=n["odata.id"],i=a(o),s=i.replace("://","___").split("/")[0].replace("___","://");return new t(i,"/_api/SP.MoveCopyUtil.CopyFolder()").postCore({body:Object(g.n)({destUrl:Object(g.m)(e)?e:""+s+e,srcUrl:""+s+r})})})},t}(be),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.addAvailableContentType=function(e){var t=this,r=Object(g.n)({contentTypeId:e});return this.clone(n,"addAvailableContentType").postCore({body:r}).then(function(e){return{contentType:t.getById(e.id),data:e}})},t.prototype.getById=function(e){var t=new Pe(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t,n,r,o){var i=this;void 0===n&&(n=""),void 0===r&&(r="Custom Content Types"),void 0===o&&(o={});var s=Object(g.n)(Object.assign(d("SP.ContentType"),{Description:n,Group:r,Id:{StringValue:e},Name:t},o));return this.postCore({body:s}).then(function(e){return{contentType:i.getById(e.id),data:e}})};var n;return t=n=o([h("contenttypes")],t)}(j),Pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._delete,t}return r(t,e),Object.defineProperty(t.prototype,"fieldLinks",{get:function(){return new Ce(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return new j(this,"fields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new t(this,"parent")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workflowAssociations",{get:function(){return new j(this,"workflowAssociations")},enumerable:!0,configurable:!0}),t}(R),Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new Ee(this);return t.concat("(guid'"+e+"')"),t},t=o([h("fieldlinks")],t)}(j),Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(R),xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getByName=function(e){var t=new Ne(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t){var r=this;return this.clone(n,"add(FileName='"+e+"')",!1).postCore({body:t}).then(function(t){return{data:t,file:r.getByName(e)}})},t.prototype.addMultiple=function(e){var t=this;return e.reduce(function(e,r){return e.then(function(){return t.clone(n,"add(FileName='"+r.name+"')",!1).postCore({body:r.content})})},Promise.resolve())},t.prototype.deleteMultiple=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(function(t,n){return t.then(function(){return e.getByName(n).delete()})},Promise.resolve())},t.prototype.recycleMultiple=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(function(t,n){return t.then(function(){return e.getByName(n).recycle()})},Promise.resolve())};var n;return t=n=o([h("AttachmentFiles")],t)}(j),Ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._deleteWithETag,t}return r(t,e),t.prototype.getText=function(){return this.getParsed(new v.i)},t.prototype.getBlob=function(){return this.getParsed(new v.a)},t.prototype.getBuffer=function(){return this.getParsed(new v.b)},t.prototype.getJSON=function(){return this.getParsed(new v.d)},t.prototype.setContent=function(e){var n=this;return this.clone(t,"$value",!1).postCore({body:e,headers:{"X-HTTP-Method":"PUT"}}).then(function(e){return new t(n)})},t.prototype.recycle=function(e){return void 0===e&&(e="*"),this.clone(t,"recycleObject").postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.getParsed=function(e){return this.clone(t,"$value",!1).get(e)},t}(R),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new Re(this);return t.concat("('"+e+"')"),t},t.prototype.getByTitle=function(e){return new Re(this,"getByTitle('"+e+"')")},t.prototype.add=function(e,t,r){var o=this;void 0===t&&(t=!1),void 0===r&&(r={});var i=Object(g.n)(Object.assign(d("SP.View"),{PersonalView:t,Title:e},r));return this.clone(n,null).postCore({body:i}).then(function(e){return{data:e,view:o.getById(e.Id)}})};var n;return t=n=o([h("views")],t)}(j),Re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.View",function(e){return{data:e,view:t}}),t.delete=t._delete,t}return r(t,e),Object.defineProperty(t.prototype,"fields",{get:function(){return new Ae(this)},enumerable:!0,configurable:!0}),t.prototype.renderAsHtml=function(){return this.clone(N,"renderashtml").get()},t.prototype.setViewXml=function(e){return this.clone(t,"SetViewXml").postCore({body:Object(g.n)({viewXml:e})})},t}(R),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getSchemaXml=function(){return this.clone(N,"schemaxml").get()},t.prototype.add=function(e){return this.clone(n,"addviewfield('"+e+"')").postCore()},t.prototype.move=function(e,t){return this.clone(n,"moveviewfieldto").postCore({body:Object(g.n)({field:e,index:t})})},t.prototype.removeAll=function(){return this.clone(n,"removeallviewfields").postCore()},t.prototype.remove=function(e){return this.clone(n,"removeviewfield('"+e+"')").postCore()};var n;return t=n=o([h("viewfields")],t)}(j),Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new ke(this);return t.concat("('"+e+"')"),t},t.prototype.getByTitle=function(e){return new ke(this,"getByTitle('"+e+"')")},t.prototype.getByInternalNameOrTitle=function(e){return new ke(this,"getByInternalNameOrTitle('"+e+"')")},t.prototype.createFieldAsXml=function(e){var t,r=this;t="string"==typeof e?{SchemaXml:e}:e;var o=Object(g.n)({parameters:Object(g.f)(d("SP.XmlSchemaFieldCreationInformation"),t)});return this.clone(n,"createfieldasxml").postCore({body:o}).then(function(e){return{data:e,field:r.getById(e.Id)}})},t.prototype.add=function(e,t,r){var o=this,i=Object(g.n)(Object.assign(d(t),{Title:e},r));return this.clone(n,null).postCore({body:i}).then(function(e){return{data:e,field:o.getById(e.Id)}})},t.prototype.addText=function(e,t,n){void 0===t&&(t=255);var r={FieldTypeKind:2,MaxLength:t};return this.add(e,"SP.FieldText",Object(g.f)(r,n))},t.prototype.addCalculated=function(e,t,n,r,o){void 0===r&&(r=K.Text);var i={DateFormat:n,FieldTypeKind:17,Formula:t,OutputType:r};return this.add(e,"SP.FieldCalculated",Object(g.f)(i,o))},t.prototype.addDateTime=function(e,t,n,r,o){void 0===t&&(t=V.DateOnly),void 0===n&&(n=X.Gregorian),void 0===r&&(r=Q.Unspecified);var i={DateTimeCalendarType:n,DisplayFormat:t,FieldTypeKind:4,FriendlyDisplayFormat:r};return this.add(e,"SP.FieldDateTime",Object(g.f)(i,o))},t.prototype.addNumber=function(e,t,n,r){var o={FieldTypeKind:9};return void 0!==t&&(o=Object(g.f)({MinimumValue:t},o)),void 0!==n&&(o=Object(g.f)({MaximumValue:n},o)),this.add(e,"SP.FieldNumber",Object(g.f)(o,r))},t.prototype.addCurrency=function(e,t,n,r,o){void 0===r&&(r=1033);var i={CurrencyLocaleId:r,FieldTypeKind:10};return void 0!==t&&(i=Object(g.f)({MinimumValue:t},i)),void 0!==n&&(i=Object(g.f)({MaximumValue:n},i)),this.add(e,"SP.FieldCurrency",Object(g.f)(i,o))},t.prototype.addMultilineText=function(e,t,n,r,o,i,s){void 0===t&&(t=6),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===i&&(i=!0);var a={AllowHyperlink:i,AppendOnly:o,FieldTypeKind:3,NumberOfLines:t,RestrictedMode:r,RichText:n};return this.add(e,"SP.FieldMultiLineText",Object(g.f)(a,s))},t.prototype.addUrl=function(e,t,n){void 0===t&&(t=J.Hyperlink);var r={DisplayFormat:t,FieldTypeKind:11};return this.add(e,"SP.FieldUrl",Object(g.f)(r,n))},t.prototype.addUser=function(e,t,n){var r={FieldTypeKind:20,SelectionMode:t};return this.add(e,"SP.FieldUser",Object(g.f)(r,n))},t.prototype.addLookup=function(e,t,r,o){var i=this,s=Object(g.f)({FieldTypeKind:7,LookupFieldName:r,LookupListId:t,Title:e},o),a=Object(g.n)({parameters:Object(g.f)(d("SP.FieldCreationInformation"),s)});return this.clone(n,"addfield").postCore({body:a}).then(function(e){return{data:e,field:i.getById(e.Id)}})},t.prototype.addChoice=function(e,t,n,r,o){void 0===n&&(n=ce.Dropdown);var i={Choices:{results:t},EditFormat:n,FieldTypeKind:6,FillInChoice:r};return this.add(e,"SP.FieldChoice",Object(g.f)(i,o))},t.prototype.addMultiChoice=function(e,t,n,r){var o={Choices:{results:t},FieldTypeKind:15,FillInChoice:n};return this.add(e,"SP.FieldMultiChoice",Object(g.f)(o,r))},t.prototype.addBoolean=function(e,t){var n={FieldTypeKind:8};return this.add(e,"SP.Field",Object(g.f)(n,t))},t.prototype.addDependentLookupField=function(e,t,r){var o=this;return this.clone(n,"adddependentlookupfield(displayName='"+e+"', primarylookupfieldid='"+t+"', showfield='"+r+"')").postCore().then(function(e){return{data:e,field:o.getById(e.Id)}})},t.prototype.addLocation=function(e,t){var n={FieldTypeKind:33};return this.add(e,"SP.FieldLocation",Object(g.f)(n,t))};var n;return t=n=o([h("fields")],t)}(j),ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._delete,t}return r(t,e),t.prototype.update=function(e,t){var n=this;void 0===t&&(t="SP.Field");var r=Object(g.n)(Object(g.f)(d(t),e));return this.postCore({body:r,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,field:n}})},t.prototype.setShowInDisplayForm=function(e){return this.clone(t,"setshowindisplayform("+e+")").postCore()},t.prototype.setShowInEditForm=function(e){return this.clone(t,"setshowineditform("+e+")").postCore()},t.prototype.setShowInNewForm=function(e){return this.clone(t,"setshowinnewform("+e+")").postCore()},t}(R),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new De(this);return t.concat("('"+e+"')"),t},t=o([h("forms")],t)}(j),De=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(R),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new Me(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t,n){var r=this,o={expirationDateTime:t,notificationUrl:e,resource:this.toUrl()};return n&&(o.clientState=n),this.postCore({body:Object(g.n)(o),headers:{"Content-Type":"application/json"}}).then(function(e){return{data:e,subscription:r.getById(e.id)}})},t=o([h("subscriptions")],t)}(j),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.update=function(e,t,n){var r=this,o={};return e&&(o.expirationDateTime=e),t&&(o.notificationUrl=t),n&&(o.clientState=n),this.patchCore({body:Object(g.n)(o),headers:{"Content-Type":"application/json"}}).then(function(e){return{data:e,subscription:r}})},t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t}(R),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new qe(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e){var t=this,n=Object(g.n)(Object(g.f)({__metadata:{type:"SP.UserCustomAction"}},e));return this.postCore({body:n}).then(function(e){return{action:t.getById(e.Id),data:e}})},t.prototype.clear=function(){return this.clone(n,"clear").postCore()};var n;return t=n=o([h("usercustomactions")],t)}(j),qe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.UserCustomAction",function(e){return{data:e,action:t}}),t}return r(t,e),t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t}(R),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new We(this);return t.concat("('"+e+"')"),t},t.prototype.getByTitle=function(e){return new We(this,"getByTitle('"+e+"')")},t.prototype.add=function(e,t,n,r,o){var i=this;void 0===t&&(t=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===o&&(o={});var s=Object(g.f)({AllowContentTypes:r,BaseTemplate:n,ContentTypesEnabled:r,Description:t,Title:e,__metadata:{type:"SP.List"}},o);return this.postCore({body:Object(g.n)(s)}).then(function(e){return{data:e,list:i.getByTitle(s.Title)}})},t.prototype.ensure=function(e,t,n,r,o){var i=this;if(void 0===t&&(t=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===o&&(o={}),this.hasBatch)throw Error("The ensure list method is not supported for use in a batch.");return new Promise(function(s,a){var u=Object(g.f)(o,{Title:e,Description:t,ContentTypesEnabled:r},!0),c=i.getByTitle(u.Title);c.get().then(function(e){c.update(u).then(function(e){s({created:!1,data:e,list:i.getByTitle(u.Title)})}).catch(function(e){return a(e)})}).catch(function(o){i.add(e,t,n,r,u).then(function(e){s({created:!0,data:e.data,list:i.getByTitle(u.Title)})}).catch(function(e){return a(e)})})})},t.prototype.ensureSiteAssetsLibrary=function(){return this.clone(n,"ensuresiteassetslibrary").postCore().then(function(e){return new We(u(e))})},t.prototype.ensureSitePagesLibrary=function(){return this.clone(n,"ensuresitepageslibrary").postCore().then(function(e){return new We(u(e))})};var n;return t=n=o([h("lists")],t)}(j),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"contentTypes",{get:function(){return new _e(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return new Qe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"views",{get:function(){return new je(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return new Ue(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forms",{get:function(){return new Le(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultView",{get:function(){return new Re(this,"DefaultView")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new Be(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return new N(this,"EffectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventReceivers",{get:function(){return new j(this,"EventReceivers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedFields",{get:function(){return new N(this,"getRelatedFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"informationRightsManagementSettings",{get:function(){return new N(this,"InformationRightsManagementSettings")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptions",{get:function(){return new Fe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootFolder",{get:function(){return new Ie(this,"rootFolder")},enumerable:!0,configurable:!0}),t.prototype.getView=function(e){return new Re(this,"getView('"+e+"')")},t.prototype.update=function(e,n){var r=this;void 0===n&&(n="*");var o=Object(g.n)(Object(g.f)({__metadata:{type:"SP.List"}},e));return this.postCore({body:o,headers:{"IF-Match":n,"X-HTTP-Method":"MERGE"}}).then(function(n){var o=r;return Object(g.j)(e,"Title")&&(o=r.getParent(t,r.parentUrl,"getByTitle('"+e.Title+"')")),{data:n,list:o}})},t.prototype.delete=function(e){return void 0===e&&(e="*"),this.postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.getChanges=function(e){return this.clone(t,"getchanges").postCore({body:Object(g.n)({query:Object(g.f)(d("SP.ChangeQuery"),e)})})},t.prototype.getItemsByCAMLQuery=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.clone(t,"getitems");return o.expand.apply(o,n).postCore({body:Object(g.n)({query:Object(g.f)({__metadata:{type:"SP.CamlQuery"}},e)})})},t.prototype.getListItemChangesSinceToken=function(e){return this.clone(t,"getlistitemchangessincetoken").postCore({body:Object(g.n)({query:Object(g.f)({__metadata:{type:"SP.ChangeLogItemQuery"}},e)})},{parse:function(e){return e.text()}})},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore().then(function(e){return Object(g.j)(e,"Recycle")?e.Recycle:e})},t.prototype.renderListData=function(e){var n=this.clone(t,"renderlistdata(@viewXml)");return n.query.set("@viewXml","'"+e+"'"),n.postCore().then(function(e){return JSON.parse(Object(g.j)(e,"RenderListData")?e.RenderListData:e)})},t.prototype.renderListDataAsStream=function(e,n,r){void 0===n&&(n=null),void 0===r&&(r=new Map),Object(g.j)(e,"RenderOptions")&&Object(g.k)(e.RenderOptions)&&(e.RenderOptions=e.RenderOptions.reduce(function(e,t){return e+t}));var o={overrideParameters:Object(g.f)(d("SP.RenderListDataOverrideParameters"),n),parameters:Object(g.f)(d("SP.RenderListDataParameters"),e)},i=this.clone(t,"RenderListDataAsStream",!0);return r&&r.size>0&&r.forEach(function(e,t){return i.query.set(t,e)}),i.postCore({body:Object(g.n)(o)})},t.prototype.renderListFormData=function(e,n,r){return this.clone(t,"renderlistformdata(itemid="+e+", formid='"+n+"', mode='"+r+"')").postCore().then(function(e){return JSON.parse(Object(g.j)(e,"RenderListFormData")?e.RenderListFormData:e)})},t.prototype.reserveListItemId=function(){return this.clone(t,"reservelistitemid").postCore().then(function(e){return Object(g.j)(e,"ReserveListItemId")?e.ReserveListItemId:e})},t.prototype.getListItemEntityTypeFullName=function(){return this.clone(t,null,!1).select("ListItemEntityTypeFullName").get().then(function(e){return e.ListItemEntityTypeFullName})},t.prototype.addValidateUpdateItemUsingPath=function(e,n,r,o){return void 0===r&&(r=!1),this.clone(t,"AddValidateUpdateItemUsingPath()").postCore({body:Object(g.n)({bNewDocumentUpdate:r,checkInComment:o,formValues:e,listItemCreateInfo:{FolderPath:{DecodedUrl:n,__metadata:{type:"SP.ResourcePath"}},__metadata:{type:"SP.ListItemCreationInformationUsingPath"}}})}).then(function(e){return void 0!==e.AddValidateUpdateItemUsingPath?e.AddValidateUpdateItemUsingPath.results:e})},t.prototype.getSiteScript=function(){return i(this,void 0,void 0,function(){var e,n;return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t).rootFolder.select("ServerRelativeUrl").get()];case 1:return e=r.sent(),[4,p(e.ServerRelativeUrl)];case 2:return n=r.sent(),[2,new S.a(this,"").getSiteScriptFromList(n)]}})})},t}(de),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e){var t=this;"string"==typeof e&&(e={text:e});var r=Object(g.n)(Object(g.f)(d("Microsoft.SharePoint.Comments.comment"),e));return this.clone(n,null).postCore({body:r}).then(function(e){return Object(g.f)(t.getById(e.id),e)})},t.prototype.getById=function(e){var t=new Ke(this);return t.concat("("+e+")"),t},t.prototype.clear=function(){return this.clone(n,"DeleteAll").postCore()};var n;return t=n=o([h("comments")],t)}(j),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"replies",{get:function(){return new Ve(this)},enumerable:!0,configurable:!0}),t.prototype.like=function(){return this.clone(t,"Like").postCore()},t.prototype.unlike=function(){return this.clone(t,"Unlike").postCore()},t.prototype.delete=function(){return this.deleteCore()},t}(R),Ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e){"string"==typeof e&&(e={text:e});var t=Object(g.n)(Object(g.f)(d("Microsoft.SharePoint.Comments.comment"),e));return this.clone(n,null).postCore({body:t}).then(function(e){return Object(g.f)(new Ke(u(e)),e)})};var n;return t=n=o([h("replies")],t)}(j),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new ze(this);return t.concat("("+e+")"),t},t.prototype.getItemByStringId=function(e){return new ze(this.parentUrl,"getItemByStringId('"+e+"')")},t.prototype.skip=function(e,t){return void 0===t&&(t=!1),t?this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&PagedPrev=TRUE&p_ID="+e)):this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&p_ID="+e)),this},t.prototype.getPaged=function(e){return void 0===e&&(e=new v.f),this.get(new $e(this,e))},t.prototype.getAll=function(e,t){void 0===e&&(e=2e3),void 0===t&&(t="application/json;odata=nometadata"),b.a.write("Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.",2);var r=new n(this,"").top(e).configure({headers:{Accept:t}});return this.query.forEach(function(e,t){/^\$select|filter|top|expand$/i.test(t)&&r.query.set(t,e)}),new Promise(function(e,t){var n=[],o=function(r){[].push.apply(n,r.results),r.hasNext?r.getNext().then(o).catch(t):e(n)};r.getPaged().then(o).catch(t)})},t.prototype.add=function(e,t){var r=this;void 0===e&&(e={}),void 0===t&&(t=null);var o=this.addBatchDependency();return this.ensureListItemEntityTypeName(t).then(function(t){var i=Object(g.n)(Object(g.f)(d(t),e)),s=r.clone(n,"").postCore({body:i}).then(function(e){return{data:e,item:r.getById(e.Id)}});return o(),s})},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.getParent(We).getListItemEntityTypeFullName()};var n;return t=n=o([h("items")],t)}(j),ze=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._deleteWithETag,t}return r(t,e),Object.defineProperty(t.prototype,"attachmentFiles",{get:function(){return new xe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return new Pe(this,"ContentType")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"comments",{get:function(){return new He(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return new N(this,"EffectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissionsForUI",{get:function(){return new N(this,"EffectiveBasePermissionsForUI")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsHTML",{get:function(){return new R(this,"FieldValuesAsHTML")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsText",{get:function(){return new R(this,"FieldValuesAsText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesForEdit",{get:function(){return new R(this,"FieldValuesForEdit")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folder",{get:function(){return new Ie(this,"folder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"file",{get:function(){return new tt(this,"file")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return new Xe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return this.getParent(We,this.parentUrl.substr(0,this.parentUrl.lastIndexOf("/")))},enumerable:!0,configurable:!0}),t.prototype.update=function(e,t,n){var r=this;return void 0===t&&(t="*"),void 0===n&&(n=null),new Promise(function(o,i){var s=r.addBatchDependency();return r.ensureListItemEntityTypeName(n).then(function(n){var i=Object(g.n)(Object(g.f)(d(n),e));return s(),r.postCore({body:i,headers:{"IF-Match":t,"X-HTTP-Method":"MERGE"}},new Ze).then(function(e){o({data:e,item:r})})}).catch(function(e){return i(e)})})},t.prototype.getLikedBy=function(){return this.clone(t,"likedBy").postCore()},t.prototype.like=function(){return this.clone(t,"like").postCore()},t.prototype.unlike=function(){return this.clone(t,"unlike").postCore()},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.getWopiFrameUrl=function(e){void 0===e&&(e=0);var n=this.clone(t,"getWOPIFrameUrl(@action)");return n.query.set("@action",e),n.postCore().then(function(e){return Object(g.j)(e,"GetWOPIFrameUrl")?e.GetWOPIFrameUrl:e})},t.prototype.validateUpdateListItem=function(e,n){return void 0===n&&(n=!1),this.clone(t,"validateupdatelistitem").postCore({body:Object(g.n)({formValues:e,bNewDocumentUpdate:n})})},t.prototype.getLikedByInformation=function(){return this.clone(t,"likedByInformation").expand("likedby").getCore()},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.list.getListItemEntityTypeFullName()},t}(ye),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new Je(this);return t.concat("("+e+")"),t},t=o([h("versions")],t)}(j),Je=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._deleteWithETag,t}return r(t,e),t}(R),Ye=function(){function e(e,t,n,r){this.parent=e,this.nextUrl=t,this.results=n,this.innerParser=r}return Object.defineProperty(e.prototype,"hasNext",{get:function(){return"string"==typeof this.nextUrl&&this.nextUrl.length>0},enumerable:!0,configurable:!0}),e.prototype.getNext=function(){if(this.hasNext){return new Qe(this.nextUrl,null).configureFrom(this.parent).getPaged(this.innerParser)}return new Promise(function(e){return e(null)})},e}(),$e=function(e){function t(t,n){var r=e.call(this)||this;return r._parent=t,r.innerParser=n,r}return r(t,e),t.prototype.parse=function(e){var t=this;return this.innerParser.parse(e).then(function(e){return i(t,void 0,void 0,function(){var t,n;return s(this,function(r){return t=this.innerParser.rawJson,n=Object(g.j)(t,"d")&&Object(g.j)(t.d,"__next")?t.d.__next:t["odata.nextLink"],[2,new Ye(this._parent,n,e,this.innerParser)]})})})},t}(v.g),Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parse=function(e){return i(this,void 0,void 0,function(){var t=this;return s(this,function(n){return[2,new Promise(function(n,r){t.handleError(e,r)&&n({"odata.etag":e.headers.get("etag")})})]})})},t}(v.g),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getByName=function(e){var t=new tt(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t,r){var o=this;return void 0===r&&(r=!0),new n(this,"add(overwrite="+r+",url='"+e+"')").postCore({body:t}).then(function(t){return{data:t,file:o.getByName(e)}})},t.prototype.addUsingPath=function(e,t,r){var o=this;void 0===r&&(r={Overwrite:!1});var i=["AddUsingPath(decodedurl='"+e+"'"];return r&&(r.Overwrite&&i.push(",Overwrite=true"),r.AutoCheckoutOnInvalidData&&i.push(",AutoCheckoutOnInvalidData=true"),Object(g.r)(r.XorHash)||i.push(",XorHash="+r.XorHash)),i.push(")"),new n(this,i.join("")).postCore({body:t}).then(function(t){return{data:t,file:o.getByName(e)}})},t.prototype.addChunked=function(e,t,r,o,i){var s=this;return void 0===o&&(o=!0),void 0===i&&(i=10485760),this.clone(n,"add(overwrite = "+o+", url = '"+e+"')",!1).postCore().then(function(){return s.getByName(e)}).then(function(e){return e.setContentChunked(t,r,i)})},t.prototype.addTemplateFile=function(e,t){var r=this;return this.clone(n,"addTemplateFile(urloffile = '"+e+"', templatefiletype = "+t+")",!1).postCore().then(function(t){return{data:t,file:r.getByName(e)}})};var n;return t=n=o([h("files")],t)}(j),tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return new R(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return new nt(this)},enumerable:!0,configurable:!0}),t.prototype.approve=function(e){return void 0===e&&(e=""),this.clone(t,"approve(comment = '"+e+"')").postCore()},t.prototype.cancelUpload=function(e){return this.clone(t,"cancelUpload(uploadId = guid'"+e+"')",!1).postCore()},t.prototype.checkin=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=pe.Major),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"checkin(comment = '"+e+"', checkintype = "+n+")").postCore()},t.prototype.checkout=function(){return this.clone(t,"checkout").postCore()},t.prototype.copyTo=function(e,n){return void 0===n&&(n=!0),this.clone(t,"copyTo(strnewurl = '"+e+"', boverwrite = "+n+")").postCore()},t.prototype.delete=function(e){return void 0===e&&(e="*"),this.clone(t,null).postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.deny=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"deny(comment = '"+e+"')").postCore()},t.prototype.getLimitedWebPartManager=function(e){return void 0===e&&(e=ot.Shared),new ve(this,"getLimitedWebPartManager(scope = "+e+")")},t.prototype.moveTo=function(e,n){return void 0===n&&(n=it.Overwrite),this.clone(t,"moveTo(newurl = '"+e+"', flags = "+n+")").postCore()},t.prototype.publish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"publish(comment = '"+e+"')").postCore()},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.undoCheckout=function(){return this.clone(t,"undoCheckout").postCore()},t.prototype.unpublish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"unpublish(comment = '"+e+"')").postCore()},t.prototype.getText=function(){return this.clone(t,"$value",!1).get(new v.i,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getBlob=function(){return this.clone(t,"$value",!1).get(new v.a,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getBuffer=function(){return this.clone(t,"$value",!1).get(new v.b,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getJSON=function(){return this.clone(t,"$value",!1).get(new v.d,{headers:{binaryStringResponseBody:"true"}})},t.prototype.setContent=function(e){var n=this;return this.clone(t,"$value",!1).postCore({body:e,headers:{"X-HTTP-Method":"PUT"}}).then(function(e){return new t(n)})},t.prototype.getItem=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.listItemAllFields;return r.select.apply(r,t).get().then(function(t){return Object(g.f)(new ze(u(t)).configureFrom(e),t)})},t.prototype.setContentChunked=function(e,t,n){var r=this;void 0===n&&(n=10485760),void 0===t&&(t=function(){return null});var o=e.size,i=parseInt((e.size/n).toString(),10)+(e.size%n==0?1:0),s=Object(g.h)();t({uploadId:s,blockNumber:1,chunkSize:n,currentPointer:0,fileSize:o,stage:"starting",totalBlocks:i});for(var a=this.startUpload(s,e.slice(0,n)),u=2;u<i;u++)!function(u){a=a.then(function(a){return t({uploadId:s,blockNumber:u,chunkSize:n,currentPointer:a,fileSize:o,stage:"continue",totalBlocks:i}),r.continueUpload(s,a,e.slice(a,a+n))})}(u);return a.then(function(a){return t({uploadId:s,blockNumber:i,chunkSize:n,currentPointer:a,fileSize:o,stage:"finishing",totalBlocks:i}),r.finishUpload(s,a,e.slice(a))})},t.prototype.startUpload=function(e,n){return this.clone(t,"startUpload(uploadId = guid'"+e+"')",!1).postCore({body:n}).then(function(e){return"object"==typeof e&&(e=e.StartUpload),parseFloat(e)})},t.prototype.continueUpload=function(e,n,r){return this.clone(t,"continueUpload(uploadId = guid'"+e+"', fileOffset = "+n+")",!1).postCore({body:r}).then(function(e){return"object"==typeof e&&(e=e.ContinueUpload),parseFloat(e)})},t.prototype.finishUpload=function(e,n,r){return this.clone(t,"finishUpload(uploadId = guid'"+e+"', fileOffset = "+n+")",!1).postCore({body:r}).then(function(e){return{data:e,file:new t(u(e))}})},t}(ge),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new rt(this);return t.concat("("+e+")"),t},t.prototype.deleteAll=function(){return new n(this,"deleteAll").postCore()},t.prototype.deleteById=function(e){return this.clone(n,"deleteById(vid = "+e+")").postCore()},t.prototype.recycleByID=function(e){return this.clone(n,"recycleByID(vid = "+e+")").postCore()},t.prototype.deleteByLabel=function(e){return this.clone(n,"deleteByLabel(versionlabel = '"+e+"')").postCore()},t.prototype.recycleByLabel=function(e){return this.clone(n,"recycleByLabel(versionlabel = '"+e+"')").postCore()},t.prototype.restoreByLabel=function(e){return this.clone(n,"restoreByLabel(versionlabel = '"+e+"')").postCore()};var n;return t=n=o([h("versions")],t)}(j),rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._deleteWithETag,t}return r(t,e),t}(R);!function(e){e[e.Minor=0]="Minor",e[e.Major=1]="Major",e[e.Overwrite=2]="Overwrite"}(pe||(pe={}));var ot;!function(e){e[e.User=0]="User",e[e.Shared=1]="Shared"}(ot||(ot={}));var it;!function(e){e[e.Overwrite=1]="Overwrite",e[e.AllowBrokenThickets=8]="AllowBrokenThickets"}(it||(it={}));var st;!function(e){e[e.StandardPage=0]="StandardPage",e[e.WikiPage=1]="WikiPage",e[e.FormPage=2]="FormPage",e[e.ClientSidePage=3]="ClientSidePage"}(st||(st={}));var at,ut=function(e){function t(t,n){return void 0===n&&(n="_api/web/tenantappcatalog/AvailableApps"),e.call(this,a("string"==typeof t?t:t.toUrl()),n)||this}return r(t,e),t.prototype.getAppById=function(e){return new ct(this,"getById('"+e+"')")},t.prototype.add=function(e,n,r){void 0===r&&(r=!0);var o=this.toUrl().indexOf("tenantappcatalog")>0?"tenantappcatalog":"sitecollectionappcatalog";return new t(a(this.toUrl()),"_api/web/"+o+"/add(overwrite="+r+",url='"+e+"')").postCore({body:n}).then(function(e){return{data:e,file:new tt(u(e))}})},t}(j),ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.deploy=function(e){return void 0===e&&(e=!1),this.clone(t,"Deploy("+e+")").postCore()},t.prototype.retract=function(){return this.clone(t,"Retract").postCore()},t.prototype.install=function(){return this.clone(t,"Install").postCore()},t.prototype.uninstall=function(){return this.clone(t,"Uninstall").postCore()},t.prototype.upgrade=function(){return this.clone(t,"Upgrade").postCore()},t.prototype.remove=function(){return this.clone(t,"Remove").postCore()},t}(R),lt=function(e){function t(t){var n=e.call(this)||this;return n.baseUrl=t,n}return r(t,e),t.ParseResponse=function(e){return new Promise(function(t,n){for(var r,o,i=[],s=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),a=e.split("\n"),u="batch",c=0;c<a.length;++c){var l=a[c];switch(u){case"batch":if("--batchresponse_"===l.substr(0,"--batchresponse_".length))u="batchHeaders";else if(""!==l.trim())throw Error("Invalid response, line "+c);break;case"batchHeaders":""===l.trim()&&(u="status");break;case"status":var p=s.exec(l);if(3!==p.length)throw Error("Invalid status, line "+c);r=parseInt(p[1],10),o=p[2],u="statusHeaders";break;case"statusHeaders":""===l.trim()&&(u="body");break;case"body":i.push(204===r?new Response:new Response(l,{status:r,statusText:o})),u="batch"}}"status"!==u&&n(Error("Unexpected end of input")),t(i)})},t.prototype.executeImpl=function(){var e=this;if(b.a.write("["+this.batchId+"] ("+(new Date).getTime()+") Executing batch with "+this.requests.length+" requests.",1),this.requests.length<1)return b.a.write("Resolving empty batch.",1),Promise.resolve();var n=new E;return p(this.baseUrl).then(function(r){for(var o=[],i="",s=0;s<e.requests.length;s++){var a=e.requests[s];"GET"===a.method?(i.length>0&&(o.push("--changeset_"+i+"--\n\n"),i=""),o.push("--batch_"+e.batchId+"\n")):(i.length<1&&(i=Object(g.h)(),o.push("--batch_"+e.batchId+"\n"),o.push('Content-Type: multipart/mixed; boundary="changeset_'+i+'"\n\n')),o.push("--changeset_"+i+"\n")),o.push("Content-Type: application/http\n"),o.push("Content-Transfer-Encoding: binary\n\n");var u=new Headers,c=Object(g.m)(a.url)?a.url:Object(g.d)(r,a.url);if(b.a.write("["+e.batchId+"] ("+(new Date).getTime()+") Adding request "+a.method+" "+c+" to batch.",0),"GET"!==a.method){var l=a.method,p=a.options.headers;Object(g.j)(a,"options")&&Object(g.j)(a.options,"headers")&&void 0!==p["X-HTTP-Method"]&&(l=p["X-HTTP-Method"],delete p["X-HTTP-Method"]),o.push(l+" "+c+" HTTP/1.1\n"),u.set("Content-Type","application/json;odata=verbose;charset=utf-8")}else o.push(a.method+" "+c+" HTTP/1.1\n");Object(g.o)(u,I.headers),a.options&&Object(g.o)(u,a.options.headers),u.has("Accept")||u.append("Accept","application/json"),u.has("Content-Type")||u.append("Content-Type","application/json;odata=verbose;charset=utf-8"),u.has("X-ClientService-ClientTag")||u.append("X-ClientService-ClientTag","PnPCoreJS:@pnp-1.3.11"),u.forEach(function(e,t){o.push(t+": "+e+"\n")}),o.push("\n"),a.options.body&&o.push(a.options.body+"\n\n")}i.length>0&&(o.push("--changeset_"+i+"--\n\n"),i=""),o.push("--batch_"+e.batchId+"--\n");var d={body:o.join(""),headers:{"Content-Type":"multipart/mixed; boundary=batch_"+e.batchId},method:"POST"};return b.a.write("["+e.batchId+"] ("+(new Date).getTime()+") Sending batch request.",1),n.fetch(Object(g.d)(r,"/_api/$batch"),d).then(function(e){return e.text()}).then(t.ParseResponse).then(function(t){if(t.length!==e.requests.length)throw Error("Could not properly parse responses to match requests in batch.");return b.a.write("["+e.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",1),t.reduce(function(t,n,r){var o=e.requests[r];return b.a.write("["+o.id+"] ("+(new Date).getTime()+") Resolving request in batch "+e.batchId+".",1),t.then(function(e){return o.parser.parse(n).then(o.resolve).catch(o.reject)})},Promise.resolve())})})},t}(v.e),pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e,t){var r=this;return void 0===t&&(t=!1),this.clone(n,"add").postCore({body:Object(g.n)({featdefScope:0,featureId:e,force:t})}).then(function(t){return{data:t,feature:r.getById(e)}})},t.prototype.getById=function(e){var t=new dt(this);return t.concat("('"+e+"')"),t},t.prototype.remove=function(e,t){return void 0===t&&(t=!1),this.clone(n,"remove").postCore({body:Object(g.n)({featureId:e,force:t})})};var n;return t=n=o([h("features")],t)}(j),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.deactivate=function(e){var n=this;void 0===e&&(e=!1);var r=this.addBatchDependency();return new t(this).select("DefinitionId").get().then(function(t){var o=n.getParent(pt,n.parentUrl,"",n.batch).remove(t.DefinitionId,e);return r(),o})},t}(R),ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,Object.defineProperty(t.prototype,"rootWeb",{get:function(){return new Ct(this,"rootweb")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return new pt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new Be(this)},enumerable:!0,configurable:!0}),t.prototype.getRootWeb=function(){return this.rootWeb.select("Url").get().then(function(e){return new Ct(e.Url)})},t.prototype.getContextInfo=function(){return new n(this.parentUrl,"_api/contextinfo").postCore().then(function(e){if(Object(g.j)(e,"GetContextWebInformation")){var t=e.GetContextWebInformation;return t.SupportedSchemaVersions=t.SupportedSchemaVersions.results,t}return e})},t.prototype.getDocumentLibraries=function(e){var t=new N("","_api/sp.web.getdocumentlibraries(@v)");return t.query.set("@v","'"+e+"'"),t.get().then(function(e){return Object(g.j)(e,"GetDocumentLibraries")?e.GetDocumentLibraries:e})},t.prototype.getWebUrlFromPageUrl=function(e){var t=new N("","_api/sp.web.getweburlfrompageurl(@v)");return t.query.set("@v","'"+e+"'"),t.get().then(function(e){return Object(g.j)(e,"GetWebUrlFromPageUrl")?e.GetWebUrlFromPageUrl:e})},t.prototype.getChanges=function(e){var t=Object(g.n)({query:Object(g.f)({__metadata:{type:"SP.ChangeQuery"}},e)});return this.clone(n,"getchanges").postCore({body:t})},t.prototype.delete=function(){return i(this,void 0,void 0,function(){var e,t;return s(this,function(r){switch(r.label){case 0:return[4,this.clone(n,"").select("Id").get()];case 1:return e=r.sent(),t=new n(this.parentUrl,"_api/SPSiteManager/Delete"),[4,t.postCore({body:Object(g.n)({siteId:e.Id})})];case 2:return r.sent(),[2]}})})},t.prototype.createBatch=function(){return new lt(this.parentUrl)},t.prototype.openWebById=function(e){return this.clone(n,"openWebById('"+e+"')").postCore().then(function(e){return{data:e,web:Ct.fromUrl(e["odata.id"]||e.__metadata.uri)}})},t.prototype.joinHubSite=function(e){return this.clone(n,"joinHubSite('"+e+"')").postCore()},t.prototype.registerHubSite=function(){return this.clone(n,"registerHubSite").postCore()},t.prototype.unRegisterHubSite=function(){return this.clone(n,"unRegisterHubSite").postCore()},t.prototype.createCommunicationSite=function(e,t,n,r,o,a,u,c,l){var p=this;void 0===t&&(t=1033),void 0===n&&(n=!1),void 0===o&&(o=""),void 0===a&&(a=""),void 0===u&&(u="00000000-0000-0000-0000-000000000000"),void 0===c&&(c="00000000-0000-0000-0000-000000000000");var d={Classification:a,Description:o,HubSiteId:c,Lcid:t,Owner:l,ShareByEmailEnabled:n,SiteDesignId:u,Title:e,Url:r,WebTemplate:"SITEPAGEPUBLISHING#0",WebTemplateExtensionId:"00000000-0000-0000-0000-000000000000"},h=Object(g.n)({request:Object(g.f)({__metadata:{type:"Microsoft.SharePoint.Portal.SPSiteCreationRequest"}},d)});return this.getRootWeb().then(function(e){return i(p,void 0,void 0,function(){var t,n;return s(this,function(r){return t=new E,n=e.parentUrl+"/_api/SPSiteManager/Create",[2,t.post(n,{body:h,headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"}}).then(function(e){return e.json()}).then(function(e){if(Object(g.j)(e,"error"))throw e;return Object(g.j)(e,"d")&&Object(g.j)(e.d,"Create")?e.d.Create:e})]})})})},t.prototype.createModernTeamSite=function(e,t,n,r,o,a,u,c,l){var p=this;void 0===n&&(n=!0),void 0===r&&(r=1033),void 0===o&&(o=""),void 0===a&&(a=""),void 0===c&&(c="00000000-0000-0000-0000-000000000000");var d={alias:t,displayName:e,isPublic:n,optionalParams:{Classification:a,CreationOptions:{results:["SPSiteLanguage:"+r,"HubSiteId:"+c]},Description:o,Owners:{results:u||[]}}};return l&&d.optionalParams.CreationOptions.results.push("implicit_formula_292aa8a00786498a87a5ca52d9f4214a_"+l),this.getRootWeb().then(function(e){return i(p,void 0,void 0,function(){var t,n;return s(this,function(r){return t=new E,n=e.parentUrl+"/_api/GroupSiteManager/CreateGroupEx",[2,t.post(n,{body:Object(g.n)(d),headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"}}).then(function(e){return e.json()})]})})})};var n;return t=n=o([h("_api/site")],t)}(R),ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new yt(this);return t.concat("("+e+")"),t},t.prototype.add=function(e,n,r){var o=this;void 0===r&&(r=!0);var i=Object(g.n)(Object(g.f)(d("SP.NavigationNode"),{IsVisible:r,Title:e,Url:n}));return this.clone(t,null).postCore({body:i}).then(function(e){return{data:e,node:o.getById(e.Id)}})},t.prototype.moveAfter=function(e,n){var r=Object(g.n)({nodeId:e,previousNodeId:n});return this.clone(t,"MoveAfter").postCore({body:r})},t}(j),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return new ft(this,"Children")},enumerable:!0,configurable:!0}),t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t.prototype.update=function(e){var t=this,n=Object(g.n)(Object(g.f)({__metadata:{type:"SP.NavigationNode"}},e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,node:t}})},t}(R),mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"quicklaunch",{get:function(){return new ft(this,"quicklaunch")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topNavigationBar",{get:function(){return new ft(this,"topnavigationbar")},enumerable:!0,configurable:!0}),t=o([h("navigation")],t)}(N),gt=function(e){function t(t,n){return void 0===n&&(n=null),e.call(this,t,n)||this}return r(t,e),t.prototype.getMenuState=function(e,n,r,o){return void 0===e&&(e=null),void 0===n&&(n=10),void 0===r&&(r=null),void 0===o&&(o=null),new t(this,"_api/navigation/MenuState").postCore({body:Object(g.n)({customProperties:o,depth:n,mapProviderName:r,menuNodeKey:e})})},t.prototype.getMenuNodeKey=function(e,n){return void 0===n&&(n=null),new t(this,"_api/navigation/MenuNodeKey").postCore({body:Object(g.n)({currentUrl:e,mapProviderName:n})})},t}(N),bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.FromUrl=function(e){if(null===e)return new n("");var t=e.indexOf("_api/");return new n(t>-1?e.substr(0,t):e)},t.prototype.getRelatedItems=function(e,t){var r=this.clone(n,null);return r.concat(".GetRelatedItems"),r.postCore({body:Object(g.n)({SourceItemID:t,SourceListName:e})})},t.prototype.getPageOneRelatedItems=function(e,t){var r=this.clone(n,null);return r.concat(".GetPageOneRelatedItems"),r.postCore({body:Object(g.n)({SourceItemID:t,SourceListName:e})})},t.prototype.addSingleLink=function(e,t,r,o,i,s,a){void 0===a&&(a=!1);var u=this.clone(n,null);return u.concat(".AddSingleLink"),u.postCore({body:Object(g.n)({SourceItemID:t,SourceListName:e,SourceWebUrl:r,TargetItemID:i,TargetListName:o,TargetWebUrl:s,TryAddReverseLink:a})})},t.prototype.addSingleLinkToUrl=function(e,t,r,o){void 0===o&&(o=!1);var i=this.clone(n,null);return i.concat(".AddSingleLinkToUrl"),i.postCore({body:Object(g.n)({SourceItemID:t,SourceListName:e,TargetItemUrl:r,TryAddReverseLink:o})})},t.prototype.addSingleLinkFromUrl=function(e,t,r,o){void 0===o&&(o=!1);var i=this.clone(n,null);return i.concat(".AddSingleLinkFromUrl"),i.postCore({body:Object(g.n)({SourceItemUrl:e,TargetItemID:r,TargetListName:t,TryAddReverseLink:o})})},t.prototype.deleteSingleLink=function(e,t,r,o,i,s,a){void 0===a&&(a=!1);var u=this.clone(n,null);return u.concat(".DeleteSingleLink"),u.postCore({body:Object(g.n)({SourceItemID:t,SourceListName:e,SourceWebUrl:r,TargetItemID:i,TargetListName:o,TargetWebUrl:s,TryDeleteReverseLink:a})})};var n;return t=n=o([h("_api/SP.RelatedItemManager")],t)}(N),vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"installedLanguages",{get:function(){return new St(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"globalInstalledLanguages",{get:function(){return new St(this,"globalinstalledlanguages")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timeZone",{get:function(){return new Tt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timeZones",{get:function(){return new Ot(this)},enumerable:!0,configurable:!0}),t=o([h("regionalsettings")],t)}(R),St=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("installedlanguages")],t)}(j),Tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.utcToLocalTime=function(e){var t;return t="string"==typeof e?e:e.toISOString(),this.clone(n,"utctolocaltime('"+t+"')").postCore().then(function(e){return Object(g.j)(e,"UTCToLocalTime")?e.UTCToLocalTime:e})},t.prototype.localTimeToUTC=function(e){var t;return t="string"==typeof e?e:Object(g.e)(e,"minute",-1*e.getTimezoneOffset()).toISOString(),this.clone(n,"localtimetoutc('"+t+"')").postCore().then(function(e){return Object(g.j)(e,"LocalTimeToUTC")?e.LocalTimeToUTC:e})};var n;return t=n=o([h("timezone")],t)}(R),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){return this.clone(n,"GetById("+e+")").postCore({},c(Tt))};var n;return t=n=o([h("timezones")],t)}(j),wt=function(e){function t(n,r){return e.call(this,t.getBaseUrl(n),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+r)||this}return r(t,e),t.getBaseUrl=function(e){if("string"==typeof e)return e;var t=e,n=t.toUrl(),r=n.indexOf("_api/");return r<0?n:n.substr(0,r)},t.prototype.execute=function(e){return this.postCore({body:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8"}})},t.prototype.createSiteDesign=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"CreateSiteDesign").execute({info:e})];case 1:return[2,n.sent()]}})})},t.prototype.applySiteDesign=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"ApplySiteDesign").execute({siteDesignId:e,webUrl:n})];case 1:return[2,r.sent()]}})})},t.prototype.getSiteDesigns=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.clone(t,"GetSiteDesigns").execute({})];case 1:return[2,e.sent()]}})})},t.prototype.getSiteDesignMetadata=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteDesignMetadata").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.updateSiteDesign=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"UpdateSiteDesign").execute({updateInfo:e})];case 1:return[2,n.sent()]}})})},t.prototype.deleteSiteDesign=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"DeleteSiteDesign").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.getSiteDesignRights=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteDesignRights").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.grantSiteDesignRights=function(e,n,r){return void 0===r&&(r=1),i(this,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return[4,this.clone(t,"GrantSiteDesignRights").execute({grantedRights:r.toString(),id:e,principalNames:n})];case 1:return[2,o.sent()]}})})},t.prototype.revokeSiteDesignRights=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"RevokeSiteDesignRights").execute({id:e,principalNames:n})];case 1:return[2,r.sent()]}})})},t.prototype.addSiteDesignTask=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"AddSiteDesignTask").execute({webUrl:e,siteDesignId:n})];case 1:return[2,r.sent()]}})})},t.prototype.addSiteDesignTaskToCurrentWeb=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"AddSiteDesignTaskToCurrentWeb").execute({siteDesignId:e})];case 1:return[2,n.sent()]}})})},t.prototype.getSiteDesignTask=function(e){return i(this,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"GetSiteDesignTask").execute({taskId:e})];case 1:return n=r.sent(),[2,Object(g.j)(n,"ID")?n:null]}})})},t.prototype.getSiteDesignRun=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"GetSiteDesignRun").execute({webUrl:e,siteDesignId:n})];case 1:return[2,r.sent()]}})})},t.prototype.getSiteDesignRunStatus=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"GetSiteDesignRunStatus").execute({webUrl:e,runId:n})];case 1:return[2,r.sent()]}})})},t}(N),It=function(e){function t(n,r){return e.call(this,t.getBaseUrl(n),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+r)||this}return r(t,e),t.getBaseUrl=function(e){if("string"==typeof e)return e;var t=e,n=t.toUrl(),r=n.indexOf("_api/");return r<0?n:n.substr(0,r)},t.prototype.execute=function(e){return this.postCore({body:JSON.stringify(e)})},t.prototype.getSiteScripts=function(){return this.clone(t,"GetSiteScripts",!0).execute({})},t.prototype.createSiteScript=function(e,n,r){return i(this,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return[4,this.clone(t,"CreateSiteScript(Title=@title,Description=@desc)?@title='"+encodeURIComponent(e)+"'&@desc='"+encodeURIComponent(n)+"'").execute(r)];case 1:return[2,o.sent()]}})})},t.prototype.getSiteScriptMetadata=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteScriptMetadata").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.deleteSiteScript=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"DeleteSiteScript").execute({id:e})];case 1:return n.sent(),[2]}})})},t.prototype.updateSiteScript=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return n&&(e.Content=JSON.stringify(n)),[4,this.clone(t,"UpdateSiteScript").execute({updateInfo:e})];case 1:return[2,r.sent()]}})})},t.prototype.getSiteScriptFromList=function(e){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteScriptFromList").execute({listUrl:e})];case 1:return[2,n.sent()]}})})},t.prototype.getSiteScriptFromWeb=function(e,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"getSiteScriptFromWeb").execute({webUrl:e,info:n})];case 1:return[2,r.sent()]}})})},t}(N),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e,t,r,o,i,s){void 0===r&&(r=""),void 0===o&&(o="STS"),void 0===i&&(i=1033),void 0===s&&(s=!0);var a={Description:r,Language:i,Title:e,Url:t,UseSamePermissionsAsParentSite:s,WebTemplate:o},c=Object(g.n)({parameters:Object(g.f)({__metadata:{type:"SP.WebCreationInformation"}},a)});return this.clone(n,"add").postCore({body:c}).then(function(e){return{data:e,web:new Ct(u(e).replace(/_api\/web\/?/i,""))}})};var n;return t=n=o([h("webs")],t)}(j),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("webinfos")],t)}(j),Ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.fromUrl=function(e,t){return new n(a(e),t)},Object.defineProperty(t.prototype,"webs",{get:function(){return new _t(this)},enumerable:!0,configurable:!0}),t.prototype.getParentWeb=function(){var e=this;return this.select("ParentWeb/Id").expand("ParentWeb").get().then(function(t){var n=t.ParentWeb;return n?new ht(e.parentUrl).openWebById(n.Id):null})},t.prototype.getSubwebsFilteredForCurrentUser=function(e,t){return void 0===e&&(e=-1),void 0===t&&(t=-1),this.clone(_t,"getSubwebsFilteredForCurrentUser(nWebTemplateFilter="+e+",nConfigurationFilter="+t+")")},Object.defineProperty(t.prototype,"allProperties",{get:function(){return this.clone(R,"allproperties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webinfos",{get:function(){return new Pt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentTypes",{get:function(){return new _e(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lists",{get:function(){return new Ge(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return new Ue(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return new pt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availablefields",{get:function(){return new Ue(this,"availablefields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"navigation",{get:function(){return new mt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteUsers",{get:function(){return new A(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteGroups",{get:function(){return new F(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteUserInfoList",{get:function(){return new We(this,"siteuserinfolist")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"regionalSettings",{get:function(){return new vt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentUser",{get:function(){return new L(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return new we(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new Be(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"roleDefinitions",{get:function(){return new G(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedItems",{get:function(){return bt.FromUrl(this.toUrl())},enumerable:!0,configurable:!0}),t.prototype.createBatch=function(){return new lt(this.parentUrl)},Object.defineProperty(t.prototype,"rootFolder",{get:function(){return new Ie(this,"rootFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedOwnerGroup",{get:function(){return new M(this,"associatedownergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedMemberGroup",{get:function(){return new M(this,"associatedmembergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedVisitorGroup",{get:function(){return new M(this,"associatedvisitorgroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultDocumentLibrary",{get:function(){return new We(this,"DefaultDocumentLibrary")},enumerable:!0,configurable:!0}),t.prototype.getFolderById=function(e){return new Ie(this,"getFolderById('"+e+"')")},t.prototype.getFolderByServerRelativeUrl=function(e){return new Ie(this,"getFolderByServerRelativeUrl('"+e+"')")},t.prototype.getFolderByServerRelativePath=function(e){return new Ie(this,"getFolderByServerRelativePath(decodedUrl='"+e+"')")},t.prototype.getFileById=function(e){return new tt(this,"getFileById('"+e+"')")},t.prototype.getFileByServerRelativeUrl=function(e){return new tt(this,"getFileByServerRelativeUrl('"+e+"')")},t.prototype.getFileByServerRelativePath=function(e){return new tt(this,"getFileByServerRelativePath(decodedUrl='"+e+"')")},t.prototype.getList=function(e){return new We(this,"getList('"+e+"')")},t.prototype.update=function(e){var t=this,n=Object(g.n)(Object(g.f)({__metadata:{type:"SP.Web"}},e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,web:t}})},t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t.prototype.applyTheme=function(e,t,r,o){var i=Object(g.n)({backgroundImageUrl:r,colorPaletteUrl:e,fontSchemeUrl:t,shareGenerated:o});return this.clone(n,"applytheme").postCore({body:i})},t.prototype.applyWebTemplate=function(e){var t=this.clone(n,"applywebtemplate");return t.concat("(@t)"),t.query.set("@t",e),t.postCore()},t.prototype.ensureUser=function(e){var t=Object(g.n)({logonName:e});return this.clone(n,"ensureuser").postCore({body:t}).then(function(e){return{data:e,user:new k(u(e))}})},t.prototype.availableWebTemplates=function(e,t){return void 0===e&&(e=1033),void 0===t&&(t=!0),new j(this,"getavailablewebtemplates(lcid="+e+", doincludecrosslanguage="+t+")")},t.prototype.getCatalog=function(e){return this.clone(n,"getcatalog("+e+")").select("Id").get().then(function(e){return new We(u(e))})},t.prototype.getChanges=function(e){var t=Object(g.n)({query:Object(g.f)({__metadata:{type:"SP.ChangeQuery"}},e)});return this.clone(n,"getchanges").postCore({body:t})},Object.defineProperty(t.prototype,"customListTemplate",{get:function(){return new j(this,"getcustomlisttemplates")},enumerable:!0,configurable:!0}),t.prototype.getUserById=function(e){return new k(this,"getUserById("+e+")")},t.prototype.mapToIcon=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=""),this.clone(n,"maptoicon(filename='"+e+"', progid='"+r+"', size="+t+")").get()},t.prototype.getStorageEntity=function(e){return this.clone(n,"getStorageEntity('"+e+"')").get()},t.prototype.setStorageEntity=function(e,t,r,o){return void 0===r&&(r=""),void 0===o&&(o=""),this.clone(n,"setStorageEntity").postCore({body:Object(g.n)({comments:o,description:r,key:e,value:t})})},t.prototype.removeStorageEntity=function(e){return this.clone(n,"removeStorageEntity('"+e+"')").postCore()},t.prototype.getAppCatalog=function(e){return new ut(e||this)},t.prototype.getSiteCollectionAppCatalog=function(e){return new ut(e||this,"_api/web/sitecollectionappcatalog/AvailableApps")},t.prototype.getClientSideWebParts=function(){return this.clone(j,"GetClientSideWebParts").get()},t.prototype.addClientSidePage=function(e,t){return void 0===t&&(t=e.replace(/\.[^\/.]+$/,"")),xt.create(this,e,t)},t.prototype.addClientSidePageByPath=function(e,t){return void 0===t&&(t=e.replace(/\.[^\/.]+$/,"")),xt.create(this,e,t)},t.prototype.createDefaultAssociatedGroups=function(e,t,r){var o=this.clone(n,"createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)");return o.query.set("@u","'"+encodeURIComponent(e||"")+"'"),o.query.set("@v","'"+encodeURIComponent(t||"")+"'"),o.query.set("@s","'"+encodeURIComponent(r||"")+"'"),o.postCore()},t.prototype.hubSiteData=function(e){return void 0===e&&(e=!1),i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.clone(n,"hubSiteData("+e+")").get().then(function(e){return JSON.parse(e)})]})})},t.prototype.syncHubSiteTheme=function(){return this.clone(n,"syncHubSiteTheme").postCore()},t.prototype.getSiteDesignRuns=function(e){return new wt(this,"").getSiteDesignRun(void 0,e)},t.prototype.getSiteScript=function(e){return new It(this,"").getSiteScriptFromWeb(void 0,e)},t.prototype.addSiteDesignTask=function(e){return new wt(this,"").addSiteDesignTaskToCurrentWeb(e)},t.prototype.getSiteDesignRunStatus=function(e){return new wt(this,"").getSiteDesignRunStatus(void 0,e)};var n;return t=n=o([h("_api/web")],t)}(fe);!function(e){e[e.NotPromoted=0]="NotPromoted",e[e.PromoteOnPublish=1]="PromoteOnPublish",e[e.Promoted=2]="Promoted"}(at||(at={}));var Et,xt=function(e){function t(n,r,o,i,s,u){void 0===i&&(i=!1),void 0===s&&(s=[]),void 0===u&&(u=!1);var c=e.call(this,n,r)||this;return c.json=o,c.sections=s,c.commentsDisabled=u,c._bannerImageDirty=!1,"string"==typeof n?(c._parentUrl="",c._url=Object(g.d)(a(n),r)):c.extend(t.initFrom(n,null),r),c._pageSettings={controlType:0,pageSettingsSlice:{isDefaultDescription:!0,isDefaultThumbnail:!0}},c._layoutPart=t.getDefaultLayoutPart(),void 0===o||i||c.fromJSON(o),c}return r(t,e),t.create=function(e,n,r,o,a){return void 0===o&&(o="Article"),void 0===a&&(a=0),i(this,void 0,void 0,function(){var i,u;return s(this,function(s){switch(s.label){case 0:return n=n.replace(/\.aspx$/i,""),[4,t.initFrom(e,"_api/sitepages/pages").postCore({body:Object(g.n)(Object.assign(d("SP.Publishing.SitePage"),{PageLayoutType:o,PromotedState:a}))})];case 1:return i=s.sent(),u=new t(e,"",i),u.title=n,[4,u.save(!1)];case 2:return s.sent(),u.title=r,[2,u]}})})},t.fromFile=function(e){return e.getItem().then(function(n){return new t(a(e.toUrl()),"",{Id:n.Id},!0).configureFrom(e).load()})},t.getDefaultLayoutPart=function(){return{dataVersion:"1.4",description:"Title Region Description",id:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",instanceId:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",properties:{authors:[],layoutType:"FullWidthImage",showPublishDate:!1,showTopicHeader:!1,textAlignment:"Left",title:"",topicHeader:""},serverProcessedContent:{htmlStrings:{},searchablePlainTexts:{},imageSources:{},links:{}},title:"Title area"}},t.initFrom=function(e,n){return new t(a(e.toUrl()),n).configureFrom(e)},Object.defineProperty(t.prototype,"pageLayout",{get:function(){return this.json.PageLayoutType},set:function(e){this.json.PageLayoutType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bannerImageUrl",{get:function(){return this.json.BannerImageUrl},set:function(e){this.json.BannerImageUrl=e,this._bannerImageDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bannerImageSourceType",{get:function(){return this._layoutPart.properties.imageSourceType},set:function(e){this._layoutPart.properties.imageSourceType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topicHeader",{get:function(){return Object(g.q)(this.json.TopicHeader)?this.json.TopicHeader:""},set:function(e){this.json.TopicHeader=e,this._layoutPart.properties.topicHeader=e,Object(g.r)(e)&&(this.showTopicHeader=!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._layoutPart.properties.title},set:function(e){this.json.Title=e,this._layoutPart.properties.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutType",{get:function(){return this._layoutPart.properties.layoutType},set:function(e){this._layoutPart.properties.layoutType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"headerTextAlignment",{get:function(){return this._layoutPart.properties.textAlignment},set:function(e){this._layoutPart.properties.textAlignment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTopicHeader",{get:function(){return this._layoutPart.properties.showTopicHeader},set:function(e){this._layoutPart.properties.showTopicHeader=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showPublishDate",{get:function(){return this._layoutPart.properties.showPublishDate},set:function(e){this._layoutPart.properties.showPublishDate=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasVerticalSection",{get:function(){return this.sections.findIndex(function(e){return 2===e.layoutIndex})>-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verticalSection",{get:function(){return this.hasVerticalSection?this.addVerticalSection():null},enumerable:!0,configurable:!0}),t.prototype.addSection=function(){var e=new Nt(this,f(this.sections),1);return this.sections.push(e),e},t.prototype.addVerticalSection=function(){var e=this.sections.findIndex(function(e){return 2===e.layoutIndex});if(e>-1)return this.sections[e];var t=new Nt(this,f(this.sections),2);return this.sections.push(t),t},t.prototype.fromJSON=function(e){this.json=e;var t=JSON.parse(e.CanvasContent1),n=JSON.parse(e.LayoutWebpartsContent);return n&&n.length>0&&(this._layoutPart=n[0]),this.setControls(t),this},t.prototype.load=function(){var e=this;return this.getItem("Id","CommentsDisabled").then(function(t){return new N(e,"_api/sitepages/pages("+t.Id+")").get().then(function(n){return e.commentsDisabled=t.CommentsDisabled,e.fromJSON(n)})})},t.prototype.save=function(e){var n=this;if(void 0===e&&(e=!0),null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");var r=Promise.resolve({});return this._bannerImageDirty&&(r=r.then(function(e){return new Promise(function(e,t){var r=n.json.BannerImageUrl;Object(g.m)(r)&&(r=r.replace(/^https?:\/\/[a-z0-9\.]*?\.[a-z]{2,3}\//i,"/"));var o=new ht(a(n.toUrl())),i=new Ct(a(n.toUrl())),s=i.getFileByServerRelativePath(r),u="",c="",l="",p="",d="";Promise.all([o.select("Id","Url").get().then(function(e){return u=e.Id}),i.select("Id","Url").get().then(function(e){c=e.Id,d=e.Url}),s.listItemAllFields.select("UniqueId","ParentList/Id").expand("ParentList").get().then(function(e){l=e.UniqueId,p=e.ParentList.Id})]).then(function(){var t=new N(d,"_layouts/15/getpreview.ashx");t.query.set("guidSite",""+u),t.query.set("guidWeb",""+c),t.query.set("guidFile",""+l),n.bannerImageUrl=t.toUrlAndQuery(),Object(g.q)(n._layoutPart.serverProcessedContent)||(n._layoutPart.serverProcessedContent={}),n._layoutPart.serverProcessedContent.imageSources={imageSource:r},Object(g.q)(n._layoutPart.serverProcessedContent.customMetadata)||(n._layoutPart.serverProcessedContent.customMetadata={}),n._layoutPart.serverProcessedContent.customMetadata.imageSource={listId:p,siteId:u,uniqueId:l,webId:c},n._layoutPart.properties.webId=c,n._layoutPart.properties.siteId=u,n._layoutPart.properties.listId=p,n._layoutPart.properties.uniqueId=l,e()}).catch(t)})})),this.json.IsPageCheckedOutToCurrentUser||(r=r.then(function(e){return t.initFrom(n,"_api/sitepages/pages("+n.json.Id+")/checkoutpage").postCore()})),r=r.then(function(e){var r=Object.assign(d("SP.Publishing.SitePage"),{AuthorByline:n.json.AuthorByline||[],BannerImageUrl:n.bannerImageUrl,CanvasContent1:n.getCanvasContent1(),LayoutWebpartsContent:n.getLayoutWebpartsContent(),Title:n.title,TopicHeader:n.topicHeader}),o=t.initFrom(n,"_api/sitepages/pages("+n.json.Id+")/savepage");return o.configure({headers:{"if-match":"*"}}),o.postCore({body:Object(g.n)(r)})}),e&&(r=r.then(function(e){return t.initFrom(n,"_api/sitepages/pages("+n.json.Id+")/publish").postCore()}).then(function(e){e&&(n.json.IsPageCheckedOutToCurrentUser=!1)})),r=r.then(function(e){n._bannerImageDirty=!1})},t.prototype.discardPageCheckout=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(n){switch(n.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return[4,t.initFrom(this,"_api/sitepages/pages("+this.json.Id+")/discardPage").postCore({body:Object(g.n)(d("SP.Publishing.SitePage"))})];case 1:return e=n.sent(),this.fromJSON(e),[2]}})})},t.prototype.promoteToNews=function(){return i(this,void 0,void 0,function(){return s(this,function(e){return[2,this.promoteNewsImpl("promoteToNews")]})})},t.prototype.enableComments=function(){var e=this;return this.setCommentsOn(!0).then(function(t){return e.commentsDisabled=!1,t})},t.prototype.disableComments=function(){var e=this;return this.setCommentsOn(!1).then(function(t){return e.commentsDisabled=!0,t})},t.prototype.findControlById=function(e){return this.findControl(function(t){return t.id===e})},t.prototype.findControl=function(e){for(var t=0;t<this.sections.length;t++)for(var n=0;n<this.sections[t].columns.length;n++)for(var r=0;r<this.sections[t].columns[n].controls.length;r++)if(e(this.sections[t].columns[n].controls[r]))return this.sections[t].columns[n].controls[r];return null},t.prototype.like=function(){return this.getItem().then(function(e){return e.like()})},t.prototype.unlike=function(){return this.getItem().then(function(e){return e.unlike()})},t.prototype.getLikedByInformation=function(){return this.getItem().then(function(e){return e.getLikedByInformation()})},t.prototype.copyPage=function(e,n,r,o,a){return void 0===o&&(o=!0),void 0===a&&(a=0),i(this,void 0,void 0,function(){var i;return s(this,function(s){switch(s.label){case 0:return[4,t.create(e,n,r,this.pageLayout,a)];case 1:return i=s.sent(),i.setControls(this.getControls()),[4,i.save(o)];case 2:return s.sent(),[2,i]}})})},t.prototype.setBannerImage=function(e,t){this.bannerImageUrl=e,this.bannerImageSourceType=2,Object(g.q)(t)&&(Object(g.j)(t,"translateX")&&(this._layoutPart.properties.translateX=t.translateX),Object(g.j)(t,"translateY")&&(this._layoutPart.properties.translateY=t.translateY),Object(g.j)(t,"imageSourceType")&&(this.bannerImageSourceType=t.imageSourceType),Object(g.j)(t,"altText")&&(this._layoutPart.properties.altText=t.altText))},t.prototype.getCanvasContent1=function(){return JSON.stringify(this.getControls())},t.prototype.getLayoutWebpartsContent=function(){return this._layoutPart?JSON.stringify([this._layoutPart]):JSON.stringify(null)},t.prototype.setControls=function(e){if(e&&e.length){for(var t=0;t<e.length;t++){switch(Object(g.j)(e[t],"controlType")?e[t].controlType:0){case 0:Object(g.j)(e[t],"pageSettingsSlice")?this._pageSettings=e[t]:this.mergeColumnToTree(new jt(e[t]));break;case 3:var n=new Ut(e[t]);this.mergePartToTree(n,n.data.position);break;case 4:var r=e[t],o=new At(r.innerHTML,r);this.mergePartToTree(o,o.data.position)}}y(this.sections)}},t.prototype.getControls=function(){var e=this;y(this.sections);var t=[];return this.sections.forEach(function(n){n.columns.forEach(function(r){r.controls.length<1?t.push({displayMode:r.data.displayMode,emphasis:e.getEmphasisObj(n.emphasis),position:r.data.position}):r.controls.forEach(function(r){r.data.emphasis=e.getEmphasisObj(n.emphasis),t.push(r.data)})})}),t.push(this._pageSettings),t},t.prototype.getEmphasisObj=function(e){return e<1||e>3?{}:{zoneEmphasis:e}},t.prototype.setCommentsOn=function(e){return this.getItem().then(function(t){return new ze(t,"SetCommentsDisabled("+!e+")").update({})})},t.prototype.promoteNewsImpl=function(e){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){switch(o.label){case 0:return Object(g.r)(this.json.VersionInfo.LastVersionCreatedBy)?(n=new Date(this.json.VersionInfo.LastVersionCreated),n.getFullYear()<2e3?[4,this.save(!0)]:[3,2]):[3,2];case 1:o.sent(),o.label=2;case 2:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return[4,t.initFrom(this,"_api/sitepages/pages("+this.json.Id+")/"+e).postCore({body:Object(g.n)(d("SP.Publishing.SitePage"))})];case 3:return r=o.sent(),[2,r]}})})},t.prototype.mergePartToTree=function(e,t){var n=null,r=12,o=0,i=0,s=1;t&&(Object(g.j)(t,"zoneIndex")&&(i=t.zoneIndex),Object(g.j)(t,"sectionIndex")&&(o=t.sectionIndex),Object(g.j)(t,"sectionFactor")&&(r=t.sectionFactor),Object(g.j)(t,"layoutIndex")&&(s=t.layoutIndex));var a=e.data&&e.data.emphasis&&e.data.emphasis.zoneEmphasis?e.data.emphasis.zoneEmphasis:0,u=this.getOrCreateSection(i,s,a),c=u.columns.filter(function(e){return e.order===o});n=c.length<1?u.addColumn(r,s):c[0],e.column=n,n.addControl(e)},t.prototype.mergeColumnToTree=function(e){var t=Object(g.j)(e.data,"position")&&Object(g.j)(e.data.position,"zoneIndex")?e.data.position.zoneIndex:0,n=Object(g.j)(e.data,"position")&&Object(g.j)(e.data.position,"layoutIndex")?e.data.position.layoutIndex:1,r=this.getOrCreateSection(t,n,e.data.emphasis.zoneEmphasis||0);e.section=r,r.columns.push(e)},t.prototype.getOrCreateSection=function(e,t,n){var r=null,o=this.sections.filter(function(n){return n.order===e&&n.layoutIndex===t});return o.length<1?(r=2===t?this.addVerticalSection():this.addSection(),r.order=e,r.emphasis=n):r=o[0],r},t.prototype.getItem=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.initFrom(this,"/_api/lists/EnsureClientRenderedSitePagesLibrary").select("EnableModeration","EnableMinorVersions","Id").postCore().then(function(t){var r=new We(t["odata.id"]).configureFrom(e).items.getById(e.json.Id);return r.select.apply(r,n).get().then(function(t){return Object(g.f)(new ze(u(t)).configureFrom(e),t)})})},t}(N),Nt=function(){function e(e,t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=0),this.page=e,this.columns=r,this._emphasis=o,this._memId=Object(g.h)(),this._order=t,this._layoutIndex=n}return Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e;for(var t=0;t<this.columns.length;t++)this.columns[t].data.position.zoneIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layoutIndex",{get:function(){return this._layoutIndex},set:function(e){this._layoutIndex=e;for(var t=0;t<this.columns.length;t++)this.columns[t].data.position.layoutIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultColumn",{get:function(){return this.columns.length<1&&this.addColumn(12),this.columns[0]},enumerable:!0,configurable:!0}),e.prototype.addColumn=function(e,t){void 0===t&&(t=1);var n=new jt;return n.section=this,n.data.position.zoneIndex=this.order,n.data.position.layoutIndex=t,n.data.position.sectionFactor=e,n.order=f(this.columns),this.columns.push(n),n},e.prototype.addControl=function(e){return this.defaultColumn.addControl(e),this},Object.defineProperty(e.prototype,"emphasis",{get:function(){return this._emphasis},set:function(e){this._emphasis=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){var e=this;this.page.sections=this.page.sections.filter(function(t){return t._memId!==e._memId}),y(this.page.sections)},e}(),jt=function(){function e(t,n){void 0===t&&(t=JSON.parse(JSON.stringify(e.Default))),void 0===n&&(n=[]),this.json=t,this.controls=n,this._section=null,this._memId=Object(g.h)()}return Object.defineProperty(e.prototype,"data",{get:function(){return this.json},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"section",{get:function(){return this._section},set:function(e){this._section=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this.data.position.sectionIndex},set:function(e){this.data.position.sectionIndex=e;for(var t=0;t<this.controls.length;t++)this.controls[t].data.position.zoneIndex=this.data.position.zoneIndex,this.controls[t].data.position.layoutIndex=this.data.position.layoutIndex,this.controls[t].data.position.sectionIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"factor",{get:function(){return this.data.position.sectionFactor},set:function(e){this.data.position.sectionFactor=e},enumerable:!0,configurable:!0}),e.prototype.addControl=function(e){return e.column=this,this.controls.push(e),this},e.prototype.getControl=function(e){return this.controls[e]},e.prototype.remove=function(){var e=this;this.section.columns=this.section.columns.filter(function(t){return t._memId!==e._memId}),y(this.section.columns)},e.Default={controlType:0,displayMode:2,emphasis:{},position:{layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1}},e}(),Rt=function(){function e(e){this.json=e}return Object.defineProperty(e.prototype,"id",{get:function(){return this.json.id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.json},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"column",{get:function(){return this._column},set:function(e){this._column=e,this.onColumnChange(this._column)},enumerable:!0,configurable:!0}),e.prototype.remove=function(){var e=this;this.column.controls=this.column.controls.filter(function(t){return t.id!==e.id}),y(this.column.controls)},e.prototype.setData=function(e){this.json=e},e}(),At=function(e){function t(n,r){void 0===r&&(r=JSON.parse(JSON.stringify(t.Default)));var o=this;return Object(g.r)(r.id)&&(r.id=Object(g.h)(),r.anchorComponentId=r.id),o=e.call(this,r)||this,o.text=n,o}return r(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.data.innerHTML},set:function(e){e.startsWith("<p>")||(e="<p>"+e+"</p>"),this.data.innerHTML=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),t.prototype.onColumnChange=function(e){this.data.position.sectionFactor=e.factor,this.data.position.controlIndex=f(e.controls),this.data.position.zoneIndex=e.data.position.zoneIndex,this.data.position.sectionIndex=e.order,this.data.position.layoutIndex=e.data.position.layoutIndex},t.Default={addedFromPersistedData:!1,anchorComponentId:"",controlType:4,displayMode:2,editorType:"CKEditor",emphasis:{},id:"",innerHTML:"",position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1}},t}(Rt),Ut=function(e){function t(n){return void 0===n&&(n=JSON.parse(JSON.stringify(t.Default))),e.call(this,n)||this}return r(t,e),t.fromComponentDef=function(e){var n=new t;return n.import(e),n},Object.defineProperty(t.prototype,"title",{get:function(){return this.data.webPartData.title},set:function(e){this.data.webPartData.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this.data.webPartData.description},set:function(e){this.data.webPartData.description=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.data.reservedHeight},set:function(e){this.data.reservedHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.data.reservedWidth},set:function(e){this.data.reservedWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return this.data.webPartData.dataVersion},set:function(e){this.data.webPartData.dataVersion=e},enumerable:!0,configurable:!0}),t.prototype.setProperties=function(e){return this.data.webPartData.properties=Object(g.f)(this.data.webPartData.properties,e),this},t.prototype.getProperties=function(){return this.data.webPartData.properties},t.prototype.onColumnChange=function(e){this.data.position={controlIndex:f(e.controls),layoutIndex:e.data.position.layoutIndex,sectionFactor:e.factor,sectionIndex:e.data.position.sectionIndex,zoneIndex:e.data.position.zoneIndex}},t.prototype.import=function(e){var t=Object(g.h)(),n=e.Id.replace(/^\{|\}$/g,"").toLowerCase(),r=JSON.parse(e.Manifest),o=r.preconfiguredEntries[0];this.setData(Object.assign({},this.data,{id:t,webPartData:{dataVersion:"1.0",description:o.description.default,id:n,instanceId:t,properties:o.properties,title:o.title.default},webPartId:n}))},t.Default={addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:null,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:null,webPartId:null},t}(Rt),kt=(new Map([["text","Querytext"],["template","QueryTemplate"],["sourceId","SourceId"],["trimDuplicatesIncludeId",""],["startRow",""],["rowLimit",""],["rankingModelId",""],["rowsPerPage",""],["selectProperties",""],["culture",""],["timeZoneId",""],["refinementFilters",""],["refiners",""],["hiddenConstraints",""],["sortList",""],["timeout",""],["hithighlightedProperties",""],["clientType",""],["personalizationData",""],["resultsURL",""],["queryTag",""],["properties",""],["queryTemplatePropertiesUrl",""],["reorderingRules",""],["hitHighlightedMultivaluePropertyLimit",""],["collapseSpecification",""],["uiLanguage",""],["desiredSnippetLength",""],["maxSnippetLength",""],["summaryLength",""]]),new Map([]),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.execute=function(e){var t=this,n=this.parseQuery(e),r=Object(g.n)({request:Object(g.f)(d("Microsoft.Office.Server.Search.REST.SearchRequest"),Object.assign({},n,{HitHighlightedProperties:this.fixArrProp(n.HitHighlightedProperties),Properties:this.fixArrProp(n.Properties),RefinementFilters:this.fixArrProp(n.RefinementFilters),ReorderingRules:this.fixArrProp(n.ReorderingRules),SelectProperties:this.fixArrProp(n.SelectProperties),SortList:this.fixArrProp(n.SortList)}))});if(this._useCaching){this._forceCaching=!0;var o="PnPjs.SearchWithCaching("+Object(g.i)(r)+")";Object(g.q)(this._cachingOptions)?/\/_api\/search\/postquery$/i.test(this._cachingOptions.key)&&(this._cachingOptions.key=o):this._cachingOptions=new v.c(o)}return this.postCore({body:r}).then(function(e){return new Lt(e,t.toUrl(),n)})},t.prototype.fixArrProp=function(e){return void 0===e?{results:[]}:(e=Object(g.k)(e)?e:[e],Object(g.j)(e,"results")?e:{results:e})},t.prototype.parseQuery=function(e){return"string"==typeof e?{Querytext:e}:e.toSearchQuery?e.toSearchQuery():e},t=o([h("_api/search/postquery")],t)}(R)),Lt=function(){function e(e,t,n,r,o){void 0===r&&(r=null),void 0===o&&(o=null),this._url=t,this._query=n,this._raw=r,this._primary=o,this._raw=e.postquery?e.postquery:e}return Object.defineProperty(e.prototype,"ElapsedTime",{get:function(){return this.RawSearchResults.ElapsedTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RowCount",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRows",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRowsIncludingDuplicates",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RawSearchResults",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"PrimarySearchResults",{get:function(){return null===this._primary&&(this._primary=this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows)),this._primary},enumerable:!0,configurable:!0}),e.prototype.getPage=function(e,t){if(this.TotalRows<this.RowCount)return Promise.resolve(null);var n=void 0!==t?t:Object(g.j)(this._query,"RowLimit")?this._query.RowLimit:10,r=Object(g.f)(this._query,{RowLimit:n,StartRow:n*(e-1)});return r.StartRow>this.TotalRows?Promise.resolve(null):new kt(this._url,null).execute(r)},e.prototype.formatSearchResults=function(e){for(var t=new Array,n=e.results?e.results:e,r=0,o=n;r<o.length;r++){var i=o[r],s=i.Cells.results?i.Cells.results:i.Cells;t.push(s.reduce(function(e,t){return Object.defineProperty(e,t.Key,{configurable:!1,enumerable:!0,value:t.Value,writable:!1}),e},{}))}return t},e}();!function(e){e[e.Ascending=0]="Ascending",e[e.Descending=1]="Descending",e[e.FQLFormula=2]="FQLFormula"}(Et||(Et={}));var Dt;!function(e){e[e.ResultContainsKeyword=0]="ResultContainsKeyword",e[e.TitleContainsKeyword=1]="TitleContainsKeyword",e[e.TitleMatchesKeyword=2]="TitleMatchesKeyword",e[e.UrlStartsWith=3]="UrlStartsWith",e[e.UrlExactlyMatches=4]="UrlExactlyMatches",e[e.ContentTypeIs=5]="ContentTypeIs",e[e.FileExtensionMatches=6]="FileExtensionMatches",e[e.ResultHasTag=7]="ResultHasTag",e[e.ManualCondition=8]="ManualCondition"}(Dt||(Dt={}));var Ft;!function(e){e[e.None=0]="None",e[e.StringType=1]="StringType",e[e.Int32Type=2]="Int32Type",e[e.BooleanType=3]="BooleanType",e[e.StringArrayType=4]="StringArrayType",e[e.UnSupportedType=5]="UnSupportedType"}(Ft||(Ft={}));var Mt,Bt=(function(){function e(){}e.Documents="e7ec8cee-ded8-43c9-beb5-436b54b31e84",e.ItemsMatchingContentType="5dc9f503-801e-4ced-8a2c-5d1237132419",e.ItemsMatchingTag="e1327b9c-2b8c-4b23-99c9-3730cb29c3f7",e.ItemsRelatedToCurrentUser="48fec42e-4a92-48ce-8363-c2703a40e67d",e.ItemsWithSameKeywordAsThisItem="5c069288-1d17-454a-8ac6-9c642a065f48",e.LocalPeopleResults="b09a7990-05ea-4af9-81ef-edfab16c4e31",e.LocalReportsAndDataResults="203fba36-2763-4060-9931-911ac8c0583b",e.LocalSharePointResults="8413cd39-2156-4e00-b54d-11efd9abdb89",e.LocalVideoResults="78b793ce-7956-4669-aa3b-451fc5defebf",e.Pages="5e34578e-4d08-4edc-8bf3-002acf3cdbcc",e.Pictures="38403c8c-3975-41a8-826e-717f2d41568a",e.Popular="97c71db1-58ce-4891-8b64-585bc2326c12",e.RecentlyChangedItems="ba63bbae-fa9c-42c0-b027-9a878f16557c",e.RecommendedItems="ec675252-14fa-4fbe-84dd-8d098ed74181",e.Wiki="9479bf85-e257-4318-b5a8-81a180f5faa1"}(),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.execute=function(e){return this.mapQueryToQueryString(e),this.get().then(function(e){var t=Object(g.j)(e,"suggest")?function(t){return e.suggest[t].results}:function(t){return e[t]};return{PeopleNames:t("PeopleNames"),PersonalResults:t("PersonalResults"),Queries:t("Queries")}})},t.prototype.mapQueryToQueryString=function(e){var t=this;this.query.set("querytext","'"+e.querytext+"'");var n=function(e){return function(n){return function(r){Object(g.j)(e,n)&&t.query.set(r,e[n].toString())}}}(e);n("count")("inumberofquerysuggestions"),n("personalCount")("inumberofresultsuggestions"),n("preQuery")("fprequerysuggestions"),n("hitHighlighting")("fhithighlighting"),n("capitalize")("fcapitalizefirstletters"),n("culture")("culture"),n("stemming")("enablestemming"),n("includePeople")("showpeoplenamesuggestions"),n("queryRules")("enablequeryrules"),n("prefixMatch")("fprefixmatchallterms")},t=o([h("_api/search/suggest")],t)}(R)),qt=function(e){function t(t,n){void 0===n&&(n="_api/sp.userprofiles.peoplemanager");var r=e.call(this,t,n)||this;return r.clientPeoplePickerQuery=new Wt(t).configureFrom(r),r.profileLoader=new Gt(t).configureFrom(r),r}return r(t,e),Object.defineProperty(t.prototype,"editProfileLink",{get:function(){return this.clone(t,"EditProfileLink").get()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMyPeopleListPublic",{get:function(){return this.clone(t,"IsMyPeopleListPublic").get()},enumerable:!0,configurable:!0}),t.prototype.amIFollowedBy=function(e){var n=this.clone(t,"amifollowedby(@v)");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},t.prototype.amIFollowing=function(e){var n=this.clone(t,"amifollowing(@v)");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},t.prototype.getFollowedTags=function(e){return void 0===e&&(e=20),this.clone(t,"getfollowedtags("+e+")").get()},t.prototype.getFollowersFor=function(e){var n=this.clone(t,"getfollowersfor(@v)");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},Object.defineProperty(t.prototype,"myFollowers",{get:function(){return new j(this,"getmyfollowers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"myProperties",{get:function(){return new t(this,"getmyproperties")},enumerable:!0,configurable:!0}),t.prototype.getPeopleFollowedBy=function(e){var n=this.clone(t,"getpeoplefollowedby(@v)");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},t.prototype.getPropertiesFor=function(e){var n=this.clone(t,"getpropertiesfor(@v)");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},Object.defineProperty(t.prototype,"trendingTags",{get:function(){var e=this.clone(t,null);return e.concat(".gettrendingtags"),e.get()},enumerable:!0,configurable:!0}),t.prototype.getUserProfilePropertyFor=function(e,n){var r=this.clone(t,"getuserprofilepropertyfor(accountname=@v, propertyname='"+n+"')");return r.query.set("@v","'"+encodeURIComponent(e)+"'"),r.get()},t.prototype.hideSuggestion=function(e){var n=this.clone(t,"hidesuggestion(@v)");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.postCore()},t.prototype.isFollowing=function(e,n){var r=this.clone(t,null);return r.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),r.query.set("@v","'"+encodeURIComponent(e)+"'"),r.query.set("@y","'"+encodeURIComponent(n)+"'"),r.get()},t.prototype.setMyProfilePic=function(e){var n=this;return new Promise(function(r,o){var i=null,s=new FileReader;s.onload=function(e){return i=e.target.result},s.readAsArrayBuffer(e),new t(n,"setmyprofilepicture").postCore({body:String.fromCharCode.apply(null,new Uint16Array(i))}).then(function(e){return r()}).catch(function(e){return o(e)})})},t.prototype.setSingleValueProfileProperty=function(e,n,r){var o=Object(g.n)({accountName:e,propertyName:n,propertyValue:r});return this.clone(t,"SetSingleValueProfileProperty").postCore({body:o})},t.prototype.setMultiValuedProfileProperty=function(e,n,r){var o=Object(g.n)({accountName:e,propertyName:n,propertyValues:r});return this.clone(t,"SetMultiValuedProfileProperty").postCore({body:o})},t.prototype.createPersonalSiteEnqueueBulk=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.profileLoader.createPersonalSiteEnqueueBulk(e)},Object.defineProperty(t.prototype,"ownerUserProfile",{get:function(){return this.profileLoader.ownerUserProfile},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userProfile",{get:function(){return this.profileLoader.userProfile},enumerable:!0,configurable:!0}),t.prototype.createPersonalSite=function(e){return void 0===e&&(e=!1),this.profileLoader.createPersonalSite(e)},t.prototype.shareAllSocialData=function(e){return this.profileLoader.shareAllSocialData(e)},t.prototype.clientPeoplePickerResolveUser=function(e){return this.clientPeoplePickerQuery.clientPeoplePickerResolveUser(e)},t.prototype.clientPeoplePickerSearchUser=function(e){return this.clientPeoplePickerQuery.clientPeoplePickerSearchUser(e)},t}(R),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.createPersonalSiteEnqueueBulk=function(e){return this.clone(n,"createpersonalsiteenqueuebulk",!1).postCore({body:Object(g.n)({emailIDs:e})})},Object.defineProperty(t.prototype,"ownerUserProfile",{get:function(){var e=this.getParent(n,this.parentUrl,"_api/sp.userprofiles.profileloader.getowneruserprofile");return this.hasBatch&&(e=e.inBatch(this.batch)),e.postCore()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userProfile",{get:function(){return this.clone(n,"getuserprofile").postCore()},enumerable:!0,configurable:!0}),t.prototype.createPersonalSite=function(e){return void 0===e&&(e=!1),this.clone(n,"getuserprofile/createpersonalsiteenque("+e+")").postCore()},t.prototype.shareAllSocialData=function(e){return this.clone(n,"getuserprofile/shareallsocialdata("+e+")").postCore()};var n;return t=n=o([h("_api/sp.userprofiles.profileloader.getprofileloader")],t)}(N),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.clientPeoplePickerResolveUser=function(e){var t=this.clone(n,null);return t.concat(".clientpeoplepickerresolveuser"),t.postCore({body:this.createClientPeoplePickerQueryParametersRequestBody(e)}).then(function(e){return"object"==typeof e?e.ClientPeoplePickerResolveUser:e}).then(JSON.parse)},t.prototype.clientPeoplePickerSearchUser=function(e){var t=this.clone(n,null);return t.concat(".clientpeoplepickersearchuser"),t.postCore({body:this.createClientPeoplePickerQueryParametersRequestBody(e)}).then(function(e){return"object"==typeof e?e.ClientPeoplePickerSearchUser:e}).then(JSON.parse)},t.prototype.createClientPeoplePickerQueryParametersRequestBody=function(e){return Object(g.n)({queryParams:Object(g.f)(d("SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters"),e)})};var n;return t=n=o([h("_api/sp.ui.applicationpages.clientpeoplepickerwebserviceinterface")],t)}(N),Ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,Object.defineProperty(t.prototype,"my",{get:function(){return new Kt(this)},enumerable:!0,configurable:!0}),t.prototype.getFollowedSitesUri=function(){return this.clone(n,"FollowedSitesUri").get().then(function(e){return e.FollowedSitesUri||e})},t.prototype.getFollowedDocumentsUri=function(){return this.clone(n,"FollowedDocumentsUri").get().then(function(e){return e.FollowedDocumentsUri||e})},t.prototype.follow=function(e){return this.clone(n,"follow").postCore({body:this.createSocialActorInfoRequestBody(e)})},t.prototype.isFollowed=function(e){return this.clone(n,"isfollowed").postCore({body:this.createSocialActorInfoRequestBody(e)})},t.prototype.stopFollowing=function(e){return this.clone(n,"stopfollowing").postCore({body:this.createSocialActorInfoRequestBody(e)})},t.prototype.createSocialActorInfoRequestBody=function(e){return Object(g.n)({actor:Object.assign(d("SP.Social.SocialActorInfo"),{Id:null},e)})};var n;return t=n=o([h("_api/social.following")],t)}(R),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.followed=function(e){return this.clone(n,"followed(types="+e+")").get().then(function(e){return Object(g.j)(e,"Followed")?e.Followed.results:e})},t.prototype.followedCount=function(e){return this.clone(n,"followedcount(types="+e+")").get().then(function(e){return e.FollowedCount||e})},t.prototype.followers=function(){return this.clone(n,"followers").get().then(function(e){return Object(g.j)(e,"Followers")?e.Followers.results:e})},t.prototype.suggestions=function(){return this.clone(n,"suggestions").get().then(function(e){return Object(g.j)(e,"Suggestions")?e.Suggestions.results:e})};var n;return t=n=o([h("my")],t)}(R);!function(e){e[e.User=0]="User",e[e.Document=1]="Document",e[e.Site=2]="Site",e[e.Tag=3]="Tag"}(Mt||(Mt={}));var Vt;!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.Document=2]="Document",e[e.Site=4]="Site",e[e.Tag=8]="Tag",e[e.ExcludeContentWithoutFeeds=268435456]="ExcludeContentWithoutFeeds",e[e.IncludeGroupsSites=536870912]="IncludeGroupsSites",e[e.WithinLast24Hours=1073741824]="WithinLast24Hours"}(Vt||(Vt={}));var Qt;!function(e){e[e.Ok=0]="Ok",e[e.AlreadyFollowing=1]="AlreadyFollowing",e[e.LimitReached=2]="LimitReached",e[e.InternalError=3]="InternalError"}(Qt||(Qt={}));var zt;!function(e){e[e.OK=0]="OK",e[e.InvalidRequest=1]="InvalidRequest",e[e.AccessDenied=2]="AccessDenied",e[e.ItemNotFound=3]="ItemNotFound",e[e.InvalidOperation=4]="InvalidOperation",e[e.ItemNotModified=5]="ItemNotModified",e[e.InternalError=6]="InternalError",e[e.CacheReadError=7]="CacheReadError",e[e.CacheUpdateError=8]="CacheUpdateError",e[e.PersonalSiteNotFound=9]="PersonalSiteNotFound",e[e.FailedToCreatePersonalSite=10]="FailedToCreatePersonalSite",e[e.NotAuthorizedToCreatePersonalSite=11]="NotAuthorizedToCreatePersonalSite",e[e.CannotCreatePersonalSite=12]="CannotCreatePersonalSite",e[e.LimitReached=13]="LimitReached",e[e.AttachmentError=14]="AttachmentError",e[e.PartialData=15]="PartialData",e[e.FeatureDisabled=16]="FeatureDisabled",e[e.StorageQuotaExceeded=17]="StorageQuotaExceeded",e[e.DatabaseError=18]="DatabaseError"}(zt||(zt={}));var Xt=function(e){function t(n,r){return e.call(this,t.getBaseUrl(n),"_api/SP.Utilities.Utility."+r)||this}return r(t,e),t.getBaseUrl=function(e){if("string"==typeof e)return e;var t=e,n=t.toUrl(),r=n.indexOf("_api/");return r<0?n:n.substr(0,r)},t.prototype.excute=function(e){return this.postCore({body:Object(g.n)(e)})},t.prototype.sendEmail=function(e){var n={properties:Object(g.f)(d("SP.Utilities.EmailProperties"),{Body:e.Body,From:e.From,Subject:e.Subject})};return e.To&&e.To.length>0&&(n.properties=Object(g.f)(n.properties,{To:{results:e.To}})),e.CC&&e.CC.length>0&&(n.properties=Object(g.f)(n.properties,{CC:{results:e.CC}})),e.BCC&&e.BCC.length>0&&(n.properties=Object(g.f)(n.properties,{BCC:{results:e.BCC}})),e.AdditionalHeaders&&(n.properties=Object(g.f)(n.properties,{AdditionalHeaders:e.AdditionalHeaders})),this.clone(t,"SendEmail",!0).excute(n)},t.prototype.getCurrentUserEmailAddresses=function(){return this.clone(t,"GetCurrentUserEmailAddresses",!0).excute({}).then(function(e){return Object(g.j)(e,"GetCurrentUserEmailAddresses")?e.GetCurrentUserEmailAddresses:e})},t.prototype.resolvePrincipal=function(e,n,r,o,i,s){void 0===s&&(s=!1);var a={addToUserInfoList:i,input:e,inputIsEmailOnly:o,matchUserInfoList:s,scopes:n,sources:r};return this.clone(t,"ResolvePrincipalInCurrentContext",!0).excute(a).then(function(e){return Object(g.j)(e,"ResolvePrincipalInCurrentContext")?e.ResolvePrincipalInCurrentContext:e})},t.prototype.searchPrincipals=function(e,n,r,o,i){var s={groupName:o,input:e,maxCount:i,scopes:n,sources:r};return this.clone(t,"SearchPrincipalsUsingContextWeb",!0).excute(s).then(function(e){return Object(g.j)(e,"SearchPrincipalsUsingContextWeb")?e.SearchPrincipalsUsingContextWeb:e})},t.prototype.createEmailBodyForInvitation=function(e){var n={pageAddress:e};return this.clone(t,"CreateEmailBodyForInvitation",!0).excute(n).then(function(e){return Object(g.j)(e,"CreateEmailBodyForInvitation")?e.CreateEmailBodyForInvitation:e})},t.prototype.expandGroupsToPrincipals=function(e,n){void 0===n&&(n=30);var r={inputs:e,maxCount:n};return this.clone(t,"ExpandGroupsToPrincipals",!0).excute(r).then(function(e){return Object(g.j)(e,"ExpandGroupsToPrincipals")?e.ExpandGroupsToPrincipals:e})},t.prototype.createWikiPage=function(e){return this.clone(t,"CreateWikiPageInContextWeb",!0).excute({parameters:e}).then(function(e){return{data:Object(g.j)(e,"CreateWikiPageInContextWeb")?e.CreateWikiPageInContextWeb:e,file:new tt(u(e))}})},t.prototype.containsInvalidFileFolderChars=function(e,n){return void 0===n&&(n=!1),n?(t.InvalidFileFolderNameCharsOnPremiseRegex.lastIndex=0,t.InvalidFileFolderNameCharsOnPremiseRegex.test(e)):(t.InvalidFileFolderNameCharsOnlineRegex.lastIndex=0,t.InvalidFileFolderNameCharsOnlineRegex.test(e))},t.prototype.stripInvalidFileFolderChars=function(e,n,r){return void 0===n&&(n=""),void 0===r&&(r=!1),r?e.replace(t.InvalidFileFolderNameCharsOnPremiseRegex,n):e.replace(t.InvalidFileFolderNameCharsOnlineRegex,n)},t.InvalidFileFolderNameCharsOnlineRegex=/["*:<>?\/\\|\x00-\x1f\x7f-\x9f]/g,t.InvalidFileFolderNameCharsOnPremiseRegex=/["#%*:<>?\/\\|\x00-\x1f\x7f-\x9f]/g,t}(N),Jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){return new Yt(this,"GetById?hubSiteId='"+e+"'")},t=o([h("_api/hubsites")],t)}(j),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(R),$t=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=""),this._options=e,this._baseUrl=t}return e.prototype.configure=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.setup=function(e){l(e)},e.prototype.searchSuggest=function(e){var t;return t="string"==typeof e?{querytext:e}:e,this.create(Bt).execute(t)},e.prototype.search=function(e){return this.create(kt).execute(e)},e.prototype.searchWithCaching=function(e,t){return this.create(kt).usingCaching(t).execute(e)},Object.defineProperty(e.prototype,"site",{get:function(){return this.create(ht)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"web",{get:function(){return this.create(Ct)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"profiles",{get:function(){return this.create(qt)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"social",{get:function(){return this.create(Ht)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"navigation",{get:function(){return this.create(gt)},enumerable:!0,configurable:!0}),e.prototype.createBatch=function(){return this.web.createBatch()},Object.defineProperty(e.prototype,"utility",{get:function(){return this.create(Xt,"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteScripts",{get:function(){return this.create(It,"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteDesigns",{get:function(){return this.create(wt,"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hubSites",{get:function(){return this.create(Jt)},enumerable:!0,configurable:!0}),e.prototype.getTenantAppCatalogWeb=function(){var e=this;return this.create(Ct,"_api/SP_TenantSettings_Current").get().then(function(t){return new Ct(t.CorporateCatalogUrl).configure(e._options)})},e.prototype.create=function(e,t){return new e(this._baseUrl,t).configure(this._options)},e}(),Zt=new $t}).call(t,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"UserCustomActionMegaMenuId",function(){return f});var r=n(6),o=(n.n(r),n(7)),i=(n.n(o),n(8)),s=(n.n(i),n(9)),a=(n.n(s),n(10)),u=n(18),c=(n(22),this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),l=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},p=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},d=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){u.label=n[1];break}if(6===n[0]&&u.label<s[1]){u.label=s[1],s=n;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(n);break}s[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},h="MegaMenuApplicationCustomizer",f="abc3361f-bb2d-491f-aba3-cd51c19a299b",y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._updateCallback=function(e){t._loadExternalCss(e.cssUrl),t._renderMegaMenu(e.termSetName)},t}return c(t,e),t.prototype.onInit=function(){return o.Log.info(h,"Initialized "+s.Title),this.properties.cssUrl&&this._loadExternalCss(this.properties.cssUrl),this.context.placeholderProvider.changedEvent.add(this,this._renderPlaceHolders),this._renderPlaceHolders(),Promise.resolve()},t.prototype._renderPlaceHolders=function(){if(console.log("Available placeholders: ",this.context.placeholderProvider.placeholderNames.map(function(e){return i.PlaceholderName[e]}).join(", ")),!this._topPlaceholder){if(this._topPlaceholder=this.context.placeholderProvider.tryCreateContent(i.PlaceholderName.Top,{onDispose:this._onDispose}),!this._topPlaceholder)return void console.error("The expected placeholder (Top) was not found.");if(!this.properties.termSetName)return console.error("TermSetName property is required but not provided."),void(this._topPlaceholder.domElement.innerHTML='\n <div class="ms-bgColor-themeDark ms-fontColor-white">\n <div class="ms-bgColor-themeDark fontColor-white">\n <i class="ms-Icon ms-Icon--Info" aria-hidden="true"></i>\n MegaMenu: TermSetName property is required.\n </div>\n </div>');this._renderMegaMenu(this.properties.termSetName)}},t.prototype._renderMegaMenu=function(e){return p(this,void 0,void 0,function(){var t,n,r,i;return d(this,function(s){switch(s.label){case 0:if(!this._topPlaceholder)return[2];s.label=1;case 1:return s.trys.push([1,3,,4]),this._topPlaceholder.domElement.innerHTML='\n <div class="ms-bgColor-themeDark ms-fontColor-white">\n <div style="padding: 10px;">\n <i class="ms-Icon ms-Icon--Loading" aria-hidden="true"></i>\n Loading menu...\n </div>\n </div>',t=new a.a(this.context,e),[4,t.getMenuItems()];case 2:return n=s.sent(),r=new u.a(this.context,n,this._updateCallback),r.render(this._topPlaceholder.domElement),o.Log.info(h,"MegaMenu rendered successfully with "+n.length+" top-level items"),[3,4];case 3:return i=s.sent(),console.error("Error rendering MegaMenu:",i),this._topPlaceholder&&(this._topPlaceholder.domElement.innerHTML='\n <div class="ms-bgColor-themeDark ms-fontColor-white">\n <div style="padding: 10px;">\n <i class="ms-Icon ms-Icon--Error" aria-hidden="true"></i>\n Fehler beim Laden des Megamenüs: '+i.message+"\n </div>\n </div>"),[3,4];case 4:return[2]}})})},t.prototype._loadExternalCss=function(e){var t=document.getElementById("mega-menu-additional-css-34FAB720");if(e&&""!==e.trim()){if(!t){var n=document.getElementsByTagName("head")[0];t=document.createElement("link"),t.rel="stylesheet",t.type="text/css",t.id="mega-menu-additional-css-34FAB720",t.onload=function(){o.Log.info(h,"External CSS loaded successfully from: "+e)},t.onerror=function(){console.warn("Failed to load external CSS from: "+e)},n.appendChild(t)}t.href=e}else t&&t.remove()},t.prototype._onDispose=function(){console.log("[MegaMenuApplicationCustomizer._onDispose] Disposed custom top placeholder.")},l([r.override],t.prototype,"onInit",null),t}(i.BaseApplicationCustomizer);t.default=y},function(e,t,n){"use strict";(function(e){function r(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){t.apply(e,n)}}function i(e,t,n){var r=new Date(e);switch(t.toLowerCase()){case"year":r.setFullYear(r.getFullYear()+n);break;case"quarter":r.setMonth(r.getMonth()+3*n);break;case"month":r.setMonth(r.getMonth()+n);break;case"week":r.setDate(r.getDate()+7*n);break;case"day":r.setDate(r.getDate()+n);break;case"hour":r.setTime(r.getTime()+36e5*n);break;case"minute":r.setTime(r.getTime()+6e4*n);break;case"second":r.setTime(r.getTime()+1e3*n);break;default:r=void 0}return r}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!h(e)}).map(function(e){return e.replace(/^[\\|\/]/,"").replace(/[\\|\/]$/,"")}).join("/").replace(/\\/g,"/")}function a(){var e=Date.now();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}function u(e){return"function"==typeof e}function c(e){return void 0!==e&&null!==e}function l(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array}function p(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=function(){return!0}),!c(t))return e;var o=n?function(e,t){return!(t in e)}:function(){return!0},i=function(t){return o(e,t)&&r(t)};return Object.getOwnPropertyNames(t).filter(i).reduce(function(e,n){return e[n]=t[n],e},e)}function d(e){return/^https?:\/\/|^\/\//i.test(e)}function h(e){return void 0===e||null===e||e.length<1}function f(e){return JSON.stringify(e)}function y(e,t){return Object.hasOwnProperty.call(e,t)}function m(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return t}function g(e,t){if(void 0!==t&&null!==t){new Request("",{headers:t}).headers.forEach(function(t,n){e.append(n,t)})}}function b(e,t){if(c(t)){var n=p(e.headers||{},t.headers);e=p(e,t),e.headers=n}}function v(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname}function S(e){return void 0!==e&&null!==e?new Map(E(e)):new Map}function T(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)t[r].forEach(function(t,n){e.set(n,t)});return e}n.d(t,"c",function(){return R}),n.d(t,"o",function(){return g}),n.d(t,"p",function(){return b}),n.d(t,"a",function(){return _}),n.d(t,"b",function(){return k}),n.d(t,"g",function(){return o}),n.d(t,"e",function(){return i}),n.d(t,"d",function(){return s}),n.d(t,"h",function(){return a}),n.d(t,"l",function(){return u}),n.d(t,"q",function(){return c}),n.d(t,"k",function(){return l}),n.d(t,"f",function(){return p}),n.d(t,"m",function(){return d}),n.d(t,"r",function(){return h}),n.d(t,"n",function(){return f}),n.d(t,"j",function(){return y}),n.d(t,"i",function(){return m});var O=n(11),w=(n.n(O),function(e,t){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)}),I=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_=function(){function e(){}return e.prototype.fetch=function(e,t){return I.fetch(e,t)},e}(),P=function(e){function t(t){var n=e.call(this)||this;return n._token=t,n}return r(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this._token||""},set:function(e){this._token=e},enumerable:!0,configurable:!0}),t.prototype.fetch=function(t,n){void 0===n&&(n={});var r=new Headers;return g(r,n.headers),r.set("Authorization","Bearer "+this._token),n.headers=r,e.prototype.fetch.call(this,t,n)},t}(_),C=(function(e){function t(t,n,r){var o=e.call(this,null)||this;return o.clientId=t,o.tenant=n,o.redirectUri=r,o._displayCallback=null,o._loginPromise=null,o}r(t,e),t.fromSPFxContext=function(e){return new C(e)},t.prototype.fetch=function(t,n){var r=this;if(!d(t))throw Error("You must supply absolute urls to AdalClient.fetch.");return this.getToken(v(t)).then(function(o){return r.token=o,e.prototype.fetch.call(r,t,n)})},t.prototype.getToken=function(e){var n=this;return new Promise(function(r,o){n.ensureAuthContext().then(function(e){return n.login()}).then(function(n){t._authContext.acquireToken(e,function(e,t){if(e)return o(Error(e));r(t)})}).catch(o)})},t.prototype.ensureAuthContext=function(){var e=this;return new Promise(function(n){null===t._authContext&&(t._authContext=Object(O.inject)({clientId:e.clientId,displayCall:function(t){e._displayCallback&&e._displayCallback(t)},navigateToLoginRequestUrl:!1,redirectUri:e.redirectUri,tenant:e.tenant})),n()})},t.prototype.login=function(){var e=this;return this._loginPromise?this._loginPromise:(this._loginPromise=new Promise(function(n,r){if(t._authContext.getCachedUser())return n();e._displayCallback=function(o){var i=window.open(o,"login","width=483, height=600");if(!i)return r(Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));i&&i.focus&&i.focus();var s=window.setInterval(function(){i&&!i.closed&&void 0!==i.closed||window.clearInterval(s);try{-1!==i.document.URL.indexOf(e.redirectUri)&&(window.clearInterval(s),t._authContext.handleWindowCallback(i.location.hash),i.close(),n())}catch(e){r(e)}},30)},e.ensureAuthContext().then(function(n){t._authContext._loginInProgress=!1,t._authContext.login(),e._displayCallback=null})}),this._loginPromise)},t._authContext=null}(P),function(e){function t(t){var n=e.call(this,null)||this;return n.context=t,n}return r(t,e),t.prototype.fetch=function(t,n){var r=this;return this.getToken(v(t)).then(function(o){return r.token=o,e.prototype.fetch.call(r,t,n)})},t.prototype.getToken=function(e){return this.context.aadTokenProviderFactory.getTokenProvider().then(function(t){return t.getToken(e)})},t}(P)),E=u(Object.entries)?Object.entries:function(e){return Object.keys(e).map(function(t){return[t,e[t]]})},x=["defaultCachingStore","defaultCachingTimeoutSeconds","globalCacheDisable","enableCacheExpiration","cacheExpirationIntervalMilliseconds","spfxContext"],N=function(){function e(e){void 0===e&&(e=new Map),this._v=e,this._v.set(x[0],"session"),this._v.set(x[1],60),this._v.set(x[2],!1),this._v.set(x[3],!1),this._v.set(x[4],750),this._v.set(x[5],null)}return e.prototype.extend=function(e){this._v=T(this._v,S(e))},e.prototype.get=function(e){return this._v.get(e)},Object.defineProperty(e.prototype,"defaultCachingStore",{get:function(){return this.get(x[0])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this.get(x[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this.get(x[2])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this.get(x[3])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this.get(x[4])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this.get(x[5])},enumerable:!0,configurable:!0}),e}(),j=new N,R=j,A=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),R.enableCacheExpiration&&this.cacheExpirationHandler()}return e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(!c(t))return null;var n=JSON.parse(t);return new Date(n.expiration)<=new Date?(this.delete(e),null):n.value},e.prototype.put=function(e,t,n){this.enabled&&this.store.setItem(e,this.createPersistable(t,n))},e.prototype.delete=function(e){this.enabled&&this.store.removeItem(e)},e.prototype.getOrPut=function(e,t,n){var r=this;if(!this.enabled)return t();var o=this.get(e);return null===o?t().then(function(t){return r.put(e,t,n),t}):Promise.resolve(o)},e.prototype.deleteExpired=function(){var e=this;return new Promise(function(t,n){e.enabled||t();try{for(var r=0;r<e.store.length;r++){var o=e.store.key(r);null!==o&&/["|']?pnp["|']? ?: ?1/i.test(e.store.getItem(o))&&e.get(o)}t()}catch(e){n(e)}})},e.prototype.test=function(){try{return this.store.setItem("t","t"),this.store.removeItem("t"),!0}catch(e){return!1}},e.prototype.createPersistable=function(e,t){if(void 0===t){var n=R.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(n=60*this.defaultTimeoutMinutes),t=i(new Date,"second",n)}return f({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.deleteExpired().then(function(t){setTimeout(o(e,e.cacheExpirationHandler),R.cacheExpirationIntervalMilliseconds)}).catch(function(e){console.error(e)})},e}(),U=function(){function e(e){void 0===e&&(e=new Map),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return Array.from(this._store)[e][0]},e.prototype.removeItem=function(e){this._store.delete(e)},e.prototype.setItem=function(e,t){this._store.set(e,t)},e}(),k=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=this.getStore("local")),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=this.getStore("session")),this._session},enumerable:!0,configurable:!0}),e.prototype.getStore=function(e){return new A("local"===e?"undefined"==typeof localStorage?new U:localStorage:"undefined"==typeof sessionStorage?new U:sessionStorage)},e}()}).call(t,n(1))},function(e,t,n){"use strict";n.d(t,"a",function(){return o});/**
|
||
* @license
|
||
* v1.3.11
|
||
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
|
||
* Copyright (c) 2020 Microsoft
|
||
* docs: https://pnp.github.io/pnpjs/
|
||
* source: https://github.com/pnp/pnpjs
|
||
* bugs: https://github.com/pnp/pnpjs/issues
|
||
*/
|
||
var r,o=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new i),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.map(function(t){return e.instance.subscribe(t)})},e.clearSubscribers=function(){return e.instance.clearSubscribers()},Object.defineProperty(e,"count",{get:function(){return e.instance.count},enumerable:!0,configurable:!0}),e.write=function(t,n){void 0===n&&(n=1),e.instance.log({level:n,message:t})},e.writeJSON=function(e,t){void 0===t&&(t=1),this.write(JSON.stringify(e),t)},e.log=function(t){e.instance.log(t)},e.error=function(t){e.instance.log({data:t,level:3,message:t.message})},e}(),i=function(){function e(e,t){void 0===e&&(e=2),void 0===t&&(t=[]),this.activeLogLevel=e,this.subscribers=t}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,t){void 0===t&&(t=1),this.log({level:t,message:e})},e.prototype.log=function(e){void 0!==e&&this.activeLogLevel<=e.level&&this.subscribers.map(function(t){return t.log(e)})},e}();!function(e){e[e.Verbose=0]="Verbose",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Off=99]="Off"}(r||(r={}));(function(){function e(){}e.prototype.log=function(e){var t=this.format(e);switch(e.level){case 0:case 1:console.log(t);break;case 2:console.warn(t);break;case 3:console.error(t)}},e.prototype.format=function(e){var t=[];if(t.push("Message: "+e.message),void 0!==e.data)try{t.push(" Data: "+JSON.stringify(e.data))}catch(e){t.push(" Data: Error in stringify of supplied data "+e)}return t.join("")}})(),function(){function e(e){this.method=e}e.prototype.log=function(e){this.method(e)}}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r;!function(e){e.Web="web",e.Site="site",e.List="list"}(r=r||(r={}))},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(0),o=n(13),i=n(14),s=n(17),a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},u=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){u.label=n[1];break}if(6===n[0]&&u.label<s[1]){u.label=s[1],s=n;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(n);break}s[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},c=function(){function e(e,t){this.context=e,this.termSetName=t,this._noTerm={_ObjectType_:"",_ObjectIdentity_:"",CustomSortOrderIndex:0,Description:"",Id:"",IsAvailableForTagging:!1,IsDeprecated:!1,IsRoot:!0,LocalCustomProperties:{_Sys_Nav_HoverText:"Es wurden keine Terms gefunden. Bitte überprüfen Sie Ihre Einstellungen.",_Sys_Nav_ExcludedProviders:void 0,_Sys_Nav_SimpleLinkUrl:void 0},Name:"Es wurden keine Terms gefunden. Bitte überprüfen Sie Ihre Einstellungen.",PathOfTerm:"",TermSet:void 0},r.b.setup({spfxContext:e}),this._taxonomyPickerService=new i.a({anchorId:"",termsetNameOrID:t,useSessionStorage:!0,hideDeprecatedTags:!0,hideTagsNotAvailableForTagging:!1},this.context)}return e.prototype.getMenuItems=function(){return a(this,void 0,void 0,function(){var e,t,n,r,i=this;return u(this,function(c){switch(c.label){case 0:return e=this.context.pageContext.site.absoluteUrl,[4,this._taxonomyPickerService.getAllTerms(this.termSetName)];case 1:return t=c.sent(),(n=new s.a,r=[],t&&t.Terms)?(t.Terms.forEach(function(t){return a(i,void 0,void 0,function(){var i,s;return u(this,function(a){return i=new o.a(t,0,e),n.Add(t.Id,i),1===i.pathDepth?r.push(i):(s=n.Get(t.ParentId),s?s.items.push(i):console.warn("Item without parent: "+t.PathOfTerm)),[2]})})}),[2,r]):(console.warn("No terms found in the term set"),[2,[new o.a(this._noTerm,0,e)]])}})})},e}()},function(e,t){/*! adal-angular v1.0.17 2018-02-27 */
|
||
var n=function(){"use strict";return n=function(e){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},n.prototype._singletonInstance)return n.prototype._singletonInstance;if(n.prototype._singletonInstance=this,this.instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,e.displayCall&&"function"!=typeof e.displayCall)throw new Error("displayCall is not a function");if(!e.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(e),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(e){}}),n.prototype.login=function(){if(this._loginInProgress)return void this.info("Login in progress");this._loginInProgress=!0;var e=this._guid();this.config.state=e,this._idTokenNonce=this._guid();var t=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);t&&""!==t?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):t=window.location.href,this.verbose("Expected state: "+e+" startPage:"+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,e,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var n=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(n):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(e),this.registerCallback(e,this.config.clientId,this.callback),this._loginPopup(n)):this.promptUser(n)},n.prototype._openPopup=function(e,t,n,r){try{var o=window.screenLeft?window.screenLeft:window.screenX,i=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,u=s/2-n/2+o,c=a/2-r/2+i,l=window.open(e,t,"width="+n+", height="+r+", top="+c+", left="+u);return l.focus&&l.focus(),l}catch(e){return this.warn("Error opening popup, "+e.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},n.prototype._handlePopupError=function(e,t,n,r,o){this.warn(r),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,r),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,o),t&&this._activeRenewals[t]&&(this._activeRenewals[t]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,e&&e(r,null,n)},n.prototype._loginPopup=function(e,t,n){var r=this._openPopup(e,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),o=n||this.callback;if(null==r){var i="Popup Window is null. This can happen if you are using IE";return void this._handlePopupError(o,t,"Error opening popup",i,i)}if(this._openedWindows.push(r),-1!=this.config.redirectUri.indexOf("#"))var s=this.config.redirectUri.split("#")[0];else var s=this.config.redirectUri;var a=this,u=window.setInterval(function(){if(!r||r.closed||void 0===r.closed){var e="Popup Window closed",n="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return a.isAngular&&a._broadcast("adal:popUpClosed",n+a.CONSTANTS.RESOURCE_DELIMETER+e),a._handlePopupError(o,t,e,n,n),void window.clearInterval(u)}try{var i=r.location;if(-1!=encodeURI(i.href).indexOf(encodeURI(s)))return a.isAngular?a._broadcast("adal:popUpHashChanged",i.hash):a.handleWindowCallback(i.hash),window.clearInterval(u),a._loginInProgress=!1,a._acquireTokenInProgress=!1,a.info("Closing popup window"),a._openedWindows=[],void r.close()}catch(e){}},1)},n.prototype._broadcast=function(e,t){!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}();var n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)},n.prototype.loginInProgress=function(){return this._loginInProgress},n.prototype._hasResource=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return t&&!this._isEmpty(t)&&t.indexOf(e+this.CONSTANTS.RESOURCE_DELIMETER)>-1},n.prototype.getCachedToken=function(e){if(!this._hasResource(e))return null;var t=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e),r=this.config.expireOffsetSeconds||300;return n&&n>this._now()+r?t:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0),null)},n.prototype.getCachedUser=function(){if(this._user)return this._user;var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(e),this._user},n.prototype.registerCallback=function(e,t,n){this._activeRenewals[t]=e,this._callBacksMappedToRenewStates[e]||(this._callBacksMappedToRenewStates[e]=[]);var r=this;this._callBacksMappedToRenewStates[e].push(n),this._callBackMappedToRenewStates[e]||(this._callBackMappedToRenewStates[e]=function(n,o,i,s){r._activeRenewals[t]=null;for(var a=0;a<r._callBacksMappedToRenewStates[e].length;++a)try{r._callBacksMappedToRenewStates[e][a](n,o,i,s)}catch(i){r.warn(i)}r._callBacksMappedToRenewStates[e]=null,r._callBackMappedToRenewStates[e]=null})},n.prototype._renewToken=function(e,t,n){this.info("renewToken is called for resource:"+e);var r=this._addAdalFrame("adalRenewFrame"+e),o=this._guid()+"|"+e;this.config.state=o,this._renewStates.push(o),this.verbose("Renew token Expected state: "+o),n=n||"token";var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl(n,e),"prompt");n===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),i+="&nonce="+encodeURIComponent(this._idTokenNonce)),i+="&prompt=none",i=this._addHintParameters(i),this.registerCallback(o,e,t),this.verbosePii("Navigate to:"+i),r.src="about:blank",this._loadFrameTimeout(i,"adalRenewFrame"+e,e)},n.prototype._renewIdToken=function(e,t){this.info("renewIdToken is called");var n=this._addAdalFrame("adalIdTokenFrame"),r=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=r,this._renewStates.push(r),this.verbose("Renew Idtoken Expected state: "+r);var o=null===t||void 0===t?null:this.config.clientId,t=t||"id_token",i=this._urlRemoveQueryStringParameter(this._getNavigateUrl(t,o),"prompt");i+="&prompt=none",i=this._addHintParameters(i),i+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(r,this.config.clientId,e),this.verbosePii("Navigate to:"+i),n.src="about:blank",this._loadFrameTimeout(i,"adalIdTokenFrame",this.config.clientId)},n.prototype._urlContainsQueryStringParameter=function(e,t){return new RegExp("[\\?&]"+e+"=").test(t)},n.prototype._urlRemoveQueryStringParameter=function(e,t){var n=new RegExp("(\\&"+t+"=)[^&]+");return e=e.replace(n,""),n=new RegExp("("+t+"=)[^&]+&"),e=e.replace(n,""),n=new RegExp("("+t+"=)[^&]+"),e=e.replace(n,"")},n.prototype._loadFrameTimeout=function(e,t,n){this.verbose("Set loading state to pending for: "+n),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(e,t);var r=this;setTimeout(function(){if(r._getItem(r.CONSTANTS.STORAGE.RENEW_STATUS+n)===r.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS){r.verbose("Loading frame has timed out after: "+r.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+n);var e=r._activeRenewals[n];e&&r._callBackMappedToRenewStates[e]&&r._callBackMappedToRenewStates[e]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),r._saveItem(r.CONSTANTS.STORAGE.RENEW_STATUS+n,r.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)}},r.CONSTANTS.LOADFRAME_TIMEOUT)},n.prototype._loadFrame=function(e,t){var n=this;n.info("LoadFrame: "+t);var r=t;setTimeout(function(){var t=n._addAdalFrame(r);""!==t.src&&"about:blank"!==t.src||(t.src=e,n._loadFrame(e,r))},500)},n.prototype.acquireToken=function(e,t){if(this._isEmpty(e))return this.warn("resource is required"),void t("resource is required",null,"resource is required");var n=this.getCachedToken(e);return n?(this.info("Token is already in cache for resource:"+e),void t(null,n,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[e]?this.registerCallback(this._activeRenewals[e],e,t):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,e===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(t)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(e,t)):(this.verbose("renewing idtoken and access_token"),this._renewToken(e,t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void t("User login is required",null,"login required"))},n.prototype.acquireTokenPopup=function(e,t,n,r){if(this._isEmpty(e))return this.warn("resource is required"),void r("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void r("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var o=this._guid()+"|"+e;this.config.state=o,this._renewStates.push(o),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+o);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",e),"prompt");if(i+="&prompt=select_account",t&&(i+=t),n&&-1===i.indexOf("&claims"))i+="&claims="+encodeURIComponent(n);else if(n&&-1!==i.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");i=this._addHintParameters(i),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+e),this.registerCallback(o,e,r),this._loginPopup(i,e,r)},n.prototype.acquireTokenRedirect=function(e,t,n){if(this._isEmpty(e))return this.warn("resource is required"),void r("resource is required",null,"resource is required");var r=this.callback;if(!this._user)return this.warn("User login is required"),void r("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var o=this._guid()+"|"+e;this.config.state=o,this.verbose("Renew token Expected state: "+o);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",e),"prompt");if(i+="&prompt=select_account",t&&(i+=t),n&&-1===i.indexOf("&claims"))i+="&claims="+encodeURIComponent(n);else if(n&&-1!==i.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");i=this._addHintParameters(i),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,o,!0),this.promptUser(i)},n.prototype.promptUser=function(e){e?(this.infoPii("Navigate to:"+e),window.location.replace(e)):this.info("Navigate url is empty")},n.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(e)){e=e.split(this.CONSTANTS.RESOURCE_DELIMETER);for(var t=0;t<e.length&&""!==e[t];t++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e[t],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e[t],0)}this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},n.prototype.clearCacheForResource=function(e){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(e)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0))},n.prototype.logOut=function(){this.clearCache(),this._user=null;var e;if(this.config.logOutUri)e=this.config.logOutUri;else{var t="common",n="";this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(n="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),e=this.instance+t+"/oauth2/logout?"+n}this.infoPii("Logout navigate to: "+e),this.promptUser(e)},n.prototype._isEmpty=function(e){return void 0===e||!e||0===e.length},n.prototype.getUser=function(e){if("function"!=typeof e)throw new Error("callback is not a function");if(this._user)return void e(null,this._user);var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);this._isEmpty(t)?(this.warn("User information is not available"),e("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(t),e(null,this._user))},n.prototype._addHintParameters=function(e){if(this._user&&this._user.profile)if(this._user.profile.sid&&-1!==e.indexOf("&prompt=none"))this._urlContainsQueryStringParameter("sid",e)||(e+="&sid="+encodeURIComponent(this._user.profile.sid));else if(this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",e)||(e+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",e)&&this._user.profile.upn.indexOf("@")>-1)){var t=this._user.profile.upn.split("@");e+="&domain_hint="+encodeURIComponent(t[t.length-1])}return e},n.prototype._createUser=function(e){var t=null,n=this._extractIdToken(e);return n&&n.hasOwnProperty("aud")&&(n.aud.toLowerCase()===this.config.clientId.toLowerCase()?(t={userName:"",profile:n},n.hasOwnProperty("upn")?t.userName=n.upn:n.hasOwnProperty("email")&&(t.userName=n.email)):this.warn("IdToken has invalid aud field")),t},n.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},n.prototype.isCallback=function(e){e=this._getHash(e);var t=this._deserialize(e);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},n.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},n.prototype.getRequestInfo=function(e){e=this._getHash(e);var t=this._deserialize(e),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(t&&(n.parameters=t,t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;var r="";if(!t.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+t.state),r=t.state,n.stateResponse=r,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var o=this._renewStates,i=0;i<o.length;i++)if(o[i]===n.stateResponse){n.stateMatch=!0;break}}}return n},n.prototype._matchNonce=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);if(t){t=t.split(this.CONSTANTS.CACHE_DELIMETER);for(var n=0;n<t.length;n++)if(t[n]===e.profile.nonce)return!0}return!1},n.prototype._matchState=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);if(t){t=t.split(this.CONSTANTS.CACHE_DELIMETER);for(var n=0;n<t.length;n++)if(t[n]===e.stateResponse)return e.requestType=this.REQUEST_TYPE.LOGIN,e.stateMatch=!0,!0}var r=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);if(r){r=r.split(this.CONSTANTS.CACHE_DELIMETER);for(var n=0;n<r.length;n++)if(r[n]===e.stateResponse)return e.requestType=this.REQUEST_TYPE.RENEW_TOKEN,e.stateMatch=!0,!0}return!1},n.prototype._getResourceFromState=function(e){if(e){var t=e.indexOf("|");if(t>-1&&t+1<e.length)return e.substring(t+1)}return""},n.prototype.saveTokenFromHash=function(e){this.info("State status:"+e.stateMatch+"; Request type:"+e.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var t=this._getResourceFromState(e.stateResponse);if(e.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION))this.infoPii("Error :"+e.parameters.error+"; Error description:"+e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,e.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),e.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,e.parameters.error_description));else if(e.stateMatch){this.info("State is right"),e.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,e.parameters[this.CONSTANTS.SESSION_STATE]);var n;e.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(t)||(n=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,n+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,e.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._expiresIn(e.parameters[this.CONSTANTS.EXPIRES_IN]))),e.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(e.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,e.parameters[this.CONSTANTS.ID_TOKEN]),t=this.config.loginResource?this.config.loginResource:this.config.clientId,this._hasResource(t)||(n=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,n+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,e.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(e.parameters.error="invalid id_token",e.parameters.error_description="Invalid id_token. id_token: "+e.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+e.parameters[this.CONSTANTS.ID_TOKEN])))}else e.parameters.error="Invalid_state",e.parameters.error_description="Invalid_state. state: "+e.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+e.stateResponse);this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+t,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},n.prototype.getResourceForEndpoint=function(e){if(this.config&&this.config.anonymousEndpoints)for(var t=0;t<this.config.anonymousEndpoints.length;t++)if(e.indexOf(this.config.anonymousEndpoints[t])>-1)return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(e.indexOf(n)>-1)return this.config.endpoints[n];return e.indexOf("http://")>-1||e.indexOf("https://")>-1?this._getHostFromUri(e)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},n.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t=t.split("/")[0]},n.prototype.handleWindowCallback=function(e){if(null==e&&(e=window.location.hash),this.isCallback(e)){var t=null,n=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);var r,o,i=t.getRequestInfo(e),s=null;o=n||window.parent!==window?t._callBackMappedToRenewStates[i.stateResponse]:t.callback,t.info("Returned from redirect url"),t.saveTokenFromHash(i),i.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),r=i.parameters[t.CONSTANTS.ACCESS_TOKEN]||i.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ACCESS_TOKEN):i.requestType===this.REQUEST_TYPE.LOGIN&&(r=i.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ID_TOKEN);var a=i.parameters[t.CONSTANTS.ERROR_DESCRIPTION],u=i.parameters[t.CONSTANTS.ERROR];try{o&&o(a,r,u,s)}catch(e){t.error("Error occurred in user defined callback function: "+e)}window.parent!==window||n||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},n.prototype._getNavigateUrl=function(e,t){var n="common";this.config.tenant&&(n=this.config.tenant);var r=this.instance+n+"/oauth2/authorize"+this._serialize(e,this.config,t)+this._addLibMetadata();return this.info("Navigate url:"+r),r},n.prototype._extractIdToken=function(e){var t=this._decodeJwt(e);if(!t)return null;try{var n=t.JWSPayload,r=this._base64DecodeStringUrlSafe(n);return r?JSON.parse(r):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(e){this.error("The returned id_token could not be decoded",e)}return null},n.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},n.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e=String(e).replace(/=+$/,"");var n=e.length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var r,o,i,s,a,u,c,l,p="",d=0;d<n;d+=4){if(r=t.indexOf(e.charAt(d)),o=t.indexOf(e.charAt(d+1)),i=t.indexOf(e.charAt(d+2)),s=t.indexOf(e.charAt(d+3)),d+2===n-1){a=r<<18|o<<12|i<<6,u=a>>16&255,c=a>>8&255,p+=String.fromCharCode(u,c);break}if(d+1===n-1){a=r<<18|o<<12,u=a>>16&255,p+=String.fromCharCode(u);break}a=r<<18|o<<12|i<<6|s,u=a>>16&255,c=a>>8&255,l=255&a,p+=String.fromCharCode(u,c,l)}return p},n.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=t.exec(e);return!n||n.length<4?(this.warn("The returned id_token is not parseable."),null):{header:n[1],JWSPayload:n[2],JWSSig:n[3]}},n.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},n.prototype._serialize=function(e,t,n){var r=[];if(null!==t){r.push("?response_type="+e),r.push("client_id="+encodeURIComponent(t.clientId)),n&&r.push("resource="+encodeURIComponent(n)),r.push("redirect_uri="+encodeURIComponent(t.redirectUri)),r.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&r.push(t.extraQueryParameter);var o=t.correlationId?t.correlationId:this._guid();r.push("client-request-id="+encodeURIComponent(o))}return r.join("&")},n.prototype._deserialize=function(e){var t,n=/\+/g,r=/([^&=]+)=([^&]*)/g,o=function(e){return decodeURIComponent(e.replace(n," "))},i={};for(t=r.exec(e);t;)i[o(t[1])]=o(t[2]),t=r.exec(e);return i},n.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n.prototype._guid=function(){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,this._decimalToHex(t[0])+this._decimalToHex(t[1])+this._decimalToHex(t[2])+this._decimalToHex(t[3])+"-"+this._decimalToHex(t[4])+this._decimalToHex(t[5])+"-"+this._decimalToHex(t[6])+this._decimalToHex(t[7])+"-"+this._decimalToHex(t[8])+this._decimalToHex(t[9])+"-"+this._decimalToHex(t[10])+this._decimalToHex(t[11])+this._decimalToHex(t[12])+this._decimalToHex(t[13])+this._decimalToHex(t[14])+this._decimalToHex(t[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",o=0,i="",s=0;s<36;s++)"-"!==n[s]&&"4"!==n[s]&&(o=16*Math.random()|0),"x"===n[s]?i+=r[o]:"y"===n[s]?(o&=3,o|=8,i+=r[o]):i+=n[s];return i},n.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},n.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},n.prototype._addAdalFrame=function(e){if(void 0!==e){this.info("Add adal frame to document:"+e);var t=document.getElementById(e);if(!t){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var n=document.createElement("iframe");n.setAttribute("id",e),n.setAttribute("aria-hidden","true"),n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height=n.borderWidth="0px",t=document.getElementsByTagName("body")[0].appendChild(n)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+e+'" id="'+e+'" style="display:none"></iframe>');window.frames&&window.frames[e]&&(t=window.frames[e])}return t}},n.prototype._saveItem=function(e,t,n){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(n){var r=this._getItem(e)||"";localStorage.setItem(e,r+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(e,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(e,t),!0):(this.info("Session storage is not supported"),!1)},n.prototype._getItem=function(e){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(e):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(e):(this.info("Session storage is not supported"),null)},n.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(e){return!1}},n.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(e){return!1}},n.prototype._cloneConfig=function(e){if(null===e||"object"!=typeof e)return e;var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},n.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},n.prototype.log=function(e,t,n,r){if(e<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var o=(new Date).toUTCString(),i="";i=this.config.correlationId?o+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t:o+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t,n&&(i+="\nstack:\n"+n.stack),Logging.log(i)}},n.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},n.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},n.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},n.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},n.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},n.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},n.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},n.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},n.prototype._libVersion=function(){return"1.0.17"},void 0!==e&&e.exports&&(e.exports=n,e.exports.inject=function(e){return new n(e)}),n}()},function(e,t,n){"use strict";function r(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function i(e){return d.a.log({data:0===d.a.activeLogLevel?e.result:{},level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning result from pipeline. Set logging to verbose to see data."}),Promise.resolve(e.result)}function s(e,t){return new Promise(function(n){e.result=t,e.hasResult=!0,n(e)})}function a(e){return e.pipeline.length>0?e.pipeline.shift()(e):Promise.resolve(e)}function u(e){e.pipeline.length<1&&d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Request pipeline contains no methods!",2);var t=a(e).then(function(e){return i(e)}).catch(function(e){throw d.a.error(e),e});return e.isBatched&&e.batch.addResolveBatchDependency(t),t}function c(e){return void 0===e&&(e=!1),function(t,n,r){var o=r.value;r.value=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return!e&&r.length>0&&Object(p.j)(r[0],"hasResult")&&r[0].hasResult?(d.a.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",0),Promise.resolve(r[0])):(d.a.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",0),o.apply(t,r).then(function(e){return a(e)}))}}}function l(){return[w.logStart,w.caching,w.send,w.logEnd].slice(0)}n.d(t,"c",function(){return h}),n.d(t,"g",function(){return g}),n.d(t,"f",function(){return b}),n.d(t,"i",function(){return v}),n.d(t,"a",function(){return S}),n.d(t,"d",function(){return T}),n.d(t,"b",function(){return O}),n.d(t,"h",function(){return _}),n.d(t,"e",function(){return P});var p=n(3),d=n(4),h=function(){function e(e){this.key=e,this.expiration=Object(p.e)(new Date,"second",p.c.defaultCachingTimeoutSeconds),this.storeName=p.c.defaultCachingStore}return Object.defineProperty(e.prototype,"store",{get:function(){return"local"===this.storeName?e.storage.local:e.storage.session},enumerable:!0,configurable:!0}),e.storage=new p.b,e}(),f=function(){function e(e,t){this.parser=e,this.cacheOptions=t}return e.prototype.parse=function(e){var t=this;return this.parser.parse(e).then(function(e){return t.cacheData(e)})},e.prototype.cacheData=function(e){return null!==this.cacheOptions.store&&this.cacheOptions.store.put(this.cacheOptions.key,e,this.cacheOptions.expiration),e},e}(),y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},m=function(e){function t(t,n,r,o){void 0===r&&(r=n.status),void 0===o&&(o=n.statusText);var i=e.call(this,t)||this;return i.response=n,i.status=r,i.statusText=o,i.isHttpRequestError=!0,i}return r(t,e),t.init=function(e){return e.clone().text().then(function(n){return new t("Error making HttpClient request in queryable ["+e.status+"] "+e.statusText+" ::> "+n,e.clone())})},t}(Error),g=function(){function e(){this.rawJson={}}return e.prototype.parse=function(e){var t=this;return new Promise(function(n,r){t.handleError(e,r)&&t.parseImpl(e,n,r)})},e.prototype.parseImpl=function(e,t,n){var r=this;e.headers.has("Content-Length")&&0===parseFloat(e.headers.get("Content-Length"))||204===e.status?t({}):e.text().then(function(e){return e.replace(/\s/gi,"").length>0?JSON.parse(e):{}}).then(function(e){return t(r.parseODataJSON(e))}).catch(function(e){return n(e)})},e.prototype.handleError=function(e,t){return e.ok||m.init(e).then(t),e.ok},e.prototype.parseODataJSON=function(e){this.rawJson=e;var t=e;return Object(p.j)(e,"d")?t=Object(p.j)(e.d,"results")?e.d.results:e.d:Object(p.j)(e,"value")&&(t=e.value),t},e}(),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(g),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){e.text().then(t)},t}(g),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){e.blob().then(t)},t}(g),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){e.json().then(t)},t}(g),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){Object(p.l)(e.arrayBuffer)?e.arrayBuffer().then(t):e.buffer().then(t)},t}(g),w=(function(e){function t(t){var n=e.call(this)||this;return n.parser=t,n}r(t,e),t.prototype.parseImpl=function(e,t){this.parser(e).then(t)}}(g),function(){function e(){}return e.logStart=function(e){return new Promise(function(t){d.a.log({data:1===d.a.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.verb+" request ("+e.requestAbsoluteUrl+")"}),t(e)})},e.caching=function(e){return new Promise(function(t){if(e.isCached){d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",1);var n=new h(e.requestAbsoluteUrl.toLowerCase());if(void 0!==e.cachingOptions&&(n=Object(p.f)(n,e.cachingOptions)),null!==n.store){var r=n.store.get(n.key);if(null!==r)return d.a.log({data:1===d.a.activeLogLevel?{}:r,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),Object(p.l)(e.batchDependency)&&e.batchDependency(),Object(p.j)(e.parser,"hydrate")&&(r=e.parser.hydrate(r)),s(e,r).then(function(e){return t(e)})}d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",1),e.parser=new f(e.parser,n)}return t(e)})},e.send=function(e){return new Promise(function(t,n){if(e.isBatched){var r=e.batch.add(e.requestAbsoluteUrl,e.verb,e.options,e.parser,e.requestId);Object(p.l)(e.batchDependency)&&e.batchDependency(),d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+e.batch.batchId+".",1),t(s(e,r))}else{d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Sending request.",1);var o=e.clientFactory(),i=Object(p.f)(e.options||{},{method:e.verb});o.fetch(e.requestAbsoluteUrl,i).then(function(t){return e.parser.parse(t)}).then(function(t){return s(e,t)}).then(function(e){return t(e)}).catch(function(e){return n(e)})}})},e.logEnd=function(e){return new Promise(function(t){e.isBatched?d.a.log({data:1===d.a.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") "+e.verb+" request will complete in batch "+e.batch.batchId+"."}):d.a.log({data:1===d.a.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.verb+" request."}),t(e)})},o([c(!0)],e,"logStart",null),o([c()],e,"caching",null),o([c()],e,"send",null),o([c(!0)],e,"logEnd",null),e}()),I=function(){function e(){this._query=new Map,this._options={},this._url="",this._parentUrl="",this._useCaching=!1,this._cachingOptions=null,this._cloneParentWasCaching=!1,this._cloneParentCacheOptions=null,this._requestPipeline=null}return e.prototype.toUrl=function(){return this._url},e.prototype.concat=function(e){return this._url+=e,this},Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){return Object(p.p)(this._options,e),this},e.prototype.configureFrom=function(e){return Object(p.p)(this._options,e._options),this},e.prototype.usingCaching=function(e){return p.c.globalCacheDisable||(this._useCaching=!0,void 0!==e&&(this._cachingOptions=e)),this},e.prototype.withPipeline=function(e){return this._requestPipeline=e.slice(0),this},e.prototype.getCore=function(e,t){return void 0===e&&(e=new T),void 0===t&&(t={}),this._cloneParentWasCaching&&this.usingCaching(this._cloneParentCacheOptions),this.reqImpl("GET",t,e)},e.prototype.postCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("POST",e,t)},e.prototype.patchCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("PATCH",e,t)},e.prototype.deleteCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("DELETE",e,t)},e.prototype.putCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("PUT",e,t)},e.prototype.reqImpl=function(e,t,n){var r=this;return void 0===t&&(t={}),this.getRequestPipeline(e,t,n).then(function(o){return r.toRequestContext(e,t,n,o)}).then(function(e){return u(e)})},e.prototype.append=function(e){this._url=Object(p.d)(this._url,e)},Object.defineProperty(e.prototype,"parentUrl",{get:function(){return this._parentUrl},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this._parentUrl=e._url,this._url=Object(p.d)(this._parentUrl,t||""),this.configureFrom(e)},e.prototype._clone=function(e,t){return e.configureFrom(this),this._useCaching&&(e._cloneParentWasCaching=!0,e._cloneParentCacheOptions=this._cachingOptions),e},e.prototype.getRequestPipeline=function(e,t,n){var r=this;return void 0===t&&(t={}),new Promise(function(e){e(Object(p.q)(r._requestPipeline)&&Object(p.k)(r._requestPipeline)?r._requestPipeline:l())})},e}(),_=function(e){function t(){var t=e.call(this)||this;return t._batch=null,t._batchDependency=null,t}return r(t,e),t.prototype.inBatch=function(e){if(null!==this.batch)throw Error("This query is already part of a batch.");return Object(p.q)(e)&&(this._batch=e),this},t.prototype.toUrl=function(){return this._url},t.prototype.get=function(e,t){return void 0===e&&(e=new b),void 0===t&&(t={}),this.getCore(e,t)},t.prototype.getCore=function(t,n){return void 0===t&&(t=new b),void 0===n&&(n={}),e.prototype.getCore.call(this,t,n)},t.prototype.postCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.postCore.call(this,t,n)},t.prototype.patchCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.patchCore.call(this,t,n)},t.prototype.deleteCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.deleteCore.call(this,t,n)},t.prototype.putCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.putCore.call(this,t,n)},t.prototype.reqImpl=function(t,n,r){return void 0===n&&(n={}),this.hasBatch&&(this._batchDependency=this.addBatchDependency()),e.prototype.reqImpl.call(this,t,n,r)},t.prototype.addBatchDependency=function(){return null!==this._batch?this._batch.addDependency():function(){return null}},Object.defineProperty(t.prototype,"hasBatch",{get:function(){return Object(p.q)(this._batch)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batch",{get:function(){return this.hasBatch?this._batch:null},enumerable:!0,configurable:!0}),t.prototype._clone=function(t,n){return t=e.prototype._clone.call(this,t,n),n.includeBatch&&(t=t.inBatch(this._batch)),t},t}(I),P=function(){function e(e){void 0===e&&(e=Object(p.h)()),this._batchId=e,this._reqs=[],this._deps=[],this._rDeps=[]}return Object.defineProperty(e.prototype,"batchId",{get:function(){return this._batchId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._reqs},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t,n,r,o){var i={id:o,method:t.toUpperCase(),options:n,parser:r,reject:null,resolve:null,url:e},s=new Promise(function(e,t){i.resolve=e,i.reject=t});return this._reqs.push(i),s},e.prototype.addDependency=function(){var e=function(){};return this._deps.push(new Promise(function(t){e=t})),e},e.prototype.addResolveBatchDependency=function(e){this._rDeps.push(e)},e.prototype.execute=function(){var e=this;return Promise.all(this._deps).then(function(){return Promise.all(e._deps)}).then(function(){return e.executeImpl()}).then(function(){return Promise.all(e._rDeps)}).then(function(){})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(e,t,n){this.level=t,this.id=e.Id,this.label=e.Name,this.hoverText=e.LocalCustomProperties._Sys_Nav_HoverText,this.pathDepth=e.PathDepth;var r=e.LocalCustomProperties._Sys_Nav_SimpleLinkUrl||e.LocalCustomProperties._Sys_Nav_TargetUrl;r&&(this.url=n&&0===r.indexOf("~sitecollection")?n+r.substring("~sitecollection".length):r),this.items=[]}return e.prototype.hasChildren=function(){return this.items&&this.items.length>0},e.prototype.command=function(){this.url&&(window.location.href=this.url)},e}()},function(e,t,n){"use strict";var r=n(15),o=(n.n(r),n(16)),i=(n.n(o),this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})}),s=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){u.label=n[1];break}if(6===n[0]&&u.label<s[1]){u.label=s[1],s=n;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(n);break}s[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},a="00000000-0000-0000-0000-000000000000",u=function(){function e(e,t){this.props=e,this.context=t,this.clientServiceUrl=this.context.pageContext.web.absoluteUrl+"/_vti_bin/client.svc/ProcessQuery",this.suggestionServiceUrl=this.context.pageContext.web.absoluteUrl+"/_vti_bin/TaxonomyInternalService.json/GetSuggestions"}return e.prototype.getTermLabels=function(e){return i(this,void 0,void 0,function(){var t,n,o,i,a,u,c,l;return s(this,function(s){switch(s.label){case 0:t=null,s.label=1;case 1:return s.trys.push([1,4,,5]),n='<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="8" ObjectPathId="7" /><ObjectIdentityQuery Id="9" ObjectPathId="7" /><ObjectPath Id="11" ObjectPathId="10" /><ObjectIdentityQuery Id="12" ObjectPathId="10" /><ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="13" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="false"><Properties><Property Name="Labels" SelectAll="true"><Query SelectAllProperties="false"><Properties /></Query></Property></Properties></Query></Query></Actions><ObjectPaths><StaticMethod Id="7" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="10" ParentId="7" Name="GetDefaultKeywordsTermStore" /><Method Id="13" ParentId="10" Name="GetTerm"><Parameters><Parameter Type="Guid">'+e+"</Parameter></Parameters></Method></ObjectPaths></Request>",o=new Headers,o.append("accept","application/json"),o.append("content-type","application/xml"),i={headers:o,body:n},[4,this.context.spHttpClient.post(this.clientServiceUrl,r.SPHttpClient.configurations.v1,i)];case 2:return a=s.sent(),[4,a.json()];case 3:return u=s.sent(),c=u.find(function(e){return"SP.Taxonomy.Term"===e._ObjectType_}),c&&c.Labels&&c.Labels._Child_Items_&&(t=c.Labels._Child_Items_.map(function(e){return e.Value})),[3,5];case 4:return l=s.sent(),t=null,console.log(l.message),[3,5];case 5:return[2,t]}})})},e.prototype.getTermStores=function(){var e=this,t=new Headers;t.append("accept","application/json"),t.append("content-type","application/xml");var n={headers:t,body:'<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="2" ObjectPathId="1" /><ObjectIdentityQuery Id="3" ObjectPathId="1" /><ObjectPath Id="5" ObjectPathId="4" /><ObjectIdentityQuery Id="6" ObjectPathId="4" /><Query Id="7" ObjectPathId="4"><Query SelectAllProperties="false"><Properties><Property Name="Id" ScalarProperty="true" /><Property Name="Name" ScalarProperty="true" /><Property Name="Groups"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="Name" ScalarProperty="true" /><Property Name="Id" ScalarProperty="true" /><Property Name="IsSystemGroup" ScalarProperty="true" /><Property Name="TermSets"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="Name" ScalarProperty="true" /><Property Name="Id" ScalarProperty="true" /><Property Name="Description" ScalarProperty="true" /><Property Name="Names" ScalarProperty="true" /></Properties></ChildItemQuery></Property></Properties></ChildItemQuery></Property></Properties></Query></Query></Actions><ObjectPaths><StaticMethod Id="1" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="4" ParentId="1" Name="GetDefaultSiteCollectionTermStore" /></ObjectPaths></Request>'};return this.context.spHttpClient.post(this.clientServiceUrl,r.SPHttpClient.configurations.v1,n).then(function(t){return t.json().then(function(t){var n=t.filter(function(e){return"SP.Taxonomy.TermStore"===e._ObjectType_});return n.length>0?e.props.termsetNameOrID?n.map(function(t){var n=t.Groups._Child_Items_;if(e.props.termsetNameOrID){var r=e.props.termsetNameOrID;n=n.map(function(t){return t.TermSets._Child_Items_=t.TermSets._Child_Items_.filter(function(t){return t.Name===r||e.cleanGuid(t.Id).toLowerCase()===e.cleanGuid(r).toLowerCase()}),t})}return n=n.filter(function(e){return!e.IsSystemGroup}),n=n.filter(function(e){return e.TermSets._Child_Items_.length>0}),t.Groups._Child_Items_=n,t}):n:[]})})},e.prototype.getTermSet=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this.getTermStores()];case 1:return e=t.sent(),[2,this.getTermSetId(e,this.props.termsetNameOrID)]}})})},e.prototype.getAllTerms=function(e,t,n,o){return void 0===o&&(o=!0),i(this,void 0,void 0,function(){var i,a,u,c,l,p,d,h=this;return s(this,function(s){switch(s.label){case 0:return i=e,this.isGuid(e)?[3,2]:[4,this.getTermStores()];case 1:if(a=s.sent(),!(u=this.getTermSetId(a,e)))return[2,null];i=this.cleanGuid(u.Id),s.label=2;case 2:return(c=this.getTermsById(i,o))?[2,c]:(l='<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="Javascript Library"><Actions><ObjectPath Id="1" ObjectPathId="0" /><ObjectIdentityQuery Id="2" ObjectPathId="0" /><ObjectPath Id="4" ObjectPathId="3" /><ObjectIdentityQuery Id="5" ObjectPathId="3" /><ObjectPath Id="7" ObjectPathId="6" /><ObjectIdentityQuery Id="8" ObjectPathId="6" /><ObjectPath Id="10" ObjectPathId="9" /><Query Id="11" ObjectPathId="6"><Query SelectAllProperties="true"><Properties /></Query></Query><Query Id="12" ObjectPathId="9"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="IsRoot" SelectAll="true" /><Property Name="Labels" SelectAll="true" /><Property Name="TermsCount" SelectAll="true" /><Property Name="CustomSortOrder" SelectAll="true" /><Property Name="Id" SelectAll="true" /><Property Name="Name" SelectAll="true" /><Property Name="PathOfTerm" SelectAll="true" /><Property Name="Parent" SelectAll="true" /><Property Name="LocalCustomProperties" SelectAll="true" /><Property Name="IsDeprecated" ScalarProperty="true" /><Property Name="IsAvailableForTagging" ScalarProperty="true" /></Properties></ChildItemQuery></Query></Actions><ObjectPaths><StaticMethod Id="0" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="3" ParentId="0" Name="GetDefaultKeywordsTermStore" /><Method Id="6" ParentId="3" Name="GetTermSet"><Parameters><Parameter Type="Guid">'+i+'</Parameter></Parameters></Method><Method Id="9" ParentId="6" Name="GetAllTerms" /></ObjectPaths></Request>',p=new Headers,p.append("accept","application/json"),p.append("content-type","application/xml"),d={headers:p,body:l},[2,this.context.spHttpClient.post(this.clientServiceUrl,r.SPHttpClient.configurations.v1,d).then(function(e){return e.json().then(function(e){var r=e.filter(function(e){return"SP.Taxonomy.TermSet"===e._ObjectType_});if(r.length>0){var s=r[0];s.Terms=[];var a=e.filter(function(e){return"SP.Taxonomy.TermCollection"===e._ObjectType_});if(a.length>0){var u=a[0]._Child_Items_;!0===t&&(u=u.filter(function(e){return!1===e.IsDeprecated})),!0===n&&(u=u.filter(function(e){return!0===e.IsAvailableForTagging})),u=u.map(function(e){return e.IsRoot?e.CustomSortOrderIndex=s.CustomSortOrder?s.CustomSortOrder.split(":").indexOf(h.cleanGuid(e.Id)):-1:e.CustomSortOrderIndex=e.Parent.CustomSortOrder?e.Parent.CustomSortOrder.split(":").indexOf(h.cleanGuid(e.Id)):-1,e.Id=h.cleanGuid(e.Id),e.PathDepth=e.PathOfTerm.split(";").length,e.TermSet={Id:h.cleanGuid(s.Id),Name:s.Name},e.Parent&&(e.ParentId=h.cleanGuid(e.Parent.Id)),e}),u.length>0&&(u=h.sortTerms(u),s.Terms=u)}try{o&&window.sessionStorage&&window.sessionStorage.setItem(i,JSON.stringify(s))}catch(e){}return s}return null})})])}})})},e.prototype.searchTermsByName=function(e){return this.searchTermsByTermSet(e)},e.prototype.searchTermsByTermId=function(e,t){return i(this,void 0,void 0,function(){var n,r,o,i,a,u,c;return s(this,function(s){switch(s.label){case 0:return n=this.props.useSessionStorage,r=this.getTermsById(t,n),r?[2,this.searchTermsBySearchText(r,e)]:[3,1];case 1:return o=this.props,i=o.termsetNameOrID,a=o.hideDeprecatedTags,u=o.hideTagsNotAvailableForTagging,[4,this.getAllTermsByAnchorId(i,t,a,u,n)];case 2:if(c=s.sent())return[2,this.searchTermsBySearchText(c,e)];s.label=3;case 3:return[2,null]}})})},e.prototype.getAllTermsByAnchorId=function(e,t,n,r,o){return void 0===o&&(o=!0),i(this,void 0,void 0,function(){var i,a,u,c,l,p,d,h=this;return s(this,function(s){switch(s.label){case 0:return i=[],a=this.getTermsById(t,o),a?[2,a]:[4,this.getAllTerms(e,n,r)];case 1:if(u=s.sent(),c=u.Terms,t){if(l=c.filter(function(e){return e.Id.toLowerCase()===t.toLowerCase()}).shift()){p=l.PathOfTerm+";",d=c.filter(function(e){return e.PathOfTerm.substring(0,p.length)===p&&e.Id!==l.Id}),d.forEach(function(e){i.push(h.convertTermToPickerTerm(e))});try{o&&window.sessionStorage&&window.sessionStorage.setItem(t,JSON.stringify(i))}catch(e){}}}else c.forEach(function(e){i.push(h.convertTermToPickerTerm(e))});return[2,i]}})})},e.prototype.cleanGuid=function(e){return void 0!==e?e.replace("/Guid(","").replace("/","").replace(")",""):""},e.prototype.getTermSetId=function(e,t){if(e&&e.length>0&&t){var n=e[0];if(n.Groups&&n.Groups._Child_Items_)for(var r=0,o=n.Groups._Child_Items_;r<o.length;r++){var i=o[r];if(i.TermSets&&i.TermSets._Child_Items_)for(var s=0,a=i.TermSets._Child_Items_;s<a.length;s++){var u=a[s];if(u.Name===t)return u}}}return null},e.prototype.getTermsById=function(e,t){void 0===t&&(t=!0);try{if(t&&window.sessionStorage){var n=window.sessionStorage.getItem(e);return n?JSON.parse(n):null}return null}catch(e){return null}},e.prototype.searchTermsBySearchText=function(e,t){return e?e.filter(function(e){return e.name.toLowerCase().indexOf(t.toLowerCase())>-1}):[]},e.prototype.searchTermsByTermSet=function(e){var t=this;return new Promise(function(n){t.getTermStores().then(function(o){var i=t.props.termsetNameOrID;if(!t.isGuid(i)){var s=t.getTermSetId(o,i);if(!s)return void n(null);i=t.cleanGuid(s.Id)}if(void 0===o||0===o.length)return void n(null);var u="de-de"===t.context.pageContext.cultureInfo.currentUICultureName?1031:1033,c={start:e,lcid:0!==u?u:t.context.pageContext.web.language,sspList:t.cleanGuid(o[0].Id),termSetList:i,anchorId:t.props.anchorId?t.props.anchorId:a,isSpanTermStores:!1,isSpanTermSets:!1,isIncludeUnavailable:!0===t.props.hideTagsNotAvailableForTagging,isIncludeDeprecated:!0===t.props.hideDeprecatedTags,isAddTerms:!1,isIncludePathData:!1,excludeKeyword:!1,excludedTermset:a},l=new Headers;l.append("accept","application/json"),l.append("content-type","application/json");var p={headers:l,body:JSON.stringify(c)};return t.context.spHttpClient.post(t.suggestionServiceUrl,r.SPHttpClient.configurations.v1,p).then(function(e){return e.json().then(function(e){var r=e.d.Groups;if(r&&r.length>0){var o=r[0].Suggestions;if(o.length>0){var i=o.map(function(e){return t.convertSuggestTermToPickerTerm(e)});return void n(i)}}n([])})})})})},e.prototype.isGuid=function(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)},e.prototype.sortTerms=function(e){for(var t=[],n=!0,r=1;n;){var i=e.filter(function(e){return e.PathDepth===r});if(i&&i.length>0){if(i=i.sort(this.sortTermByPath),1!==r){i=i.reverse();for(var s=0,a=i;s<a.length;s++){var u=a[s];!function(e){var n=e.PathOfTerm.split(";");n.pop();var r=Object(o.findIndex)(t,function(e){return e.PathOfTerm===n.join(";")});-1!==r?t.splice(r+1,0,e):t.push(e)}(u)}}else t=i;++r}else n=!1}return t},e.prototype.sortTermByPath=function(e,t){return-1===e.CustomSortOrderIndex?e.PathOfTerm.toLowerCase()<t.PathOfTerm.toLowerCase()?-1:e.PathOfTerm.toLowerCase()>t.PathOfTerm.toLowerCase()?1:0:e.CustomSortOrderIndex<t.CustomSortOrderIndex?-1:e.CustomSortOrderIndex>t.CustomSortOrderIndex?1:0},e.prototype.convertTermToPickerTerm=function(e){return{key:this.cleanGuid(e.Id),name:e.Name,path:e.PathOfTerm,termSet:this.cleanGuid(e.TermSet.Id),termSetName:e.TermSet.Name}},e.prototype.convertSuggestTermToPickerTerm=function(e){var t="",n="";if(e.Paths&&e.Paths.length>0){var r=e.Paths[0].replace(/^\[/,"").replace(/\]$/,""),o=r.split(":");t=o.join(";")+";"+e.DefaultLabel,n=o[0]}return{key:this.cleanGuid(e.Id),name:e.DefaultLabel,path:t,termSet:a,termSetName:n}},e}();t.a=u},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.Get=function(e){return this[e]},e.prototype.Add=function(e,t){this[e]=t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(19),o=(n.n(r),n(20)),i=function(){function e(e,t,n){this.context=e,this.menuItems=t,this.updateCallback=n}return e.prototype.render=function(e){var t=this;e.innerHTML="",e.id="CustomNavigation";var n=document.createElement("nav");n.id="Mega-Menu",n.className="mega-menu-main",n.setAttribute("role","navigation"),n.setAttribute("aria-label","Hauptnavigation");var o=document.createElement("ul");o.setAttribute("role","menubar"),this.menuItems.forEach(function(e){var n=t.createTopLevelItem(e);o.appendChild(n)}),this.context.pageContext.web.permissions.hasPermission(r.SPPermission.manageWeb)&&o.appendChild(this.createSettingsItem()),n.appendChild(o),e.appendChild(n),this.attachEventListeners(),this.createScreenReaderAnnouncer()},e.prototype.createSettingsItem=function(){var e=this,t=document.createElement("li");t.setAttribute("role","none");var n=document.createElement("button");n.type="button",n.className="menu-item-link menu-item-settings",n.setAttribute("role","menuitem"),n.setAttribute("tabindex","0"),n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-label","Einstellungen"),n.title="Einstellungen";var r=document.createElement("span");return r.className="ms-Icon ms-Icon--Settings menu-item-settings__icon",r.setAttribute("aria-hidden","true"),n.appendChild(r),n.addEventListener("click",function(){return e.openSettings()}),n.addEventListener("keydown",function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e.openSettings())}),t.appendChild(n),t},e.prototype.openSettings=function(){this._settingsPanel||(this._settingsPanel=new o.a(this.context,this.updateCallback)),this._settingsPanel.open()},e.prototype.createTopLevelItem=function(e){var t=document.createElement("li");t.setAttribute("role","none");var n=this.createTopLevelElement(e);if(t.appendChild(n),e.hasChildren()&&e.items&&e.items.length>0){var r=this.createMegaMenu(e);t.appendChild(r)}return t},e.prototype.createTopLevelElement=function(e){var t;return e.url?(t=document.createElement("a"),t.href=e.url,t.className="menu-item-link"):(t=document.createElement("span"),t.className="menu-item-text",t.setAttribute("tabindex","0")),t.setAttribute("role","menuitem"),t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false"),t.textContent=e.label,e.hoverText&&(t.title=e.hoverText),t},e.prototype.createMegaMenu=function(e){var t=this,n=document.createElement("div");n.className="mega-menu",n.setAttribute("role","menu"),n.setAttribute("aria-label",e.label+" Unterkategorien");var r=document.createElement("div");return r.className="mega-menu-grid",e.items&&e.items.forEach(function(e){var n=t.createCategorySection(e);r.appendChild(n)}),n.appendChild(r),n},e.prototype.createCategorySection=function(e){var t=document.createElement("div");t.className="mega-menu-category";var n=document.createElement("h3");if(e.url){var r=document.createElement("a");r.href=e.url,r.textContent=e.label,e.hoverText&&(r.title=e.hoverText),n.appendChild(r)}else{var o=document.createElement("span");o.textContent=e.label,e.hoverText&&(o.title=e.hoverText),n.appendChild(o)}if(t.appendChild(n),e.hasChildren()&&e.items&&e.items.length>0){var i=document.createElement("ul");e.items.forEach(function(e){var t=document.createElement("li"),n=document.createElement("a");n.href=e.url||"#",n.textContent=e.label,e.hoverText&&(n.title=e.hoverText),t.appendChild(n),i.appendChild(t)}),t.appendChild(i)}return t},e.prototype.attachEventListeners=function(){for(var e=document.querySelectorAll('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span[role="menuitem"]'),t=0;t<e.length;t++){var n=e[t],r=n.nextElementSibling;r&&r.classList.contains("mega-menu")&&(this.attachKeyboardNavigation(n,r),this.attachMouseEvents(n,r),this.attachFocusManagement(n,r))}this.attachGlobalKeyboardNavigation()},e.prototype.attachKeyboardNavigation=function(e,t){var n=this;e.addEventListener("keydown",function(r){if("Enter"===r.key){if("A"===e.tagName)return;r.preventDefault(),n.toggleMegaMenu(e,t)}else" "===r.key?(r.preventDefault(),n.toggleMegaMenu(e,t)):"ArrowDown"===r.key?(r.preventDefault(),n.openMegaMenu(e,t),n.focusFirstLink(t)):"ArrowUp"===r.key?(r.preventDefault(),n.closeMegaMenu(e,t)):"Escape"===r.key&&(r.preventDefault(),n.closeMegaMenu(e,t),e.focus())}),"A"===e.tagName&&e.addEventListener("click",function(t){console.log("Link geklickt:",e.href)}),e.addEventListener("focus",function(){console.log("Focus auf:",e.textContent)})},e.prototype.attachMouseEvents=function(e,t){var n=this,r=e.parentElement;r.addEventListener("mouseenter",function(){n.openMegaMenu(e,t)}),r.addEventListener("mouseleave",function(){n.closeMegaMenu(e,t)})},e.prototype.attachFocusManagement=function(e,t){var n=this;t.addEventListener("focusout",function(r){setTimeout(function(){var r=document.activeElement,o=t.contains(r),i=r===e,s=r.closest(".mega-menu"),a=r.closest("#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span");o||i||s||a||(console.log("Schließe Menu wegen Focus-Verlust"),n.closeMegaMenu(e,t))},150)})},e.prototype.attachGlobalKeyboardNavigation=function(){var e=this;document.addEventListener("keydown",function(t){var n=document.activeElement;if("Escape"===t.key){var r=document.querySelector('.mega-menu[aria-expanded="true"]');if(r){var o=r.previousElementSibling;e.closeMegaMenu(o,r),o.focus()}}if("Tab"===t.key){if(!t.shiftKey){var i=n.closest("#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span");if(i){var s=i.closest("li"),a=s.querySelector(".mega-menu.js-open");if(a){t.preventDefault();var u=a.querySelector("a");return void(u&&u.focus())}}}if(t.shiftKey){var a=n.closest(".mega-menu");if(a&&a.classList.contains("js-open")){if(n===a.querySelectorAll("a")[0]){t.preventDefault();return void a.previousElementSibling.focus()}}}}})},e.prototype.openMegaMenu=function(e,t){e.setAttribute("aria-expanded","true"),t.setAttribute("aria-expanded","true"),t.classList.add("js-open"),console.log("Menu geöffnet:",e.textContent)},e.prototype.closeMegaMenu=function(e,t){e.setAttribute("aria-expanded","false"),t.setAttribute("aria-expanded","false"),t.classList.remove("js-open"),console.log("Menu geschlossen:",e.textContent)},e.prototype.toggleMegaMenu=function(e,t){"true"===e.getAttribute("aria-expanded")?this.closeMegaMenu(e,t):(this.closeAllMegaMenus(),this.openMegaMenu(e,t))},e.prototype.closeAllMegaMenus=function(){for(var e=document.querySelectorAll('#Mega-Menu > ul > li > a[aria-expanded="true"], #Mega-Menu > ul > li > span[aria-expanded="true"]'),t=0;t<e.length;t++){var n=e[t],r=n.nextElementSibling;r&&this.closeMegaMenu(n,r)}},e.prototype.focusFirstLink=function(e){var t=e.querySelector("a");t&&t.focus()},e.prototype.createScreenReaderAnnouncer=function(){var e=document.createElement("div");e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.className="sr-only",document.body.appendChild(e),console.log("Screenreader-Ankündigungen sind jetzt bereit")},e}()},function(e,t){e.exports=s},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(2),o=n(21),i=n(5),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){u.label=n[1];break}if(6===n[0]&&u.label<s[1]){u.label=s[1],s=n;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(n);break}s[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},u=function(){function e(e,t){this.context=e,this.dataUpdated=t,this._panelElement=void 0,this._overlayElement=void 0,this._service=new o.a(this.context)}return e.prototype.open=function(){return s(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return this._panelElement?[2]:[4,this.readApplicationCustomizerProps()];case 1:return e=t.sent(),this._createPanel(e),[2]}})})},e.prototype.close=function(){this._panelElement&&(this._panelElement.remove(),this._panelElement=void 0),this._overlayElement&&(this._overlayElement.remove(),this._overlayElement=void 0),document.body.focus(),document.body.blur()},e.prototype.readApplicationCustomizerProps=function(){return s(this,void 0,void 0,function(){var e,t,n;return a(this,function(o){switch(o.label){case 0:return[4,this._service.getUserCustomActions(i.a.Site)];case 1:return e=o.sent(),t=e.filter(function(e){return e.ClientSideComponentId===r.UserCustomActionMegaMenuId}),t.length?(n=t[0],this._ucaId=n.Id,[2,JSON.parse(n.ClientSideComponentProperties)]):(console.error("UserCustomAction für das Megamenü nicht gefunden. Alles ist sinnlos."),[2,{termSetName:"",cssUrl:""}])}})})},e.prototype.saveApplicationCustomizerProps=function(e){return s(this,void 0,void 0,function(){var t,n;return a(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t={ClientSideComponentProperties:JSON.stringify(e)},[4,this._service.updateUserCustomAction(i.a.Site,this._ucaId,t)];case 1:return r.sent(),this.dataUpdated(e),[3,3];case 2:return n=r.sent(),console.error(n),[3,3];case 3:return[2]}})})},e.prototype._createPanel=function(e){var t=this,n=document.createElement("div");n.className="mm-settings-overlay",n.tabIndex=-1,n.onclick=function(){return t.close()},this._overlayElement=n;var r=document.createElement("div");r.className="mm-settings-panel",r.setAttribute("role","dialog"),r.setAttribute("aria-modal","true"),r.setAttribute("aria-label","MegaMenu Einstellungen"),r.innerHTML=this._getMarkup(e.termSetName,e.cssUrl),this._panelElement=r,document.body.appendChild(n),document.body.appendChild(r);var o=r.querySelector(".mm-settings-close"),i=r.querySelector(".mm-settings-cancel"),s=r.querySelector(".mm-settings-save"),a=r.querySelector("#mm-setting-termset");o&&(o.onclick=function(){return t.close()}),i&&(i.onclick=function(){return t.close()}),s&&(s.onclick=function(){return t._save()}),r.addEventListener("keydown",function(e){"Escape"===e.key?(e.preventDefault(),t.close()):"Tab"===e.key&&t._trapFocus(e)}),setTimeout(function(){a&&a.focus()},0)},e.prototype._getMarkup=function(e,t){return"<div class='mm-settings-header'>\n <h2 class='mm-settings-title'>Einstellungen</h2>\n <button type='button' class='mm-settings-close' aria-label='Schließen'>×</button>\n </div>\n <div class='mm-settings-body'>\n <div class='mm-settings-field'>\n <label for='mm-setting-termset'>Name des Navigations-Termsets</label>\n <input id='mm-setting-termset' type='text' value='"+this._escape(e)+"' />\n </div>\n <div class='mm-settings-field'>\n <label for='mm-setting-css'>Pfad zu zusätzlicher CSS-Datei</label>\n <input id='mm-setting-css' type='text' value='"+this._escape(t)+"' />\n </div>\n </div>\n <div class='mm-settings-footer'>\n <button type='button' class='mm-settings-save ms-Button ms-Button--primary'><span>Speichern</span></button>\n <button type='button' class='mm-settings-cancel ms-Button'><span>Abbrechen</span></button>\n </div>"},e.prototype._save=function(){if(this._panelElement){var e=this._panelElement.querySelector("#mm-setting-termset"),t=this._panelElement.querySelector("#mm-setting-css");this.saveApplicationCustomizerProps({termSetName:e&&e.value?e.value:"",cssUrl:t&&t.value?t.value:""}),this.close()}},e.prototype._trapFocus=function(e){if(this._panelElement){var t=this._panelElement.querySelectorAll("button, input");if(t&&0!==t.length){var n=t[0],r=t[t.length-1],o=document.activeElement;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}}},e.prototype._escape=function(e){return e?e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"):""},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(0),o=n(5),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){u.label=n[1];break}if(6===n[0]&&u.label<s[1]){u.label=s[1],s=n;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(n);break}s[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},a=function(){function e(e){r.b.setup({spfxContext:e})}return e.prototype.getUserCustomActions=function(e,t){return i(this,void 0,void 0,function(){var n,i,a;return s(this,function(s){switch(s.label){case 0:switch(s.trys.push([0,9,,10]),n=void 0,i=e){case o.a.Web:return[3,1];case o.a.Site:return[3,3];case o.a.List:return[3,5]}return[3,7];case 1:return[4,r.b.web.userCustomActions.get()];case 2:return n=s.sent(),[3,8];case 3:return[4,r.b.site.userCustomActions.get()];case 4:return n=s.sent(),[3,8];case 5:if(!t)throw new Error("List ID is required for List scope");return[4,r.b.web.lists.getById(t).userCustomActions.get()];case 6:return n=s.sent(),[3,8];case 7:throw new Error("Invalid scope");case 8:return[2,n];case 9:throw a=s.sent(),console.error("Error getting user custom actions: ",a),a;case 10:return[2]}})})},e.prototype.getUserCustomActionById=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(i){try{switch(e){case o.a.Web:return[2,r.b.web.userCustomActions.getById(t)];case o.a.Site:return[2,r.b.site.userCustomActions.getById(t)];case o.a.List:if(!n)throw new Error("List ID is required for List scope");return[2,r.b.web.lists.getById(n).userCustomActions.getById(t)];default:throw new Error("Invalid scope")}}catch(e){throw console.error("Error getting user custom action by ID: ",e),e}return[2]})})},e.prototype.addUserCustomAction=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(i){try{switch(e){case o.a.Web:return[2,r.b.web.userCustomActions.add(t)];case o.a.Site:return[2,r.b.site.userCustomActions.add(t)];case o.a.List:if(!n)throw new Error("List ID is required for List scope");return[2,r.b.web.lists.getById(n).userCustomActions.add(t)];default:throw new Error("Invalid scope")}}catch(e){throw console.error("Error adding user custom action: ",e),e}return[2]})})},e.prototype.updateUserCustomAction=function(e,t,n,a){return i(this,void 0,void 0,function(){var i,u,c;return s(this,function(s){switch(s.label){case 0:switch(s.trys.push([0,9,,10]),i=void 0,u=e){case o.a.Web:return[3,1];case o.a.Site:return[3,3];case o.a.List:return[3,5]}return[3,7];case 1:return[4,r.b.web.userCustomActions.getById(t).update(n)];case 2:return i=s.sent(),[3,8];case 3:return[4,r.b.site.userCustomActions.getById(t).update(n)];case 4:return i=s.sent(),[3,8];case 5:if(!a)throw new Error("List ID is required for List scope");return[4,r.b.web.lists.getById(a).userCustomActions.getById(t).update(n)];case 6:return i=s.sent(),[3,8];case 7:throw new Error("Invalid scope");case 8:return[2,i];case 9:throw c=s.sent(),console.error("Error updating user custom action: ",c),c;case 10:return[2]}})})},e.prototype.deleteUserCustomAction=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(i){try{switch(e){case o.a.Web:return[2,r.b.web.userCustomActions.getById(t.Id).delete()];case o.a.Site:return[2,r.b.site.userCustomActions.getById(t.Id).delete()];case o.a.List:if(!n)throw new Error("List ID is required for List scope");return[2,r.b.web.lists.getById(n).userCustomActions.getById(t.Id).delete()];default:throw new Error("Invalid scope")}}catch(e){throw console.error("Error deleting user custom action: ",e),e}return[2]})})},e}()},function(e,t,n){"use strict";n(23)},function(e,t,n){var r=n(24),o=n(26);"string"==typeof r&&(r=[[e.i,r]]);for(var i=0;i<r.length;i++)o.loadStyles(r[i][1],!0);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(25)(!1),t.push([e.i,'.skip-link{position:absolute;top:-40px;left:6px;background:"[theme:error, default: #a80000]";color:"[theme:white, default: #ffffff]";padding:8px;text-decoration:none;font-weight:700;border-radius:4px;z-index:10000;transition:top .2s}.skip-link:focus{top:6px;outline:3px solid}.mega-menu-main{background:"[theme:themePrimary, default: #0078d7]";width:100%;position:relative}.mega-menu-main>ul{margin:0;list-style:none;display:-ms-grid;display:grid;-ms-grid-columns:(minmax(120px,1fr)) [auto-fit];grid-template-columns:repeat(auto-fit,minmax(120px,1fr));width:100%}.mega-menu-main>ul>li{position:static}.mega-menu-main>ul>li>a,.mega-menu-main>ul>li>span[role=menuitem]{display:block;padding:15px 20px;transition:all .3s ease;border-bottom:3px solid transparent;outline:0;cursor:pointer}@media (max-width:900px){.mega-menu-main>ul>li>a,.mega-menu-main>ul>li>span[role=menuitem]{font-size:17px}}.mega-menu-main>ul>li:hover>a,.mega-menu-main>ul>li:hover>span[role=menuitem]{background:linear-gradient(135deg,"[theme:themePrimary, default: #0078d7]","[theme:themeSecondary, default: #2b88d8]");color:"[theme:white, default: #ffffff]";border-bottom:3px solid;transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,.2)}.mega-menu-main>ul>li>a:focus,.mega-menu-main>ul>li>span[role=menuitem]:focus{background:linear-gradient(135deg,"[theme:error, default: #a80000]","[theme:themeDarker, default: #004578]");color:"[theme:white, default: #ffffff]";border-bottom:3px solid;transform:translateY(-2px);box-shadow:0 0 0 3px "[theme:warning, default: #767676]",0 4px 8px rgba(0,0,0,.2);outline:3px solid;outline-offset:2px}.mega-menu-main>ul>li>a:active,.mega-menu-main>ul>li>span[role=menuitem]:active{transform:translateY(0);box-shadow:0 2px 4px rgba(0,0,0,.2)}.mega-menu{position:absolute;left:0;right:0;top:100%;width:100%;background:"[theme:white, default: #ffffff]";box-shadow:0 4px 12px rgba(0,0,0,.15);display:none;padding:40px;max-height:calc(100vh - 60px);overflow-y:auto;z-index:1000;visibility:hidden;opacity:0;transition:visibility 0s,opacity .3s}.mega-menu-main>ul>li:hover .mega-menu{visibility:visible;opacity:1;display:block}.mega-menu.js-open{visibility:visible!important;opacity:1!important;display:block!important}.mega-menu-grid{max-width:none;margin:0 auto;display:-ms-grid;display:grid;-ms-grid-columns:(minmax(200px,1fr)) [auto-fit];grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:30px}.mega-menu-category>h3{margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid}.mega-menu-category>h3>a,.mega-menu-category>h3>span{color:"[theme:neutralPrimary, default: #333333]";font-size:16px;font-weight:700;display:block}.mega-menu-category>h3>a{text-decoration:none;padding:0;border-radius:0;transition:color .2s ease;outline:0}.mega-menu-category>h3>a:hover{color:"[theme:themePrimary, default: #0078d7]"}.mega-menu-category>h3>a:focus{color:"[theme:white, default: #ffffff]";background:"[theme:error, default: #a80000]";text-decoration:none;padding:4px 8px;border-radius:4px;margin:-4px -8px;outline:3px solid;outline-offset:2px;box-shadow:0 0 0 1px "[theme:white, default: #ffffff]",0 2px 8px rgba(0,0,0,.2)}.mega-menu-category ul{list-style:none}.mega-menu-category ul li{margin-bottom:4px}.mega-menu-category ul li a{color:"[theme:neutralSecondary, default: #666666]";text-decoration:none;font-size:14px;transition:all .2s ease;display:block;padding:4px 8px;border-radius:4px;outline:0}.mega-menu-category ul li a:hover{color:"[theme:themePrimary, default: #0078d7]";background:"[theme:themeLight, default: #c7e0f4]";padding-left:12px;transform:translateX(4px)}.mega-menu-category ul li a:focus{color:"[theme:white, default: #ffffff]";background:"[theme:error, default: #a80000]";padding-left:12px;transform:translateX(4px);box-shadow:0 0 0 2px "[theme:warning, default: #767676]";outline:2px solid;outline-offset:2px}.mega-menu-category ul li a{position:relative}@media (prefers-contrast:high){.mega-menu-main>ul>li>a:focus,.mega-menu-main>ul>li>span[role=menuitem]:focus{outline:4px solid;outline-offset:2px}.mega-menu-category>h3>a:focus,.mega-menu-category ul li a:focus{outline:3px solid;outline-offset:2px}}.content{padding:40px;max-width:1200px;margin:0 auto}.menu-item-link,.menu-item-text{display:block;padding:15px 20px;color:"[theme:neutralPrimary, default: #333333]";font-weight:600;transition:all .3s ease;border-bottom:3px solid transparent;outline:0;text-decoration:none}.menu-item-text{cursor:pointer}.menu-item-link:hover,.menu-item-text:hover{background-color:"[theme:neutralLighter, default: #f4f4f4]";border-bottom-color:"[theme:themePrimary, default: #0078d7]"}.menu-item-link:focus,.menu-item-text:focus{background-color:"[theme:themeDarker, default: #004578]";color:"[theme:white, default: #ffffff]";border-bottom-color:"[theme:themeDark, default: #005a9e]";outline:3px solid;outline-offset:2px;box-shadow:0 0 0 6px rgba(243,156,18,.3)}.menu-item-settings{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:0 0;border:none;cursor:pointer;font:inherit;padding:15px 20px;color:"[theme:neutralPrimary, default: #333333]"}.menu-item-settings:hover{background-color:"[theme:neutralLighter, default: #f4f4f4]";border-bottom:3px solid}.menu-item-settings:focus{background-color:"[theme:themeDarker, default: #004578]";color:"[theme:white, default: #ffffff]";border-bottom:3px solid;outline:3px solid;outline-offset:2px;box-shadow:0 0 0 6px rgba(243,156,18,.3)}.menu-item-settings__icon{font-size:18px;line-height:1;display:inline-block;transform:translateY(2px)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mm-settings-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:4000;animation:mmFadeIn .2s ease}.mm-settings-panel{position:fixed;top:0;right:0;height:100vh;width:480px;max-width:100%;background:"[theme:white, default: #ffffff]";box-shadow:-4px 0 12px rgba(0,0,0,.2);z-index:4001;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:17px;font-weight:300;font-family:Segoe UI,"Segoe UI Web (West European)",-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif;animation:mmSlideIn .25s ease}@media (max-width:600px){.mm-settings-panel{width:100%}}.mm-settings-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid}.mm-settings-title{margin:0;font-size:18px;font-weight:600;font-size:17px;font-weight:300}.mm-settings-close{background:0 0;border:none;font-size:16px;line-height:1;cursor:pointer;padding:4px 8px;font-size:17px;font-weight:300}.mm-settings-close:focus{outline:3px solid;outline-offset:2px}.mm-settings-body{padding:20px;overflow-y:auto;-ms-flex:1;flex:1;font-size:14px;font-weight:400}.mm-settings-field{margin-bottom:16px}.mm-settings-field label{display:block;margin-bottom:4px;font-weight:600}.mm-settings-field input[type=text],.mm-settings-field label{color:"[theme:neutralPrimary, default: #333333]";font-size:14px;font-weight:400}.mm-settings-field input[type=text]{width:100%;padding:8px 12px;border:1px solid;border-radius:2px;box-sizing:border-box;background:"[theme:white, default: #ffffff]"}.mm-settings-field input[type=text]:focus{outline:3px solid;border-color:"[theme:themePrimary, default: #0078d7]"}.mm-settings-footer{padding:14px 20px;border-top:1px solid;display:-ms-flexbox;display:flex;gap:10px;-ms-flex-pack:end;justify-content:flex-end}.mm-settings-cancel,.mm-settings-save{cursor:pointer;border:none;border-radius:4px;padding:8px 16px;font-weight:600;font-size:14px;font-weight:400}.mm-settings-save{background:"[theme:themePrimary, default: #0078d7]";color:"[theme:white, default: #ffffff]"}.mm-settings-save:hover{background:"[theme:themeSecondary, default: #2b88d8]"}.mm-settings-cancel{background:"[theme:neutralTertiaryAlt, default: #c8c8c8]";color:"[theme:neutralPrimary, default: #333333]"}.mm-settings-cancel:hover{background:"[theme:neutralTertiary, default: #a6a6a6]"}.mm-settings-cancel:focus,.mm-settings-save:focus{outline:3px solid;outline-offset:2px}@keyframes mmSlideIn_3c772eac{0%{transform:translateX(40px);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes mmFadeIn_3c772eac{0%{opacity:0}to{opacity:1}}',""])},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){"use strict";(function(e){function n(e){var t=_();e();var n=_();O.perf.duration+=n-t}function r(e,t){void 0===t&&(t=!1),n(function(){var n=Array.isArray(e)?e:y(e);void 0===S&&(S=b());var r=O.runState,o=r.mode,i=r.buffer,s=r.flushTimer;t||1===o?(i.push(n),s||(O.runState.flushTimer=a())):u(n)})}function o(e){O.loadStyles=e}function i(e){O.runState.mode=e}function s(){n(function(){var e=O.runState.buffer.slice();O.runState.buffer=[];var t=[].concat.apply([],e);t.length>0&&u(t)})}function a(){return setTimeout(function(){O.runState.flushTimer=0,s()},0)}function u(e,t){O.loadStyles?O.loadStyles(f(e).styleString,e):S?g(e,t):m(e)}function c(e){O.theme=e,d()}function l(e){void 0===e&&(e=3),3!==e&&2!==e||(p(O.registeredStyles),O.registeredStyles=[]),3!==e&&1!==e||(p(O.registeredThemableStyles),O.registeredThemableStyles=[])}function p(e){e.forEach(function(e){var t=e&&e.styleElement;t&&t.parentElement&&t.parentElement.removeChild(t)})}function d(){if(O.theme){for(var e=[],t=0,n=O.registeredThemableStyles;t<n.length;t++){var r=n[t];e.push(r.themableStyle)}e.length>0&&(l(1),u([].concat.apply([],e)))}}function h(e){return e&&(e=f(y(e)).styleString),e}function f(e){var t=O.theme,n=!1;return{styleString:(e||[]).map(function(e){var r=e.theme;if(r){n=!0;var o=t?t[r]:void 0,i=e.defaultValue||"inherit";return t&&!o&&console,o||i}return e.rawString}).join(""),themable:n}}function y(e){var t=[];if(e){for(var n=0,r=void 0;r=w.exec(e);){var o=r.index;o>n&&t.push({rawString:e.substring(n,o)}),t.push({theme:r[1],defaultValue:r[2]}),n=w.lastIndex}t.push({rawString:e.substring(n)})}return t}function m(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),r=f(e),o=r.styleString,i=r.themable;n.type="text/css",n.appendChild(document.createTextNode(o)),O.perf.count++,t.appendChild(n);var s={styleElement:n,themableStyle:e};i?O.registeredThemableStyles.push(s):O.registeredStyles.push(s)}function g(e,t){var n=document.getElementsByTagName("head")[0],r=O.registeredStyles,o=O.lastStyleElement,i=o?o.styleSheet:void 0,s=i?i.cssText:"",a=r[r.length-1],u=f(e).styleString;(!o||s.length+u.length>I)&&(o=document.createElement("style"),o.type="text/css",t?(n.replaceChild(o,t.styleElement),t.styleElement=o):n.appendChild(o),t||(a={styleElement:o,themableStyle:e},r.push(a))),o.styleSheet.cssText+=h(u),Array.prototype.push.apply(a.themableStyle,e),O.lastStyleElement=o}function b(){var e=!1;if("undefined"!=typeof document){var t=document.createElement("style");t.type="text/css",e=!!t.styleSheet}return e}var v=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var S,T="undefined"==typeof window?e:window,O=function(){var e=T.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]};return e.runState||(e=v({},e,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),e.registeredThemableStyles||(e=v({},e,{registeredThemableStyles:[]})),T.__themeState__=e,e}(),w=/[\'\"]\[theme:\s*(\w+)\s*(?:\,\s*default:\s*([\\"\']?[\.\,\(\)\#\-\s\w]*[\.\,\(\)\#\-\w][\"\']?))?\s*\][\'\"]/g,I=1e4,_=function(){return"undefined"!=typeof performance&&performance.now?performance.now():Date.now()};t.loadStyles=r,t.configureLoadStyles=o,t.configureRunMode=i,t.flush=s,t.loadTheme=c,t.clearStyles=l,t.detokenize=h,t.splitStyles=y}).call(t,n(1))}])}); |