@flarehr/cars-calculator 2.3.49 → 2.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cars-calculator/cars-calculator.esm.js +1 -1
- package/dist/lib/cars-calculator/cars-calculator.js +1 -1
- package/dist/lib/cars-calculator/{p-b7e7dc0f.system.entry.js → p-08f08988.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-0b08c63c.system.js → p-19b00569.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-92efd97a.system.entry.js → p-2f318de8.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-cc24e248.js → p-34be9e94.js} +1 -1
- package/dist/lib/cars-calculator/{p-9e42ba48.system.entry.js → p-3986811b.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-69382409.entry.js → p-40adf333.entry.js} +1 -1
- package/dist/lib/cars-calculator/p-45d6fbc2.system.js +1 -0
- package/dist/lib/cars-calculator/{p-82b4b9ca.entry.js → p-5feb27ac.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-5e27b626.js → p-628050dd.js} +1 -1
- package/dist/lib/cars-calculator/{p-f91aa986.system.js → p-6339bd49.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-a0ed3a75.system.js → p-63ad215f.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-03836e14.entry.js → p-6a379ac2.entry.js} +1 -1
- package/dist/lib/cars-calculator/p-7062880e.js +1 -0
- package/dist/lib/cars-calculator/{p-20a242dc.entry.js → p-7141bc11.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-ac38cb9d.system.entry.js → p-7234d34c.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-9cc8b374.system.entry.js → p-7fed1bfc.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-192dd4a3.system.js → p-8d4bb973.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-25e24da6.system.entry.js → p-94ba6def.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-5efd0fbd.entry.js → p-a54b8d09.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-50451ff0.entry.js → p-aa6eeef5.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-98bd1117.system.entry.js → p-aa7dc5dc.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-819cfa63.js → p-ab3a7737.js} +1 -1
- package/dist/lib/cars-calculator/{p-821b5928.entry.js → p-af1b58b9.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-78c4dce3.system.js → p-b41f72c8.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-598f4a0b.system.js → p-b51215ae.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-69960bb6.system.js → p-bdb3fb61.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-5c2cc99d.js → p-bf086b51.js} +1 -1
- package/dist/lib/cars-calculator/p-c39a8fe9.entry.js +1 -0
- package/dist/lib/cars-calculator/p-c3b6466e.js +1 -0
- package/dist/lib/cars-calculator/{p-3126f655.system.entry.js → p-c3d37683.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/p-c49546ea.entry.js +1 -0
- package/dist/lib/cars-calculator/{p-88c232fe.system.entry.js → p-c77c24a6.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-1bc2b206.system.js → p-c9562e73.system.js} +1 -1
- package/dist/lib/cars-calculator/p-cbc447c7.system.entry.js +1 -0
- package/dist/lib/cars-calculator/{p-2e1b766b.system.entry.js → p-cd0073f4.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-c35d387e.js → p-d14b00d9.js} +1 -1
- package/dist/lib/cars-calculator/{p-c4cda1ba.entry.js → p-e385dbe0.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-066d8e7b.js → p-f3effa5d.js} +1 -1
- package/dist/lib/cars-calculator/{p-4b3e246f.js → p-fa160c9f.js} +1 -1
- package/dist/lib/cars-calculator/{p-8ec3baa9.system.js → p-fa7a5280.system.js} +1 -1
- package/dist/lib/cars-calculator/{p-e45ce69c.entry.js → p-ffa283e3.entry.js} +1 -1
- package/dist/lib/cjs/ap-ben-asset_15.cjs.entry.js +1 -1
- package/dist/lib/cjs/ap-ben-benefit-card.cjs.entry.js +3 -3
- package/dist/lib/cjs/ap-ben-benefit-list-item.cjs.entry.js +3 -3
- package/dist/lib/cjs/ap-ben-benefit-url_10.cjs.entry.js +6 -6
- package/dist/lib/cjs/ap-ben-benefits-list_3.cjs.entry.js +3 -3
- package/dist/lib/cjs/ap-ben-benefits-page.cjs.entry.js +4 -4
- package/dist/lib/cjs/ap-ben-confirm-dialog_4.cjs.entry.js +3 -3
- package/dist/lib/cjs/ap-ben-edit-benefit-page_5.cjs.entry.js +4 -4
- package/dist/lib/cjs/ap-ben-loading-page_2.cjs.entry.js +4 -4
- package/dist/lib/cjs/ap-ben-oidc-callback-page.cjs.entry.js +2 -2
- package/dist/lib/cjs/api-client-00edc9b6.js +107 -0
- package/dist/lib/cjs/{app-globals-086f9d49.js → app-globals-dec360ac.js} +1 -1
- package/dist/lib/cjs/{authentication.service-11c30071.js → authentication.service-12f9ead3.js} +1 -1
- package/dist/lib/cjs/benefits-app-host.cjs.entry.js +2 -2
- package/dist/lib/cjs/{benefits-app.query-97410065.js → benefits-app.query-98898e4c.js} +2 -2
- package/dist/lib/cjs/{benefits.api-053c4334.js → benefits.api-a4bd9804.js} +1 -1
- package/dist/lib/cjs/cars-calculator.cjs.js +2 -2
- package/dist/lib/cjs/{datorama-akita-792b4d1d.js → datorama-akita-bb801820.js} +15 -5
- package/dist/lib/cjs/{event-tracking.service-6ae64142.js → event-tracking.service-fcc820f1.js} +1 -1
- package/dist/lib/cjs/loader.cjs.js +2 -2
- package/dist/lib/cjs/{manage-benefits.service-04883c9b.js → manage-benefits.service-f45b4602.js} +3 -3
- package/dist/lib/cjs/{role-management.service-120cb99a.js → role-management.service-2109723c.js} +2 -2
- package/dist/lib/esm/ap-ben-asset_15.entry.js +1 -1
- package/dist/lib/esm/ap-ben-benefit-card.entry.js +3 -3
- package/dist/lib/esm/ap-ben-benefit-list-item.entry.js +3 -3
- package/dist/lib/esm/ap-ben-benefit-url_10.entry.js +6 -6
- package/dist/lib/esm/ap-ben-benefits-list_3.entry.js +3 -3
- package/dist/lib/esm/ap-ben-benefits-page.entry.js +4 -4
- package/dist/lib/esm/ap-ben-confirm-dialog_4.entry.js +3 -3
- package/dist/lib/esm/ap-ben-edit-benefit-page_5.entry.js +4 -4
- package/dist/lib/esm/ap-ben-loading-page_2.entry.js +4 -4
- package/dist/lib/esm/ap-ben-oidc-callback-page.entry.js +2 -2
- package/dist/lib/esm/api-client-a68152b8.js +99 -0
- package/dist/lib/esm/{app-globals-aa396171.js → app-globals-2a868a4d.js} +1 -1
- package/dist/lib/esm/{authentication.service-05da74e1.js → authentication.service-905f97c2.js} +1 -1
- package/dist/lib/esm/benefits-app-host.entry.js +2 -2
- package/dist/lib/esm/{benefits-app.query-9179a170.js → benefits-app.query-bfee691f.js} +2 -2
- package/dist/lib/esm/{benefits.api-5ecab17a.js → benefits.api-806ca0bc.js} +1 -1
- package/dist/lib/esm/cars-calculator.js +2 -2
- package/dist/lib/esm/{datorama-akita-e42d9911.js → datorama-akita-d2413fd0.js} +15 -5
- package/dist/lib/esm/{event-tracking.service-bc65ac3b.js → event-tracking.service-8d44e7ac.js} +1 -1
- package/dist/lib/esm/loader.js +2 -2
- package/dist/lib/esm/{manage-benefits.service-08338cf7.js → manage-benefits.service-aca7df4c.js} +3 -3
- package/dist/lib/esm/{role-management.service-0e339b49.js → role-management.service-a7592363.js} +2 -2
- package/dist/lib/esm-es5/ap-ben-asset_15.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefit-card.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefit-list-item.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefit-url_10.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefits-list_3.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefits-page.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-confirm-dialog_4.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-edit-benefit-page_5.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-loading-page_2.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-oidc-callback-page.entry.js +1 -1
- package/dist/lib/esm-es5/api-client-a68152b8.js +1 -0
- package/dist/lib/esm-es5/{app-globals-aa396171.js → app-globals-2a868a4d.js} +1 -1
- package/dist/lib/esm-es5/{authentication.service-05da74e1.js → authentication.service-905f97c2.js} +1 -1
- package/dist/lib/esm-es5/benefits-app-host.entry.js +1 -1
- package/dist/lib/esm-es5/{benefits-app.query-9179a170.js → benefits-app.query-bfee691f.js} +1 -1
- package/dist/lib/esm-es5/{benefits.api-5ecab17a.js → benefits.api-806ca0bc.js} +1 -1
- package/dist/lib/esm-es5/cars-calculator.js +1 -1
- package/dist/lib/esm-es5/{datorama-akita-e42d9911.js → datorama-akita-d2413fd0.js} +1 -1
- package/dist/lib/esm-es5/{event-tracking.service-bc65ac3b.js → event-tracking.service-8d44e7ac.js} +1 -1
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/{manage-benefits.service-08338cf7.js → manage-benefits.service-aca7df4c.js} +1 -1
- package/dist/lib/esm-es5/{role-management.service-0e339b49.js → role-management.service-a7592363.js} +1 -1
- package/package.json +7 -3
- package/dist/lib/cars-calculator/p-1bdb5093.entry.js +0 -1
- package/dist/lib/cars-calculator/p-307f91bf.system.entry.js +0 -1
- package/dist/lib/cars-calculator/p-56fb974f.entry.js +0 -1
- package/dist/lib/cars-calculator/p-69cf2679.system.js +0 -1
- package/dist/lib/cars-calculator/p-dc58dd5c.js +0 -1
- package/dist/lib/cars-calculator/p-df0a267a.js +0 -1
- package/dist/lib/cjs/api-client-a3c12426.js +0 -107
- package/dist/lib/esm/api-client-8974d2bd.js +0 -99
- package/dist/lib/esm-es5/api-client-8974d2bd.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(i,t,a,n){function e(i){return i instanceof a?i:new a((function(t){t(i)}))}return new(a||(a=Promise))((function(a,o){function p(i){try{c(n.next(i))}catch(i){o(i)}}function l(i){try{c(n["throw"](i))}catch(i){o(i)}}function c(i){i.done?a(i.value):e(i.value).then(p,l)}c((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,e,o,p;return p={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function l(i){return function(t){return c([i,t])}}function c(p){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,e&&(o=p[0]&2?e["return"]:p[0]?e["throw"]||((o=e["return"])&&o.call(e),0):e.next)&&!(o=o.call(e,p[1])).done)return o;if(e=0,o)p=[p[0]&2,o.value];switch(p[0]){case 0:case 1:o=p;break;case 4:a.label++;return{value:p[1],done:false};case 5:a.label++;e=p[1];p=[0];continue;case 7:p=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){a=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){a.label=p[1];break}if(p[0]===6&&a.label<o[1]){a.label=o[1];o=p;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(p);break}if(o[2])a.ops.pop();a.trys.pop();continue}p=t.call(i,a)}catch(i){p=[6,i];e=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:true}}};System.register(["./p-6c8594d0.system.js","./p-835322bf.system.js","./p-f91aa986.system.js","./p-6efcc4fd.system.js","./p-9a8c9350.system.js","./p-69cf2679.system.js","./p-0045ce79.system.js","./p-598f4a0b.system.js","./p-8ec3baa9.system.js","./p-62fe72dc.system.js","./p-0b08c63c.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js","./p-01cc3fd8.system.js","./p-78c4dce3.system.js"],(function(i){"use strict";var t,a,n,e,o,p,l,c,r,s,d,m,u,f,v,x,h,g,b,y,w,k,j,z,_,S,I,E,U,q;return{setters:[function(i){t=i.r;a=i.h;n=i.c;e=i.H;o=i.d},function(i){p=i.O;l=i.c;c=i._},function(i){r=i.e;s=i.a;d=i.B;m=i.m;u=i.c;f=i.n},function(i){v=i.a},function(i){x=i.n;h=i.e;g=i.h;b=i.b;y=i.i;w=i.m;k=i.g;j=i.c},function(i){z=i.f},function(i){_=i.a},function(i){S=i.b},function(i){I=i.r;E=i.a;U=i.b},function(i){q=i.A},function(){},function(){},function(){},function(){},function(){}],execute:function(){var P="ap-ben-benefit-url .blur-backdrop{opacity:0;position:fixed;top:0;left:0;width:100%;height:100%}";var C;(function(i){i[i["Pristine"]=0]="Pristine";i[i["Validated"]=1]="Validated"})(C||(C={}));var B;(function(i){i[i["Collapsed"]=0]="Collapsed";i[i["Editing"]=1]="Editing"})(B||(B={}));var D=i("ap_ben_benefit_url",function(){function i(i){t(this,i);this.benefitUrl=p.none;this.uiState=B.Collapsed;this.inputState=C.Pristine;this.storeSubscription=new v;this.absoluteUrlRegex=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;this.relativeUrlRegex=/^\/\S+/;this.httpSchemeRegex=/^https?:\/\//i}i.prototype.componentWillLoad=function(){var i=this;this.storeSubscription.add(r.draftBenefitUrl$.subscribe((function(t){i.benefitUrl=t})))};i.prototype.disconnectedCallback=function(){this.storeSubscription.unsubscribe()};i.prototype.render=function(){return this.uiState===B.Editing?this.renderInProgress():this.renderEmptyState()};i.prototype.renderEmptyState=function(){var i=this;return a("div",{class:"row mb-2"},a("div",{class:"col-12 d-flex"},a("button",{type:"button",class:"uiid-benefit-urllink btn btn-light border flex-fill d-flex align-items-center rounded p-0 w-100",onClick:function(t){i.uiState=B.Editing}},p.isSome(this.benefitUrl)?a("ap-ben-icon",{class:"weblink-icon m-4",iconPrefix:"fas",iconId:"globe"}):a("ap-ben-icon",{class:"text-muted m-4",iconPrefix:"fal",iconId:"link"}),a("div",{class:"d-flex flex-column text-left overflow-hidden"},a("span",null,p.isSome(this.benefitUrl)?"Weblink":"Add weblink"),a("small",{class:"text-muted text-truncate w-100"},p.isSome(this.benefitUrl)?p.toUndefined(this.benefitUrl):"Add a web URL to supporting material")),a("button",{class:"btn ml-auto px-3",type:"button",hidden:p.isNone(this.benefitUrl),onClick:function(t){return i.clear(t)}},a("ap-ben-icon",{iconPrefix:"fal",iconId:"trash"})))))};i.prototype.renderInProgress=function(){var i=this;return a("div",{class:"row mb-2 no-gutters border rounded"},a("div",{class:"blur-backdrop",onClick:function(t){i.uiState=B.Collapsed}}),a("div",{class:"col-12 p-3 "+(this.inputState===C.Validated?"was-validated":"")},a("div",{class:"row"},a("div",{class:"col-12 d-flex"},a("div",{class:"d-flex flex-column flex-fill"},a("input",{type:"text",class:"uiid-enter-benefit-urllink form-control d-inline",name:"benefitUrl",value:p.toUndefined(this.benefitUrl),required:true,onInput:function(t){return i.onBenefitUrlInput()},ref:function(t){return i.inputElement=t},placeholder:"https://www.example.com"}),a("div",{class:"invalid-feedback"},"Please provide a valid URL for your benefit.")),a("button",{type:"button",class:"uiid-verify-benefit-urllink btn btn-primary ml-2 d-inline align-self-start",onClick:function(t){i.submit()}},a("ap-ben-icon",{iconPrefix:"fal",iconId:"check"}))))))};i.prototype.getUrlRegex=function(i){if(this.relativeUrlRegex.test(i)){return this.relativeUrlRegex}return this.absoluteUrlRegex};i.prototype.formatUrl=function(i){if(i===""){return""}if(i[0]==="/"){return i}if(this.httpSchemeRegex.test(i)){return i}try{return new URL("https://"+i).href}catch(t){return i}};i.prototype.onBenefitUrlInput=function(){var i=this.inputElement.value.trim();this.inputElement.pattern=this.getUrlRegex(i).source};i.prototype.submit=function(){var i=this.inputElement.value.trim();var t=this.formatUrl(i);this.inputElement.value=t;this.inputElement.pattern=this.getUrlRegex(t).source;this.inputState=C.Validated;if(this.inputElement.checkValidity()&&t!==""){this.uiState=B.Collapsed;s.updateDraftUrl(t)}else{this.inputElement.focus()}};i.prototype.clear=function(i){i.stopPropagation();this.inputState=C.Pristine;s.clearDraftUrl()};return i}());D.style=P;var T=l((function(i,t){Object.defineProperty(t,"__esModule",{value:true});t.pipe=t.pipeable=void 0;var a=function(i){return typeof i.map==="function"};var n=function(i){return typeof i.contramap==="function"};var e=function(i){return typeof i.mapWithIndex==="function"};var o=function(i){return typeof i.ap==="function"};var p=function(i){return typeof i.chain==="function"};var l=function(i){return typeof i.bimap==="function"};var r=function(i){return typeof i.extend==="function"};var s=function(i){return typeof i.reduce==="function"};var d=function(i){return typeof i.reduceWithIndex==="function"};var m=function(i){return typeof i.alt==="function"};var u=function(i){return typeof i.compact==="function"};var f=function(i){return typeof i.filter==="function"};var v=function(i){return typeof i.filterWithIndex==="function"};var x=function(i){return typeof i.promap==="function"};var h=function(i){return typeof i.compose==="function"};var g=function(i){return typeof i.throwError==="function"};function b(i){var t={};if(a(i)){var b=function(t){return function(a){return i.map(a,t)}};t.map=b}if(n(i)){var y=function(t){return function(a){return i.contramap(a,t)}};t.contramap=y}if(e(i)){var w=function(t){return function(a){return i.mapWithIndex(a,t)}};t.mapWithIndex=w}if(o(i)){var k=function(t){return function(a){return i.ap(a,t)}};var j=function(t){return function(a){return i.ap(i.map(a,(function(i){return function(){return i}})),t)}};t.ap=k;t.apFirst=j;t.apSecond=function(t){return function(a){return i.ap(i.map(a,(function(){return function(i){return i}})),t)}}}if(p(i)){var z=function(t){return function(a){return i.chain(a,t)}};var _=function(t){return function(a){return i.chain(a,(function(a){return i.map(t(a),(function(){return a}))}))}};var S=function(t){return i.chain(t,c.identity)};t.chain=z;t.chainFirst=_;t.flatten=S}if(l(i)){var I=function(t,a){return function(n){return i.bimap(n,t,a)}};var E=function(t){return function(a){return i.mapLeft(a,t)}};t.bimap=I;t.mapLeft=E}if(r(i)){var U=function(t){return function(a){return i.extend(a,t)}};var q=function(t){return i.extend(t,c.identity)};t.extend=U;t.duplicate=q}if(s(i)){var P=function(t,a){return function(n){return i.reduce(n,t,a)}};var C=function(t){var a=i.foldMap(t);return function(i){return function(t){return a(t,i)}}};var B=function(t,a){return function(n){return i.reduceRight(n,t,a)}};t.reduce=P;t.foldMap=C;t.reduceRight=B}if(d(i)){var D=function(t,a){return function(n){return i.reduceWithIndex(n,t,a)}};var T=function(t){var a=i.foldMapWithIndex(t);return function(i){return function(t){return a(t,i)}}};var M=function(t,a){return function(n){return i.reduceRightWithIndex(n,t,a)}};t.reduceWithIndex=D;t.foldMapWithIndex=T;t.reduceRightWithIndex=M}if(m(i)){var R=function(t){return function(a){return i.alt(a,t)}};t.alt=R}if(u(i)){t.compact=i.compact;t.separate=i.separate}if(f(i)){var F=function(t){return function(a){return i.filter(a,t)}};var A=function(t){return function(a){return i.filterMap(a,t)}};var W=function(t){return function(a){return i.partition(a,t)}};var L=function(t){return function(a){return i.partitionMap(a,t)}};t.filter=F;t.filterMap=A;t.partition=W;t.partitionMap=L}if(v(i)){var O=function(t){return function(a){return i.filterWithIndex(a,t)}};var V=function(t){return function(a){return i.filterMapWithIndex(a,t)}};var N=function(t){return function(a){return i.partitionWithIndex(a,t)}};var $=function(t){return function(a){return i.partitionMapWithIndex(a,t)}};t.filterWithIndex=O;t.filterMapWithIndex=V;t.partitionWithIndex=N;t.partitionMapWithIndex=$}if(x(i)){var H=function(t,a){return function(n){return i.promap(n,t,a)}};t.promap=H}if(h(i)){var Z=function(t){return function(a){return i.compose(a,t)}};t.compose=Z}if(g(i)){var G=function(t){return function(a){return a._tag==="None"?i.throwError(t()):i.of(a.value)}};var J=function(t){return t._tag==="Left"?i.throwError(t.left):i.of(t.right)};var K=function(t,a){return function(n){return t(n)?i.of(n):i.throwError(a(n))}};var Q=function(t,a){return function(n){return i.chain(n,(function(n){return t(n)?i.of(n):i.throwError(a(n))}))}};t.fromOption=G;t.fromEither=J;t.fromPredicate=K;t.filterOrElse=Q}return t}t.pipeable=b;t.pipe=c.pipe}));var M=i("ap_ben_edit_benefit_form",function(){function i(i){t(this,i);this.isValidationDisplayed=false;this.disabled=false;this.draftBenefit=x;this.stateSubscription=new v;this.nonWhitespaceRegex=/.*\S+.*/}i.prototype.componentWillLoad=function(){var i=this;this.stateSubscription.add(r.draftBenefit$.subscribe((function(t){return i.draftBenefit=t})))};i.prototype.disconnectedCallback=function(){this.stateSubscription.unsubscribe()};i.prototype.render=function(){var i=this;return a("form",{class:"needs-validation",novalidate:"true",ref:function(t){return i.benefitForm=t}},a("fieldset",{disabled:this.disabled},a("div",{class:"row"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",{class:"d-block"},"Icon")),a("div",{class:"col-12 col-sm-8"},a("ap-ben-upload-benefit-icon",null))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Title",a("abbr",{title:"Required",class:"text-danger text-decoration-none"},"*"))),a("div",{class:"col-12 col-sm-8 "+(this.isValidationDisplayed?"was-validated":"")},a("input",{type:"text",name:"benefitTitle",value:T.pipe(this.draftBenefit,h((function(i){return i.title})),g),required:true,class:"uiid-benefit-title form-control fl-hide-valid-style",maxLength:40,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.title=b(a)}))},pattern:this.nonWhitespaceRegex.source}),a("span",{class:"invalid-feedback"},"Please provide a name for your benefit."))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Subtitle")),a("div",{class:"col-12 col-sm-8"},a("input",{type:"text",name:"benefitValue",value:T.pipe(this.draftBenefit,h((function(i){return i.subtitle})),g),class:"uiid-benefit-highlight form-control fl-hide-valid-style",maxLength:40,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.subtitle=b(a)}))}}),a("small",{class:"text-muted"},"Highlight phone numbers, dates or potential savings"))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Description")),a("div",{class:"col-12 col-sm-8"},a("textarea",{name:"benefitDescription",value:T.pipe(this.draftBenefit,h((function(i){return i.description})),g),class:"uiid-benefit-description form-control fl-hide-valid-style",placeholder:"Join the team in the park for 30 minutes",maxLength:400,rows:4,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.description=b(a)}))}}))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Category",a("abbr",{title:"Required",class:"text-danger text-decoration-none"},"*"))),a("div",{class:"col-12 col-sm-4 "+(this.isValidationDisplayed?"was-validated":"")},a("select",{name:"benefitCategory",class:"uiid-benefit-category form-control fl-hide-valid-style",required:true,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.category=b(a)}))}},a("option",{value:"",label:"Select...",selected:T.pipe(this.draftBenefit,h((function(i){return i.category})),y),disabled:true,hidden:true}),d.map((function(t){return a("option",{value:t,selected:T.pipe(i.draftBenefit,h((function(i){return i.category})),g)===t},t)}))),a("span",{class:"invalid-feedback"},"Please choose a category for your benefit."))),a("div",{class:"row mt-4"},a("div",{class:"col-12 col-sm-4 mb-1"},"Additional information"),a("div",{class:"col-12 col-sm-8 mb-3"},a("ap-ben-benefit-url",null),a("ap-ben-upload-file",null)))))};i.prototype.updateDraftBenefit=function(i){var t=this;if(y(this.draftBenefit))return;var a=z(this.draftBenefit.value,i);a=z(a,(function(i){i.isValid=t.benefitForm.checkValidity();i.isDirty=true}));s.updateDraftBenefit(a)};return i}());var R=i("ap_ben_empty_benefits",function(){function i(i){t(this,i);this.newBenefitButtonClicked=n(this,"newBenefitButtonClicked",7)}i.prototype.render=function(){var i=this;return a(e,{class:"d-flex flex-column justify-content-center benefits-zero-state p-4 border-top"},a("div",{class:"text-center my-5"},a("ap-ben-icon",{class:"text-success fa-4x",iconPrefix:"fad",iconId:"handshake-alt"}),a("ap-ben-icon",{class:"text-success fa-4x px-3",iconPrefix:"fad",iconId:"heartbeat"}),a("ap-ben-icon",{class:"text-success fa-4x",iconPrefix:"fad",iconId:"car"})),a("div",{class:"text-center mb-3"},a("h5",null,"Attract and retain a healthy, productive workforce."),a("p",{class:"uiid-noactive-benefit-item text-muted my-1"},"Begin by building out your employee benefits offering.")),a("fl-button",{class:"mb-5 align-self-center",onClick:function(t){var a;(a=i.newBenefitButtonClicked)===null||a===void 0?void 0:a.emit()}},a("ap-ben-icon",{class:"mr-2",iconPrefix:"far",iconId:"plus"}),"New benefit"))};return i}());var F=".file-icon-red-dark{color:#db424d}.file-icon-blue{color:#2985d2}.file-icon-green{color:#12aa7c}.file-icon-purple{color:purple}";var A=i("ap_ben_file_icon",function(){function i(i){var a=this;t(this,i);this.defaultIconStyle="text-muted";this.fileTypeToIconStyleMapping=[{fileType:"pdf",iconStyle:"file-icon-red-dark"},{fileType:"word",iconStyle:"file-icon-blue"},{fileType:"powerpoint",iconStyle:"file-icon-purple"}];this.fileTypeToFontawesomeMapping=[{fileType:"pdf",iconName:"file-pdf"},{fileType:"word",iconName:"file-word"},{fileType:"powerpoint",iconName:"file-powerpoint"}];this.getFontawesomeStyleFromFileType=function(i){var t=a.fileTypeToFontawesomeMapping.find((function(t){return t.fileType===i}));return t?t.iconName:"file-alt"}}i.prototype.render=function(){var i=this.isEmpty?"fal":"fas";var t=this.isEmpty?this.defaultIconStyle:this.getIconStyleFromFileType(this.fileType);return a("ap-ben-icon",{iconPrefix:i,iconId:this.getFontawesomeStyleFromFileType(this.fileType),class:t})};i.prototype.getIconStyleFromFileType=function(i){var t=this.fileTypeToIconStyleMapping.find((function(t){return t.fileType===i}));if(t){return t.iconStyle}else{return this.defaultIconStyle}};return i}());A.style=F;var W=i("ap_ben_manage_benefits_header_row",function(){function i(i){t(this,i)}i.prototype.render=function(){return a(e,null,a("div",{class:"row border-top bg-light font-weight-bold p-3 no-gutters"},a("small",{class:"text-muted col-5 col-lg-6"},a("strong",null,"Title")),a("small",{class:"text-muted col-2 d-none d-md-block"},"Category"),a("small",{class:"text-muted col-2 d-none d-md-block"},"Last modified"),a("small",{class:"text-muted col-3 col-lg-2 d-none d-md-block"},"Status")))};return i}());var L="ap-ben-managed-benefit-item>div:first-child:hover{cursor:pointer;background-color:rgba(173, 173, 173, 0.05)}ap-ben-managed-benefit-item .flb-opacity-onhover{opacity:0.75}ap-ben-managed-benefit-item .flb-opacity-onhover:hover{opacity:1}";var O=i("ap_ben_managed_benefit_item",function(){function i(i){t(this,i);this.editBenefitButtonClicked=n(this,"editBenefitButtonClicked",7)}i.prototype.render=function(){var i=this;return a("div",{class:"border-top py-3 px-3 row d-flex align-items-center no-gutters",onClick:function(){return i.onBenefitClick()}},a("div",{class:"col-12 col-md-5 col-lg-6"},a("span",{class:{"m-0 text-truncate":true,"text-muted":!this.benefit.visibility.isEnabled}},this.benefit.title)),a("div",{class:"col-12 col-md-2 text-muted text-truncate"},this.benefit.category),a("div",{class:"col-12 col-md-2 text-muted text-truncate"},this.formatDate(this.benefit.lastModifiedDate)),a("div",{class:"col-12 col-md-3 col-lg-2 mt-4 mt-md-0 text-right"},this.benefit.visibility.isEnabled?a("fl-promise-button",{class:"uiid-deactivate-benefit-item",isBlockElement:true,variant:"secondary",onClick:function(i){i.stopPropagation()},promiseFn:function(){return i.onSetInactive()}},a("h6",{class:"my-0"},"Deactivate")):a("fl-promise-button",{class:"uiid-activate-benefit-item",isBlockElement:true,variant:"secondary",onClick:function(i){i.stopPropagation()},promiseFn:function(){return i.onSetActive()}},a("h6",{class:"my-0"},"Activate"))))};i.prototype.onBenefitClick=function(){this.editBenefitButtonClicked.emit(this.benefit)};i.prototype.onSetActive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,m.enableBenefitAsync(this.benefit.id)];case 1:i.sent();return[2]}}))}))};i.prototype.onSetInactive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,m.disableBenefitAsync(this.benefit.id)];case 1:i.sent();return[2]}}))}))};i.prototype.formatDate=function(i){return T.pipe(i,w((function(i){return new Date(i).toLocaleDateString("en-AU",{day:"numeric",month:"short",year:"numeric"})})),k((function(){return""})))};return i}());O.style=L;var V=i("ap_ben_role_management_page",function(){function i(i){t(this,i);this.showRemoveConfirmDialog=false;this.storeSubscription=new v}i.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i=this;return __generator(this,(function(t){switch(t.label){case 0:I.reset();this.storeSubscription.add(S.signedInUser$.subscribe((function(t){i.user=_(t)})));return[4,E.getEditorProfiles()];case 1:t.sent();this.storeSubscription.add(U.showRemoveEditorDialog$.subscribe((function(t){return i.showRemoveConfirmDialog=t})));return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.storeSubscription.unsubscribe()};i.prototype.render=function(){return a(e,{class:"w-100"},a("ap-ben-ui-container",{class:"w-100 d-none py-5"},a("div",{class:"d-flex align-items-start flex-column"},a("h3",null,"Access Management"),a("div",{class:"mt-3"},a("h4",null,"Permissions")),a("div",null,"Manage which staff has permission to edit and manage benefits.")),a("div",{class:"mt-4"},a("ap-ben-role-owner-section",{owner:this.user})),a("div",{class:"mt-4"},a("ap-ben-role-editors-section",null))),this.renderRemoveConfirmDialog())};i.prototype.renderRemoveConfirmDialog=function(){return a("ap-ben-modal-section",{show:this.showRemoveConfirmDialog,showHeader:true,modalTitle:"Remove editor",onModalClosed:function(i){return I.showRemoveEditorDialog(false)}},a("ap-ben-confirm-dialog",{acceptText:"Remove",declineText:"Cancel",dialogStyle:"danger",onAccepted:function(i){return E.removeSelectedEditor()},onDeclined:function(i){return I.showRemoveEditorDialog(false)}},a("p",null,a("b",null,"Are you sure you want to remove this person?")),a("p",null,"If you proceed, this person will not be able to edit or manage benefits anymore.")))};return i}());var N="ap-ben-upload-benefit-icon .flb-icon-container{height:4rem;width:4rem;color:#1865bf;background:#c0e1fd;border:1px dashed #2985d2}ap-ben-upload-benefit-icon .flb-icon-container.error-state{color:#db424d;background:#f8d3d6;border:1px dashed #e2505c}ap-ben-upload-benefit-icon .flb-icon-container .flb-icon{max-width:100%;max-height:100%}ap-ben-upload-benefit-icon .flb-icon-container .btn-icon-delete{position:absolute;opacity:0.7;display:none}ap-ben-upload-benefit-icon .flb-icon-container:hover .btn-icon-delete{display:-ms-flexbox;display:flex}";var $;(function(i){i[i["Empty"]=0]="Empty";i[i["UploadPending"]=1]="UploadPending";i[i["Uploaded"]=2]="Uploaded";i[i["Error"]=3]="Error"})($||($={}));var H=i("ap_ben_upload_benefit_icon",function(){function i(i){t(this,i);this.customIcon=x;this.uploadIconState=$.Empty;this.storeSubscription=new v;this.allowedMimetypes=["image/png","image/jpeg","image/gif"]}i.prototype.componentWillLoad=function(){var i=this;this.storeSubscription.add(r.draftBenefitIcon$.subscribe((function(t){i.customIcon=t;i.uploadIconState=j(t)?$.Uploaded:$.Empty})))};i.prototype.disconnectedCallback=function(){this.storeSubscription.unsubscribe()};i.prototype.render=function(){switch(this.uploadIconState){case $.Empty:case $.Error:return this.renderEmptyOrErrorState();case $.UploadPending:return this.renderUploadPending();case $.Uploaded:return this.renderIconUploaded()}};i.prototype.mapState=function(){var i=this;return r.draftBenefitIcon$.subscribe((function(t){i.customIcon=t}))};i.prototype.renderEmptyOrErrorState=function(){var i=this;return a("div",{class:"d-flex align-items-center"},a("button",{type:"button",class:"flb-icon-container flb-btn-file rounded mr-4 "+(this.uploadIconState===$.Error?"error-state":"")},this.uploadIconState===$.Empty&&a("ap-ben-icon",{iconPrefix:"fal",iconId:"upload"}),this.uploadIconState===$.Error&&a("ap-ben-icon",{iconPrefix:"fal",iconId:"exclamation-triangle"}),a("input",{class:"uiid-benefit-image",type:"file",accept:this.allowedMimetypes.join(", "),onChange:function(t){return i.onIconUpload(t)}})),a("div",null,a("h6",{class:"m-0"},"Upload image"),this.uploadIconState===$.Empty&&a("small",{class:"text-muted"},"Max file size 1 MB"),this.uploadIconState===$.Error&&a("small",{class:"text-danger"},"Invalid file format or 1 MB size limit exceeded. Try again.")))};i.prototype.renderUploadPending=function(){return a("div",{class:"flb-icon-container rounded p-3 d-flex justify-content-center align-items-center"},a("ap-ben-icon",{iconPrefix:"fal",iconId:"spinner-third",spin:true,class:"fa-2x"}))};i.prototype.renderIconUploaded=function(){var i=this;return a("div",{class:"flb-icon-container bg-white position-relative d-flex justify-content-center align-items-center border rounded"},a("img",{src:_(this.customIcon).downloadUrl,class:"flb-icon"}),a("button",{class:"btn btn-dark btn-icon-delete flex-column justify-content-center align-items-center h-100",type:"button",onClick:function(t){return i.clearIcon()}},a("i",{class:"fal fa-trash"}),a("small",null,"Delete")))};i.prototype.onIconUpload=function(i){return __awaiter(this,void 0,void 0,(function(){var t,a,n;return __generator(this,(function(e){switch(e.label){case 0:i.preventDefault();t=i.target.files;if(!t){return[2]}a=t.item(0);if(!a){return[2]}this.uploadIconState=$.UploadPending;e.label=1;case 1:e.trys.push([1,3,,4]);return[4,s.uploadIconAsync(a)];case 2:e.sent();this.uploadIconState=$.Uploaded;return[3,4];case 3:n=e.sent();this.uploadIconState=$.Error;return[3,4];case 4:return[2]}}))}))};i.prototype.clearIcon=function(){s.clearIcon()};return i}());H.style=N;function Z(){this._types=Object.create(null);this._extensions=Object.create(null);for(var i=0;i<arguments.length;i++){this.define(arguments[i])}this.define=this.define.bind(this);this.getType=this.getType.bind(this);this.getExtension=this.getExtension.bind(this)}Z.prototype.define=function(i,t){for(var a in i){var n=i[a].map((function(i){return i.toLowerCase()}));a=a.toLowerCase();for(var e=0;e<n.length;e++){var o=n[e];if(o[0]==="*"){continue}if(!t&&o in this._types){throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+a+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+a+'".')}this._types[o]=a}if(t||!this._extensions[a]){var o=n[0];this._extensions[a]=o[0]!=="*"?o:o.substr(1)}}};Z.prototype.getType=function(i){i=String(i);var t=i.replace(/^.*[/\\]/,"").toLowerCase();var a=t.replace(/^.*\./,"").toLowerCase();var n=t.length<i.length;var e=a.length<t.length-1;return(e||!n)&&this._types[a]||null};Z.prototype.getExtension=function(i){i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1;return i&&this._extensions[i.toLowerCase()]||null};var G=Z;var J={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};var K={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};var Q=new G(J,K);var X=".flb-btn-file{position:relative;overflow:hidden !important}.flb-btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;cursor:inherit;display:block}";var Y;(function(i){i[i["Empty"]=0]="Empty";i[i["UploadPending"]=1]="UploadPending";i[i["Attached"]=2]="Attached"})(Y||(Y={}));var ii=i("ap_ben_upload_file",function(){function i(i){t(this,i);this.uploadedFile=p.none;this.uploadFileState=Y.Empty;this.isUploadError=false;this.stateSubscription=new v;this.allowedMimetypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"]}i.prototype.componentWillLoad=function(){var i=this;this.stateSubscription.add(r.draftBenefitAttachment$.subscribe((function(t){i.uploadedFile=t;i.uploadFileState=p.isSome(t)?Y.Attached:Y.Empty})))};i.prototype.disconnectedCallback=function(){this.stateSubscription.unsubscribe()};i.prototype.render=function(){return a(e,null,a("div",{class:"row border rounded bg-light no-gutters"},a("div",{class:"col-12 d-flex"},this.renderUploadState())),this.isUploadError&&a("div",null,a("small",{class:"text-danger"},"File format is invalid, or the file is larger than 10 MB. Try again.")))};i.prototype.renderUploadState=function(){switch(this.uploadFileState){case Y.Empty:return this.renderEmptyOrErrorState();case Y.UploadPending:return this.renderUploadPending();case Y.Attached:return this.renderAttachedDocument()}};i.prototype.renderEmptyOrErrorState=function(){var i=this;return a("button",{type:"button",class:"uiid-new-benefit-document btn btn-light flb-btn-file p-0 flex-fill d-flex align-items-center"},a("span",{class:"m-4"},a("ap-ben-file-icon",{fileType:"pdf",isEmpty:true})),a("div",{class:"d-flex flex-column align-items-start text-left"},a("span",null,"Add document"),a("small",{class:"text-muted text-wrap"},"Word, Powerpoint and PDF (Max file size 10MB)")),a("input",{class:"uiid-benefit-document",type:"file",accept:this.allowedMimetypes.join(", "),onChange:function(t){return i.onDocumentUpload(t)}}))};i.prototype.renderUploadPending=function(){return a("div",{class:"rounded bg-light d-flex justify-content-center align-items-center"},a("span",{class:"m-4"},a("ap-ben-icon",{iconPrefix:"fal",iconId:"spinner-third",spin:true})),a("div",{class:"d-flex flex-column align-items-start"},a("span",null,"Document"),a("small",{class:"text-muted"},"Please wait while your document is uploading")))};i.prototype.renderAttachedDocument=function(){var i=this;return a("div",{class:"rounded bg-light d-flex align-items-center flex-fill"},a("span",{class:"m-4"},a("ap-ben-file-icon",{fileType:_(this.uploadedFile).documentFormat})),a("div",{class:"d-flex flex-column align-items-start"},a("span",null,"Document"),a("small",{class:"text-muted"},_(this.uploadedFile).title)),a("button",{class:"btn ml-auto px-3",type:"button",onClick:function(t){return i.onClearDocument()}},a("ap-ben-icon",{iconPrefix:"fal",iconId:"trash"})))};i.prototype.onDocumentUpload=function(i){return __awaiter(this,void 0,void 0,(function(){var t,a;return __generator(this,(function(n){switch(n.label){case 0:i.preventDefault();this.isUploadError=false;t=i.target.files;if(!t){return[2]}a=t.item(0);if(!a){return[2]}if(!this.isFileValid(a)){this.isUploadError=true;return[2]}this.uploadFileState=Y.UploadPending;return[4,s.uploadAttachmentAsync(a)];case 1:n.sent();return[2]}}))}))};i.prototype.isFileValid=function(i){return this.allowedMimetypes.some((function(t){return t===Q.getType(i.name)}))&&i.size<=10485760};i.prototype.onClearDocument=function(){s.clearAttachment()};return i}());ii.style=X;var ti="stencil-route.inactive{display:none}";var ai=i("stencil_route",function(){function i(i){t(this,i);this.group=null;this.match=null;this.componentProps={};this.exact=false;this.scrollOnNextRender=false;this.previousMatch=null}i.prototype.computeMatch=function(i){var t=this.group!=null||this.el.parentElement!=null&&this.el.parentElement.tagName.toLowerCase()==="stencil-route-switch";if(!i||t){return}this.previousMatch=this.match;return this.match=u(i.pathname,{path:this.url,exact:this.exact,strict:true})};i.prototype.loadCompleted=function(){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(t){i={};if(this.history&&this.history.location.hash){i={scrollToId:this.history.location.hash.substr(1)}}else if(this.scrollTopOffset){i={scrollTopOffset:this.scrollTopOffset}}if(typeof this.componentUpdated==="function"){this.componentUpdated(i)}else if(this.match&&!f(this.match,this.previousMatch)&&this.routeViewsUpdated){this.routeViewsUpdated(i)}return[2]}))}))};i.prototype.componentDidUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,this.loadCompleted()];case 1:i.sent();return[2]}}))}))};i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,this.loadCompleted()];case 1:i.sent();return[2]}}))}))};i.prototype.render=function(){if(!this.match||!this.history){return null}var i=Object.assign({},this.componentProps,{history:this.history,match:this.match});if(this.routeRender){return this.routeRender(Object.assign({},i,{component:this.component}))}if(this.component){var t=this.component;return a(t,Object.assign({},i))}};Object.defineProperty(i.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(i,"watchers",{get:function(){return{location:["computeMatch"]}},enumerable:false,configurable:true});return i}());q.injectProps(ai,["location","history","historyType","routeViewsUpdated"]);ai.style=ti}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(i,t,a,n){function e(i){return i instanceof a?i:new a((function(t){t(i)}))}return new(a||(a=Promise))((function(a,o){function p(i){try{c(n.next(i))}catch(i){o(i)}}function l(i){try{c(n["throw"](i))}catch(i){o(i)}}function c(i){i.done?a(i.value):e(i.value).then(p,l)}c((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,e,o,p;return p={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function l(i){return function(t){return c([i,t])}}function c(p){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,e&&(o=p[0]&2?e["return"]:p[0]?e["throw"]||((o=e["return"])&&o.call(e),0):e.next)&&!(o=o.call(e,p[1])).done)return o;if(e=0,o)p=[p[0]&2,o.value];switch(p[0]){case 0:case 1:o=p;break;case 4:a.label++;return{value:p[1],done:false};case 5:a.label++;e=p[1];p=[0];continue;case 7:p=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){a=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){a.label=p[1];break}if(p[0]===6&&a.label<o[1]){a.label=o[1];o=p;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(p);break}if(o[2])a.ops.pop();a.trys.pop();continue}p=t.call(i,a)}catch(i){p=[6,i];e=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:true}}};System.register(["./p-6c8594d0.system.js","./p-835322bf.system.js","./p-6339bd49.system.js","./p-6efcc4fd.system.js","./p-9a8c9350.system.js","./p-45d6fbc2.system.js","./p-0045ce79.system.js","./p-b51215ae.system.js","./p-fa7a5280.system.js","./p-62fe72dc.system.js","./p-19b00569.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js","./p-01cc3fd8.system.js","./p-b41f72c8.system.js"],(function(i){"use strict";var t,a,n,e,o,p,l,c,r,s,d,m,u,f,v,x,h,g,b,y,w,k,j,z,_,S,I,E,U,q;return{setters:[function(i){t=i.r;a=i.h;n=i.c;e=i.H;o=i.d},function(i){p=i.O;l=i.c;c=i._},function(i){r=i.e;s=i.a;d=i.B;m=i.m;u=i.c;f=i.n},function(i){v=i.a},function(i){x=i.n;h=i.e;g=i.h;b=i.b;y=i.i;w=i.m;k=i.g;j=i.c},function(i){z=i.f},function(i){_=i.a},function(i){S=i.b},function(i){I=i.r;E=i.a;U=i.b},function(i){q=i.A},function(){},function(){},function(){},function(){},function(){}],execute:function(){var P="ap-ben-benefit-url .blur-backdrop{opacity:0;position:fixed;top:0;left:0;width:100%;height:100%}";var C;(function(i){i[i["Pristine"]=0]="Pristine";i[i["Validated"]=1]="Validated"})(C||(C={}));var B;(function(i){i[i["Collapsed"]=0]="Collapsed";i[i["Editing"]=1]="Editing"})(B||(B={}));var D=i("ap_ben_benefit_url",function(){function i(i){t(this,i);this.benefitUrl=p.none;this.uiState=B.Collapsed;this.inputState=C.Pristine;this.storeSubscription=new v;this.absoluteUrlRegex=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;this.relativeUrlRegex=/^\/\S+/;this.httpSchemeRegex=/^https?:\/\//i}i.prototype.componentWillLoad=function(){var i=this;this.storeSubscription.add(r.draftBenefitUrl$.subscribe((function(t){i.benefitUrl=t})))};i.prototype.disconnectedCallback=function(){this.storeSubscription.unsubscribe()};i.prototype.render=function(){return this.uiState===B.Editing?this.renderInProgress():this.renderEmptyState()};i.prototype.renderEmptyState=function(){var i=this;return a("div",{class:"row mb-2"},a("div",{class:"col-12 d-flex"},a("button",{type:"button",class:"uiid-benefit-urllink btn btn-light border flex-fill d-flex align-items-center rounded p-0 w-100",onClick:function(t){i.uiState=B.Editing}},p.isSome(this.benefitUrl)?a("ap-ben-icon",{class:"weblink-icon m-4",iconPrefix:"fas",iconId:"globe"}):a("ap-ben-icon",{class:"text-muted m-4",iconPrefix:"fal",iconId:"link"}),a("div",{class:"d-flex flex-column text-left overflow-hidden"},a("span",null,p.isSome(this.benefitUrl)?"Weblink":"Add weblink"),a("small",{class:"text-muted text-truncate w-100"},p.isSome(this.benefitUrl)?p.toUndefined(this.benefitUrl):"Add a web URL to supporting material")),a("button",{class:"btn ml-auto px-3",type:"button",hidden:p.isNone(this.benefitUrl),onClick:function(t){return i.clear(t)}},a("ap-ben-icon",{iconPrefix:"fal",iconId:"trash"})))))};i.prototype.renderInProgress=function(){var i=this;return a("div",{class:"row mb-2 no-gutters border rounded"},a("div",{class:"blur-backdrop",onClick:function(t){i.uiState=B.Collapsed}}),a("div",{class:"col-12 p-3 "+(this.inputState===C.Validated?"was-validated":"")},a("div",{class:"row"},a("div",{class:"col-12 d-flex"},a("div",{class:"d-flex flex-column flex-fill"},a("input",{type:"text",class:"uiid-enter-benefit-urllink form-control d-inline",name:"benefitUrl",value:p.toUndefined(this.benefitUrl),required:true,onInput:function(t){return i.onBenefitUrlInput()},ref:function(t){return i.inputElement=t},placeholder:"https://www.example.com"}),a("div",{class:"invalid-feedback"},"Please provide a valid URL for your benefit.")),a("button",{type:"button",class:"uiid-verify-benefit-urllink btn btn-primary ml-2 d-inline align-self-start",onClick:function(t){i.submit()}},a("ap-ben-icon",{iconPrefix:"fal",iconId:"check"}))))))};i.prototype.getUrlRegex=function(i){if(this.relativeUrlRegex.test(i)){return this.relativeUrlRegex}return this.absoluteUrlRegex};i.prototype.formatUrl=function(i){if(i===""){return""}if(i[0]==="/"){return i}if(this.httpSchemeRegex.test(i)){return i}try{return new URL("https://"+i).href}catch(t){return i}};i.prototype.onBenefitUrlInput=function(){var i=this.inputElement.value.trim();this.inputElement.pattern=this.getUrlRegex(i).source};i.prototype.submit=function(){var i=this.inputElement.value.trim();var t=this.formatUrl(i);this.inputElement.value=t;this.inputElement.pattern=this.getUrlRegex(t).source;this.inputState=C.Validated;if(this.inputElement.checkValidity()&&t!==""){this.uiState=B.Collapsed;s.updateDraftUrl(t)}else{this.inputElement.focus()}};i.prototype.clear=function(i){i.stopPropagation();this.inputState=C.Pristine;s.clearDraftUrl()};return i}());D.style=P;var T=l((function(i,t){Object.defineProperty(t,"__esModule",{value:true});t.pipe=t.pipeable=void 0;var a=function(i){return typeof i.map==="function"};var n=function(i){return typeof i.contramap==="function"};var e=function(i){return typeof i.mapWithIndex==="function"};var o=function(i){return typeof i.ap==="function"};var p=function(i){return typeof i.chain==="function"};var l=function(i){return typeof i.bimap==="function"};var r=function(i){return typeof i.extend==="function"};var s=function(i){return typeof i.reduce==="function"};var d=function(i){return typeof i.reduceWithIndex==="function"};var m=function(i){return typeof i.alt==="function"};var u=function(i){return typeof i.compact==="function"};var f=function(i){return typeof i.filter==="function"};var v=function(i){return typeof i.filterWithIndex==="function"};var x=function(i){return typeof i.promap==="function"};var h=function(i){return typeof i.compose==="function"};var g=function(i){return typeof i.throwError==="function"};function b(i){var t={};if(a(i)){var b=function(t){return function(a){return i.map(a,t)}};t.map=b}if(n(i)){var y=function(t){return function(a){return i.contramap(a,t)}};t.contramap=y}if(e(i)){var w=function(t){return function(a){return i.mapWithIndex(a,t)}};t.mapWithIndex=w}if(o(i)){var k=function(t){return function(a){return i.ap(a,t)}};var j=function(t){return function(a){return i.ap(i.map(a,(function(i){return function(){return i}})),t)}};t.ap=k;t.apFirst=j;t.apSecond=function(t){return function(a){return i.ap(i.map(a,(function(){return function(i){return i}})),t)}}}if(p(i)){var z=function(t){return function(a){return i.chain(a,t)}};var _=function(t){return function(a){return i.chain(a,(function(a){return i.map(t(a),(function(){return a}))}))}};var S=function(t){return i.chain(t,c.identity)};t.chain=z;t.chainFirst=_;t.flatten=S}if(l(i)){var I=function(t,a){return function(n){return i.bimap(n,t,a)}};var E=function(t){return function(a){return i.mapLeft(a,t)}};t.bimap=I;t.mapLeft=E}if(r(i)){var U=function(t){return function(a){return i.extend(a,t)}};var q=function(t){return i.extend(t,c.identity)};t.extend=U;t.duplicate=q}if(s(i)){var P=function(t,a){return function(n){return i.reduce(n,t,a)}};var C=function(t){var a=i.foldMap(t);return function(i){return function(t){return a(t,i)}}};var B=function(t,a){return function(n){return i.reduceRight(n,t,a)}};t.reduce=P;t.foldMap=C;t.reduceRight=B}if(d(i)){var D=function(t,a){return function(n){return i.reduceWithIndex(n,t,a)}};var T=function(t){var a=i.foldMapWithIndex(t);return function(i){return function(t){return a(t,i)}}};var M=function(t,a){return function(n){return i.reduceRightWithIndex(n,t,a)}};t.reduceWithIndex=D;t.foldMapWithIndex=T;t.reduceRightWithIndex=M}if(m(i)){var R=function(t){return function(a){return i.alt(a,t)}};t.alt=R}if(u(i)){t.compact=i.compact;t.separate=i.separate}if(f(i)){var F=function(t){return function(a){return i.filter(a,t)}};var A=function(t){return function(a){return i.filterMap(a,t)}};var W=function(t){return function(a){return i.partition(a,t)}};var L=function(t){return function(a){return i.partitionMap(a,t)}};t.filter=F;t.filterMap=A;t.partition=W;t.partitionMap=L}if(v(i)){var O=function(t){return function(a){return i.filterWithIndex(a,t)}};var V=function(t){return function(a){return i.filterMapWithIndex(a,t)}};var N=function(t){return function(a){return i.partitionWithIndex(a,t)}};var $=function(t){return function(a){return i.partitionMapWithIndex(a,t)}};t.filterWithIndex=O;t.filterMapWithIndex=V;t.partitionWithIndex=N;t.partitionMapWithIndex=$}if(x(i)){var H=function(t,a){return function(n){return i.promap(n,t,a)}};t.promap=H}if(h(i)){var Z=function(t){return function(a){return i.compose(a,t)}};t.compose=Z}if(g(i)){var G=function(t){return function(a){return a._tag==="None"?i.throwError(t()):i.of(a.value)}};var J=function(t){return t._tag==="Left"?i.throwError(t.left):i.of(t.right)};var K=function(t,a){return function(n){return t(n)?i.of(n):i.throwError(a(n))}};var Q=function(t,a){return function(n){return i.chain(n,(function(n){return t(n)?i.of(n):i.throwError(a(n))}))}};t.fromOption=G;t.fromEither=J;t.fromPredicate=K;t.filterOrElse=Q}return t}t.pipeable=b;t.pipe=c.pipe}));var M=i("ap_ben_edit_benefit_form",function(){function i(i){t(this,i);this.isValidationDisplayed=false;this.disabled=false;this.draftBenefit=x;this.stateSubscription=new v;this.nonWhitespaceRegex=/.*\S+.*/}i.prototype.componentWillLoad=function(){var i=this;this.stateSubscription.add(r.draftBenefit$.subscribe((function(t){return i.draftBenefit=t})))};i.prototype.disconnectedCallback=function(){this.stateSubscription.unsubscribe()};i.prototype.render=function(){var i=this;return a("form",{class:"needs-validation",novalidate:"true",ref:function(t){return i.benefitForm=t}},a("fieldset",{disabled:this.disabled},a("div",{class:"row"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",{class:"d-block"},"Icon")),a("div",{class:"col-12 col-sm-8"},a("ap-ben-upload-benefit-icon",null))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Title",a("abbr",{title:"Required",class:"text-danger text-decoration-none"},"*"))),a("div",{class:"col-12 col-sm-8 "+(this.isValidationDisplayed?"was-validated":"")},a("input",{type:"text",name:"benefitTitle",value:T.pipe(this.draftBenefit,h((function(i){return i.title})),g),required:true,class:"uiid-benefit-title form-control fl-hide-valid-style",maxLength:40,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.title=b(a)}))},pattern:this.nonWhitespaceRegex.source}),a("span",{class:"invalid-feedback"},"Please provide a name for your benefit."))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Subtitle")),a("div",{class:"col-12 col-sm-8"},a("input",{type:"text",name:"benefitValue",value:T.pipe(this.draftBenefit,h((function(i){return i.subtitle})),g),class:"uiid-benefit-highlight form-control fl-hide-valid-style",maxLength:40,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.subtitle=b(a)}))}}),a("small",{class:"text-muted"},"Highlight phone numbers, dates or potential savings"))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Description")),a("div",{class:"col-12 col-sm-8"},a("textarea",{name:"benefitDescription",value:T.pipe(this.draftBenefit,h((function(i){return i.description})),g),class:"uiid-benefit-description form-control fl-hide-valid-style",placeholder:"Join the team in the park for 30 minutes",maxLength:400,rows:4,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.description=b(a)}))}}))),a("div",{class:"row my-4"},a("div",{class:"col-12 col-sm-4 mb-1"},a("span",null,"Category",a("abbr",{title:"Required",class:"text-danger text-decoration-none"},"*"))),a("div",{class:"col-12 col-sm-4 "+(this.isValidationDisplayed?"was-validated":"")},a("select",{name:"benefitCategory",class:"uiid-benefit-category form-control fl-hide-valid-style",required:true,onInput:function(t){var a=t.target.value;i.updateDraftBenefit((function(i){i.category=b(a)}))}},a("option",{value:"",label:"Select...",selected:T.pipe(this.draftBenefit,h((function(i){return i.category})),y),disabled:true,hidden:true}),d.map((function(t){return a("option",{value:t,selected:T.pipe(i.draftBenefit,h((function(i){return i.category})),g)===t},t)}))),a("span",{class:"invalid-feedback"},"Please choose a category for your benefit."))),a("div",{class:"row mt-4"},a("div",{class:"col-12 col-sm-4 mb-1"},"Additional information"),a("div",{class:"col-12 col-sm-8 mb-3"},a("ap-ben-benefit-url",null),a("ap-ben-upload-file",null)))))};i.prototype.updateDraftBenefit=function(i){var t=this;if(y(this.draftBenefit))return;var a=z(this.draftBenefit.value,i);a=z(a,(function(i){i.isValid=t.benefitForm.checkValidity();i.isDirty=true}));s.updateDraftBenefit(a)};return i}());var R=i("ap_ben_empty_benefits",function(){function i(i){t(this,i);this.newBenefitButtonClicked=n(this,"newBenefitButtonClicked",7)}i.prototype.render=function(){var i=this;return a(e,{class:"d-flex flex-column justify-content-center benefits-zero-state p-4 border-top"},a("div",{class:"text-center my-5"},a("ap-ben-icon",{class:"text-success fa-4x",iconPrefix:"fad",iconId:"handshake-alt"}),a("ap-ben-icon",{class:"text-success fa-4x px-3",iconPrefix:"fad",iconId:"heartbeat"}),a("ap-ben-icon",{class:"text-success fa-4x",iconPrefix:"fad",iconId:"car"})),a("div",{class:"text-center mb-3"},a("h5",null,"Attract and retain a healthy, productive workforce."),a("p",{class:"uiid-noactive-benefit-item text-muted my-1"},"Begin by building out your employee benefits offering.")),a("fl-button",{class:"mb-5 align-self-center",onClick:function(t){var a;(a=i.newBenefitButtonClicked)===null||a===void 0?void 0:a.emit()}},a("ap-ben-icon",{class:"mr-2",iconPrefix:"far",iconId:"plus"}),"New benefit"))};return i}());var F=".file-icon-red-dark{color:#db424d}.file-icon-blue{color:#2985d2}.file-icon-green{color:#12aa7c}.file-icon-purple{color:purple}";var A=i("ap_ben_file_icon",function(){function i(i){var a=this;t(this,i);this.defaultIconStyle="text-muted";this.fileTypeToIconStyleMapping=[{fileType:"pdf",iconStyle:"file-icon-red-dark"},{fileType:"word",iconStyle:"file-icon-blue"},{fileType:"powerpoint",iconStyle:"file-icon-purple"}];this.fileTypeToFontawesomeMapping=[{fileType:"pdf",iconName:"file-pdf"},{fileType:"word",iconName:"file-word"},{fileType:"powerpoint",iconName:"file-powerpoint"}];this.getFontawesomeStyleFromFileType=function(i){var t=a.fileTypeToFontawesomeMapping.find((function(t){return t.fileType===i}));return t?t.iconName:"file-alt"}}i.prototype.render=function(){var i=this.isEmpty?"fal":"fas";var t=this.isEmpty?this.defaultIconStyle:this.getIconStyleFromFileType(this.fileType);return a("ap-ben-icon",{iconPrefix:i,iconId:this.getFontawesomeStyleFromFileType(this.fileType),class:t})};i.prototype.getIconStyleFromFileType=function(i){var t=this.fileTypeToIconStyleMapping.find((function(t){return t.fileType===i}));if(t){return t.iconStyle}else{return this.defaultIconStyle}};return i}());A.style=F;var W=i("ap_ben_manage_benefits_header_row",function(){function i(i){t(this,i)}i.prototype.render=function(){return a(e,null,a("div",{class:"row border-top bg-light font-weight-bold p-3 no-gutters"},a("small",{class:"text-muted col-5 col-lg-6"},a("strong",null,"Title")),a("small",{class:"text-muted col-2 d-none d-md-block"},"Category"),a("small",{class:"text-muted col-2 d-none d-md-block"},"Last modified"),a("small",{class:"text-muted col-3 col-lg-2 d-none d-md-block"},"Status")))};return i}());var L="ap-ben-managed-benefit-item>div:first-child:hover{cursor:pointer;background-color:rgba(173, 173, 173, 0.05)}ap-ben-managed-benefit-item .flb-opacity-onhover{opacity:0.75}ap-ben-managed-benefit-item .flb-opacity-onhover:hover{opacity:1}";var O=i("ap_ben_managed_benefit_item",function(){function i(i){t(this,i);this.editBenefitButtonClicked=n(this,"editBenefitButtonClicked",7)}i.prototype.render=function(){var i=this;return a("div",{class:"border-top py-3 px-3 row d-flex align-items-center no-gutters",onClick:function(){return i.onBenefitClick()}},a("div",{class:"col-12 col-md-5 col-lg-6"},a("span",{class:{"m-0 text-truncate":true,"text-muted":!this.benefit.visibility.isEnabled}},this.benefit.title)),a("div",{class:"col-12 col-md-2 text-muted text-truncate"},this.benefit.category),a("div",{class:"col-12 col-md-2 text-muted text-truncate"},this.formatDate(this.benefit.lastModifiedDate)),a("div",{class:"col-12 col-md-3 col-lg-2 mt-4 mt-md-0 text-right"},this.benefit.visibility.isEnabled?a("fl-promise-button",{class:"uiid-deactivate-benefit-item",isBlockElement:true,variant:"secondary",onClick:function(i){i.stopPropagation()},promiseFn:function(){return i.onSetInactive()}},a("h6",{class:"my-0"},"Deactivate")):a("fl-promise-button",{class:"uiid-activate-benefit-item",isBlockElement:true,variant:"secondary",onClick:function(i){i.stopPropagation()},promiseFn:function(){return i.onSetActive()}},a("h6",{class:"my-0"},"Activate"))))};i.prototype.onBenefitClick=function(){this.editBenefitButtonClicked.emit(this.benefit)};i.prototype.onSetActive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,m.enableBenefitAsync(this.benefit.id)];case 1:i.sent();return[2]}}))}))};i.prototype.onSetInactive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,m.disableBenefitAsync(this.benefit.id)];case 1:i.sent();return[2]}}))}))};i.prototype.formatDate=function(i){return T.pipe(i,w((function(i){return new Date(i).toLocaleDateString("en-AU",{day:"numeric",month:"short",year:"numeric"})})),k((function(){return""})))};return i}());O.style=L;var V=i("ap_ben_role_management_page",function(){function i(i){t(this,i);this.showRemoveConfirmDialog=false;this.storeSubscription=new v}i.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i=this;return __generator(this,(function(t){switch(t.label){case 0:I.reset();this.storeSubscription.add(S.signedInUser$.subscribe((function(t){i.user=_(t)})));return[4,E.getEditorProfiles()];case 1:t.sent();this.storeSubscription.add(U.showRemoveEditorDialog$.subscribe((function(t){return i.showRemoveConfirmDialog=t})));return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.storeSubscription.unsubscribe()};i.prototype.render=function(){return a(e,{class:"w-100"},a("ap-ben-ui-container",{class:"w-100 d-none py-5"},a("div",{class:"d-flex align-items-start flex-column"},a("h3",null,"Access Management"),a("div",{class:"mt-3"},a("h4",null,"Permissions")),a("div",null,"Manage which staff has permission to edit and manage benefits.")),a("div",{class:"mt-4"},a("ap-ben-role-owner-section",{owner:this.user})),a("div",{class:"mt-4"},a("ap-ben-role-editors-section",null))),this.renderRemoveConfirmDialog())};i.prototype.renderRemoveConfirmDialog=function(){return a("ap-ben-modal-section",{show:this.showRemoveConfirmDialog,showHeader:true,modalTitle:"Remove editor",onModalClosed:function(i){return I.showRemoveEditorDialog(false)}},a("ap-ben-confirm-dialog",{acceptText:"Remove",declineText:"Cancel",dialogStyle:"danger",onAccepted:function(i){return E.removeSelectedEditor()},onDeclined:function(i){return I.showRemoveEditorDialog(false)}},a("p",null,a("b",null,"Are you sure you want to remove this person?")),a("p",null,"If you proceed, this person will not be able to edit or manage benefits anymore.")))};return i}());var N="ap-ben-upload-benefit-icon .flb-icon-container{height:4rem;width:4rem;color:#1865bf;background:#c0e1fd;border:1px dashed #2985d2}ap-ben-upload-benefit-icon .flb-icon-container.error-state{color:#db424d;background:#f8d3d6;border:1px dashed #e2505c}ap-ben-upload-benefit-icon .flb-icon-container .flb-icon{max-width:100%;max-height:100%}ap-ben-upload-benefit-icon .flb-icon-container .btn-icon-delete{position:absolute;opacity:0.7;display:none}ap-ben-upload-benefit-icon .flb-icon-container:hover .btn-icon-delete{display:-ms-flexbox;display:flex}";var $;(function(i){i[i["Empty"]=0]="Empty";i[i["UploadPending"]=1]="UploadPending";i[i["Uploaded"]=2]="Uploaded";i[i["Error"]=3]="Error"})($||($={}));var H=i("ap_ben_upload_benefit_icon",function(){function i(i){t(this,i);this.customIcon=x;this.uploadIconState=$.Empty;this.storeSubscription=new v;this.allowedMimetypes=["image/png","image/jpeg","image/gif"]}i.prototype.componentWillLoad=function(){var i=this;this.storeSubscription.add(r.draftBenefitIcon$.subscribe((function(t){i.customIcon=t;i.uploadIconState=j(t)?$.Uploaded:$.Empty})))};i.prototype.disconnectedCallback=function(){this.storeSubscription.unsubscribe()};i.prototype.render=function(){switch(this.uploadIconState){case $.Empty:case $.Error:return this.renderEmptyOrErrorState();case $.UploadPending:return this.renderUploadPending();case $.Uploaded:return this.renderIconUploaded()}};i.prototype.mapState=function(){var i=this;return r.draftBenefitIcon$.subscribe((function(t){i.customIcon=t}))};i.prototype.renderEmptyOrErrorState=function(){var i=this;return a("div",{class:"d-flex align-items-center"},a("button",{type:"button",class:"flb-icon-container flb-btn-file rounded mr-4 "+(this.uploadIconState===$.Error?"error-state":"")},this.uploadIconState===$.Empty&&a("ap-ben-icon",{iconPrefix:"fal",iconId:"upload"}),this.uploadIconState===$.Error&&a("ap-ben-icon",{iconPrefix:"fal",iconId:"exclamation-triangle"}),a("input",{class:"uiid-benefit-image",type:"file",accept:this.allowedMimetypes.join(", "),onChange:function(t){return i.onIconUpload(t)}})),a("div",null,a("h6",{class:"m-0"},"Upload image"),this.uploadIconState===$.Empty&&a("small",{class:"text-muted"},"Max file size 1 MB"),this.uploadIconState===$.Error&&a("small",{class:"text-danger"},"Invalid file format or 1 MB size limit exceeded. Try again.")))};i.prototype.renderUploadPending=function(){return a("div",{class:"flb-icon-container rounded p-3 d-flex justify-content-center align-items-center"},a("ap-ben-icon",{iconPrefix:"fal",iconId:"spinner-third",spin:true,class:"fa-2x"}))};i.prototype.renderIconUploaded=function(){var i=this;return a("div",{class:"flb-icon-container bg-white position-relative d-flex justify-content-center align-items-center border rounded"},a("img",{src:_(this.customIcon).downloadUrl,class:"flb-icon"}),a("button",{class:"btn btn-dark btn-icon-delete flex-column justify-content-center align-items-center h-100",type:"button",onClick:function(t){return i.clearIcon()}},a("i",{class:"fal fa-trash"}),a("small",null,"Delete")))};i.prototype.onIconUpload=function(i){return __awaiter(this,void 0,void 0,(function(){var t,a,n;return __generator(this,(function(e){switch(e.label){case 0:i.preventDefault();t=i.target.files;if(!t){return[2]}a=t.item(0);if(!a){return[2]}this.uploadIconState=$.UploadPending;e.label=1;case 1:e.trys.push([1,3,,4]);return[4,s.uploadIconAsync(a)];case 2:e.sent();this.uploadIconState=$.Uploaded;return[3,4];case 3:n=e.sent();this.uploadIconState=$.Error;return[3,4];case 4:return[2]}}))}))};i.prototype.clearIcon=function(){s.clearIcon()};return i}());H.style=N;function Z(){this._types=Object.create(null);this._extensions=Object.create(null);for(var i=0;i<arguments.length;i++){this.define(arguments[i])}this.define=this.define.bind(this);this.getType=this.getType.bind(this);this.getExtension=this.getExtension.bind(this)}Z.prototype.define=function(i,t){for(var a in i){var n=i[a].map((function(i){return i.toLowerCase()}));a=a.toLowerCase();for(var e=0;e<n.length;e++){var o=n[e];if(o[0]==="*"){continue}if(!t&&o in this._types){throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+a+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+a+'".')}this._types[o]=a}if(t||!this._extensions[a]){var o=n[0];this._extensions[a]=o[0]!=="*"?o:o.substr(1)}}};Z.prototype.getType=function(i){i=String(i);var t=i.replace(/^.*[/\\]/,"").toLowerCase();var a=t.replace(/^.*\./,"").toLowerCase();var n=t.length<i.length;var e=a.length<t.length-1;return(e||!n)&&this._types[a]||null};Z.prototype.getExtension=function(i){i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1;return i&&this._extensions[i.toLowerCase()]||null};var G=Z;var J={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};var K={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};var Q=new G(J,K);var X=".flb-btn-file{position:relative;overflow:hidden !important}.flb-btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;cursor:inherit;display:block}";var Y;(function(i){i[i["Empty"]=0]="Empty";i[i["UploadPending"]=1]="UploadPending";i[i["Attached"]=2]="Attached"})(Y||(Y={}));var ii=i("ap_ben_upload_file",function(){function i(i){t(this,i);this.uploadedFile=p.none;this.uploadFileState=Y.Empty;this.isUploadError=false;this.stateSubscription=new v;this.allowedMimetypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"]}i.prototype.componentWillLoad=function(){var i=this;this.stateSubscription.add(r.draftBenefitAttachment$.subscribe((function(t){i.uploadedFile=t;i.uploadFileState=p.isSome(t)?Y.Attached:Y.Empty})))};i.prototype.disconnectedCallback=function(){this.stateSubscription.unsubscribe()};i.prototype.render=function(){return a(e,null,a("div",{class:"row border rounded bg-light no-gutters"},a("div",{class:"col-12 d-flex"},this.renderUploadState())),this.isUploadError&&a("div",null,a("small",{class:"text-danger"},"File format is invalid, or the file is larger than 10 MB. Try again.")))};i.prototype.renderUploadState=function(){switch(this.uploadFileState){case Y.Empty:return this.renderEmptyOrErrorState();case Y.UploadPending:return this.renderUploadPending();case Y.Attached:return this.renderAttachedDocument()}};i.prototype.renderEmptyOrErrorState=function(){var i=this;return a("button",{type:"button",class:"uiid-new-benefit-document btn btn-light flb-btn-file p-0 flex-fill d-flex align-items-center"},a("span",{class:"m-4"},a("ap-ben-file-icon",{fileType:"pdf",isEmpty:true})),a("div",{class:"d-flex flex-column align-items-start text-left"},a("span",null,"Add document"),a("small",{class:"text-muted text-wrap"},"Word, Powerpoint and PDF (Max file size 10MB)")),a("input",{class:"uiid-benefit-document",type:"file",accept:this.allowedMimetypes.join(", "),onChange:function(t){return i.onDocumentUpload(t)}}))};i.prototype.renderUploadPending=function(){return a("div",{class:"rounded bg-light d-flex justify-content-center align-items-center"},a("span",{class:"m-4"},a("ap-ben-icon",{iconPrefix:"fal",iconId:"spinner-third",spin:true})),a("div",{class:"d-flex flex-column align-items-start"},a("span",null,"Document"),a("small",{class:"text-muted"},"Please wait while your document is uploading")))};i.prototype.renderAttachedDocument=function(){var i=this;return a("div",{class:"rounded bg-light d-flex align-items-center flex-fill"},a("span",{class:"m-4"},a("ap-ben-file-icon",{fileType:_(this.uploadedFile).documentFormat})),a("div",{class:"d-flex flex-column align-items-start"},a("span",null,"Document"),a("small",{class:"text-muted"},_(this.uploadedFile).title)),a("button",{class:"btn ml-auto px-3",type:"button",onClick:function(t){return i.onClearDocument()}},a("ap-ben-icon",{iconPrefix:"fal",iconId:"trash"})))};i.prototype.onDocumentUpload=function(i){return __awaiter(this,void 0,void 0,(function(){var t,a;return __generator(this,(function(n){switch(n.label){case 0:i.preventDefault();this.isUploadError=false;t=i.target.files;if(!t){return[2]}a=t.item(0);if(!a){return[2]}if(!this.isFileValid(a)){this.isUploadError=true;return[2]}this.uploadFileState=Y.UploadPending;return[4,s.uploadAttachmentAsync(a)];case 1:n.sent();return[2]}}))}))};i.prototype.isFileValid=function(i){return this.allowedMimetypes.some((function(t){return t===Q.getType(i.name)}))&&i.size<=10485760};i.prototype.onClearDocument=function(){s.clearAttachment()};return i}());ii.style=X;var ti="stencil-route.inactive{display:none}";var ai=i("stencil_route",function(){function i(i){t(this,i);this.group=null;this.match=null;this.componentProps={};this.exact=false;this.scrollOnNextRender=false;this.previousMatch=null}i.prototype.computeMatch=function(i){var t=this.group!=null||this.el.parentElement!=null&&this.el.parentElement.tagName.toLowerCase()==="stencil-route-switch";if(!i||t){return}this.previousMatch=this.match;return this.match=u(i.pathname,{path:this.url,exact:this.exact,strict:true})};i.prototype.loadCompleted=function(){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(t){i={};if(this.history&&this.history.location.hash){i={scrollToId:this.history.location.hash.substr(1)}}else if(this.scrollTopOffset){i={scrollTopOffset:this.scrollTopOffset}}if(typeof this.componentUpdated==="function"){this.componentUpdated(i)}else if(this.match&&!f(this.match,this.previousMatch)&&this.routeViewsUpdated){this.routeViewsUpdated(i)}return[2]}))}))};i.prototype.componentDidUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,this.loadCompleted()];case 1:i.sent();return[2]}}))}))};i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,this.loadCompleted()];case 1:i.sent();return[2]}}))}))};i.prototype.render=function(){if(!this.match||!this.history){return null}var i=Object.assign({},this.componentProps,{history:this.history,match:this.match});if(this.routeRender){return this.routeRender(Object.assign({},i,{component:this.component}))}if(this.component){var t=this.component;return a(t,Object.assign({},i))}};Object.defineProperty(i.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(i,"watchers",{get:function(){return{location:["computeMatch"]}},enumerable:false,configurable:true});return i}());q.injectProps(ai,["location","history","historyType","routeViewsUpdated"]);ai.style=ti}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as t,a as e,Q as n}from"./p-066d8e7b.js";import{_ as a,O as s}from"./p-556fdb43.js";import{n as r,e as i,t as c,a as o,g as l,s as f,b as u,i as d,c as p,m as h}from"./p-2c9dd7c4.js";import{f as y,B as m}from"./p-df0a267a.js";import{w as b}from"./p-5347b880.js";import{b as g}from"./p-5c2cc99d.js";import{a as w,b as B}from"./p-7ad92407.js";const v=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),A=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),x=t=>t.replace(/([=!:$/()])/g,"\\$1"),D=t=>t&&t.sensitive?"":"i",E=(t,e,n)=>{for(var a=(n=n||{}).strict,s=!1!==n.end,r=A(n.delimiter||"/"),i=n.delimiters||"./",c=[].concat(n.endsWith||[]).map(A).concat("$").join("|"),o="",l=!1,f=0;f<t.length;f++){var u=t[f];if("string"==typeof u)o+=A(u),l=f===t.length-1&&i.indexOf(u[u.length-1])>-1;else{var d=A(u.prefix||""),p=u.repeat?"(?:"+u.pattern+")(?:"+d+"(?:"+u.pattern+"))*":u.pattern;e&&e.push(u),o+=u.optional?u.partial?d+"("+p+")?":"(?:"+d+"("+p+"))?":d+"("+p+")"}}return s?(a||(o+="(?:"+r+")?"),o+="$"===c?"$":"(?="+c+")"):(a||(o+="(?:"+r+"(?="+c+"))?"),l||(o+="(?="+r+"|"+c+")")),new RegExp("^"+o,D(n))},j=(t,e,n)=>t instanceof RegExp?((t,e)=>{if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var a=0;a<n.length;a++)e.push({name:a,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,e):Array.isArray(t)?((t,e,n)=>{for(var a=[],s=0;s<t.length;s++)a.push(j(t[s],e,n).source);return new RegExp("(?:"+a.join("|")+")",D(n))})(t,e,n):((t,e,n)=>E(((t,e)=>{for(var n,a=[],s=0,r=0,i="",c=e&&e.delimiter||"/",o=e&&e.delimiters||"./",l=!1;null!==(n=v.exec(t));){var f=n[0],u=n[1],d=n.index;if(i+=t.slice(r,d),r=d+f.length,u)i+=u[1],l=!0;else{var p="",h=t[r],y=n[2],m=n[3],b=n[4],g=n[5];if(!l&&i.length){var w=i.length-1;o.indexOf(i[w])>-1&&(p=i[w],i=i.slice(0,w))}i&&(a.push(i),i="",l=!1);var B=p||c,D=m||b;a.push({name:y||s++,prefix:p,delimiter:B,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==p&&void 0!==h&&h!==p,pattern:D?x(D):"[^"+A(B)+"]+?"})}}return(i||r<t.length)&&a.push(i+t.substr(r)),a})(t,n),e,n))(t,e,n),$=(t,e)=>new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t),R=(t,e)=>$(t,e)?t.substr(e.length):t,S=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,k=t=>"/"===t.charAt(0)?t:"/"+t,F=t=>"/"===t.charAt(0)?t.substr(1):t,O=t=>{const{pathname:e,search:n,hash:a}=t;let s=e||"/";return n&&"?"!==n&&(s+="?"===n.charAt(0)?n:`?${n}`),a&&"#"!==a&&(s+="#"===a.charAt(0)?a:`#${a}`),s},I=t=>"/"===t.charAt(0),U=t=>Math.random().toString(36).substr(2,t),C=(t,e)=>{for(let n=e,a=n+1,s=t.length;a<s;n+=1,a+=1)t[n]=t[a];t.pop()},P=(t,e)=>{if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>P(t,e[n])));const n=typeof t;if(n!==typeof e)return!1;if("object"===n){const n=t.valueOf(),a=e.valueOf();if(n!==t||a!==e)return P(n,a);const s=Object.keys(t),r=Object.keys(e);return s.length===r.length&&s.every((n=>P(t[n],e[n])))}return!1},H=(t,e)=>t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&P(t.state,e.state),T=(t,e,n,a)=>{let s;"string"==typeof t?(s=(t=>{let e=t||"/",n="",a="";const s=e.indexOf("#");-1!==s&&(a=e.substr(s),e=e.substr(0,s));const r=e.indexOf("?");return-1!==r&&(n=e.substr(r),e=e.substr(0,r)),{pathname:e,search:"?"===n?"":n,hash:"#"===a?"":a,query:{},key:""}})(t),void 0!==e&&(s.state=e)):(s=Object.assign({pathname:""},t),s.search&&"?"!==s.search.charAt(0)&&(s.search="?"+s.search),s.hash&&"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash),void 0!==e&&void 0===s.state&&(s.state=e));try{s.pathname=decodeURI(s.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var r;return s.key=n,a?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=((t,e="")=>{let n,a=e&&e.split("/")||[],s=0;const r=t&&t.split("/")||[],i=t&&I(t),c=e&&I(e),o=i||c;if(t&&I(t)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){const t=a[a.length-1];n="."===t||".."===t||""===t}else n=!1;for(let t=a.length;t>=0;t--){const e=a[t];"."===e?C(a,t):".."===e?(C(a,t),s++):s&&(C(a,t),s--)}if(!o)for(;s--;s)a.unshift("..");!o||""===a[0]||a[0]&&I(a[0])||a.unshift("");let l=a.join("/");return n&&"/"!==l.substr(-1)&&(l+="/"),l})(s.pathname,a.pathname)):s.pathname=a.pathname:s.pathname||(s.pathname="/"),s.query=(r=s.search||"")?(/^[?#]/.test(r)?r.slice(1):r).split("&").reduce(((t,e)=>{let[n,a]=e.split("=");return t[n]=a?decodeURIComponent(a.replace(/\+/g," ")):"",t}),{}):{},s};let L=0;const V={},M=(t,e={})=>{"string"==typeof e&&(e={path:e});const{path:n="/",exact:a=!1,strict:s=!1}=e,{re:r,keys:i}=((t,e)=>{const n=`${e.end}${e.strict}`,a=V[n]||(V[n]={}),s=JSON.stringify(t);if(a[s])return a[s];const r=[],i={re:j(t,r,e),keys:r};return L<1e4&&(a[s]=i,L+=1),i})(n,{end:a,strict:s}),c=r.exec(t);if(!c)return null;const[o,...l]=c,f=t===o;return a&&!f?null:{path:n,url:"/"===n&&""===o?"/":o,isExact:f,params:i.reduce(((t,e,n)=>(t[e.name]=l[n],t)),{})}},N=(t,e)=>null==t&&null==e||null!=e&&t&&e&&t.path===e.path&&t.url===e.url&&P(t.params,e.params);const q=["Appliances & Electronics","Automotive","Banking","Clothing & Footwear","Clubs","Entertainment","Food, Drink & Groceries","Fuel","Health, Beauty & Fitness","Homeware & Hardware","Learning","Pets","Shopping & Retail","Social","Sports & Leisure","Technology","Travel & Accommodation","Wellbeing & Health Services","Other","None"];let G=class extends e{constructor(){super({manageBenefitsPageState:{enabledBenefits:[],disabledBenefits:[]},selectedBenefit:r,draftBenefit:r})}};G=function(t,e,n,a){var s,r=arguments.length,i=r<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,a);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i}([t({name:"manage-benefits",resettable:!0,producerFn:y})],G);const J=new G,Q=new class extends n{constructor(t){super(t),this.store=t,this.managedBenefits$=this.select((t=>t.manageBenefitsPageState)),this.selectedBenefit$=this.select((t=>t.selectedBenefit)),this.draftBenefit$=this.select((t=>t.draftBenefit)),this.draftBenefitUrl$=this.select((t=>a.pipe(t.draftBenefit,i((t=>t.url))))),this.draftBenefitIcon$=this.select((t=>a.pipe(t.draftBenefit,i((t=>t.icon))))),this.draftBenefitAttachment$=this.select((t=>a.pipe(t.draftBenefit,i((t=>t.attachment))))),this.isLoading$=this.selectLoading()}}(J);class W{static fromDraftBenefit(t){return{title:w(t.title),subtitle:w(t.subtitle),category:w(t.category),description:c(t.description),url:c(t.url),attachments:o((()=>[]),(t=>[t]))(t.attachment),icon:c(t.icon),backdrop:null}}}const _=new class{async getPageStateAsync(){return m.instance.url("benefits/ui/manage-page").get().json()}async loadBenefitForEditingAsync(t){return m.instance.url(`benefits/edit/${t}`).get().json()}async postCommandAsync(t,e){const n={command:e};return m.instance.url(`benefits/edit/${l((()=>""))(t)}`).post(n).badRequest((()=>{throw new Error("Failed to execute benefit command")})).text()}};class z{static toCustomBenefitsListEntry(t){return{id:t.benefitId,title:t.benefit.title,category:t.benefit.category,lastModifiedDate:f(t.metadata.updatedAt),visibility:t.visibility}}static toBenefit(t){const e=null!==t.benefit.attachments&&t.benefit.attachments.length>0?f(t.benefit.attachments[0]):r;return{id:B(t.benefitId),title:B(t.benefit.title),subtitle:B(t.benefit.subtitle),category:B(t.benefit.category),description:u(t.benefit.description),url:u(t.benefit.url),attachment:e,icon:u(t.benefit.icon)}}}const K=new class extends n{constructor(t){super(t),this.store=t,this.manageBenefitsPageState$=this.select((t=>t.manageBenefitsPageState)),this.isLoading$=this.selectLoading()}}(J),X=new class{async loadExistingBenefitForEditingAsync(t){J.update((t=>{t.selectedBenefit=r})),J.setLoading(!0);const e=z.toBenefit(await _.loadBenefitForEditingAsync(t));J.update((t=>{t.selectedBenefit=f(e),t.draftBenefit=f(this.existingBenefitToDraft(e))})),J.setLoading(!1)}createDraftBenefit(){const t={title:r,category:r,subtitle:r,description:r,url:r,attachment:r,icon:r,isValid:!1,isDirty:!1};J.update((e=>{e.selectedBenefit=r,e.draftBenefit=f(t)}))}clearDraftBenefit(){J.update((t=>{t.draftBenefit=r}))}updateDraftBenefit(t){J.update((e=>{e.draftBenefit=f(t)}))}async publishDraftBenefitAsync(){const t=K.getValue().draftBenefit;if(d(t))return;this.assertDraftIsValid(t.value),J.setLoading(!0);const e=K.getValue().selectedBenefit;if(p(e)){const n={updateAccountBenefit:W.fromDraftBenefit(t.value)};await _.postCommandAsync(e.value.id,n)}else{const e={createAccountBenefit:W.fromDraftBenefit(t.value)};await _.postCommandAsync(r,e)}J.setLoading(!1)}async deleteSelectedBenefitAsync(){const t=K.getValue().selectedBenefit;p(t)&&(J.setLoading(!0),await _.postCommandAsync(t.value.id,"deleteAccountBenefit"),J.setLoading(!1))}updateDraftUrl(t){this.updateDraft((e=>{e.url=u(t),e.isDirty=!0}))}clearDraftUrl(){this.updateDraft((t=>{t.url=r,t.isDirty=!0}))}async uploadAttachmentAsync(t){J.setLoading(!0);try{const e=await b(g.postDocumentAsync({file:t}),500);this.updateDraft((t=>{t.attachment=f(e),t.isDirty=!0}))}finally{J.setLoading(!1)}}clearAttachment(){this.updateDraft((t=>{t.attachment=r,t.isDirty=!0}))}async uploadIconAsync(t){J.setLoading(!0);try{const e=await b(g.postIconAsync({file:t}),500);this.updateDraft((t=>{t.icon=f(e),t.isDirty=!0}))}finally{J.setLoading(!1)}}clearIcon(){this.updateDraft((t=>{t.icon=r,t.isDirty=!0}))}assertDraftIsValid(t){if(!p(t.title)||!p(t.category))throw Error("Draft benefit is not valid")}updateDraft(t){J.update((e=>{e.draftBenefit=a.pipe(e.draftBenefit,h(y(t)))}))}existingBenefitToDraft(t){return{title:t.title,category:t.category,subtitle:t.subtitle,description:t.description,url:t.url,attachment:t.attachment,icon:t.icon,isValid:!0,isDirty:!1}}},Y=new class{async loadPageStateAsync(){J.setLoading(!0);const t=await _.getPageStateAsync();J.update((e=>{e.manageBenefitsPageState=class{static toDomain(t){return{enabledBenefits:t.activeAccountBenefits.map(z.toCustomBenefitsListEntry),disabledBenefits:t.inactiveAccountBenefits.map(z.toCustomBenefitsListEntry)}}}.toDomain(t)})),J.setLoading(!1)}async enableBenefitAsync(t){await _.postCommandAsync(s.some(t),"enableAccountBenefit"),J.update((e=>{const n=e.manageBenefitsPageState.disabledBenefits.findIndex((e=>e.id===t));if(-1===n)return;const a=e.manageBenefitsPageState.disabledBenefits.splice(n,1)[0];a.visibility.isEnabled=!0,e.manageBenefitsPageState.enabledBenefits.push(a)}))}async disableBenefitAsync(t){await _.postCommandAsync(s.some(t),"disableAccountBenefit"),J.update((e=>{const n=e.manageBenefitsPageState.enabledBenefits.findIndex((e=>e.id===t));if(-1===n)return;const a=e.manageBenefitsPageState.enabledBenefits.splice(n,1)[0];a.visibility.isEnabled=!1,e.manageBenefitsPageState.disabledBenefits.push(a)}))}};export{q as B,X as a,K as b,M as c,k as d,Q as e,T as f,U as g,$ as h,R as i,O as j,F as k,H as l,Y as m,N as n,S as s}
|
|
1
|
+
import{S as t,a as e,Q as n}from"./p-f3effa5d.js";import{_ as s,O as a}from"./p-556fdb43.js";import{n as r,e as i,t as c,a as o,g as l,s as f,b as u,i as d,c as p,m as h}from"./p-2c9dd7c4.js";import{f as y,B as m}from"./p-7062880e.js";import{w as b}from"./p-5347b880.js";import{b as g}from"./p-bf086b51.js";import{a as w,b as B}from"./p-7ad92407.js";const v=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),A=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),x=t=>t.replace(/([=!:$/()])/g,"\\$1"),D=t=>t&&t.sensitive?"":"i",E=(t,e,n)=>{for(var s=(n=n||{}).strict,a=!1!==n.end,r=A(n.delimiter||"/"),i=n.delimiters||"./",c=[].concat(n.endsWith||[]).map(A).concat("$").join("|"),o="",l=!1,f=0;f<t.length;f++){var u=t[f];if("string"==typeof u)o+=A(u),l=f===t.length-1&&i.indexOf(u[u.length-1])>-1;else{var d=A(u.prefix||""),p=u.repeat?"(?:"+u.pattern+")(?:"+d+"(?:"+u.pattern+"))*":u.pattern;e&&e.push(u),o+=u.optional?u.partial?d+"("+p+")?":"(?:"+d+"("+p+"))?":d+"("+p+")"}}return a?(s||(o+="(?:"+r+")?"),o+="$"===c?"$":"(?="+c+")"):(s||(o+="(?:"+r+"(?="+c+"))?"),l||(o+="(?="+r+"|"+c+")")),new RegExp("^"+o,D(n))},j=(t,e,n)=>t instanceof RegExp?((t,e)=>{if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var s=0;s<n.length;s++)e.push({name:s,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,e):Array.isArray(t)?((t,e,n)=>{for(var s=[],a=0;a<t.length;a++)s.push(j(t[a],e,n).source);return new RegExp("(?:"+s.join("|")+")",D(n))})(t,e,n):((t,e,n)=>E(((t,e)=>{for(var n,s=[],a=0,r=0,i="",c=e&&e.delimiter||"/",o=e&&e.delimiters||"./",l=!1;null!==(n=v.exec(t));){var f=n[0],u=n[1],d=n.index;if(i+=t.slice(r,d),r=d+f.length,u)i+=u[1],l=!0;else{var p="",h=t[r],y=n[2],m=n[3],b=n[4],g=n[5];if(!l&&i.length){var w=i.length-1;o.indexOf(i[w])>-1&&(p=i[w],i=i.slice(0,w))}i&&(s.push(i),i="",l=!1);var B=p||c,D=m||b;s.push({name:y||a++,prefix:p,delimiter:B,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==p&&void 0!==h&&h!==p,pattern:D?x(D):"[^"+A(B)+"]+?"})}}return(i||r<t.length)&&s.push(i+t.substr(r)),s})(t,n),e,n))(t,e,n),$=(t,e)=>new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t),R=(t,e)=>$(t,e)?t.substr(e.length):t,S=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,k=t=>"/"===t.charAt(0)?t:"/"+t,F=t=>"/"===t.charAt(0)?t.substr(1):t,O=t=>{const{pathname:e,search:n,hash:s}=t;let a=e||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:`?${n}`),s&&"#"!==s&&(a+="#"===s.charAt(0)?s:`#${s}`),a},I=t=>"/"===t.charAt(0),U=t=>Math.random().toString(36).substr(2,t),C=(t,e)=>{for(let n=e,s=n+1,a=t.length;s<a;n+=1,s+=1)t[n]=t[s];t.pop()},P=(t,e)=>{if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>P(t,e[n])));const n=typeof t;if(n!==typeof e)return!1;if("object"===n){const n=t.valueOf(),s=e.valueOf();if(n!==t||s!==e)return P(n,s);const a=Object.keys(t),r=Object.keys(e);return a.length===r.length&&a.every((n=>P(t[n],e[n])))}return!1},H=(t,e)=>t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&P(t.state,e.state),T=(t,e,n,s)=>{let a;"string"==typeof t?(a=(t=>{let e=t||"/",n="",s="";const a=e.indexOf("#");-1!==a&&(s=e.substr(a),e=e.substr(0,a));const r=e.indexOf("?");return-1!==r&&(n=e.substr(r),e=e.substr(0,r)),{pathname:e,search:"?"===n?"":n,hash:"#"===s?"":s,query:{},key:""}})(t),void 0!==e&&(a.state=e)):(a=Object.assign({pathname:""},t),a.search&&"?"!==a.search.charAt(0)&&(a.search="?"+a.search),a.hash&&"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash),void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var r;return a.key=n,s?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=((t,e="")=>{let n,s=e&&e.split("/")||[],a=0;const r=t&&t.split("/")||[],i=t&&I(t),c=e&&I(e),o=i||c;if(t&&I(t)?s=r:r.length&&(s.pop(),s=s.concat(r)),!s.length)return"/";if(s.length){const t=s[s.length-1];n="."===t||".."===t||""===t}else n=!1;for(let t=s.length;t>=0;t--){const e=s[t];"."===e?C(s,t):".."===e?(C(s,t),a++):a&&(C(s,t),a--)}if(!o)for(;a--;a)s.unshift("..");!o||""===s[0]||s[0]&&I(s[0])||s.unshift("");let l=s.join("/");return n&&"/"!==l.substr(-1)&&(l+="/"),l})(a.pathname,s.pathname)):a.pathname=s.pathname:a.pathname||(a.pathname="/"),a.query=(r=a.search||"")?(/^[?#]/.test(r)?r.slice(1):r).split("&").reduce(((t,e)=>{let[n,s]=e.split("=");return t[n]=s?decodeURIComponent(s.replace(/\+/g," ")):"",t}),{}):{},a};let L=0;const V={},M=(t,e={})=>{"string"==typeof e&&(e={path:e});const{path:n="/",exact:s=!1,strict:a=!1}=e,{re:r,keys:i}=((t,e)=>{const n=`${e.end}${e.strict}`,s=V[n]||(V[n]={}),a=JSON.stringify(t);if(s[a])return s[a];const r=[],i={re:j(t,r,e),keys:r};return L<1e4&&(s[a]=i,L+=1),i})(n,{end:s,strict:a}),c=r.exec(t);if(!c)return null;const[o,...l]=c,f=t===o;return s&&!f?null:{path:n,url:"/"===n&&""===o?"/":o,isExact:f,params:i.reduce(((t,e,n)=>(t[e.name]=l[n],t)),{})}},N=(t,e)=>null==t&&null==e||null!=e&&t&&e&&t.path===e.path&&t.url===e.url&&P(t.params,e.params);const q=["Appliances & Electronics","Automotive","Banking","Clothing & Footwear","Clubs","Entertainment","Food, Drink & Groceries","Fuel","Health, Beauty & Fitness","Homeware & Hardware","Learning","Pets","Shopping & Retail","Social","Sports & Leisure","Technology","Travel & Accommodation","Wellbeing & Health Services","Other","None"];let G=class extends e{constructor(){super({manageBenefitsPageState:{enabledBenefits:[],disabledBenefits:[]},selectedBenefit:r,draftBenefit:r})}};G=function(t,e,n,s){var a,r=arguments.length,i=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,s);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(r<3?a(i):r>3?a(e,n,i):a(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i}([t({name:"manage-benefits",resettable:!0,producerFn:y})],G);const J=new G,Q=new class extends n{constructor(t){super(t),this.store=t,this.managedBenefits$=this.select((t=>t.manageBenefitsPageState)),this.selectedBenefit$=this.select((t=>t.selectedBenefit)),this.draftBenefit$=this.select((t=>t.draftBenefit)),this.draftBenefitUrl$=this.select((t=>s.pipe(t.draftBenefit,i((t=>t.url))))),this.draftBenefitIcon$=this.select((t=>s.pipe(t.draftBenefit,i((t=>t.icon))))),this.draftBenefitAttachment$=this.select((t=>s.pipe(t.draftBenefit,i((t=>t.attachment))))),this.isLoading$=this.selectLoading()}}(J);class W{static fromDraftBenefit(t){return{title:w(t.title),subtitle:w(t.subtitle),category:w(t.category),description:c(t.description),url:c(t.url),attachments:o((()=>[]),(t=>[t]))(t.attachment),icon:c(t.icon),backdrop:null}}}const _=new class{async getPageStateAsync(){return m.instance.url("benefits/ui/manage-page").get().json()}async loadBenefitForEditingAsync(t){return m.instance.url(`benefits/edit/${t}`).get().json()}async postCommandAsync(t,e){const n={command:e};return m.instance.url(`benefits/edit/${l((()=>""))(t)}`).post(n).badRequest((()=>{throw new Error("Failed to execute benefit command")})).text()}};class z{static toCustomBenefitsListEntry(t){return{id:t.benefitId,title:t.benefit.title,category:t.benefit.category,lastModifiedDate:f(t.metadata.updatedAt),visibility:t.visibility}}static toBenefit(t){const e=null!==t.benefit.attachments&&t.benefit.attachments.length>0?f(t.benefit.attachments[0]):r;return{id:B(t.benefitId),title:B(t.benefit.title),subtitle:B(t.benefit.subtitle),category:B(t.benefit.category),description:u(t.benefit.description),url:u(t.benefit.url),attachment:e,icon:u(t.benefit.icon)}}}const K=new class extends n{constructor(t){super(t),this.store=t,this.manageBenefitsPageState$=this.select((t=>t.manageBenefitsPageState)),this.isLoading$=this.selectLoading()}}(J),X=new class{async loadExistingBenefitForEditingAsync(t){J.update((t=>{t.selectedBenefit=r})),J.setLoading(!0);const e=z.toBenefit(await _.loadBenefitForEditingAsync(t));J.update((t=>{t.selectedBenefit=f(e),t.draftBenefit=f(this.existingBenefitToDraft(e))})),J.setLoading(!1)}createDraftBenefit(){const t={title:r,category:r,subtitle:r,description:r,url:r,attachment:r,icon:r,isValid:!1,isDirty:!1};J.update((e=>{e.selectedBenefit=r,e.draftBenefit=f(t)}))}clearDraftBenefit(){J.update((t=>{t.draftBenefit=r}))}updateDraftBenefit(t){J.update((e=>{e.draftBenefit=f(t)}))}async publishDraftBenefitAsync(){const t=K.getValue().draftBenefit;if(d(t))return;this.assertDraftIsValid(t.value),J.setLoading(!0);const e=K.getValue().selectedBenefit;if(p(e)){const n={updateAccountBenefit:W.fromDraftBenefit(t.value)};await _.postCommandAsync(e.value.id,n)}else{const e={createAccountBenefit:W.fromDraftBenefit(t.value)};await _.postCommandAsync(r,e)}J.setLoading(!1)}async deleteSelectedBenefitAsync(){const t=K.getValue().selectedBenefit;p(t)&&(J.setLoading(!0),await _.postCommandAsync(t.value.id,"deleteAccountBenefit"),J.setLoading(!1))}updateDraftUrl(t){this.updateDraft((e=>{e.url=u(t),e.isDirty=!0}))}clearDraftUrl(){this.updateDraft((t=>{t.url=r,t.isDirty=!0}))}async uploadAttachmentAsync(t){J.setLoading(!0);try{const e=await b(g.postDocumentAsync({file:t}),500);this.updateDraft((t=>{t.attachment=f(e),t.isDirty=!0}))}finally{J.setLoading(!1)}}clearAttachment(){this.updateDraft((t=>{t.attachment=r,t.isDirty=!0}))}async uploadIconAsync(t){J.setLoading(!0);try{const e=await b(g.postIconAsync({file:t}),500);this.updateDraft((t=>{t.icon=f(e),t.isDirty=!0}))}finally{J.setLoading(!1)}}clearIcon(){this.updateDraft((t=>{t.icon=r,t.isDirty=!0}))}assertDraftIsValid(t){if(!p(t.title)||!p(t.category))throw Error("Draft benefit is not valid")}updateDraft(t){J.update((e=>{e.draftBenefit=s.pipe(e.draftBenefit,h(y(t)))}))}existingBenefitToDraft(t){return{title:t.title,category:t.category,subtitle:t.subtitle,description:t.description,url:t.url,attachment:t.attachment,icon:t.icon,isValid:!0,isDirty:!1}}},Y=new class{async loadPageStateAsync(){J.setLoading(!0);const t=await _.getPageStateAsync();J.update((e=>{e.manageBenefitsPageState=class{static toDomain(t){return{enabledBenefits:t.activeAccountBenefits.map(z.toCustomBenefitsListEntry),disabledBenefits:t.inactiveAccountBenefits.map(z.toCustomBenefitsListEntry)}}}.toDomain(t)})),J.setLoading(!1)}async enableBenefitAsync(t){await _.postCommandAsync(a.some(t),"enableAccountBenefit"),J.update((e=>{const n=e.manageBenefitsPageState.disabledBenefits.findIndex((e=>e.id===t));if(-1===n)return;const s=e.manageBenefitsPageState.disabledBenefits.splice(n,1)[0];s.visibility.isEnabled=!0,e.manageBenefitsPageState.enabledBenefits.push(s)}))}async disableBenefitAsync(t){await _.postCommandAsync(a.some(t),"disableAccountBenefit"),J.update((e=>{const n=e.manageBenefitsPageState.enabledBenefits.findIndex((e=>e.id===t));if(-1===n)return;const s=e.manageBenefitsPageState.enabledBenefits.splice(n,1)[0];s.visibility.isEnabled=!1,e.manageBenefitsPageState.disabledBenefits.push(s)}))}};export{q as B,X as a,K as b,M as c,k as d,Q as e,T as f,U as g,$ as h,R as i,O as j,F as k,H as l,Y as m,N as n,S as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-6c8594d0.system.js","./p-835322bf.system.js","./p-
|
|
1
|
+
System.register(["./p-6c8594d0.system.js","./p-835322bf.system.js","./p-63ad215f.system.js","./p-45d6fbc2.system.js","./p-9a8c9350.system.js","./p-0045ce79.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(e){"use strict";var t,n,s,r,o;return{setters:[function(e){t=e.r;n=e.h;s=e.g},function(e){r=e.O},function(e){o=e.b},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var i=e("ap_ben_benefits_list",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.benefits){return undefined}return n("div",{class:"list-group"},this.benefits.map((function(e){return n("ap-ben-benefit-list-item",{class:"list-group-item px-4 py-2",benefitWithId:e})})))};return e}());var c="ap-ben-hero-banner .card.fl-card-background{background-color:#febd55}ap-ben-hero-banner .fl-logo-container{-o-object-fit:contain;object-fit:contain;position:absolute;left:0}";var a=e("ap_ben_hero_banner",function(){function e(e){t(this,e);this.shopifyUrl=r.none}e.prototype.render=function(){return n("div",{class:"card fl-card-background border-0 mb-4 py-0"},n("a",{target:"_blank",rel:"noopener noreferrer",href:r.toUndefined(this.shopifyUrl),class:"text-reset text-decoration-none",onClick:function(e){return o.trackPageViewedAsync({pageId:"discounts"})}},n("div",{class:"card-body p-0"},n("div",{class:"row m-0"},n("div",{class:"col-12 col-lg-6 col-xl-7 px-3"},n("div",{class:"pl-lg-5 pl-2 pt-lg-4 pt-sm-0 pt-xs-0"},n("h1",{class:"font-weight-bold my-4"},"Access exclusive discounts and vouchers."),n("p",{class:"mb-4"},"Choose from leading retailers including Woolworths, JB Hi-Fi, Caltex and Hoyts Cinemas."),n("a",{target:"_blank",rel:"noopener noreferrer",class:"btn btn-light bg-white mb-4 px-3 py-2"},n("h6",{class:"m-0"},"Browse discounts")))),n("div",{class:"col-6 d-none d-lg-block col-xl-4 ml-auto overflow-hidden text-right p-0 rounded"},n("img",{src:s("./assets/Hero_Background.png"),class:"fl-logo-container h-100"}))))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}());a.style=c;var l=e("ap_ben_promoted_benefits",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.benefits){return undefined}return n("div",{class:"list-group list-group-horizontal-md mb-4"},this.benefits.map((function(e){return n("a",{href:"#",class:"list-group-item list-group-item-action p-4"},n("ap-ben-benefit-card",{key:e.benefitId,benefitWithId:e}))})))};return e}())}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,H as n}from"./p-91e1cdd0.js";import{O as i}from"./p-556fdb43.js";import{i as r}from"./p-fdc8ec5f.js";import{O as o,a as s,s as u,A as c,o as a,b as f}from"./p-5e27b626.js";import{Q as h}from"./p-066d8e7b.js";import"./p-2c9dd7c4.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";var l,d=[],p="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(l||(l={}));var v,b=function(t){return Object.freeze(t)},w=function(t,e){this.inlineSize=t,this.blockSize=e,b(this)},m=function(){function t(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,b(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),g=function(t){return t instanceof SVGElement&&"getBBox"in t},x=function(t){if(g(t)){var e=t.getBBox();return!e.width&&!e.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},y=function(t){var e,n;if(t instanceof Element)return!0;var i=null===(n=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(i&&t instanceof i.Element)},E="undefined"!=typeof window?window:{},z=new WeakMap,O=/auto|scroll/,R=/^tb|vertical/,j=/msie|trident/i.test(E.navigator&&E.navigator.userAgent),k=function(t){return parseFloat(t||"0")},M=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new w((n?e:t)||0,(n?t:e)||0)},S=b({devicePixelContentBoxSize:M(),borderBoxSize:M(),contentBoxSize:M(),contentRect:new m(0,0,0,0)}),B=function(t,e){if(void 0===e&&(e=!1),z.has(t)&&!e)return z.get(t);if(x(t))return z.set(t,S),S;var n=getComputedStyle(t),i=g(t)&&t.ownerSVGElement&&t.getBBox(),r=!j&&"border-box"===n.boxSizing,o=R.test(n.writingMode||""),s=!i&&O.test(n.overflowY||""),u=!i&&O.test(n.overflowX||""),c=i?0:k(n.paddingTop),a=i?0:k(n.paddingRight),f=i?0:k(n.paddingBottom),h=i?0:k(n.paddingLeft),l=i?0:k(n.borderTopWidth),d=i?0:k(n.borderRightWidth),p=i?0:k(n.borderBottomWidth),v=h+a,w=c+f,y=(i?0:k(n.borderLeftWidth))+d,E=l+p,B=u?t.offsetHeight-E-t.clientHeight:0,T=s?t.offsetWidth-y-t.clientWidth:0,F=r?v+y:0,P=r?w+E:0,A=i?i.width:k(n.width)-F-T,C=i?i.height:k(n.height)-P-B,D=A+v+T+y,$=C+w+B+E,I=b({devicePixelContentBoxSize:M(Math.round(A*devicePixelRatio),Math.round(C*devicePixelRatio),o),borderBoxSize:M(D,$,o),contentBoxSize:M(A,C,o),contentRect:new m(h,c,A,C)});return z.set(t,I),I},T=function(t,e,n){var i=B(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case l.DEVICE_PIXEL_CONTENT_BOX:return s;case l.BORDER_BOX:return r;default:return o}},F=function(t){var e=B(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=b([e.borderBoxSize]),this.contentBoxSize=b([e.contentBoxSize]),this.devicePixelContentBoxSize=b([e.devicePixelContentBoxSize])},P=function(t){if(x(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},A=function(){var t=1/0,e=[];d.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new F(e.target),r=P(e.target);i.push(n),e.lastReportedSize=T(e.target,e.observedBox),r<t&&(t=r)})),e.push((function(){n.callback.call(n.observer,i,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,i=e;n<i.length;n++)(0,i[n])();return t},C=function(t){d.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(P(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},D=[],$=0,I={attributes:!0,characterData:!0,childList:!0,subtree:!0},U=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],q=function(t){return void 0===t&&(t=0),Date.now()+t},L=!1,V=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!L){L=!0;var n,i=q(t);n=function(){var n=!1;try{n=function(){var t,e=0;for(C(e);d.some((function(t){return t.activeTargets.length>0}));)e=A(),C(e);return d.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:p}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=p),window.dispatchEvent(t)),e>0}()}finally{if(L=!1,t=i-q(),!$)return;n?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!v){var e=0,n=document.createTextNode("");new MutationObserver((function(){return D.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),v=function(){n.textContent=""+(e?e--:e++)}}D.push(t),v()}((function(){requestAnimationFrame(n)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,I)};document.body?e():E.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),U.forEach((function(e){return E.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),U.forEach((function(e){return E.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),W=function(t){!$&&t>0&&V.start(),!($+=t)&&V.stop()},G=function(){function t(t,e){this.target=t,this.observedBox=e||l.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=T(this.target,this.observedBox,!0);return g(t=this.target)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),N=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},_=new WeakMap,H=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},J=function(){function t(){}return t.connect=function(t,e){var n=new N(t,e);_.set(t,n)},t.observe=function(t,e,n){var i=_.get(t),r=0===i.observationTargets.length;H(i.observationTargets,e)<0&&(r&&d.push(i),i.observationTargets.push(new G(e,n&&n.box)),W(1),V.schedule())},t.unobserve=function(t,e){var n=_.get(t),i=H(n.observationTargets,e);i>=0&&(1===n.observationTargets.length&&d.splice(d.indexOf(n),1),n.observationTargets.splice(i,1),W(-1))},t.disconnect=function(t){var e=this,n=_.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),Q=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");J.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!y(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");J.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!y(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");J.unobserve(this,t)},t.prototype.disconnect=function(){J.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const K=new class extends h{constructor(t){super(t),this.store=t,this.sessionState$=this.select((t=>t.authenticationState)),this.jwt$=this.select((t=>t.jwt))}get sessionState(){return this.getValue().authenticationState}get isUnauthorized(){return this.getValue().authenticationState===c.Unauthorized||this.getValue().authenticationState===c.Error}get isAuthorized(){return this.getValue().authenticationState===c.Authenticated}}(u),X=class{constructor(t){e(this,t)}async componentWillLoad(){await s.loadConfigurationAsync(`${s.getAppHostUrl()}/static/config.json`),(K.isUnauthorized||a.shouldPerformSignIn(window.location.search))&&a.initFromRoute(window.location.pathname,window.location.search),K.sessionState$.subscribe((t=>this.sessionState=t)),K.jwt$.subscribe((t=>this.jwt=t)),f.appConfiguration$.subscribe((t=>this.appConfiguration=t))}render(){if(i.isNone(this.appConfiguration))return t("ap-ben-loading-page",null);const e=s.getAppRootUrl(!1);return t(n,{class:"w-100"},t("stencil-router",null,t("stencil-route-switch",{scrollTopOffset:0},(()=>{const e=s.getAppRootUrl(!1);return[t("stencil-route",{url:`${e}${o.SignIn}`,component:"ap-ben-oidc-callback-page",componentProps:{callbackMode:"sign-in"}}),t("stencil-route",{url:`${e}${o.SignOut}`,component:"ap-ben-oidc-callback-page",componentProps:{callbackMode:"sign-out"}}),t("stencil-route",{url:`${e}${o.SilentRefresh}`,component:"ap-ben-oidc-callback-page",componentProps:{callbackMode:"silent-refresh"}})]})(),t("stencil-route",{url:e,routeRender:this.renderProtectedRoute((n=>t("benefits-app",Object.assign({ref:t=>this.observeContentResize(t),jwt:i.toUndefined(this.jwt),apiBaseUrl:f.configuration.ApiBaseUrl,appBaseUrl:e},n))))}))))}renderProtectedRoute(e){switch(this.sessionState){case c.Authenticated:return e;case c.Unauthorized:case c.SignOutPending:case c.SignInPending:return()=>t("ap-ben-loading-page",null);case c.Error:return()=>t("h1",null,"Authentication Error")}}observeContentResize(t){new(window.ResizeObserver||Q)((()=>{r.resize(t.offsetHeight,-1)})).observe(t)}};export{X as benefits_app_host}
|
|
1
|
+
import{h as t,r as e,H as n}from"./p-91e1cdd0.js";import{O as i}from"./p-556fdb43.js";import{i as r}from"./p-fdc8ec5f.js";import{O as o,a as s,s as u,A as c,o as a,b as f}from"./p-628050dd.js";import{Q as h}from"./p-f3effa5d.js";import"./p-2c9dd7c4.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";var d,l=[],p="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(d||(d={}));var v,w=function(t){return Object.freeze(t)},b=function(t,e){this.inlineSize=t,this.blockSize=e,w(this)},m=function(){function t(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,w(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),g=function(t){return t instanceof SVGElement&&"getBBox"in t},x=function(t){if(g(t)){var e=t.getBBox();return!e.width&&!e.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},y=function(t){var e,n;if(t instanceof Element)return!0;var i=null===(n=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(i&&t instanceof i.Element)},E="undefined"!=typeof window?window:{},z=new WeakMap,O=/auto|scroll/,R=/^tb|vertical/,j=/msie|trident/i.test(E.navigator&&E.navigator.userAgent),k=function(t){return parseFloat(t||"0")},M=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new b((n?e:t)||0,(n?t:e)||0)},S=w({devicePixelContentBoxSize:M(),borderBoxSize:M(),contentBoxSize:M(),contentRect:new m(0,0,0,0)}),B=function(t,e){if(void 0===e&&(e=!1),z.has(t)&&!e)return z.get(t);if(x(t))return z.set(t,S),S;var n=getComputedStyle(t),i=g(t)&&t.ownerSVGElement&&t.getBBox(),r=!j&&"border-box"===n.boxSizing,o=R.test(n.writingMode||""),s=!i&&O.test(n.overflowY||""),u=!i&&O.test(n.overflowX||""),c=i?0:k(n.paddingTop),a=i?0:k(n.paddingRight),f=i?0:k(n.paddingBottom),h=i?0:k(n.paddingLeft),d=i?0:k(n.borderTopWidth),l=i?0:k(n.borderRightWidth),p=i?0:k(n.borderBottomWidth),v=h+a,b=c+f,y=(i?0:k(n.borderLeftWidth))+l,E=d+p,B=u?t.offsetHeight-E-t.clientHeight:0,T=s?t.offsetWidth-y-t.clientWidth:0,F=r?v+y:0,P=r?b+E:0,A=i?i.width:k(n.width)-F-T,C=i?i.height:k(n.height)-P-B,D=A+v+T+y,$=C+b+B+E,I=w({devicePixelContentBoxSize:M(Math.round(A*devicePixelRatio),Math.round(C*devicePixelRatio),o),borderBoxSize:M(D,$,o),contentBoxSize:M(A,C,o),contentRect:new m(h,c,A,C)});return z.set(t,I),I},T=function(t,e,n){var i=B(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case d.DEVICE_PIXEL_CONTENT_BOX:return s;case d.BORDER_BOX:return r;default:return o}},F=function(t){var e=B(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=w([e.borderBoxSize]),this.contentBoxSize=w([e.contentBoxSize]),this.devicePixelContentBoxSize=w([e.devicePixelContentBoxSize])},P=function(t){if(x(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},A=function(){var t=1/0,e=[];l.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new F(e.target),r=P(e.target);i.push(n),e.lastReportedSize=T(e.target,e.observedBox),r<t&&(t=r)})),e.push((function(){n.callback.call(n.observer,i,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,i=e;n<i.length;n++)(0,i[n])();return t},C=function(t){l.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(P(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},D=[],$=0,I={attributes:!0,characterData:!0,childList:!0,subtree:!0},U=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],q=function(t){return void 0===t&&(t=0),Date.now()+t},L=!1,V=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!L){L=!0;var n,i=q(t);n=function(){var n=!1;try{n=function(){var t,e=0;for(C(e);l.some((function(t){return t.activeTargets.length>0}));)e=A(),C(e);return l.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:p}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=p),window.dispatchEvent(t)),e>0}()}finally{if(L=!1,t=i-q(),!$)return;n?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!v){var e=0,n=document.createTextNode("");new MutationObserver((function(){return D.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),v=function(){n.textContent=""+(e?e--:e++)}}D.push(t),v()}((function(){requestAnimationFrame(n)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,I)};document.body?e():E.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),U.forEach((function(e){return E.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),U.forEach((function(e){return E.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),W=function(t){!$&&t>0&&V.start(),!($+=t)&&V.stop()},G=function(){function t(t,e){this.target=t,this.observedBox=e||d.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=T(this.target,this.observedBox,!0);return g(t=this.target)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),N=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},_=new WeakMap,H=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},J=function(){function t(){}return t.connect=function(t,e){var n=new N(t,e);_.set(t,n)},t.observe=function(t,e,n){var i=_.get(t),r=0===i.observationTargets.length;H(i.observationTargets,e)<0&&(r&&l.push(i),i.observationTargets.push(new G(e,n&&n.box)),W(1),V.schedule())},t.unobserve=function(t,e){var n=_.get(t),i=H(n.observationTargets,e);i>=0&&(1===n.observationTargets.length&&l.splice(l.indexOf(n),1),n.observationTargets.splice(i,1),W(-1))},t.disconnect=function(t){var e=this,n=_.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),Q=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");J.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!y(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");J.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!y(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");J.unobserve(this,t)},t.prototype.disconnect=function(){J.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const K=new class extends h{constructor(t){super(t),this.store=t,this.sessionState$=this.select((t=>t.authenticationState)),this.jwt$=this.select((t=>t.jwt))}get sessionState(){return this.getValue().authenticationState}get isUnauthorized(){return this.getValue().authenticationState===c.Unauthorized||this.getValue().authenticationState===c.Error}get isAuthorized(){return this.getValue().authenticationState===c.Authenticated}}(u),X=class{constructor(t){e(this,t)}async componentWillLoad(){await s.loadConfigurationAsync(`${s.getAppHostUrl()}/static/config.json`),(K.isUnauthorized||a.shouldPerformSignIn(window.location.search))&&a.initFromRoute(window.location.pathname,window.location.search),K.sessionState$.subscribe((t=>this.sessionState=t)),K.jwt$.subscribe((t=>this.jwt=t)),f.appConfiguration$.subscribe((t=>this.appConfiguration=t))}render(){if(i.isNone(this.appConfiguration))return t("ap-ben-loading-page",null);const e=s.getAppRootUrl(!1);return t(n,{class:"w-100"},t("stencil-router",null,t("stencil-route-switch",{scrollTopOffset:0},(()=>{const e=s.getAppRootUrl(!1);return[t("stencil-route",{url:`${e}${o.SignIn}`,component:"ap-ben-oidc-callback-page",componentProps:{callbackMode:"sign-in"}}),t("stencil-route",{url:`${e}${o.SignOut}`,component:"ap-ben-oidc-callback-page",componentProps:{callbackMode:"sign-out"}}),t("stencil-route",{url:`${e}${o.SilentRefresh}`,component:"ap-ben-oidc-callback-page",componentProps:{callbackMode:"silent-refresh"}})]})(),t("stencil-route",{url:e,routeRender:this.renderProtectedRoute((n=>t("benefits-app",Object.assign({ref:t=>this.observeContentResize(t),jwt:i.toUndefined(this.jwt),apiBaseUrl:f.configuration.ApiBaseUrl,appBaseUrl:e},n))))}))))}renderProtectedRoute(e){switch(this.sessionState){case c.Authenticated:return e;case c.Unauthorized:case c.SignOutPending:case c.SignInPending:return()=>t("ap-ben-loading-page",null);case c.Error:return()=>t("h1",null,"Authentication Error")}}observeContentResize(t){new(window.ResizeObserver||Q)((()=>{r.resize(t.offsetHeight,-1)})).observe(t)}};export{X as benefits_app_host}
|