1(()=>{var t={443(t,e,n){var i;void 0===(i=function(){"use strict";return window.$svjq}.call(e,n,e,t))||(t.exports=i)},419(t,e){!function(){var n=Array.prototype.forEach,i=Object.prototype.hasOwnProperty,s=Array.prototype.slice,r=0;var a,o={keys:Object.keys||function(t){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++r+"";return t?t+e:e},has:function(t,e){return i.call(t,e)},each:function(t,e,i){if(null!=t)if(n&&t.forEach===n)t.forEach(e,i);else if(t.length===+t.length)for(var s=0,r=t.length;s<r;s++)e.call(i,t[s],s,t);else for(var a in t)this.has(t,a)&&e.call(i,t[a],a,t)},once:function(t){var e,n=!1;return function(){return n||(n=!0,e=t.apply(this,arguments),t=null),e}}};a={on:function(t,e,n){return l(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!l(this,"once",t,[e,n])||!e)return this;var i=this,s=o.once(function(){i.off(t,s),e.apply(this,arguments)});return s._callback=e,this.on(t,s,n)},off:function(t,e,n){var i,s,r,a,c,h,u,d;if(!this._events||!l(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(c=0,h=(a=t?[t]:o.keys(this._events)).length;c<h;c++)if(t=a[c],r=this._events[t]){if(this._events[t]=i=[],e||n)for(u=0,d=r.length;u<d;u++)s=r[u],(e&&e!==s.callback&&e!==s.callback._callback||n&&n!==s.context)&&i.push(s);i.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!l(this,"trigger",t,e))return this;var n=this._events[t],i=this._events.all;return n&&h(n,e),i&&h(i,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var s=!e&&!n;for(var r in"object"==typeof e&&(n=this),t&&((i={})[t._listenerId]=t),i)i[r].off(e,n,this),s&&delete this._listeners[r];return this}};var c=/\s+/,l=function(t,e,n,i){if(!n)return!0;if("object"==typeof n){for(var s in n)t[e].apply(t,[s,n[s]].concat(i));return!1}if(c.test(n)){for(var r=n.split(c),a=0,o=r.length;a<o;a++)t[e].apply(t,[r[a]].concat(i));return!1}return!0},h=function(t,e){var n,i=-1,s=t.length,r=e[0],a=e[1],o=e[2];switch(e.length){case 0:for(;++i<s;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<s;)(n=t[i]).callback.call(n.ctx,r);return;case 2:for(;++i<s;)(n=t[i]).callback.call(n.ctx,r,a);return;case 3:for(;++i<s;)(n=t[i]).callback.call(n.ctx,r,a,o);return;default:for(;++i<s;)(n=t[i]).callback.apply(n.ctx,e)}};o.each({listenTo:"on",listenToOnce:"once"},function(t,e){a[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=o.uniqueId("l"))]=e,"object"==typeof n&&(i=this),e[t](n,i,this),this}}),a.bind=a.on,a.unbind=a.off,a.mixin=function(t){return o.each(["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"],function(e){t[e]=this[e]},this),t},t.exports&&(e=t.exports=a),e.BackboneEvents=a}()},370(t,e,n){t.exports=n(419)},714(t){"use strict";(t.exports=function(){}).extend=function(t,e){const n=this;let i;i=t&&Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:function(){return n.apply(this,arguments)};Object.assign(i,n,e),i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}
1),t&&Object.assign(i.prototype,t);return i.__super__=n.prototype,i}}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{captcha:()=>k,csrf:()=>E});var e={};n.r(e),n.d(e,{doDelete:()=>S,doGet:()=>A,doPatch:()=>T,doPost:()=>P,doPut:()=>I});var i={};n.r(i),n.d(i,{publish:()=>R});var s=n(714),r=n.n(s),a=n(370),o=n.n(a);function c(t,e){var n=[];return Object.entries(e).forEach(function([e,i]){t[e]!==i&&n.push(e)}),Object.keys(t).forEach(function(t){Object.hasOwn(e,t)||n.push(t)}),n}function l(t,e){var n=t.length?t.slice(1).split("&"):[],i={};return n.forEach(function(t){t=t.split("="),i[t[0]]=decodeURIComponent(t[1]||"")}),Object.fromEntries(Object.entries(i).filter(([t])=>"sv.target"!==t&&t!==e))}function h(t,e){var n=t.substring(t.indexOf("?")+1).split("&").find(function(t){return 0===t.indexOf(e)}),i=n?n.split("=")[1]:"/";return decodeURIComponent(i)}function u(t){return null==t||0===t.trim().length}const d=r().extend(Object.assign({constructor:function(t){this.history=window.history,this.location=window.location,this.portletId=t.portletId,this.pathParameterName="sv."+this.portletId+".route",this.currentQueryString=this.location.search,this.currentPath=h(this.location.href,this.pathParameterName),window.addEventListener("popstate",this._handleRouteChange.bind(this),!1)},_handleRouteChange:function(){var t=h(this.location.href,this.pathParameterName),e=l(this.location.search,this.pathParameterName),n=c(l(this.currentQueryString,this.pathParameterName),e);if(t!==this.currentPath&&(this.currentPath=t,this.trigger("path:changed",{path:t,url:this.location.search})),this.currentQueryString=this.location.search,n.length){var i={queryParams:e,url:this.location.search};n.forEach(function(t){this.trigger("query:changed:"+t,i)},this),n.length&&this.trigger("query:changed",i)}},getUrl:function(t,e){const n=u(t)?h(this.location.search,this.pathParameterName):t;let i="?sv.target="+this.portletId+"&"+this.pathParameterName+"="+n;return e&&Object.entries(e).forEach(function([t,e]){i+="&"+(!0===e?encodeURIComponent(t):encodeURIComponent(t)+"="+encodeURIComponent(e))}),i},getStandaloneUrl:function(t,e){var n=window.sv.PageContext.pageId;if(!n)return"/";var i,s,r,a=window.sv.PageContext.dashboardId;return a?i="/edit-dashboard/"+n+"/"+a+"/"+this.portletId+t:(i="/appresource/"+n+"/"+this.portletId+t,window.sv.PageContext.inEdit&&!i.includes("version=")&&(e=e||{},e=Object.assign({version:0},e))),e&&(i+="?"+(s=e,r=[],Object.entries(s).forEach(function([t,e]){r.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),r.join("&"))),i},parseQueryString:function(){return l(this.location.search,this.pathParameterName)},navigate:function(t,e){const n=u(t)?h(this.location.href,this.pathParameterName):h(t,this.pathParameterName),i=e&&e.queryParams,s=e&&e.replace,r=this.getUrl(n,i),a=l(r,this.pathParameterName),o=c(l(this.location.search,this.pathParameterName),a);if(this.history[s?"replaceState":"pushState"]({},document.title,r),n!==this.currentPath&&(this.currentPath=n,this.trigger("path:changed",{path:n,url:r})),this.currentQueryString=r,o.length){var d={queryParams:a,url:r};o.forEach(function(t){this.trigger("query:changed:"+t,d)},this),this.trigger("query:changed",d)}}},o()));function p(t){return t.split("-")[0]}const f=r().extend({constructor:function(t,e,n){this.defaultLocale=e,this.bundles=n,this.bundle=function(t,e,n){const i=Object.assign({},n[e]);if(t===e)return i;let s;const r=p(t).toLowerCase();return Object.keys(n).find(function(e){const i=p(e).toLowerCase();if(r===i&&(s=n[e],t===e))return!0}),s&&Object.assign(i,s),i}(t,e,n)},get:function(t){if(1===arguments.length)return this.bundle[t]||t;
1const e=Array.prototype.slice.call(arguments,1);let n=this.bundle[t];for(var i=0;i<e.length;i++){var s=new RegExp("\\{"+i+"\\}","gm");n=n.replace(s,e[i])}return n||t},forLocale:function(t){if(t)return new this.constructor(t,this.defaultLocale,this.bundles)}});var m=n(443),g=n.n(m);const v=r().extend(Object.assign({constructor:function(t){this.$el=g()("#"+t.htmlElementId),this.portletId=t.portletId,this.route=t.route,this.locale=t.locale,this.defaultLocale=t.defaultLocale,this.webAppId=t.webAppId,this.webAppVersion=t.webAppVersion,this.webAppAopId=t.webAppAopId,this.webAppImportTime=t.webAppImportTime,this.childComponentStateExtractionStrategy=t.childComponentStateExtractionStrategy}},o())),b=Object.assign({},o()),y="[data-sv-captcha-provider][data-sv-captcha-state]",_=function(t){const e=t.getAttribute("data-sv-captcha-state");return{captchaId:t.id,widget:t,provider:t.getAttribute("data-sv-captcha-provider"),state:e,valid:"verified"===e}},w=function(t){const e=function(t){if("string"==typeof t)return document.getElementById(t);if(null==t)return null;if(!(t instanceof Element))throw new TypeError("Captcha container must be an HTMLElement or a DOM element id");return t}(t);if(!e)return null;const n=[];if(e.matches(y)&&n.push(e),e.querySelectorAll(y).forEach(function(t){n.push(t)}),n.length>1)throw new Error("Captcha container contains multiple widgets; use a narrower container");return n[0]||null};document.addEventListener("SVWebAppCaptchaStateChanged",function(t){const e=t.target;e instanceof Element&&e.matches(y)&&b.trigger("svCaptcha:stateChanged",_(e))});const E={getToken:function(){return window.sv.PageContext.csrfToken||null},getParameterName:function(){return"sv.csrfToken"},getHeaderName:function(){return"X-CSRF-Token"}},k={init:()=>{document.dispatchEvent(new Event("SVInitCaptchaTrigger"))},getState:t=>{const e=w(t);return e?_(e):null}};function j(t){let e=!1;if(t.fileUpload&&/put|post|patch/i.test(t.type)?(t.processData=!1,t.contentType=!1):t.data&&"object"!=typeof t.data||(e=!0,t.data=t.data||{},t.data.svAjaxReqParam="ajax"),!/get/i.test(t.type)&&e&&!1!==t.processData&&(t.processData=!1,t.data=JSON.stringify(t.data)),/put|post|patch|delete/i.test(t.type)){const e=E.getToken();e&&(t.headers=t.headers||{},t.headers[E.getHeaderName()]=e)}return g().ajax(t)}const O={type:"get",dataType:"json"},x=Object.assign({},{contentType:"application/json; charset=utf-8"},O),C={get:Object.assign({},O),put:Object.assign({},x,{type:"put"}),post:Object.assign({},x,{type:"post"}),delete:Object.assign({},x,{type:"delete"}),patch:Object.assign({},x,{type:"patch"})},A=function(t){return j(Object.assign({},C.get,t))},I=function(t){return j(Object.assign({},C.put,t))},P=function(t){return j(Object.assign({},C.post,t))},S=function(t){return j(Object.assign({},C.delete,t))},T=function(t){return j(Object.assign({},C.patch,t))},L=window.sv.i18n,N={type:"",alertRole:!0},q=function(){const t={delay:4,showCheckmark:!1,classes:{base:"sv-toast__container",prefix:"env-toast--",toast:"env-toast",bottomLeft:"sv-bottom-left",visible:"env-toast--visible",hidden:"env-toast--hide",close:"env-toast__close"}};let e;const n=[],i=t.classes,s=i.base;function r(t){for(;t.lastChild;)t.removeChild(t.lastChild)}const a=function(){let t,e,n=!1;const i={animation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in i)if(void 0!==document.documentElement.style[t]){e=i[t],n=!0;break}return{type:e,supported:n}}();function o(n){n.__internal||(n.__internal={delay:t.delay},e=document.createElement("DIV"),e.className=s,e.classList.add(i.bottomLeft)),e.parentNode!==document.body&&document.body.appendChild(e)}function c(t,s){function o(t,e){"close"===t.target.getAttribute("data-dismiss")&&e.dismiss(!0)}function c(t,n){n.element.removeEventListener(a.type,c),e.removeChild(n.element)}function l(t,e){return function(){if(arguments.length>0){const n=[];for(let t=0;t<arguments.length;t+=1)n.push(arguments[t]);return n.push(t),e.apply(t,n)}return e.apply(t,[null,t])}}function h(t){clearTimeout(t.__internal.timer),clearTimeout(t.__internal.transitionTimeout)}return u={element:t,push:function(t,s,r,a){if(!this.__internal.pushed){let c,l;switch((o=this).__internal.pushed=!0,n.push(o),h(this),arguments.length){case 0:l=this.__internal.delay;break;case 1:"number"==typeof t?l=t:(c=t,l=this.__internal.delay);break;case 2:c=t,l=s;break;case 3:case 4:c=t,l=s,this.__internal.showCheckmark=r}return void 0!==c&&this.setContent(c,a),e.appendChild(this.element),function(t){void 0===t&&(t=document.documentElement),t.offsetHeight}(this.element),this.element.classList.add(i.visible),this.element.addEventListener("click",this.__internal.clickHandler),this.delay(l)}var o;return this},ondismiss:function(){},callback:s,dismiss:function(t){var s;return this.__internal.pushed&&(h(this),"function"==typeof this.ondismiss&&!1===this.ondismiss.call(this)||(this.element.removeEventListener("click",this.__internal.clickHandler),void 0!==this.element&&this.element.parentNode===e&&(this.__internal.transitionTimeout=setTimeout(this.__internal.transitionEndHandler,a.supported?1e3:100),this.element.classList.add(i.hidden),"function"==typeof this.callback&&this.callback.call(this,t)),s=this,n.splice(n.indexOf(s),1),s.__internal.pushed=!1)),this},delay:function(t){if(h(this),this.__internal.delay=void 0===t||isNaN(+t)?q.__internal.delay:+t,this.__internal.delay>0){const t=this;this.__internal.timer=setTimeout(function(){t.dismiss()},1e3*this.__internal.delay)}return this},setContent:function(t,e){const n=document.createElement("div");n.classList.add("env-toast__content"),e&&n.setAttribute("role","alert"),"string"==typeof t?(r(this.element),n.innerHTML=t):t instanceof window.HTMLElement&&n.firstChild!==t&&(r(this.element),n.appendChild(t)),this.element.appendChild(n),this.__internal.showCheckmark&&this.element.insertAdjacentHTML("afterbegin",'<div class="sv-toast-checkmark env-m-left--medium"><svg class="env-icon env-icon--small">\n <use xlink:href="/sitevision/envision-icons.svg#icon-check-done"></use>\n </svg></div>');const s=document.createElement("button");return s.classList.add(i.close),s.insertAdjacentHTML("beforeend",'<svg data-dismiss="close" class="env-icon env-icon--small">\n <use data-dismiss="close" xlink:href="/sitevision/envision-icons.svg#icon-delete"></use>\n </svg>'),s.setAttribute("aria-label",L.getText("common","close")),s.setAttribute("data-dismiss","close"),this.element.appendChild(s),this}},u.__internal||(u.__internal={pushed:!1,delay:void 0,timer:void 0,clickHandler:void 0,transitionEndHandler:void 0,transitionTimeout:void 0,showCheckmark:void 0},u.__internal.clickHandler=l(u,o),u.__internal.transitionEndHandler=l(u,c)),u;var u}return{create:function(t,e){o(this);const n=document.createElement("div");return n.className=i.toast+("string"==typeof t&&""!==t?" "+i.prefix+t:""),c(n,e)}}}();document.addEventListener("sv-publish-toast",t=>{const e=t.detail;var n,i;e.heading&&(e.message=(n=e.heading,i=e.message,"<strong>"+n+"</strong> "+i)),q.create(e.type,e.callback).push(e.message,e.ttl,e.checkmark,e.alertRole)});const R=t=>{try{const e=new CustomEvent("sv-publish-toast",{detail:Object.assign({},N,t)});document.dispatchEvent(e)}catch{window.console.log("Something went wrong! Failed to create Toast!")}},M=window.AppRegistry,H=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,U=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,D=/^(react|react-dom|react-dom\/client|react\/jsx-runtime)$/,Q=function(t){const e=t.split("."),n=e[0],i=e[1];
1return window.sv.UNSAFE_MAY_CHANGE_AT_ANY_GIVEN_TIME_webAppExternals["react_"+n+"_"+i]},F=r().extend({constructor:function(n,s,r){this.requiredLibs=n.requiredLibs,this.app=new v(n),this.router=new d(n);const a=new f(n.locale,n.defaultLocale,s);this.i18n=a.get.bind(a),this.i18n.get=a.get.bind(a),this.initialState=M.getInitialState(this.app.portletId),this.agnosticRender=r&&r.AGNOSTIC_RENDERER,this.bootstrapData=r,this.modules={app:this.app,router:this.router,i18n:this.i18n,events:b,requester:{...e},toasts:{...i},security:{...t},url:{get:this.router.getUrl.bind(this.router)}},this.definitions={},this.definitionQue=[]},start:function(){if(this.startModules(),this.agnosticRender){const t=this.require("/main"),e='[data-cid="'+this.app.portletId+'"]',n=this.app.$el.find(e)[0]||document.querySelector(e);t.default?t.default(this.initialState,n):"function"==typeof t&&t(this.initialState,n)}},require:function(t){return this.requiredLibs.react&&D.test(t)?Q(this.requiredLibs.react)[t]:this.modules[t]},define:function(t,e,n){let i=!1;n||(n=e,e=void 0,i=!0),e||"function"!=typeof n||(e=[],n.length&&n.toString().replace(U,"").replace(H,function(t,n){e.push(n)})),this.definitions[t]={path:t,callback:n,deps:e,usesRequireFunction:i},this.definitionQue.push({path:t,deps:e,callback:n,usesRequireFunction:i})},startModule:function(t){this.modules[t.path]||(t.deps.forEach(function(e){let n;-1===Object.keys(this.modules).indexOf(e)&&(D.test(e)||(n=this.definitions[e],n?this.startModule(this.definitions[e]):window.console.error("Error in: "+this.app.webAppId+'. Missing dependency "'+e+'" in module '+t.path)))},this),t.usesRequireFunction?this.modules[t.path]=t.callback(this.require.bind(this)):this.modules[t.path]=t.callback.apply(null,t.deps.map(t=>this.requiredLibs.react&&D.test(t)?Q(this.requiredLibs.react)[t]:this.modules[t])))},startModules:function(){this.definitionQue.forEach(this.startModule,this)},createDefine:function(t){return this.define.bind(this,t)}}),V=window.AppRegistry;({start:function(t){t=t||V.getRegistry(),V.setAppStarter(this),Object.values(t).forEach(function(t){t.instances.forEach(function(e){const n=new F(e,t.bundle,V.getBootstrapData(e.portletId));Object.entries(t.modules).forEach(function([t,e]){e.module(n.createDefine(t))}),n.start()})})}}).start()})()})(); 2//# sourceMappingURL=webapp_sdk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.