From 4f1f724b3e3342e1cd0cef0e3b2522710fee9762 Mon Sep 17 00:00:00 2001 From: jlangy <37274633+jlangy@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:31:11 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20bcgov/ss?= =?UTF-8?q?o-requests@788dfa615fab07759e30f13d89323afd9aea1333=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 4 ++-- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 _next/static/chunks/499-db9d50d6ddfb158e.js | 1 - _next/static/chunks/806-ee165ca071d8ee2d.js | 1 + .../{_app-de873a6016e1d408.js => _app-2dad111fd534c479.js} | 2 +- _next/static/chunks/pages/admin-dashboard-337bead842b9d71c.js | 1 - _next/static/chunks/pages/admin-dashboard-7bde57071b12fc9c.js | 1 + .../pages/my-dashboard/integrations-144bc3f4dd0d65bd.js | 1 + .../pages/my-dashboard/integrations-5f2326827a5662a4.js | 1 - ...equest-c8c37a22c9454711.js => request-e238936e4ce45aca.js} | 2 +- .../{[rid]-c514d3a9b6eaef3f.js => [rid]-5ecdf081c09f87bf.js} | 2 +- admin-dashboard.html | 4 ++-- admin-reports.html | 4 ++-- application-error.html | 4 ++-- faq.html | 4 ++-- index.html | 4 ++-- my-dashboard.html | 4 ++-- my-dashboard/integrations.html | 4 ++-- my-dashboard/s2g.html | 4 ++-- my-dashboard/teams.html | 4 ++-- request.html | 4 ++-- request/[rid].html | 4 ++-- terms-conditions.html | 4 ++-- verify-user.html | 4 ++-- 25 files changed, 35 insertions(+), 35 deletions(-) rename _next/static/{9vTiiPo1qe9VgK-porxrf => F8fed2RJC4hYslfRHilsK}/_buildManifest.js (59%) rename _next/static/{9vTiiPo1qe9VgK-porxrf => F8fed2RJC4hYslfRHilsK}/_ssgManifest.js (100%) delete mode 100644 _next/static/chunks/499-db9d50d6ddfb158e.js create mode 100644 _next/static/chunks/806-ee165ca071d8ee2d.js rename _next/static/chunks/pages/{_app-de873a6016e1d408.js => _app-2dad111fd534c479.js} (93%) delete mode 100644 _next/static/chunks/pages/admin-dashboard-337bead842b9d71c.js create mode 100644 _next/static/chunks/pages/admin-dashboard-7bde57071b12fc9c.js create mode 100644 _next/static/chunks/pages/my-dashboard/integrations-144bc3f4dd0d65bd.js delete mode 100644 _next/static/chunks/pages/my-dashboard/integrations-5f2326827a5662a4.js rename _next/static/chunks/pages/{request-c8c37a22c9454711.js => request-e238936e4ce45aca.js} (88%) rename _next/static/chunks/pages/request/{[rid]-c514d3a9b6eaef3f.js => [rid]-5ecdf081c09f87bf.js} (94%) diff --git a/404.html b/404.html index 200a097..a99b005 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/_next/static/9vTiiPo1qe9VgK-porxrf/_buildManifest.js b/_next/static/F8fed2RJC4hYslfRHilsK/_buildManifest.js similarity index 59% rename from _next/static/9vTiiPo1qe9VgK-porxrf/_buildManifest.js rename to _next/static/F8fed2RJC4hYslfRHilsK/_buildManifest.js index 1ecfc1d..829ddfb 100644 --- a/_next/static/9vTiiPo1qe9VgK-porxrf/_buildManifest.js +++ b/_next/static/F8fed2RJC4hYslfRHilsK/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,a,c,t,e,d,r,i,n){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/sso-requests-preview/app/:path*"}],fallback:[]},"/":["static/chunks/pages/index-b96eb2adda78e53b.js"],"/_error":["static/chunks/pages/_error-f80591a523a75251.js"],"/admin-dashboard":[s,a,t,c,e,"static/chunks/pages/admin-dashboard-337bead842b9d71c.js"],"/admin-reports":["static/chunks/674a26a7-2bd362fa1142fae7.js",s,"static/chunks/pages/admin-reports-283f335bedd74aab.js"],"/application-error":[r,"static/chunks/pages/application-error-fb8607d884ddd007.js"],"/faq":["static/chunks/pages/faq-cfafbf730ed7834b.js"],"/my-dashboard":["static/chunks/pages/my-dashboard-f9c93d4808f61351.js"],"/my-dashboard/integrations":["static/chunks/29107295-8ab47bb7d9547e26.js",s,t,d,"static/css/02409508432e1dfb.css","static/chunks/254-dbd475d1aa747176.js",e,"static/chunks/pages/my-dashboard/integrations-5f2326827a5662a4.js"],"/my-dashboard/s2g":["static/chunks/pages/my-dashboard/s2g-5ea744013761d59d.js"],"/my-dashboard/teams":[s,a,t,c,e,"static/chunks/pages/my-dashboard/teams-8c8f5cb2491ffbe9.js"],"/request":[s,a,d,i,c,n,"static/chunks/pages/request-c8c37a22c9454711.js"],"/request/[rid]":[s,a,d,i,c,n,"static/chunks/pages/request/[rid]-c514d3a9b6eaef3f.js"],"/terms-conditions":["static/chunks/pages/terms-conditions-ff4e47abb5c77f02.js"],"/verify-user":[r,"static/chunks/pages/verify-user-b199b3cac0c034a4.js"],sortedPages:["/","/_app","/_error","/admin-dashboard","/admin-reports","/application-error","/faq","/my-dashboard","/my-dashboard/integrations","/my-dashboard/s2g","/my-dashboard/teams","/request","/request/[rid]","/terms-conditions","/verify-user"]}}("static/chunks/925-37ea4f12340c1cc4.js","static/chunks/830-65d2a33cc746e328.js","static/chunks/974-6825820c00a4562a.js","static/chunks/937-2fc0291f72f8e859.js","static/chunks/954-714ab8b16dafedbf.js","static/chunks/759-bc0158665481e525.js","static/chunks/9-1495f392282e36d5.js","static/chunks/281-adcaa0db00b6031c.js","static/chunks/499-db9d50d6ddfb158e.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,a,c,e,t,r,d,i,n){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/sso-requests-preview/app/:path*"}],fallback:[]},"/":["static/chunks/pages/index-b96eb2adda78e53b.js"],"/_error":["static/chunks/pages/_error-f80591a523a75251.js"],"/admin-dashboard":[s,a,e,c,t,"static/chunks/pages/admin-dashboard-7bde57071b12fc9c.js"],"/admin-reports":["static/chunks/674a26a7-2bd362fa1142fae7.js",s,"static/chunks/pages/admin-reports-283f335bedd74aab.js"],"/application-error":[d,"static/chunks/pages/application-error-fb8607d884ddd007.js"],"/faq":["static/chunks/pages/faq-cfafbf730ed7834b.js"],"/my-dashboard":["static/chunks/pages/my-dashboard-f9c93d4808f61351.js"],"/my-dashboard/integrations":["static/chunks/29107295-8ab47bb7d9547e26.js",s,e,r,"static/css/02409508432e1dfb.css","static/chunks/254-dbd475d1aa747176.js",t,"static/chunks/pages/my-dashboard/integrations-144bc3f4dd0d65bd.js"],"/my-dashboard/s2g":["static/chunks/pages/my-dashboard/s2g-5ea744013761d59d.js"],"/my-dashboard/teams":[s,a,e,c,t,"static/chunks/pages/my-dashboard/teams-8c8f5cb2491ffbe9.js"],"/request":[s,a,r,i,c,n,"static/chunks/pages/request-e238936e4ce45aca.js"],"/request/[rid]":[s,a,r,i,c,n,"static/chunks/pages/request/[rid]-5ecdf081c09f87bf.js"],"/terms-conditions":["static/chunks/pages/terms-conditions-ff4e47abb5c77f02.js"],"/verify-user":[d,"static/chunks/pages/verify-user-b199b3cac0c034a4.js"],sortedPages:["/","/_app","/_error","/admin-dashboard","/admin-reports","/application-error","/faq","/my-dashboard","/my-dashboard/integrations","/my-dashboard/s2g","/my-dashboard/teams","/request","/request/[rid]","/terms-conditions","/verify-user"]}}("static/chunks/925-37ea4f12340c1cc4.js","static/chunks/830-65d2a33cc746e328.js","static/chunks/974-6825820c00a4562a.js","static/chunks/937-2fc0291f72f8e859.js","static/chunks/954-714ab8b16dafedbf.js","static/chunks/759-bc0158665481e525.js","static/chunks/9-1495f392282e36d5.js","static/chunks/281-adcaa0db00b6031c.js","static/chunks/806-ee165ca071d8ee2d.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/9vTiiPo1qe9VgK-porxrf/_ssgManifest.js b/_next/static/F8fed2RJC4hYslfRHilsK/_ssgManifest.js similarity index 100% rename from _next/static/9vTiiPo1qe9VgK-porxrf/_ssgManifest.js rename to _next/static/F8fed2RJC4hYslfRHilsK/_ssgManifest.js diff --git a/_next/static/chunks/499-db9d50d6ddfb158e.js b/_next/static/chunks/499-db9d50d6ddfb158e.js deleted file mode 100644 index 89757f8..0000000 --- a/_next/static/chunks/499-db9d50d6ddfb158e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[499],{36575:function(e,t,n){var r,i=n(71383),o=n(71893).ZP.span(r||(r=(0,i.Z)(["\n color: #dc3545;\n margin: 0;\n padding: 0;\n"])));t.Z=o},19344:function(e,t,n){var r,i,o,a=n(71383),s=n(71893),c=n(77740),l=n(63005),d=n(85893),u=s.ZP.table(r||(r=(0,a.Z)(["\n font-size: unset;\n & tr {\n display: flex;\n margin-bottom: 5px;\n & > td {\n border: none;\n padding: 0 5px 0 0;\n }\n }\n"]))),p=s.ZP.span(i||(i=(0,a.Z)(["\n font-weight: 600;\n"]))),h=s.ZP.ul(o||(o=(0,a.Z)(["\n list-style: none;\n margin: 0;\n & li {\n margin: 0;\n }\n"]))),f=function(e){var t=e.list,n=e.title,r=e.inline,i=void 0!==r&&r,o=e.testid;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:n}),((null==t?void 0:t.length)===1||i)&&(0,d.jsx)(p,{"data-testid":o,children:null==t?void 0:t.map(function(e,n){return(0,d.jsxs)("span",{children:[e,n!==t.length-1&&", "," "]},e)})})]}),!i&&((null==t?void 0:t.length)||0)>1&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{children:(0,d.jsx)(p,{children:(0,d.jsx)(h,{children:null==t?void 0:t.map(function(e){return(0,d.jsx)("li",{children:e},e)})})})})})]})};t.Z=function(e){var t,n,r,i,o,a,s,h,m=e.children,b=e.request,v=e.teams;if(!b)return null;var g=null!==(i=b.devIdps)&&void 0!==i?i:[],x="saml"!==b.protocol,j=g.map(function(e){return l.S[e]}),y="";b.usesTeam&&(y=(null===(h=(void 0===v?[]:v).find(function(e){return String(e.id)===String(b.teamId)}))||void 0===h?void 0:h.name)||b.team&&b.team.name);var O=(t=b.primaryEndUsers,n=b.primaryEndUsersOther,null==t?void 0:t.map(function(e){switch(e){case"livingInBC":return"People living in BC";case"businessInBC":return"People doing business/travel in BC";case"bcGovEmployees":return"BC Gov Employees";case"other":return"Other: ".concat(null!=n?n:"");default:return""}}));return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(u,{children:(0,d.jsxs)("tbody",{children:[y?(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Associated Team:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"associated-team",children:y})})]}):(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Are you accountable for this project?"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"you-accountable",children:void 0===(r=b.projectLead)?"":r?"Yes":"No"})})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Client Protocol:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"client-protocol",children:x?"OpenID Connect":"SAML"})})]}),x&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Client Type:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"client-type-team",children:b.publicAccess?"Public":"Confidential"})})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Usecase:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"use-case",children:c.F[b.authType||"browser-login"]})})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Project Name:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"project-name",children:b.projectName})})]}),O&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Primary End Users:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"project-name",children:O.join(", ")})})]}),b.additionalRoleAttribute&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Additional Role Attribute:"}),(0,d.jsx)("td",{children:(0,d.jsx)(p,{"data-testid":"add-role-attrib",children:b.additionalRoleAttribute})})]}),(0,d.jsx)(f,{list:j,title:"Identity Providers Required:",inline:!0,testid:"idp-required"}),(null===(o=b.environments)||void 0===o?void 0:o.includes("dev"))&&(0,d.jsx)(f,{list:b.devValidRedirectUris,title:"Dev Redirect URIs:",testid:"dev-uri"}),(null===(a=b.environments)||void 0===a?void 0:a.includes("test"))&&(0,d.jsx)(f,{list:b.testValidRedirectUris,title:"Test Redirect URIs:",testid:"test-uri"}),(null===(s=b.environments)||void 0===s?void 0:s.includes("prod"))&&(0,d.jsx)(f,{list:b.prodValidRedirectUris,title:"Prod Redirect URIs:",testid:"prod-uri"}),m]})})})}},60499:function(e,t,n){n.d(t,{Z:function(){return n6}});var r,i,o,a,s,c,l,d,u,p,h,f,m,b,v,g,x,j,y,O,w,P,S,C,Z,k,D,I,T,A,E,N,F,R,L,U,B,q,M,_,z,W,H=n(16835),G=n(50029),V=n(59499),K=n(71383),Y=n(87794),J=n.n(Y),$=n(67294),Q=n(11163),X=n(71893),ee=n(59722),et=n.n(ee),en=n(93096),er=n.n(en),ei=n(71431),eo=n.n(ei),ea=n(61478),es=n.n(ea),ec=n(70100),el=n.n(ec),ed=n(85893),eu=X.ZP.h1(o||(o=(0,K.Z)(["\n font-weight: lighter;\n color: #003366;\n margin: 0;\n"])));function ep(e){var t=e.schema,n=e.requestId,r=e.editing,i=eo()(String(n),8,"0"),o="".concat(et()(n)?"":"Req ID: ".concat(i," - ")).concat(t.headerText);return(0,ed.jsx)(eu,{children:(r?"Editing ":"")+o})}var eh=n(64735),ef=n(99603),em=n(59417),eb=n(35683),ev=n.n(eb),eg=X.ZP.div(a||(a=(0,K.Z)(["\n height: 60px;\n width: 200px;\n background-color: #ebf7ff;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-radius: 5px;\n padding: 15px;\n cursor: pointer;\n margin: 3px 0;\n ","\n"])),function(e){var t=e.color,n=e.backgroundColor,r=e.fontWeight,i=e.border;return"\n color: ".concat(t,";\n background-color: ").concat(n,";\n font-weight: ").concat(r,";\n border: ").concat(i,";\n ")}),ex=X.ZP.div(s||(s=(0,K.Z)(["\n height: 40px;\n width: 40px;\n min-width: 40px;\n text-align: center;\n line-height: 40px;\n border-radius: 40px;\n border: 1px solid #b9d8f0;\n background-color: white;\n font-weight: bold;\n color: #31393f;\n"]))),ej=X.ZP.p(c||(c=(0,K.Z)(["\n margin: 0 0 0 5px;\n"])));function ey(e){var t=e.stageNumber,n=e.title,r=e.active,i=e.visited,o=e.handleClick,a=e.hasError,s="#999999",c="#F0F8FE",l="400",d="1px solid #999999";return r?a?(s="#FFFFFF",c="#D75757",l="700",d="2px solid #313131"):(s="#FFFFFF",c="#2A6FBE",l="700",d="2px solid #313131"):i&&(a?(s="#1A1A1A",c="#F1C0C0",l="700",d="1px solid #313131"):(s="#31393F",c="#C3E3FC",l="400",d="1px solid #313131")),(0,ed.jsxs)(eg,{color:s,backgroundColor:c,fontWeight:l,border:d,onClick:o,"data-testid":"stage-".concat(ev()(n)),children:[(0,ed.jsx)(ex,{children:a?(0,ed.jsx)(ef.G,{icon:em.eHv,color:"red",title:"Some additional fields require your attention."}):t}),(0,ed.jsx)(ej,{children:n})]})}var eO=X.ZP.div(l||(l=(0,K.Z)(["\n width: 824px;\n max-width: 100%;\n"])));function ew(e){var t=e.currentStage,n=e.setFormStage,r=e.errors,i=e.isNew,o=e.visited,a=e.schemas,s=function(e){i||n(e)};return(0,ed.jsx)(eO,{children:(0,ed.jsx)(eh.ZP,{cols:4,children:(0,ed.jsx)(eh.ZP.Row,{collapse:"992",gutter:[],children:null==a?void 0:a.map(function(e,n){return(0,ed.jsx)(eh.ZP.Col,{children:(0,ed.jsx)(ey,{title:e.stepText,stageNumber:n+1,active:n===t,hasError:!!r[n],visited:o[n],handleClick:function(){return s(n)}},n)},e.stepText)})})})})}var eP=n(56483),eS=n(76427),eC=n.n(eS),eZ=n(11915),ek=n(30996),eD=n(35611);function eI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eT(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n=function(e){switch(e){case"checkbox":return"checked";case"file":return"files";default:return"value"}}(t);return function(r){var i=r.value,o=r.onChange,a=r.label,s=r.schema,c=r.options,l=r.required,d=r.disabled,u=r.onBlur,p=r.id,h=void 0===p?"":p,f=r.readonly,m=s.pattern,b=s.minLength,v=s.maxLength,g=s.placeholder,x=s.fullWidth,j=s.rows,y=c.enumOptions,O=void 0===y?[]:y,w={onChange:function(e){var t=e.target[n];""===t&&(t=void 0),"true"===t&&(t=!0),"false"===t&&(t=!1),o(t)},label:a,name:name,maxLength:v,id:h,required:l,disabled:d,minLength:b,type:t,pattern:m,onBlur:u,fullWidth:x,rows:j,readOnly:f,value:i||"",placeholder:g,checked:void 0!==i&&i};return("file"===t&&delete w.value,"checkbox"===t&&(w.value=!0),"radio"===t)?(0,ed.jsxs)("div",{children:[(0,ed.jsx)("label",{children:a}),O.map(function(t){return(0,ed.jsx)(e,eT(eT({},w),{},{label:t.label,value:t.value,checked:t.value===i,style:{padding:"2px 0"},size:"small",readOnly:f,onBlur:u}),t.value)})]}):(0,ed.jsx)(e,eT(eT({},w),{},{onBlur:u&&function(e){return u(h,e.target.value)},children:O&&O.map(function(e){var t=e.value,n=e.label;return(0,ed.jsx)("option",{value:t,children:n},t)})}))}},eE=n(31513);function eN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eF(e){for(var t=1;t=u&&(0,ed.jsx)(e8,{onClick:e.onDropIndexClick(e.index),children:(0,ed.jsx)(ef.G,{style:{color:"red"},icon:em.uMC,title:"Remove Item"})})]})},e.index)}),"prod"===d?(0,ed.jsxs)(tn,{children:["*Note: wildcard* redirect URIs are ",(0,ed.jsx)("strong",{children:"not"})," allowed in Prod for security reasons."]}):(0,ed.jsxs)(tn,{children:["*Note: wildcard* redirect URIs are ",(0,ed.jsx)("strong",{children:"only"})," allowed in ",(0,ed.jsx)("strong",{children:"Dev"})," and"," ",(0,ed.jsx)("strong",{children:"Test"})," environments (but not in Prod for security reasons)."]}),e.canAdd&&(0,ed.jsxs)(e7,{onClick:e.onAddClick,children:[(0,ed.jsx)(ef.G,{style:{color:"#006fc4"},icon:em.KtF,onClick:e.onAddClick,title:"Add Item","data-testid":"add-uri"}),(0,ed.jsx)(te,{children:l})]})]})}var ti=n(61165),to=n(91073),ta=n(99154),ts=n(15812),tc=n(3016),tl=n(97644),td=n.n(tl),tu=n(39772),tp=n(90352);function th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t input {\n margin-right: 5px;\n }\n"]))),tT=function(e){var t=e.id,n=e.value,r=e.onChange,i=e.onBlur,o=e.schema;e.formContext;var a=o.enum,s=o.enumNames,c=(0,$.useState)(!1),l=c[0],d=c[1];return(0,ed.jsxs)("div",{children:[s.map(function(e,o){return(0,ed.jsxs)(tI,{children:[(0,ed.jsx)("input",{type:"radio",id:"".concat(t,"-").concat(e),name:t,value:e,checked:a[o]===n,onChange:function(){return r(a[o])},onBlur:function(){return i(t,n)}}),(0,ed.jsx)("label",{htmlFor:"".concat(t,"-").concat(e),children:e})]},e)}),(0,ed.jsxs)("div",{children:[(0,ed.jsx)(tP.default,{onClick:function(){return d(!0)},style:{cursor:"pointer"},children:"Click here"})," ","to get help deciding which client type to use."]}),(0,ed.jsx)(tD,{id:"client-helper",open:l,onChange:function(e){d(!1),"cancel"!==e&&r("public"===e)}})]})},tA=X.ZP.span(I||(I=(0,K.Z)(["\n display: inline-block;\n width: 200px;\n\n & label {\n font-weight: 700;\n font-size: 0.8rem;\n }\n"]))),tE=X.ZP.span(T||(T=(0,K.Z)(["\n display: inline-block;\n margin-right: 0.3rem;\n margin-bottom: 0.5rem;\n\n & input {\n height: 1.94rem;\n max-width: 3.125rem;\n }\n"]))),tN=X.ZP.span(A||(A=(0,K.Z)(["\n display: inline-block;\n\n & select {\n width: 100px;\n }\n\n & select:disabled {\n margin: 0;\n }\n"]))),tF=function(e){var t=e.id,n=e.value,r=void 0===n?0:n,i=e.label,o=e.readonly,a=e.onChange,s=(e.onBlur,e.schema);e.formContext,o&&(a=eM());var c=s.tooltipContent,l=(0,$.useState)(0),d=l[0],u=l[1],p=(0,$.useState)("Minutes"),h=p[0],f=p[1],m=function(e){if(0===e){u(0),f("Minutes");return}var t=e,n="Seconds";t%60==0&&(n="Minutes",t/=60),t%60==0&&(n="Hours",t/=60),t%24==0&&(n="Days",t/=24),u(t),f(n)};return(0,$.useEffect)(function(){m(r)},[r]),(0,ed.jsxs)("div",{children:[(0,ed.jsxs)(tA,{children:[(0,ed.jsx)("label",{htmlFor:t,children:i}),"\xa0",(0,ed.jsx)(e$.Z,{content:void 0===c?"":c})]}),(0,ed.jsx)(tE,{children:(0,ed.jsx)(eZ.default,{type:"text",size:"small",id:t,name:i,value:d.toString(),onChange:function(e){var t=parseInt(e.target.value);isNaN(t)&&(t=0);var n=t;"Minutes"===h?n*=60:"Hours"===h?n*=3600:n*=86400,n>31536e3&&(n=31536e3),a(n),u(t)},disabled:o})}),(0,ed.jsx)(tN,{children:(0,ed.jsxs)(eD.default,{size:"small",onChange:function(e){var t=e.target.value,n=0;(n="Minutes"===t?60*d:"Hours"===t?3600*d:86400*d)>31536e3&&(n=31536e3),a(n),f(t)},value:h,disabled:o,children:[(0,ed.jsx)("option",{children:"Minutes"}),(0,ed.jsx)("option",{children:"Hours"}),(0,ed.jsx)("option",{children:"Days"})]})})]})};function tR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var tL=function(e){var t=e.options,n=e.value,r=e.required,i=e.disabled,o=e.readonly,a=e.autofocus,s=void 0!==a&&a,c=e.onBlur,l=e.onFocus,d=e.onChange,u=e.id,p=e.schema,h=Math.random().toString(),f=t.enumOptions,m=t.enumDisabled,b=t.inline,v=p.tooltips,g=Array.isArray(f)?f:[],x=Array.isArray(m)?m:[];return(0,ed.jsx)("div",{className:"field-radio-group",id:u,children:g.map(function(e,t){var a=e.value===n,p=-1!==x.indexOf(e.value),f=i||p||o?"disabled":"",m=(0,ed.jsxs)("span",{children:[(0,ed.jsx)("input",{type:"radio",checked:a,name:h,required:r,value:e.value,disabled:i||p||o,autoFocus:s&&0===t,onChange:function(t){return d(e.value)},onBlur:c&&function(e){return c(u,e.target.value)},onFocus:l&&function(e){return l(u,e.target.value)}}),(0,ed.jsx)("span",{children:e.label}),"\xa0",v[t]&&(0,ed.jsx)(e$.Z,function(e){for(var t=1;t\n Only the person who is responsible for this project should be submitting the integration request.\xa0\n If you are not the one accountable, please refer this request to a team member who will be accountable for this project.\n

"}},t8={type:"array",items:{type:"string",enum:["livingInBC","businessInBC","bcGovEmployees","other"],enumNames:["People living in BC","People doing business/travel in BC","BC Gov Employees","Other"]},uniqueItems:!0,title:"Who are the primary end users of your project/application? (select all that apply)"};function ne(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=t.map(function(e){return e.name});r.unshift("Select...");var i=t.map(function(e){return String(e.id)});i.unshift("");var o=t.length>0;return{type:"object",customValidation:["createTeam","projectName","projectLead"],headerText:"Enter requester information",stepText:"Requester Info",properties:t6(t6({projectName:{type:"string",title:"Project Name",maxLength:50},primaryEndUsers:t8},(null===(e=n.primaryEndUsers)||void 0===e?void 0:e.includes("other"))&&{primaryEndUsersOther:{type:"string",title:"Project Name",maxLength:100,placeholder:"Enter Details",rows:3}}),{},{usesTeam:{type:"boolean",title:"Project Team",description:"Would you like to allow multiple members to manage this integration?"}}),required:["projectName"],dependencies:{usesTeam:{oneOf:[{properties:{usesTeam:{enum:[!1]},projectLead:t7}},{properties:t6(t6({usesTeam:{enum:[!0]}},o&&{teamId:{type:"string",title:"Project Team",enum:i,enumNames:r}}),{},{createTeam:{type:"string"}})}]},projectLead:{oneOf:[{properties:{projectLead:{enum:[!0]}},required:["projectLead"]},{properties:{projectLead:{enum:[!1]}}}]}}}}var nt={type:"object",required:["agreeWithTerms"],headerText:"Terms and Conditions",stepText:"Terms and Conditions",properties:{agreeWithTerms:{type:"boolean",title:"I agree to the Terms and Conditions",default:null,enum:[null,!0]}}},nn=n(63005),nr=n(11752),ni=n.n(nr),no=n(34155),na=(ni()()||{}).publicRuntimeConfig,ns=void 0===na?{}:na,nc=ns.include_digital_credential,nl=ns.include_bc_services_card;function nd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{isAdmin:!0},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e.protocol,o=e.authType,a=e.status,s="true"===nl||"true"===no.env.INCLUDE_BC_SERVICES_CARD,c=(0,ta.e$)(e),l={type:"string",title:"Select Client Protocol",enum:["oidc","saml"],enumNames:["OpenID Connect","SAML"],tooltip:{content:"The OpenID Connect (OIDC) client protocol is recommended."},tooltips:[null,{content:'To read more about SAML configuration options and limitations, see here.'),hide:3e3}]},d={type:"string",title:"Please select privacy zone",enum:null==n?void 0:n.map(function(e){return e.privacy_zone_uri||[]}),enumNames:null==n?void 0:n.map(function(e){return e.privacy_zone_name||[]})},u={protocol:l},p=[];if("oidc"===i&&(u.authType={type:"string",title:"Select Usecase",enum:["browser-login","service-account","both"],enumNames:["Browser Login","Service Account","Browser Login and Service Account"],tooltip:"applied"===a?null:{content:"Note that once this is submitted, you will not be able to update and rather will need to create a new integration."},tooltips:[{content:"This enables standard OpenID Connect redirect based authentication with authorization code. In terms of OpenID Connect or OAuth2 specifications, this enables support of 'Authorization Code Flow' for this client."},{content:"This allows you to authenticate this client to Keycloak and retrieve access token dedicated to this client. In terms of OAuth2 specification, this enables support of 'Client Credentials Grant' for this client."},{content:"This enables 'Browser Login' and 'Service Account' both."}]},"browser-login"===o&&(u.publicAccess={type:"boolean",title:"Select Client Type",enum:[!0,!1],enumNames:["Public","Confidential"]}),p.push("publicAccess")),"service-account"!==o){var h=["idir","azureidir","bceidbasic","bceidbusiness","bceidboth","githubpublic","githubbcgov"];("true"===nc||"true"===no.env.INCLUDE_DIGITAL_CREDENTIAL)&&h.push("digitalcredential"),s&&h.push("bcservicescard");var f=h.map(function(e){return nn.S[e]});u.devIdps={type:"array",minItems:1,title:"Choose Identity Provider(s)",items:{type:"string",enum:h,enumNames:f},tooltips:h.map(function(e){return"azureidir"===e?{content:'\n To learn the difference between IDIR and IDIR with MFA,\n \n please visit our GitHub page about choosing an Identity Provider\n \n '),hide:3e3}:"digitalcredential"===e?{content:'To learn more about using the Digital Credential option visit our additional information.'),hide:3e3,alpha:!0}:"bcservicescard"===e?{content:'To learn more about using the BC Services Card option visit our additional information.'),hide:3e3,alpha:!0}:null}),uniqueItems:!0,tooltip:{content:"The identity providers you add will let your users authenticate with those services."}}}return c&&s&&(u.bcscPrivacyZone=d,u.bcscAttributes={type:"array",title:"Please select attribute(s)",items:{type:"string",enum:null==r?void 0:r.map(function(e){return e.name}),enumNames:null==r?void 0:r.map(function(e){return e.name})},uniqueItems:!0,tooltip:{content:"We will provide a separate client for each attribute you can select. Select the attributes required for your project."}}),u.environments={type:"array",minItems:1,title:"Choose Environment(s)",items:{type:"string",enum:["dev","test","prod"],enumNames:["Development","Test","Production"]},uniqueItems:!0,tooltip:{content:"We will provide a separate client for each environment you can select. Select the environments required for your project."}},"saml"!==i&&(u.additionalRoleAttribute={type:"string",title:"Additional Role Attribute(optional)",tooltip:{content:'By default "client_roles" is the default attribute key name to include roles info, if you wish to include same info in another attribute, then use this.'},maxLength:50}),"saml"===i&&t.isAdmin&&(u.clientId={type:"string",title:"As SSO Admin. you can override the client id",tooltip:{content:"The client id should be a string without any spaces"},maxLength:250}),{type:"object",customValidation:["additionalRoleAttribute","clientId","devIdps","authType","bcscPrivacyZone","bcscAttributes"],headerText:"Choose providers",stepText:"Basic Info",properties:u,required:p}}function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function np(e){for(var t=1;t1?0:1},default:[""],addItemText:"Add another URI"};np(np({},nf),{},{title:"Test Redirect URIs"}),np(np({},nf),{},{title:"Prod Redirect URIs"});var nm='valid URI '),nb=np(np({},nf),{},{description:"You can use any ".concat(nm,' for your redirect URIs. We recommend only using your client for one application.'),title:"Dev Redirect URIs",tooltip:{content:"At least one redirect URI is required for each of DEV, TEST and PROD. If you don't know the redirect URI for one or\n more of these environments, you may provide any valid URI for now and change it later. We suggest something like\n 'http://localhost:1000'."}}),nv=n(34155);function ng(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nx(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oidc";if(e.length===t.length)return t;var o=e.length1&&void 0!==arguments[1]&&arguments[1];if(!e||0===e.length)return[];var n=e.map(el());return t&&(n=n.filter(function(e){return e})),0===n.length&&n.push(""),n},n4=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.dropEmptyRedirectUris,r=void 0!==n&&n,i=n9(e.devValidRedirectUris,r),o=n9(e.testValidRedirectUris,r),a=n9(e.prodValidRedirectUris,r);return n0(n0({},e),{},{devValidRedirectUris:i,testValidRedirectUris:o,prodValidRedirectUris:a})},n6=(0,ts.hU)(function(e){var t,n,r,i,o,a,s,c,l=e.currentUser,d=e.request,u=e.alert,p=(0,Q.useRouter)(),h=p.query.step,f=h?Number(h):0,m=(0,$.useState)(d||{}),b=m[0],v=m[1],g=(0,$.useState)(f),x=g[0],j=g[1],y=(0,$.useState)(!1),O=y[0],w=y[1],P=(0,$.useState)(""),S=P[0],C=P[1],Z=(0,$.useState)(!1),k=Z[0],D=Z[1],I=(0,$.useState)({}),T=I[0],A=I[1],E=(0,$.useState)(d?{0:!0}:{}),N=E[0],F=E[1],R=(0,$.useState)([]),L=R[0],U=R[1],B=(0,$.useState)([]),q=B[0],M=B[1],_=(0,$.useState)((0,tp.S2)()),z=_[0],W=_[1],V=(0,$.useState)((0,tp.K_)()),K=V[0],Y=V[1],X=(0,$.useContext)(nY.SurveyContext),ee=et()(null==d?void 0:d.id),en=(null==d?void 0:d.status)==="applied",ei=l.isAdmin||!1,ea=0!==x||b.usesTeam||b.projectLead,es=x===q.length-1,ec=q[x]||{},el=(0,$.useCallback)(er()((t=(0,G.Z)(J().mark(function e(t){var n;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(ee||en)){e.next=2;break}return e.abrupt("return");case 2:if(!d){e.next=11;break}return D(!0),e.next=6,(0,nK.WN)(n0(n0({},t),{},{id:d.id}));case 6:n=e.sent,(0,H.Z)(n,2)[1]||C("Last saved at ".concat(new Date().toLocaleString())),D(!1);case 11:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),2e3,{trailing:!0}),[null==d?void 0:d.id]),eu=(n=(0,G.Z)(J().mark(function e(){var t,n,r,i;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=ee?tc.Dc:tc.l8,e.next=3,t();case 3:n=e.sent,i=(r=(0,H.Z)(n,2))[0],r[1]?u.show({variant:"danger",content:"Failed to load teams. Please refresh."}):U(i||[]);case 8:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),eh=(r=(0,G.Z)(J().mark(function e(){var t,n,r,i;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n$();case 2:r=e.sent,(i=(0,H.Z)(r,1)[0])&&(null===(t=i)||void 0===t?void 0:t.length)>0&&(i=null===(n=i)||void 0===n?void 0:n.sort(function(e,t){return e.privacy_zone_name.localeCompare(t.privacy_zone_name)})),W(i||[]);case 7:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),ef=(i=(0,G.Z)(J().mark(function e(){var t,n,r,i;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nQ();case 2:r=e.sent,(i=(0,H.Z)(r,1)[0])&&(null===(t=i)||void 0===t?void 0:t.length)>0&&(i=null===(n=i)||void 0===n?void 0:n.sort(function(e,t){return e.name.localeCompare(t.name)})),Y(i||[]);case 7:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)}),em=function(){M(nO({integration:d,formData:b,teams:L,isAdmin:ei,bcscPrivacyZones:z,bcscAttributes:K}))};(0,$.useEffect)(function(){eu(),eh(),ef()},[]),(0,$.useEffect)(function(){b.primaryEndUsers&&!b.primaryEndUsers.includes("other")&&v(n0(n0({},b),{},{primaryEndUsersOther:""}))},[JSON.stringify(b.primaryEndUsers)]),(0,$.useEffect)(function(){em()},[b,x,L]);var eb=function(e){if(N[x]=!0,e===q.length-1)for(var t=0;t0?(u.show({variant:"danger",fadeOut:1e4,closable:!0,content:"There were errors with your submission. Please see the navigation tabs above for the form pages with errors."}),A(e)):window.location.hash="confirmation-modal"},eP=en?(0,ed.jsx)(nV,{onConfirm:ev}):null,eS={continue:"",back:""},eC=null===(c=b.devIdps)||void 0===c?void 0:c.includes("digitalcredential");return(es?(eS.continue=en?"Update":"Submit",eS.back=en?"Cancel":"Save and Close"):0===x&&ee?(eS.continue="Next",eS.back=en?"Cancel":"Close"):(eS.continue="Next",eS.back=en?"Cancel":"Save and Close"),0===q.length)?null:(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsxs)(n3,{children:[(0,ed.jsx)(ep,{schema:ec,requestId:b.id,editing:en}),(0,ed.jsx)(ew,{currentStage:x,setFormStage:eb,errors:T,isNew:ee,visited:N,schemas:q}),(0,ed.jsxs)(n1,{children:["If new to SSO, please"," ",(0,ed.jsx)(tP.default,{external:!0,href:"".concat(tp.UN,"/category/integrating-your-application"),children:"click to learn more on our wiki page"}),"."]})]}),(0,ed.jsx)(eU,{schema:ec,uiSchema:eg,onChange:function(e){var t=n4(e.formData),n=n2((null==b?void 0:b.devIdps)||[],t.devIdps||[],"applied"===b.status,b.bceidApproved,b.protocol),r=!1===t.projectLead&&!1===t.usesTeam,i=!b.usesTeam&&!0===t.usesTeam,o=!0===t.bceidApproved&&n5(t.devIdps);b.protocol!==t.protocol&&n.length>1&&(n=[]);var a=n0(n0({},t),{},{devIdps:n});"saml"!==t.protocol&&(b.protocol!==t.protocol&&(a.clientId=""),a.devSamlLogoutPostBindingUri="",a.testSamlLogoutPostBindingUri="",a.prodSamlLogoutPostBindingUri=""),"saml"===t.protocol&&((0,ta.S3)(t)||(0,ta.e$)(t))&&(a.devIdps=[]),"browser-login"!==t.authType&&(a.publicAccess=!1),i&&!0===a.projectLead&&!ee&&(a.projectLead=!1),o&&(a.bceidApproved=!1),v(a),r&&(window.location.hash="info-modal"),el(a)},onSubmit:ex,formData:b,formContext:{isAdmin:ei,teams:L,formData:b,setFormData:v,loadTeams:eu},FieldTemplate:e1,ArrayFieldTemplate:tr,liveValidate:N[x]||en,validate:to.Mr,children:ea?(0,ed.jsx)(eY,{formSubmission:ee&&0===x,backButton:eP,text:eS,loading:O,handleSubmit:ey,handleBackClick:ev,savingStatus:{saving:k,content:S}}):(0,ed.jsx)(ed.Fragment,{})}),(0,ed.jsx)(ti.Z,{id:"confirmation-modal",content:(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsx)("p",{children:"Are you sure you're ready to submit your request?"}),eC&&(0,ed.jsxs)("p",{children:["You will need to engage with DIT to learn about the Digital Credential Configuration ID. You can contact them at ",(0,ed.jsx)(tP.default,{href:"mailto:ditp.support@gov.bc.ca",children:"ditp.support@gov.bc.ca"}),"."]}),!ei&&(0,ed.jsxs)("p",{children:["If you need to change anything after submitting your request, please contact our"," ",(0,ed.jsx)(tP.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"#SSO channel"})," ","or email ",(0,ed.jsx)(tP.default,{href:"mailto:bcgov.sso@gov.bc.ca",children:"bcgov.sso@gov.bc.ca"})]})]}),title:"Submitting Request",onConfirm:ej})]})})},39772:function(e,t,n){var r,i=n(16835),o=n(50029),a=n(71383),s=n(87794),c=n.n(s),l=n(67294),d=n(11915),u=n(71893),p=n(85330),h=n(3016),f=n(42894),m=n(15812),b=n(36575),v=n(91679),g=n(24444),x=n(85893),j=u.ZP.div(r||(r=(0,a.Z)(["\n display: flex;\n justify-content: space-between;\n margin-top: 20px;\n & button {\n min-width: 180px;\n }\n"]))),y={idirEmail:"",role:"member",id:new Date().getTime()};t.Z=(0,m.hU)(function(e){var t,n=e.onSubmit,r=e.alert,a=((0,l.useContext)(g.SessionContext)||{}).session,s=(0,l.useState)([y]),u=s[0],m=s[1],O=(0,l.useState)(""),w=O[0],P=O[1],S=(0,l.useState)(!1),C=S[0],Z=S[1],k=(0,l.useState)(null),D=k[0],I=k[1],T=(t=(0,o.Z)(c().mark(function e(){var t,o,s,l,d,p,f,b;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t={name:w,members:u},o=(0,v.p)(t,a.email),l=(s=(0,i.Z)(o,2))[0],d=s[1],!l){e.next=5;break}return e.abrupt("return",I(d));case 5:return Z(!0),e.next=8,(0,h.Cm)(t);case 8:if(p=e.sent,b=(f=(0,i.Z)(p,2))[0],f[1]?r.show({variant:"danger",fadeOut:1e4,closable:!0,content:"Failed to create team. Please try again."}):r.show({variant:"success",fadeOut:1e4,closable:!0,content:"Team ".concat(w," successfully created")}),!b){e.next=16;break}return e.next=16,n(b.id);case 16:m([y]),P(""),Z(!1),I(null),window.location.hash="#";case 21:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});return(0,x.jsxs)("div",{children:[(0,x.jsx)(d.default,{label:"Team Name",onChange:function(e){P(e.target.value)},maxLength:"255","data-testid":"team-name",value:w}),D&&D.name&&(0,x.jsx)(b.Z,{children:null==D?void 0:D.name}),(0,x.jsx)("br",{}),(0,x.jsx)("strong",{children:"Team Members"}),(0,x.jsx)(v.Z,{errors:D,members:u,setMembers:m,currentUser:a}),(0,x.jsxs)(j,{children:[(0,x.jsx)(p.zx,{variant:"secondary",onClick:function(){m([y]),P(""),Z(!1),I(null),window.location.hash="#"},children:"Cancel"}),(0,x.jsx)(p.zx,{type:"button",onClick:T,"data-testid":"send-invitation",children:C?(0,x.jsx)(f.rj,{color:"#FFF",height:18,width:50,visible:C}):"Send Invitation"})]})]})})},91679:function(e,t,n){n.d(t,{p:function(){return M}});var r,i,o,a,s,c,l,d,u,p,h=n(59499),f=n(27812),m=n(71383);n(67294);var b=n(11915),v=n(35611),g=n(71893),x=n(48966),j=n.n(x),y=n(99603),O=n(59417),w=n(36575),P=n(74150),S=n(90352),C=n(35685),Z=n(67888),k=n(85893);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t .select-inner__control {\n padding: 0.13em 0;\n border: 2px solid #606060;\n visibility: inherit;\n\n &:focus-within {\n outline: 4px solid #3b99fc !important;\n outline-offset: 2px !important;\n }\n }\n"]))),L=(0,g.ZP)(y.G)(l||(l=(0,m.Z)(["\n align-self: center;\n color: red;\n cursor: pointer;\n"]))),U=(0,g.ZP)(y.G)(d||(d=(0,m.Z)(["\n padding: 3px;\n border-radius: 25px;\n border-style: solid;\n border-color: black;\n border-width: thin;\n"]))),B=(0,g.ZP)(y.G)(u||(u=(0,m.Z)(["\n padding: 3px;\n border-radius: 25px;\n border-style: solid;\n border-color: black;\n border-width: thin;\n color: white;\n background-color: black;\n"]))),q=g.ZP.p(p||(p=(0,m.Z)(["\n font-style: italic;\n font-size: 0.95em;\n"]))),M=function(e,t){var n={name:null,members:[]};return e.name||(n.name="Please enter a name"),e.members.forEach(function(r,i){r.idirEmail?j().isEmail(r.idirEmail)?(e.members.filter(function(e){return e.idirEmail===r.idirEmail}).length>1||r.idirEmail===t)&&(n.members[i]="Please use unique email"):n.members[i]="Please enter a valid email":n.members[i]="Please enter an email"}),[n.name||n.members.length>0,n]};t.Z=function(e){var t=e.errors,n=e.members,r=e.setMembers,i=e.allowDelete,o=void 0===i||i,a=e.currentUser,s=void 0===a?null:a,c=function(e,t){var i=I({},n[t]);i.idirEmail=(null==e?void 0:e.label.toLowerCase())||"";var o=(0,f.Z)(n);o[t]=i,r(o)},l=function(e,t){var i=I({},n[e]);i.role=t.target.value;var o=(0,f.Z)(n);o[e]=i,r(o)},d=function(e){r(n.filter(function(t,n){return n!==e}))};return(0,k.jsxs)("div",{children:[(0,k.jsxs)("p",{children:["Enter your team member’s government email address and they will be sent an invitation to join the project. Once they accept the invitation, they will have access to your project. Their invitation will expire in"," ",(0,k.jsx)("strong",{children:"2 business days"}),"."]}),(0,k.jsxs)("p",{children:[(0,k.jsx)("span",{className:"strong",children:"Roles:"}),(0,k.jsx)("br",{}),(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{children:(0,k.jsx)(B,{icon:O.Tab})}),"\xa0\xa0",(0,k.jsx)("span",{className:"underline",style:{verticalAlign:"top"},children:"Admins"}),(0,k.jsxs)("span",{style:{verticalAlign:"top"},children:["\xa0have ",(0,k.jsx)("b",{children:"managing"})," powers"]})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{children:(0,k.jsx)(U,{icon:O.Tab})}),"\xa0\xa0",(0,k.jsx)("span",{className:"underline",style:{verticalAlign:"top"},children:"Members"}),(0,k.jsxs)("span",{style:{verticalAlign:"top"},children:["\xa0have ",(0,k.jsx)("b",{children:"viewing"})," powers"]})]}),(0,k.jsx)("br",{}),(0,k.jsx)("div",{children:(0,k.jsx)("span",{className:"underline",children:(0,k.jsx)(P.default,{external:!0,href:(0,S.eO)("CSS-App-My-Teams#ive-created-a-team-now-what"),children:"View a detailed breakdown of roles on our wiki page"})})})]}),(0,k.jsxs)(F,{children:[(0,k.jsxs)(T,{children:[(0,k.jsx)("strong",{children:"Member"}),(0,k.jsx)("strong",{children:"Role"}),(0,k.jsx)(E,{})]}),(0,k.jsx)(q,{children:"*Please enter email address tied to an IDIR to allow your user to login"}),s&&(0,k.jsxs)(R,{children:[(0,k.jsx)(b.default,{value:(null==s?void 0:s.email)||"",readOnly:!0,fullWidth:!0}),(0,k.jsx)(A,{label:"Role",disabled:!0,value:"admin",readOnlyRole:!0,children:(0,k.jsx)("option",{value:"admin",children:"Admin"})})]}),n.map(function(e,n){return(0,k.jsxs)(R,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)(C.Z,{loadOptions:Z.c,onChange:function(e){return c(e,n)},noOptionsMessage:function(){return"Start typing email..."},className:"email-select",menuPlacement:"top",maxMenuHeight:120,classNamePrefix:"select-inner",placeholder:"Enter email address"}),t&&t.members&&t.members[n]&&(0,k.jsx)(w.Z,{children:t.members[n]})]}),(0,k.jsxs)(A,{label:"Role",onChange:function(e){return l(n,e)},value:e.role,"data-testid":"user-role",children:[(0,k.jsx)("option",{value:"member",children:"Member"}),(0,k.jsx)("option",{value:"admin",children:"Admin"})]}),n>=0&&o&&(0,k.jsx)(L,{icon:O.uMC,onClick:function(){return d(n)},title:"Delete","data-testid":"delete-user-role"})]},e.id)}),(0,k.jsxs)(N,{onClick:function(){r([].concat((0,f.Z)(n),[{idirEmail:"",role:"member",id:new Date().getTime(),pending:!0}]))},children:[(0,k.jsx)(y.G,{style:{color:"#006fc4"},icon:O.KtF,title:"Add Item","data-testid":"add-user-role"}),(0,k.jsx)("span",{children:"Add another team member"})]})]})]})}},63005:function(e,t,n){n.d(t,{S:function(){return r}});var r={idir:"IDIR",azureidir:"IDIR - MFA",bceidbasic:"Basic BCeID",bceidbusiness:"Business BCeID",bceidboth:"Basic or Business BCeID",githubbcgov:"GitHub BC Gov",githubpublic:"GitHub",digitalcredential:"Digital Credential",bcservicescard:"BC Services Card"}},77740:function(e,t,n){n.d(t,{F:function(){return r}});var r={"browser-login":"Browser Login","service-account":"Service Account",both:"Browser Login & Service Account"}},26700:function(e,t,n){n.d(t,{Z:function(){return v}});var r,i,o,a,s=n(71383);n(67294);var c=n(71893),l=n(74150),d=n(63055),u=n(90352),p=n(85893),h=c.ZP.h2(r||(r=(0,s.Z)(["\n text-transform: uppercase;\n margin-bottom: 0;\n font-size: ",";\n"])),d.CA),f=c.ZP.ul(i||(i=(0,s.Z)(["\n & li {\n margin: 0;\n }\n"]))),m=c.ZP.li(o||(o=(0,s.Z)(["\n &&& {\n margin-left: 20px;\n }\n"]))),b=c.ZP.div(a||(a=(0,s.Z)(["\n margin-top: ",";\n"])),d.SI);function v(){var e=(0,u.eO)();return(0,p.jsxs)(b,{children:[(0,p.jsx)(h,{children:"Requirements"}),(0,p.jsxs)(f,{children:[(0,p.jsx)("li",{children:"Keep your email address active, and if you are not using your integration, clean it up"}),(0,p.jsxs)("li",{children:["If you are not using your client app configuration,"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"ask us at rocketchat"})," ","for the detailed info"]}),(0,p.jsx)("li",{children:"In order to reduce your application's potential exposure, we recommend using a unique integration for each application."})]}),(0,p.jsx)(h,{children:"We're a Community"}),(0,p.jsxs)(f,{children:[(0,p.jsxs)("li",{children:["As part of a community, we can solve things together and quickly. Please join the"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"#SSO channel on Rocket.Chat"})]}),(0,p.jsxs)("li",{children:["Please follow the",(0,p.jsx)(l.default,{external:!0,href:"https://digital.gov.bc.ca/resources/digital-principles",target:"_blank",rel:"noreferrer",children:"BC Government digital standards"})]}),(0,p.jsx)("li",{children:"Coordinate load testing with the Pathfinder SSO Team, and please only use the Test environment"}),(0,p.jsxs)("li",{children:["The SSO Service is multitenancy; meaning you share with others, so please coordinate with us (",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"#SSO channel on Rocket.Chat"})," ","or email at ",(0,p.jsx)(l.default,{href:"mailto:bcgov.sso@gov.bc.ca",children:"bcgov.sso@gov.bc.ca"}),") :",(0,p.jsxs)("ul",{children:[(0,p.jsxs)(m,{children:["if you predict moderate or high loads",(0,p.jsx)("br",{}),"OR",(0,p.jsx)("br",{})]}),(0,p.jsx)(m,{children:"if you need to conduct load testing or security scans please do in TEST only"})]})]})]}),(0,p.jsx)(h,{children:"What's included in the service"}),(0,p.jsx)(f,{children:(0,p.jsx)("li",{children:"The Standard realm is configured to meet the general needs of the community. Currently, custom configurations, such as scopes or flows, are not available"})}),(0,p.jsx)(h,{children:"Understanding the service level"}),(0,p.jsxs)(f,{children:[(0,p.jsxs)("li",{children:["Our service is available 24/7, except during planned outages within the Kamloops and Calgary data centres. Planned outages are communicated through"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"RocketChat"}),"."]}),(0,p.jsx)("li",{children:"Our regular business hours are weekdays from 9:00 am to 5:00 pm Pacific Time, excluding statutory holidays. Client provisioning questions and requests will be reviewed and handled during normal business hours. After hours support is provided by the Pathfinder SSO team, and is only available for service outages and other incidents that impact the service."}),(0,p.jsxs)("li",{children:["To learn more about our service uptime monitoring, please visit our"," ",(0,p.jsx)(l.default,{external:!0,href:(0,u.eO)("Pathfinder-Uptime-Monitoring/"),children:"uptime page on our wiki"})," ","and join our"," ",(0,p.jsx)(l.default,{external:!0,href:"https://subscribe.developer.gov.bc.ca/",children:"newsletter"})," ","to receive important updates on the service and any outages."]})]}),(0,p.jsx)(h,{children:"Contact Us"}),(0,p.jsxs)(f,{children:[(0,p.jsxs)("li",{children:["If you have any questions, please reach out to us on"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca",children:"Rocket.Chat"})," ","or"," ",(0,p.jsx)(l.default,{external:!0,href:"mailto:bcgov.sso@gov.bc.ca",children:"Email"})," ","the Pathfinder SSO Product Owner."]}),(0,p.jsxs)("li",{children:["Visit our documentation: one for"," ",(0,p.jsx)(l.default,{external:!0,href:e,children:"business"})," ","areas and one for"," ",(0,p.jsx)(l.default,{external:!0,href:u.UN,children:"technical"})," ","areas."]})]})]})}}}]); \ No newline at end of file diff --git a/_next/static/chunks/806-ee165ca071d8ee2d.js b/_next/static/chunks/806-ee165ca071d8ee2d.js new file mode 100644 index 0000000..6f29815 --- /dev/null +++ b/_next/static/chunks/806-ee165ca071d8ee2d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[806],{36575:function(e,t,n){var r,i=n(71383),o=n(71893).ZP.span(r||(r=(0,i.Z)(["\n color: #dc3545;\n margin: 0;\n padding: 0;\n"])));t.Z=o},19344:function(e,t,n){var r,i,o,a=n(71383),s=n(71893),c=n(77740),l=n(63005),d=n(99154),u=n(85893),p=s.ZP.table(r||(r=(0,a.Z)(["\n font-size: unset;\n & tr {\n display: flex;\n margin-bottom: 5px;\n & > td {\n border: none;\n padding: 0 5px 0 0;\n }\n }\n"]))),h=s.ZP.span(i||(i=(0,a.Z)(["\n font-weight: 600;\n"]))),f=s.ZP.ul(o||(o=(0,a.Z)(["\n list-style: none;\n margin: 0;\n & li {\n margin: 0;\n }\n"]))),m=function(e){var t=e.list,n=e.title,r=e.inline,i=void 0!==r&&r,o=e.testid;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:n}),((null==t?void 0:t.length)===1||i)&&(0,u.jsx)(h,{"data-testid":o,children:null==t?void 0:t.map(function(e,n){return(0,u.jsxs)("span",{children:[e,n!==t.length-1&&", "," "]},e)})})]}),!i&&((null==t?void 0:t.length)||0)>1&&(0,u.jsx)("tr",{children:(0,u.jsx)("td",{children:(0,u.jsx)(h,{children:(0,u.jsx)(f,{children:null==t?void 0:t.map(function(e){return(0,u.jsx)("li",{children:e},e)})})})})})]})};t.Z=function(e){var t,n,r,i,o,a,s,f,b=e.children,v=e.request,g=e.teams,x=e.privacyZone;if(!v)return null;var j=null!==(i=v.devIdps)&&void 0!==i?i:[],y="saml"!==v.protocol,O=j.map(function(e){return l.S[e]}),w=(0,d.e$)(v),P="";v.usesTeam&&(P=(null===(f=(void 0===g?[]:g).find(function(e){return String(e.id)===String(v.teamId)}))||void 0===f?void 0:f.name)||v.team&&v.team.name);var S=(t=v.primaryEndUsers,n=v.primaryEndUsersOther,null==t?void 0:t.map(function(e){switch(e){case"livingInBC":return"People living in BC";case"businessInBC":return"People doing business/travel in BC";case"bcGovEmployees":return"BC Gov Employees";case"other":return"Other: ".concat(null!=n?n:"");default:return""}}));return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(p,{children:(0,u.jsxs)("tbody",{children:[P?(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Associated Team:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"associated-team",children:P})})]}):(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Are you accountable for this project?"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"you-accountable",children:void 0===(r=v.projectLead)?"":r?"Yes":"No"})})]}),(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Client Protocol:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"client-protocol",children:y?"OpenID Connect":"SAML"})})]}),y&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Client Type:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"client-type-team",children:v.publicAccess?"Public":"Confidential"})})]}),(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Usecase:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"use-case",children:c.F[v.authType||"browser-login"]})})]}),(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Project Name:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"project-name",children:v.projectName})})]}),S&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Primary End Users:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"project-name",children:S.join(", ")})})]}),v.additionalRoleAttribute&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Additional Role Attribute:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{"data-testid":"add-role-attrib",children:v.additionalRoleAttribute})})]}),(0,u.jsx)(m,{list:O,title:"Identity Providers Required:",inline:!0,testid:"idp-required"}),w&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Privacy Zone:"}),(0,u.jsx)("td",{children:(0,u.jsx)(h,{children:x})})]}),(null===(o=v.environments)||void 0===o?void 0:o.includes("dev"))&&(0,u.jsx)(m,{list:v.devValidRedirectUris,title:"Dev Redirect URIs:",testid:"dev-uri"}),(null===(a=v.environments)||void 0===a?void 0:a.includes("test"))&&(0,u.jsx)(m,{list:v.testValidRedirectUris,title:"Test Redirect URIs:",testid:"test-uri"}),(null===(s=v.environments)||void 0===s?void 0:s.includes("prod"))&&(0,u.jsx)(m,{list:v.prodValidRedirectUris,title:"Prod Redirect URIs:",testid:"prod-uri"}),b]})})})}},47806:function(e,t,n){n.d(t,{Z:function(){return n2}});var r,i,o,a,s,c,l,d,u,p,h,f,m,b,v,g,x,j,y,O,w,P,S,Z,C,k,D,I,T,A,E,N,F,R,L,U,B,q,M,_,z=n(16835),W=n(50029),H=n(59499),G=n(71383),V=n(87794),K=n.n(V),Y=n(67294),$=n(11163),J=n(71893),Q=n(59722),X=n.n(Q),ee=n(93096),et=n.n(ee),en=n(71431),er=n.n(en),ei=n(61478),eo=n.n(ei),ea=n(70100),es=n.n(ea),ec=n(85893),el=J.ZP.h1(r||(r=(0,G.Z)(["\n font-weight: lighter;\n color: #003366;\n margin: 0;\n"])));function ed(e){var t=e.schema,n=e.requestId,r=e.editing,i=er()(String(n),8,"0"),o="".concat(X()(n)?"":"Req ID: ".concat(i," - ")).concat(t.headerText);return(0,ec.jsx)(el,{children:(r?"Editing ":"")+o})}var eu=n(64735),ep=n(99603),eh=n(59417),ef=n(35683),em=n.n(ef),eb=J.ZP.div(i||(i=(0,G.Z)(["\n height: 60px;\n width: 200px;\n background-color: #ebf7ff;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-radius: 5px;\n padding: 15px;\n cursor: pointer;\n margin: 3px 0;\n ","\n"])),function(e){var t=e.color,n=e.backgroundColor,r=e.fontWeight,i=e.border;return"\n color: ".concat(t,";\n background-color: ").concat(n,";\n font-weight: ").concat(r,";\n border: ").concat(i,";\n ")}),ev=J.ZP.div(o||(o=(0,G.Z)(["\n height: 40px;\n width: 40px;\n min-width: 40px;\n text-align: center;\n line-height: 40px;\n border-radius: 40px;\n border: 1px solid #b9d8f0;\n background-color: white;\n font-weight: bold;\n color: #31393f;\n"]))),eg=J.ZP.p(a||(a=(0,G.Z)(["\n margin: 0 0 0 5px;\n"])));function ex(e){var t=e.stageNumber,n=e.title,r=e.active,i=e.visited,o=e.handleClick,a=e.hasError,s="#999999",c="#F0F8FE",l="400",d="1px solid #999999";return r?a?(s="#FFFFFF",c="#D75757",l="700",d="2px solid #313131"):(s="#FFFFFF",c="#2A6FBE",l="700",d="2px solid #313131"):i&&(a?(s="#1A1A1A",c="#F1C0C0",l="700",d="1px solid #313131"):(s="#31393F",c="#C3E3FC",l="400",d="1px solid #313131")),(0,ec.jsxs)(eb,{color:s,backgroundColor:c,fontWeight:l,border:d,onClick:o,"data-testid":"stage-".concat(em()(n)),children:[(0,ec.jsx)(ev,{children:a?(0,ec.jsx)(ep.G,{icon:eh.eHv,color:"red",title:"Some additional fields require your attention."}):t}),(0,ec.jsx)(eg,{children:n})]})}var ej=J.ZP.div(s||(s=(0,G.Z)(["\n width: 824px;\n max-width: 100%;\n"])));function ey(e){var t=e.currentStage,n=e.setFormStage,r=e.errors,i=e.isNew,o=e.visited,a=e.schemas,s=function(e){i||n(e)};return(0,ec.jsx)(ej,{children:(0,ec.jsx)(eu.ZP,{cols:4,children:(0,ec.jsx)(eu.ZP.Row,{collapse:"992",gutter:[],children:null==a?void 0:a.map(function(e,n){return(0,ec.jsx)(eu.ZP.Col,{children:(0,ec.jsx)(ex,{title:e.stepText,stageNumber:n+1,active:n===t,hasError:!!r[n],visited:o[n],handleClick:function(){return s(n)}},n)},e.stepText)})})})})}var eO=n(56483),ew=n(76427),eP=n.n(ew),eS=n(11915),eZ=n(30996),eC=n(35611);function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eD(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n=function(e){switch(e){case"checkbox":return"checked";case"file":return"files";default:return"value"}}(t);return function(r){var i=r.value,o=r.onChange,a=r.label,s=r.schema,c=r.options,l=r.required,d=r.disabled,u=r.onBlur,p=r.id,h=void 0===p?"":p,f=r.readonly,m=s.pattern,b=s.minLength,v=s.maxLength,g=s.placeholder,x=s.fullWidth,j=s.rows,y=c.enumOptions,O=void 0===y?[]:y,w={onChange:function(e){var t=e.target[n];""===t&&(t=void 0),"true"===t&&(t=!0),"false"===t&&(t=!1),o(t)},label:a,name:name,maxLength:v,id:h,required:l,disabled:d,minLength:b,type:t,pattern:m,onBlur:u,fullWidth:x,rows:j,readOnly:f,value:i||"",placeholder:g,checked:void 0!==i&&i};return("file"===t&&delete w.value,"checkbox"===t&&(w.value=!0),"radio"===t)?(0,ec.jsxs)("div",{children:[(0,ec.jsx)("label",{children:a}),O.map(function(t){return(0,ec.jsx)(e,eD(eD({},w),{},{label:t.label,value:t.value,checked:t.value===i,style:{padding:"2px 0"},size:"small",readOnly:f,onBlur:u}),t.value)})]}):(0,ec.jsx)(e,eD(eD({},w),{},{onBlur:u&&function(e){return u(h,e.target.value)},children:O&&O.map(function(e){var t=e.value,n=e.label;return(0,ec.jsx)("option",{value:t,children:n},t)})}))}},eT=n(31513);function eA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eE(e){for(var t=1;t=u&&(0,ec.jsx)(e4,{onClick:e.onDropIndexClick(e.index),children:(0,ec.jsx)(ep.G,{style:{color:"red"},icon:eh.uMC,title:"Remove Item"})})]})},e.index)}),"prod"===d?(0,ec.jsxs)(te,{children:["*Note: wildcard* redirect URIs are ",(0,ec.jsx)("strong",{children:"not"})," allowed in Prod for security reasons."]}):(0,ec.jsxs)(te,{children:["*Note: wildcard* redirect URIs are ",(0,ec.jsx)("strong",{children:"only"})," allowed in ",(0,ec.jsx)("strong",{children:"Dev"})," and"," ",(0,ec.jsx)("strong",{children:"Test"})," environments (but not in Prod for security reasons)."]}),e.canAdd&&(0,ec.jsxs)(e6,{onClick:e.onAddClick,children:[(0,ec.jsx)(ep.G,{style:{color:"#006fc4"},icon:eh.KtF,onClick:e.onAddClick,title:"Add Item","data-testid":"add-uri"}),(0,ec.jsx)(e7,{children:l})]})]})}var tn=n(61165),tr=n(91073),ti=n(99154),to=n(15812),ta=n(3016),ts=n(97644),tc=n.n(ts),tl=n(39772),td=n(90352);function tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t input {\n margin-right: 5px;\n }\n"]))),tD=function(e){var t=e.id,n=e.value,r=e.onChange,i=e.onBlur,o=e.schema;e.formContext;var a=o.enum,s=o.enumNames,c=(0,Y.useState)(!1),l=c[0],d=c[1];return(0,ec.jsxs)("div",{children:[s.map(function(e,o){return(0,ec.jsxs)(tk,{children:[(0,ec.jsx)("input",{type:"radio",id:"".concat(t,"-").concat(e),name:t,value:e,checked:a[o]===n,onChange:function(){return r(a[o])},onBlur:function(){return i(t,n)}}),(0,ec.jsx)("label",{htmlFor:"".concat(t,"-").concat(e),children:e})]},e)}),(0,ec.jsxs)("div",{children:[(0,ec.jsx)(tO.default,{onClick:function(){return d(!0)},style:{cursor:"pointer"},children:"Click here"})," ","to get help deciding which client type to use."]}),(0,ec.jsx)(tC,{id:"client-helper",open:l,onChange:function(e){d(!1),"cancel"!==e&&r("public"===e)}})]})},tI=J.ZP.span(k||(k=(0,G.Z)(["\n display: inline-block;\n width: 200px;\n\n & label {\n font-weight: 700;\n font-size: 0.8rem;\n }\n"]))),tT=J.ZP.span(D||(D=(0,G.Z)(["\n display: inline-block;\n margin-right: 0.3rem;\n margin-bottom: 0.5rem;\n\n & input {\n height: 1.94rem;\n max-width: 3.125rem;\n }\n"]))),tA=J.ZP.span(I||(I=(0,G.Z)(["\n display: inline-block;\n\n & select {\n width: 100px;\n }\n\n & select:disabled {\n margin: 0;\n }\n"]))),tE=function(e){var t=e.id,n=e.value,r=void 0===n?0:n,i=e.label,o=e.readonly,a=e.onChange,s=(e.onBlur,e.schema);e.formContext,o&&(a=eB());var c=s.tooltipContent,l=(0,Y.useState)(0),d=l[0],u=l[1],p=(0,Y.useState)("Minutes"),h=p[0],f=p[1],m=function(e){if(0===e){u(0),f("Minutes");return}var t=e,n="Seconds";t%60==0&&(n="Minutes",t/=60),t%60==0&&(n="Hours",t/=60),t%24==0&&(n="Days",t/=24),u(t),f(n)};return(0,Y.useEffect)(function(){m(r)},[r]),(0,ec.jsxs)("div",{children:[(0,ec.jsxs)(tI,{children:[(0,ec.jsx)("label",{htmlFor:t,children:i}),"\xa0",(0,ec.jsx)(eY.Z,{content:void 0===c?"":c})]}),(0,ec.jsx)(tT,{children:(0,ec.jsx)(eS.default,{type:"text",size:"small",id:t,name:i,value:d.toString(),onChange:function(e){var t=parseInt(e.target.value);isNaN(t)&&(t=0);var n=t;"Minutes"===h?n*=60:"Hours"===h?n*=3600:n*=86400,n>31536e3&&(n=31536e3),a(n),u(t)},disabled:o})}),(0,ec.jsx)(tA,{children:(0,ec.jsxs)(eC.default,{size:"small",onChange:function(e){var t=e.target.value,n=0;(n="Minutes"===t?60*d:"Hours"===t?3600*d:86400*d)>31536e3&&(n=31536e3),a(n),f(t)},value:h,disabled:o,children:[(0,ec.jsx)("option",{children:"Minutes"}),(0,ec.jsx)("option",{children:"Hours"}),(0,ec.jsx)("option",{children:"Days"})]})})]})};function tN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var tF=function(e){var t=e.options,n=e.value,r=e.required,i=e.disabled,o=e.readonly,a=e.autofocus,s=void 0!==a&&a,c=e.onBlur,l=e.onFocus,d=e.onChange,u=e.id,p=e.schema,h=Math.random().toString(),f=t.enumOptions,m=t.enumDisabled,b=t.inline,v=p.tooltips,g=Array.isArray(f)?f:[],x=Array.isArray(m)?m:[];return(0,ec.jsx)("div",{className:"field-radio-group",id:u,children:g.map(function(e,t){var a=e.value===n,p=-1!==x.indexOf(e.value),f=i||p||o?"disabled":"",m=(0,ec.jsxs)("span",{children:[(0,ec.jsx)("input",{type:"radio",checked:a,name:h,required:r,value:e.value,disabled:i||p||o,autoFocus:s&&0===t,onChange:function(t){return d(e.value)},onBlur:c&&function(e){return c(u,e.target.value)},onFocus:l&&function(e){return l(u,e.target.value)}}),(0,ec.jsx)("span",{children:e.label}),"\xa0",v[t]&&(0,ec.jsx)(eY.Z,function(e){for(var t=1;t\n Only the person who is responsible for this project should be submitting the integration request.\xa0\n If you are not the one accountable, please refer this request to a team member who will be accountable for this project.\n

"}},t4={type:"array",items:{type:"string",enum:["livingInBC","businessInBC","bcGovEmployees","other"],enumNames:["People living in BC","People doing business/travel in BC","BC Gov Employees","Other"]},uniqueItems:!0,title:"Who are the primary end users of your project/application? (select all that apply)"};function t7(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=t.map(function(e){return e.name});r.unshift("Select...");var i=t.map(function(e){return String(e.id)});i.unshift("");var o=t.length>0;return{type:"object",customValidation:["createTeam","projectName","projectLead"],headerText:"Enter requester information",stepText:"Requester Info",properties:t9(t9({projectName:{type:"string",title:"Project Name",maxLength:50},primaryEndUsers:t4},(null===(e=n.primaryEndUsers)||void 0===e?void 0:e.includes("other"))&&{primaryEndUsersOther:{type:"string",title:"Project Name",maxLength:100,placeholder:"Enter Details",rows:3}}),{},{usesTeam:{type:"boolean",title:"Project Team",description:"Would you like to allow multiple members to manage this integration?"}}),required:["projectName"],dependencies:{usesTeam:{oneOf:[{properties:{usesTeam:{enum:[!1]},projectLead:t6}},{properties:t9(t9({usesTeam:{enum:[!0]}},o&&{teamId:{type:"string",title:"Project Team",enum:i,enumNames:r}}),{},{createTeam:{type:"string"}})}]},projectLead:{oneOf:[{properties:{projectLead:{enum:[!0]}},required:["projectLead"]},{properties:{projectLead:{enum:[!1]}}}]}}}}var t8={type:"object",required:["agreeWithTerms"],headerText:"Terms and Conditions",stepText:"Terms and Conditions",properties:{agreeWithTerms:{type:"boolean",title:"I agree to the Terms and Conditions",default:null,enum:[null,!0]}}},ne=n(63005),nt=n(11752),nn=n.n(nt),nr=n(34155),ni=(nn()()||{}).publicRuntimeConfig,no=void 0===ni?{}:ni,na=no.include_digital_credential,ns=no.include_bc_services_card;function nc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{isAdmin:!0},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e.protocol,o=e.authType,a=e.status,s="true"===ns||"true"===nr.env.INCLUDE_BC_SERVICES_CARD,c=(0,ti.e$)(e),l={type:"string",title:"Select Client Protocol",enum:["oidc","saml"],enumNames:["OpenID Connect","SAML"],tooltip:{content:"The OpenID Connect (OIDC) client protocol is recommended."},tooltips:[null,{content:'To read more about SAML configuration options and limitations, see here.'),hide:3e3}]},d={type:"string",title:"Please select privacy zone",enum:null==n?void 0:n.map(function(e){return e.privacy_zone_uri||[]}),enumNames:null==n?void 0:n.map(function(e){return e.privacy_zone_name||[]})},u={protocol:l},p=[];if("oidc"===i&&(u.authType={type:"string",title:"Select Usecase",enum:["browser-login","service-account","both"],enumNames:["Browser Login","Service Account","Browser Login and Service Account"],tooltip:"applied"===a?null:{content:"Note that once this is submitted, you will not be able to update and rather will need to create a new integration."},tooltips:[{content:"This enables standard OpenID Connect redirect based authentication with authorization code. In terms of OpenID Connect or OAuth2 specifications, this enables support of 'Authorization Code Flow' for this client."},{content:"This allows you to authenticate this client to Keycloak and retrieve access token dedicated to this client. In terms of OAuth2 specification, this enables support of 'Client Credentials Grant' for this client."},{content:"This enables 'Browser Login' and 'Service Account' both."}]},"browser-login"===o&&(u.publicAccess={type:"boolean",title:"Select Client Type",enum:[!0,!1],enumNames:["Public","Confidential"]}),p.push("publicAccess")),"service-account"!==o){var h=["idir","azureidir","bceidbasic","bceidbusiness","bceidboth","githubpublic","githubbcgov"];("true"===na||"true"===nr.env.INCLUDE_DIGITAL_CREDENTIAL)&&h.push("digitalcredential"),s&&h.push("bcservicescard");var f=h.map(function(e){return ne.S[e]});u.devIdps={type:"array",minItems:1,title:"Choose Identity Provider(s)",items:{type:"string",enum:h,enumNames:f},tooltips:h.map(function(e){return"azureidir"===e?{content:'\n To learn the difference between IDIR and IDIR with MFA,\n \n please visit our GitHub page about choosing an Identity Provider\n \n '),hide:3e3}:"digitalcredential"===e?{content:'To learn more about using the Digital Credential option visit our additional information.'),hide:3e3,alpha:!0}:"bcservicescard"===e?{content:'To learn more about using the BC Services Card option visit our additional information.'),hide:3e3,alpha:!0}:null}),uniqueItems:!0,tooltip:{content:"The identity providers you add will let your users authenticate with those services."}}}return c&&s&&(u.bcscPrivacyZone=d,u.bcscAttributes={type:"array",title:"Please select attribute(s)",items:{type:"string",enum:null==r?void 0:r.map(function(e){return e.name}),enumNames:null==r?void 0:r.map(function(e){return e.name})},uniqueItems:!0,tooltip:{content:"We will provide a separate client for each attribute you can select. Select the attributes required for your project."}}),u.environments={type:"array",minItems:1,title:"Choose Environment(s)",items:{type:"string",enum:["dev","test","prod"],enumNames:["Development","Test","Production"]},uniqueItems:!0,tooltip:{content:"We will provide a separate client for each environment you can select. Select the environments required for your project."}},"saml"!==i&&(u.additionalRoleAttribute={type:"string",title:"Additional Role Attribute(optional)",tooltip:{content:'By default "client_roles" is the default attribute key name to include roles info, if you wish to include same info in another attribute, then use this.'},maxLength:50}),"saml"===i&&t.isAdmin&&(u.clientId={type:"string",title:"As SSO Admin. you can override the client id",tooltip:{content:"The client id should be a string without any spaces"},maxLength:250}),{type:"object",customValidation:["additionalRoleAttribute","clientId","devIdps","authType","bcscPrivacyZone","bcscAttributes"],headerText:"Choose providers",stepText:"Basic Info",properties:u,required:p}}function nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nd(e){for(var t=1;t1?0:1},default:[""],addItemText:"Add another URI"};nd(nd({},np),{},{title:"Test Redirect URIs"}),nd(nd({},np),{},{title:"Prod Redirect URIs"});var nh='valid URI '),nf=nd(nd({},np),{},{description:"You can use any ".concat(nh,' for your redirect URIs. We recommend only using your client for one application.'),title:"Dev Redirect URIs",tooltip:{content:"At least one redirect URI is required for each of DEV, TEST and PROD. If you don't know the redirect URI for one or\n more of these environments, you may provide any valid URI for now and change it later. We suggest something like\n 'http://localhost:1000'."}}),nm=n(34155);function nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nv(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oidc";if(e.length===t.length)return t;var o=e.length1&&void 0!==arguments[1]&&arguments[1];if(!e||0===e.length)return[];var n=e.map(es());return t&&(n=n.filter(function(e){return e})),0===n.length&&n.push(""),n},n3=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.dropEmptyRedirectUris,r=void 0!==n&&n,i=n1(e.devValidRedirectUris,r),o=n1(e.testValidRedirectUris,r),a=n1(e.prodValidRedirectUris,r);return n$(n$({},e),{},{devValidRedirectUris:i,testValidRedirectUris:o,prodValidRedirectUris:a})},n2=(0,to.hU)(function(e){var t,n,r,i,o,a,s,c,l=e.currentUser,d=e.request,u=e.alert,p=(0,$.useRouter)(),h=p.query.step,f=h?Number(h):0,m=(0,Y.useState)(d||{}),b=m[0],v=m[1],g=(0,Y.useState)(f),x=g[0],j=g[1],y=(0,Y.useState)(!1),O=y[0],w=y[1],P=(0,Y.useState)(""),S=P[0],Z=P[1],C=(0,Y.useState)(!1),k=C[0],D=C[1],I=(0,Y.useState)({}),T=I[0],A=I[1],E=(0,Y.useState)(d?{0:!0}:{}),N=E[0],F=E[1],R=(0,Y.useState)([]),L=R[0],U=R[1],B=(0,Y.useState)([]),q=B[0],M=B[1],_=(0,Y.useState)((0,td.S2)()),H=_[0],G=_[1],V=(0,Y.useState)((0,td.K_)()),J=V[0],Q=V[1],ee=(0,Y.useContext)(nV.SurveyContext),en=X()(null==d?void 0:d.id),ei=(null==d?void 0:d.status)==="applied",eo=l.isAdmin||!1,ea=0!==x||b.usesTeam||b.projectLead,es=x===q.length-1,el=q[x]||{},eu=(0,Y.useCallback)(et()((t=(0,W.Z)(K().mark(function e(t){var n;return K().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(en||ei)){e.next=2;break}return e.abrupt("return");case 2:if(!d){e.next=11;break}return D(!0),e.next=6,(0,nG.WN)(n$(n$({},t),{},{id:d.id}));case 6:n=e.sent,(0,z.Z)(n,2)[1]||Z("Last saved at ".concat(new Date().toLocaleString())),D(!1);case 11:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),2e3,{trailing:!0}),[null==d?void 0:d.id]),ep=(n=(0,W.Z)(K().mark(function e(){var t,n,r,i;return K().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=en?ta.Dc:ta.l8,e.next=3,t();case 3:n=e.sent,i=(r=(0,z.Z)(n,2))[0],r[1]?u.show({variant:"danger",content:"Failed to load teams. Please refresh."}):U(i||[]);case 8:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),eh=(r=(0,W.Z)(K().mark(function e(){var t,n,r,i;return K().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,nK.k)();case 2:r=e.sent,(i=(0,z.Z)(r,1)[0])&&(null===(t=i)||void 0===t?void 0:t.length)>0&&(i=null===(n=i)||void 0===n?void 0:n.sort(function(e,t){return e.privacy_zone_name.localeCompare(t.privacy_zone_name)})),G(i||[]);case 7:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),ef=(i=(0,W.Z)(K().mark(function e(){var t,n,r,i;return K().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,nK.A)();case 2:r=e.sent,(i=(0,z.Z)(r,1)[0])&&(null===(t=i)||void 0===t?void 0:t.length)>0&&(i=null===(n=i)||void 0===n?void 0:n.sort(function(e,t){return e.name.localeCompare(t.name)})),Q(i||[]);case 7:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)}),em=function(){M(nj({integration:d,formData:b,teams:L,isAdmin:eo,bcscPrivacyZones:H,bcscAttributes:J}))};(0,Y.useEffect)(function(){ep(),eh(),ef()},[]),(0,Y.useEffect)(function(){b.primaryEndUsers&&!b.primaryEndUsers.includes("other")&&v(n$(n$({},b),{},{primaryEndUsersOther:""}))},[JSON.stringify(b.primaryEndUsers)]),(0,Y.useEffect)(function(){em()},[b,x,L]);var eb=function(e){if(N[x]=!0,e===q.length-1)for(var t=0;t0?(u.show({variant:"danger",fadeOut:1e4,closable:!0,content:"There were errors with your submission. Please see the navigation tabs above for the form pages with errors."}),A(e)):window.location.hash="confirmation-modal"},eP=ei?(0,ec.jsx)(nH,{onConfirm:ev}):null,eS={continue:"",back:""},eZ=null===(c=b.devIdps)||void 0===c?void 0:c.includes("digitalcredential");return(es?(eS.continue=ei?"Update":"Submit",eS.back=ei?"Cancel":"Save and Close"):0===x&&en?(eS.continue="Next",eS.back=ei?"Cancel":"Close"):(eS.continue="Next",eS.back=ei?"Cancel":"Save and Close"),0===q.length)?null:(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)(nQ,{children:[(0,ec.jsx)(ed,{schema:el,requestId:b.id,editing:ei}),(0,ec.jsx)(ey,{currentStage:x,setFormStage:eb,errors:T,isNew:en,visited:N,schemas:q}),(0,ec.jsxs)(nJ,{children:["If new to SSO, please"," ",(0,ec.jsx)(tO.default,{external:!0,href:"".concat(td.UN,"/category/integrating-your-application"),children:"click to learn more on our wiki page"}),"."]})]}),(0,ec.jsx)(eR,{schema:el,uiSchema:eg,onChange:function(e){var t=n3(e.formData),n=nX((null==b?void 0:b.devIdps)||[],t.devIdps||[],"applied"===b.status,b.bceidApproved,b.protocol),r=!1===t.projectLead&&!1===t.usesTeam,i=!b.usesTeam&&!0===t.usesTeam,o=!0===t.bceidApproved&&n0(t.devIdps);b.protocol!==t.protocol&&n.length>1&&(n=[]);var a=n$(n$({},t),{},{devIdps:n});"saml"!==t.protocol&&(b.protocol!==t.protocol&&(a.clientId=""),a.devSamlLogoutPostBindingUri="",a.testSamlLogoutPostBindingUri="",a.prodSamlLogoutPostBindingUri=""),"saml"===t.protocol&&((0,ti.S3)(t)||(0,ti.e$)(t))&&(a.devIdps=[]),"browser-login"!==t.authType&&(a.publicAccess=!1),i&&!0===a.projectLead&&!en&&(a.projectLead=!1),o&&(a.bceidApproved=!1),v(a),r&&(window.location.hash="info-modal"),eu(a)},onSubmit:ex,formData:b,formContext:{isAdmin:eo,teams:L,formData:b,setFormData:v,loadTeams:ep,bcscPrivacyZones:H},FieldTemplate:eX,ArrayFieldTemplate:tt,liveValidate:N[x]||ei,validate:tr.Mr,children:ea?(0,ec.jsx)(eV,{formSubmission:en&&0===x,backButton:eP,text:eS,loading:O,handleSubmit:eO,handleBackClick:ev,savingStatus:{saving:k,content:S}}):(0,ec.jsx)(ec.Fragment,{})}),(0,ec.jsx)(tn.Z,{id:"confirmation-modal",content:(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("p",{children:"Are you sure you're ready to submit your request?"}),eZ&&(0,ec.jsxs)("p",{children:["You will need to engage with DIT to learn about the Digital Credential Configuration ID. You can contact them at ",(0,ec.jsx)(tO.default,{href:"mailto:ditp.support@gov.bc.ca",children:"ditp.support@gov.bc.ca"}),"."]}),!eo&&(0,ec.jsxs)("p",{children:["If you need to change anything after submitting your request, please contact our"," ",(0,ec.jsx)(tO.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"#SSO channel"})," ","or email ",(0,ec.jsx)(tO.default,{href:"mailto:bcgov.sso@gov.bc.ca",children:"bcgov.sso@gov.bc.ca"})]})]}),title:"Submitting Request",onConfirm:ej})]})})},39772:function(e,t,n){var r,i=n(16835),o=n(50029),a=n(71383),s=n(87794),c=n.n(s),l=n(67294),d=n(11915),u=n(71893),p=n(85330),h=n(3016),f=n(42894),m=n(15812),b=n(36575),v=n(91679),g=n(24444),x=n(85893),j=u.ZP.div(r||(r=(0,a.Z)(["\n display: flex;\n justify-content: space-between;\n margin-top: 20px;\n & button {\n min-width: 180px;\n }\n"]))),y={idirEmail:"",role:"member",id:new Date().getTime()};t.Z=(0,m.hU)(function(e){var t,n=e.onSubmit,r=e.alert,a=((0,l.useContext)(g.SessionContext)||{}).session,s=(0,l.useState)([y]),u=s[0],m=s[1],O=(0,l.useState)(""),w=O[0],P=O[1],S=(0,l.useState)(!1),Z=S[0],C=S[1],k=(0,l.useState)(null),D=k[0],I=k[1],T=(t=(0,o.Z)(c().mark(function e(){var t,o,s,l,d,p,f,b;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t={name:w,members:u},o=(0,v.p)(t,a.email),l=(s=(0,i.Z)(o,2))[0],d=s[1],!l){e.next=5;break}return e.abrupt("return",I(d));case 5:return C(!0),e.next=8,(0,h.Cm)(t);case 8:if(p=e.sent,b=(f=(0,i.Z)(p,2))[0],f[1]?r.show({variant:"danger",fadeOut:1e4,closable:!0,content:"Failed to create team. Please try again."}):r.show({variant:"success",fadeOut:1e4,closable:!0,content:"Team ".concat(w," successfully created")}),!b){e.next=16;break}return e.next=16,n(b.id);case 16:m([y]),P(""),C(!1),I(null),window.location.hash="#";case 21:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});return(0,x.jsxs)("div",{children:[(0,x.jsx)(d.default,{label:"Team Name",onChange:function(e){P(e.target.value)},maxLength:"255","data-testid":"team-name",value:w}),D&&D.name&&(0,x.jsx)(b.Z,{children:null==D?void 0:D.name}),(0,x.jsx)("br",{}),(0,x.jsx)("strong",{children:"Team Members"}),(0,x.jsx)(v.Z,{errors:D,members:u,setMembers:m,currentUser:a}),(0,x.jsxs)(j,{children:[(0,x.jsx)(p.zx,{variant:"secondary",onClick:function(){m([y]),P(""),C(!1),I(null),window.location.hash="#"},children:"Cancel"}),(0,x.jsx)(p.zx,{type:"button",onClick:T,"data-testid":"send-invitation",children:Z?(0,x.jsx)(f.rj,{color:"#FFF",height:18,width:50,visible:Z}):"Send Invitation"})]})]})})},91679:function(e,t,n){n.d(t,{p:function(){return M}});var r,i,o,a,s,c,l,d,u,p,h=n(59499),f=n(27812),m=n(71383);n(67294);var b=n(11915),v=n(35611),g=n(71893),x=n(48966),j=n.n(x),y=n(99603),O=n(59417),w=n(36575),P=n(74150),S=n(90352),Z=n(35685),C=n(67888),k=n(85893);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t .select-inner__control {\n padding: 0.13em 0;\n border: 2px solid #606060;\n visibility: inherit;\n\n &:focus-within {\n outline: 4px solid #3b99fc !important;\n outline-offset: 2px !important;\n }\n }\n"]))),L=(0,g.ZP)(y.G)(l||(l=(0,m.Z)(["\n align-self: center;\n color: red;\n cursor: pointer;\n"]))),U=(0,g.ZP)(y.G)(d||(d=(0,m.Z)(["\n padding: 3px;\n border-radius: 25px;\n border-style: solid;\n border-color: black;\n border-width: thin;\n"]))),B=(0,g.ZP)(y.G)(u||(u=(0,m.Z)(["\n padding: 3px;\n border-radius: 25px;\n border-style: solid;\n border-color: black;\n border-width: thin;\n color: white;\n background-color: black;\n"]))),q=g.ZP.p(p||(p=(0,m.Z)(["\n font-style: italic;\n font-size: 0.95em;\n"]))),M=function(e,t){var n={name:null,members:[]};return e.name||(n.name="Please enter a name"),e.members.forEach(function(r,i){r.idirEmail?j().isEmail(r.idirEmail)?(e.members.filter(function(e){return e.idirEmail===r.idirEmail}).length>1||r.idirEmail===t)&&(n.members[i]="Please use unique email"):n.members[i]="Please enter a valid email":n.members[i]="Please enter an email"}),[n.name||n.members.length>0,n]};t.Z=function(e){var t=e.errors,n=e.members,r=e.setMembers,i=e.allowDelete,o=void 0===i||i,a=e.currentUser,s=void 0===a?null:a,c=function(e,t){var i=I({},n[t]);i.idirEmail=(null==e?void 0:e.label.toLowerCase())||"";var o=(0,f.Z)(n);o[t]=i,r(o)},l=function(e,t){var i=I({},n[e]);i.role=t.target.value;var o=(0,f.Z)(n);o[e]=i,r(o)},d=function(e){r(n.filter(function(t,n){return n!==e}))};return(0,k.jsxs)("div",{children:[(0,k.jsxs)("p",{children:["Enter your team member’s government email address and they will be sent an invitation to join the project. Once they accept the invitation, they will have access to your project. Their invitation will expire in"," ",(0,k.jsx)("strong",{children:"2 business days"}),"."]}),(0,k.jsxs)("p",{children:[(0,k.jsx)("span",{className:"strong",children:"Roles:"}),(0,k.jsx)("br",{}),(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{children:(0,k.jsx)(B,{icon:O.Tab})}),"\xa0\xa0",(0,k.jsx)("span",{className:"underline",style:{verticalAlign:"top"},children:"Admins"}),(0,k.jsxs)("span",{style:{verticalAlign:"top"},children:["\xa0have ",(0,k.jsx)("b",{children:"managing"})," powers"]})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{children:(0,k.jsx)(U,{icon:O.Tab})}),"\xa0\xa0",(0,k.jsx)("span",{className:"underline",style:{verticalAlign:"top"},children:"Members"}),(0,k.jsxs)("span",{style:{verticalAlign:"top"},children:["\xa0have ",(0,k.jsx)("b",{children:"viewing"})," powers"]})]}),(0,k.jsx)("br",{}),(0,k.jsx)("div",{children:(0,k.jsx)("span",{className:"underline",children:(0,k.jsx)(P.default,{external:!0,href:(0,S.eO)("CSS-App-My-Teams#ive-created-a-team-now-what"),children:"View a detailed breakdown of roles on our wiki page"})})})]}),(0,k.jsxs)(F,{children:[(0,k.jsxs)(T,{children:[(0,k.jsx)("strong",{children:"Member"}),(0,k.jsx)("strong",{children:"Role"}),(0,k.jsx)(E,{})]}),(0,k.jsx)(q,{children:"*Please enter email address tied to an IDIR to allow your user to login"}),s&&(0,k.jsxs)(R,{children:[(0,k.jsx)(b.default,{value:(null==s?void 0:s.email)||"",readOnly:!0,fullWidth:!0}),(0,k.jsx)(A,{label:"Role",disabled:!0,value:"admin",readOnlyRole:!0,children:(0,k.jsx)("option",{value:"admin",children:"Admin"})})]}),n.map(function(e,n){return(0,k.jsxs)(R,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)(Z.Z,{loadOptions:C.c,onChange:function(e){return c(e,n)},noOptionsMessage:function(){return"Start typing email..."},className:"email-select",menuPlacement:"top",maxMenuHeight:120,classNamePrefix:"select-inner",placeholder:"Enter email address"}),t&&t.members&&t.members[n]&&(0,k.jsx)(w.Z,{children:t.members[n]})]}),(0,k.jsxs)(A,{label:"Role",onChange:function(e){return l(n,e)},value:e.role,"data-testid":"user-role",children:[(0,k.jsx)("option",{value:"member",children:"Member"}),(0,k.jsx)("option",{value:"admin",children:"Admin"})]}),n>=0&&o&&(0,k.jsx)(L,{icon:O.uMC,onClick:function(){return d(n)},title:"Delete","data-testid":"delete-user-role"})]},e.id)}),(0,k.jsxs)(N,{onClick:function(){r([].concat((0,f.Z)(n),[{idirEmail:"",role:"member",id:new Date().getTime(),pending:!0}]))},children:[(0,k.jsx)(y.G,{style:{color:"#006fc4"},icon:O.KtF,title:"Add Item","data-testid":"add-user-role"}),(0,k.jsx)("span",{children:"Add another team member"})]})]})]})}},63005:function(e,t,n){n.d(t,{S:function(){return r}});var r={idir:"IDIR",azureidir:"IDIR - MFA",bceidbasic:"Basic BCeID",bceidbusiness:"Business BCeID",bceidboth:"Basic or Business BCeID",githubbcgov:"GitHub BC Gov",githubpublic:"GitHub",digitalcredential:"Digital Credential",bcservicescard:"BC Services Card"}},77740:function(e,t,n){n.d(t,{F:function(){return r}});var r={"browser-login":"Browser Login","service-account":"Service Account",both:"Browser Login & Service Account"}},26700:function(e,t,n){n.d(t,{Z:function(){return v}});var r,i,o,a,s=n(71383);n(67294);var c=n(71893),l=n(74150),d=n(63055),u=n(90352),p=n(85893),h=c.ZP.h2(r||(r=(0,s.Z)(["\n text-transform: uppercase;\n margin-bottom: 0;\n font-size: ",";\n"])),d.CA),f=c.ZP.ul(i||(i=(0,s.Z)(["\n & li {\n margin: 0;\n }\n"]))),m=c.ZP.li(o||(o=(0,s.Z)(["\n &&& {\n margin-left: 20px;\n }\n"]))),b=c.ZP.div(a||(a=(0,s.Z)(["\n margin-top: ",";\n"])),d.SI);function v(){var e=(0,u.eO)();return(0,p.jsxs)(b,{children:[(0,p.jsx)(h,{children:"Requirements"}),(0,p.jsxs)(f,{children:[(0,p.jsx)("li",{children:"Keep your email address active, and if you are not using your integration, clean it up"}),(0,p.jsxs)("li",{children:["If you are not using your client app configuration,"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"ask us at rocketchat"})," ","for the detailed info"]}),(0,p.jsx)("li",{children:"In order to reduce your application's potential exposure, we recommend using a unique integration for each application."})]}),(0,p.jsx)(h,{children:"We're a Community"}),(0,p.jsxs)(f,{children:[(0,p.jsxs)("li",{children:["As part of a community, we can solve things together and quickly. Please join the"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"#SSO channel on Rocket.Chat"})]}),(0,p.jsxs)("li",{children:["Please follow the",(0,p.jsx)(l.default,{external:!0,href:"https://digital.gov.bc.ca/resources/digital-principles",target:"_blank",rel:"noreferrer",children:"BC Government digital standards"})]}),(0,p.jsx)("li",{children:"Coordinate load testing with the Pathfinder SSO Team, and please only use the Test environment"}),(0,p.jsxs)("li",{children:["The SSO Service is multitenancy; meaning you share with others, so please coordinate with us (",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"#SSO channel on Rocket.Chat"})," ","or email at ",(0,p.jsx)(l.default,{href:"mailto:bcgov.sso@gov.bc.ca",children:"bcgov.sso@gov.bc.ca"}),") :",(0,p.jsxs)("ul",{children:[(0,p.jsxs)(m,{children:["if you predict moderate or high loads",(0,p.jsx)("br",{}),"OR",(0,p.jsx)("br",{})]}),(0,p.jsx)(m,{children:"if you need to conduct load testing or security scans please do in TEST only"})]})]})]}),(0,p.jsx)(h,{children:"What's included in the service"}),(0,p.jsx)(f,{children:(0,p.jsx)("li",{children:"The Standard realm is configured to meet the general needs of the community. Currently, custom configurations, such as scopes or flows, are not available"})}),(0,p.jsx)(h,{children:"Understanding the service level"}),(0,p.jsxs)(f,{children:[(0,p.jsxs)("li",{children:["Our service is available 24/7, except during planned outages within the Kamloops and Calgary data centres. Planned outages are communicated through"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca/channel/sso/",children:"RocketChat"}),"."]}),(0,p.jsx)("li",{children:"Our regular business hours are weekdays from 9:00 am to 5:00 pm Pacific Time, excluding statutory holidays. Client provisioning questions and requests will be reviewed and handled during normal business hours. After hours support is provided by the Pathfinder SSO team, and is only available for service outages and other incidents that impact the service."}),(0,p.jsxs)("li",{children:["To learn more about our service uptime monitoring, please visit our"," ",(0,p.jsx)(l.default,{external:!0,href:(0,u.eO)("Pathfinder-Uptime-Monitoring/"),children:"uptime page on our wiki"})," ","and join our"," ",(0,p.jsx)(l.default,{external:!0,href:"https://subscribe.developer.gov.bc.ca/",children:"newsletter"})," ","to receive important updates on the service and any outages."]})]}),(0,p.jsx)(h,{children:"Contact Us"}),(0,p.jsxs)(f,{children:[(0,p.jsxs)("li",{children:["If you have any questions, please reach out to us on"," ",(0,p.jsx)(l.default,{external:!0,href:"https://chat.developer.gov.bc.ca",children:"Rocket.Chat"})," ","or"," ",(0,p.jsx)(l.default,{external:!0,href:"mailto:bcgov.sso@gov.bc.ca",children:"Email"})," ","the Pathfinder SSO Product Owner."]}),(0,p.jsxs)("li",{children:["Visit our documentation: one for"," ",(0,p.jsx)(l.default,{external:!0,href:e,children:"business"})," ","areas and one for"," ",(0,p.jsx)(l.default,{external:!0,href:u.UN,children:"technical"})," ","areas."]})]})]})}},16239:function(e,t,n){n.d(t,{A:function(){return u},k:function(){return d}});var r,i,o=n(50029),a=n(87794),s=n.n(a),c=n(90352),l=n(21963),d=(r=(0,o.Z)(s().mark(function e(){var t;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.e.get("bc-services-card/privacy-zones").then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[t,null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",[(0,c.S2)(),null]);case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(){return r.apply(this,arguments)}),u=(i=(0,o.Z)(s().mark(function e(){var t;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.e.get("bc-services-card/claim-types").then(function(e){return e.data});case 3:return t=(t=e.sent).filter(function(e){return!["sub","client_id"].includes(e.name)}),e.abrupt("return",[t,null]);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",[(0,c.K_)(),null]);case 11:case"end":return e.stop()}},e,null,[[0,8]])})),function(){return i.apply(this,arguments)})}}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/_app-de873a6016e1d408.js b/_next/static/chunks/pages/_app-2dad111fd534c479.js similarity index 93% rename from _next/static/chunks/pages/_app-de873a6016e1d408.js rename to _next/static/chunks/pages/_app-2dad111fd534c479.js index fa15b57..046c876 100644 --- a/_next/static/chunks/pages/_app-de873a6016e1d408.js +++ b/_next/static/chunks/pages/_app-2dad111fd534c479.js @@ -295,7 +295,7 @@ */function tn(e,t){this.x=t,this.q=e}function ti(e,t,r,n){this.curve=e,this.x=t,this.y=r,null==n?this.z=E.ONE:this.z=n,this.zinv=null}function ta(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new ti(this,null,null)}e9.prototype.nextBytes=function(e){var t;for(t=0;t0&&t.length>0)this.n=e7(e,16),this.e=parseInt(t,16);else throw"Invalid RSA public key"},tt.prototype.encrypt=function(e){var t=function(e,t){if(t=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var a=new e9,o=[];t>2;){for(o[0]=0;0==o[0];)a.nextBytes(o);r[--t]=o[0]}return r[--t]=2,r[--t]=0,new E(r)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var r=this.doPublic(t);if(null==r)return null;var n=r.toString(16);return(1&n.length)==0?n:"0"+n},tt.prototype.encryptOAEP=function(e,t,r){var n=function(e,t,r,n){var i=d.crypto.MessageDigest,a=d.crypto.Util,o=null;if(r||(r="sha1"),"string"==typeof r&&(o=i.getCanonicalAlgName(r),n=i.getHashLength(o),r=function(e){return tv(a.hashHex(tg(e),o))}),e.length+2*n+2>t)throw"Message too long for RSA";var s,u="";for(s=0;s>3,t,r);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;var a=i.toString(16);return(1&a.length)==0?a:"0"+a},tt.prototype.type="RSA",tt.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);0>t.compareTo(r);)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},tt.prototype.setPrivate=function(e,t,r){if(this.isPrivate=!0,"string"!=typeof e)this.n=e,this.e=t,this.d=r;else if(null!=e&&null!=t&&e.length>0&&t.length>0)this.n=e7(e,16),this.e=parseInt(t,16),this.d=e7(r,16);else throw"Invalid RSA private key"},tt.prototype.setPrivateEx=function(e,t,r,n,i,a,o,s){if(this.isPrivate=!0,this.isPublic=!1,null==e)throw"RSASetPrivateEx N == null";if(null==t)throw"RSASetPrivateEx E == null";if(0==e.length)throw"RSASetPrivateEx N.length == 0";if(0==t.length)throw"RSASetPrivateEx E.length == 0";if(null!=e&&null!=t&&e.length>0&&t.length>0)this.n=e7(e,16),this.e=parseInt(t,16),this.d=e7(r,16),this.p=e7(n,16),this.q=e7(i,16),this.dmp1=e7(a,16),this.dmq1=e7(o,16),this.coeff=e7(s,16);else throw"Invalid RSA private key in RSASetPrivateEx"},tt.prototype.generate=function(e,t){var r=new e9,n=e>>1;this.e=parseInt(t,16);for(var i=new E(t,16),a=e/2-100,o=E.ONE.shiftLeft(a);;){for(;this.p=new E(e-n,1,r),!(0==this.p.subtract(E.ONE).gcd(i).compareTo(E.ONE)&&this.p.isProbablePrime(10)););for(;this.q=new E(n,1,r),!(0==this.q.subtract(E.ONE).gcd(i).compareTo(E.ONE)&&this.q.isProbablePrime(10)););if(0>=this.p.compareTo(this.q)){var s=this.p;this.p=this.q,this.q=s}var u=this.q.subtract(this.p).abs();if(!(u.bitLength()=u.compareTo(o))){var c=this.p.subtract(E.ONE),l=this.q.subtract(E.ONE),f=c.multiply(l);if(0==f.gcd(i).compareTo(E.ONE)&&(this.n=this.p.multiply(this.q),this.n.bitLength()==e)){this.d=i.modInverse(f),this.dmp1=this.d.mod(c),this.dmq1=this.d.mod(l),this.coeff=this.q.modInverse(this.p);break}}}this.isPrivate=!0},tt.prototype.decrypt=function(e){if(e.length!=Math.ceil(this.n.bitLength()/4))throw Error("wrong ctext length");var t=e7(e,16),r=this.doPrivate(t);return null==r?null:/*! (c) Tom Wu, Kenji Urushima | http://www-cs-students.stanford.edu/~tjw/jsbn/ */function(e,t){for(var r=e.toByteArray(),n=0;n=r.length)return null;for(var i="";++n191&&a<224?(i+=String.fromCharCode((31&a)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&a)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}(r,this.n.bitLength()+7>>3)},tt.prototype.decryptOAEP=function(e,t,r){if(e.length!=Math.ceil(this.n.bitLength()/4))throw Error("wrong ctext length");var n=e7(e,16),i=this.doPrivate(n);return null==i?null:function(e,t,r,n){var i=d.crypto.MessageDigest,a=d.crypto.Util,o=null;for(r||(r="sha1"),"string"==typeof r&&(o=i.getCanonicalAlgName(r),n=i.getHashLength(o),r=function(e){return tv(a.hashHex(tg(e),o))}),e=e.toByteArray(),s=0;s>3,t,r)},tn.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},tn.prototype.toBigInteger=function(){return this.x},tn.prototype.negate=function(){return new tn(this.q,this.x.negate().mod(this.q))},tn.prototype.add=function(e){return new tn(this.q,this.x.add(e.toBigInteger()).mod(this.q))},tn.prototype.subtract=function(e){return new tn(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},tn.prototype.multiply=function(e){return new tn(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},tn.prototype.square=function(){return new tn(this.q,this.x.square().mod(this.q))},tn.prototype.divide=function(e){return new tn(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},tn.prototype.sqrt=function(){return new tn(this.q,this.x.sqrt().mod(this.q))},ti.prototype.getX=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ti.prototype.getY=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ti.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(E.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(E.ZERO))},ti.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(E.ZERO)&&!this.y.toBigInteger().equals(E.ZERO)},ti.prototype.negate=function(){return new ti(this.curve,this.x,this.y.negate(),this.z)},ti.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(E.ZERO.equals(r))return E.ZERO.equals(t)?this.twice():this.curve.getInfinity();var n=new E("3"),i=this.x.toBigInteger(),a=this.y.toBigInteger();e.x.toBigInteger(),e.y.toBigInteger();var o=r.square(),s=o.multiply(r),u=i.multiply(o),c=t.square().multiply(this.z),l=c.subtract(u.shiftLeft(1)).multiply(e.z).subtract(s).multiply(r).mod(this.curve.q),f=u.multiply(n).multiply(t).subtract(a.multiply(s)).subtract(c.multiply(t)).multiply(e.z).add(t.multiply(s)).mod(this.curve.q),d=s.multiply(this.z).multiply(e.z).mod(this.curve.q);return new ti(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(f),d)},ti.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new E("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),a=this.curve.a.toBigInteger(),o=t.square().multiply(e);E.ZERO.equals(a)||(o=o.add(this.z.square().multiply(a)));var s=(o=o.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),u=o.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(o.square().multiply(o)).mod(this.curve.q),c=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new ti(this.curve,this.curve.fromBigInteger(s),this.curve.fromBigInteger(u),c)},ti.prototype.multiply=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e.multiply(new E("3")),n=this.negate(),i=this,a=this.curve.q.subtract(e),o=a.multiply(new E("3")),s=new ti(this.curve,this.x,this.y),u=s.negate();for(t=r.bitLength()-2;t>0;--t){i=i.twice();var c=r.testBit(t);c!=e.testBit(t)&&(i=i.add(c?this:n))}for(t=o.bitLength()-2;t>0;--t){s=s.twice();var l=o.testBit(t);l!=a.testBit(t)&&(s=s.add(l?s:u))}return i},ti.prototype.multiplyTwo=function(e,t,r){n=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var n,i=this.curve.getInfinity(),a=this.add(t);n>=0;)i=i.twice(),e.testBit(n)?i=r.testBit(n)?i.add(a):i.add(this):r.testBit(n)&&(i=i.add(t)),--n;return i},ta.prototype.getQ=function(){return this.q},ta.prototype.getA=function(){return this.a},ta.prototype.getB=function(){return this.b},ta.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},ta.prototype.getInfinity=function(){return this.infinity},ta.prototype.fromBigInteger=function(e){return new tn(this.q,e)},ta.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var t=e.substr(0,2);e.substr(2);var r=this.fromBigInteger(new E(s,16)),n=this.getA(),i=this.getB(),a=r.square().add(n).multiply(r).add(i).sqrt();return"03"==t&&(a=a.negate()),new ti(this,r,a);case 4:case 6:case 7:var o=(e.length-2)/2,s=e.substr(2,o),u=e.substr(o+2,o);return new ti(this,this.fromBigInteger(new E(s,16)),this.fromBigInteger(new E(u,16)));default:return null}},/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib */tn.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},ti.prototype.getEncoded=function(e){var t=function(e,t){var r=e.toByteArrayUnsigned();if(tr.length;)r.unshift(0);return r},r=this.getX().toBigInteger(),n=this.getY().toBigInteger(),i=t(r,32);return e?n.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(t(n,32))),i},ti.decodeFrom=function(e,t){t[0];var r=t.length-1,n=t.slice(1,1+r/2),i=t.slice(1+r/2,1+r);n.unshift(0),i.unshift(0);var a=new E(n),o=new E(i);return new ti(e,e.fromBigInteger(a),e.fromBigInteger(o))},ti.decodeFromHex=function(e,t){t.substr(0,2);var r=t.length-2,n=t.substr(2,r/2),i=t.substr(2+r/2,r/2),a=new E(n,16),o=new E(i,16);return new ti(e,e.fromBigInteger(a),e.fromBigInteger(o))},ti.prototype.add2D=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.x.equals(e.x))return this.y.equals(e.y)?this.twice():this.curve.getInfinity();var t=e.x.subtract(this.x),r=e.y.subtract(this.y).divide(t),n=r.square().subtract(this.x).subtract(e.x),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new ti(this.curve,n,i)},ti.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=this.curve.fromBigInteger(E.valueOf(2)),t=this.curve.fromBigInteger(E.valueOf(3)),r=this.x.square().multiply(t).add(this.curve.a).divide(this.y.multiply(e)),n=r.square().subtract(this.x.multiply(e)),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new ti(this.curve,n,i)},ti.prototype.multiply2D=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e.multiply(new E("3")),n=this.negate(),i=this;for(t=r.bitLength()-2;t>0;--t){i=i.twice();var a=r.testBit(t);a!=e.testBit(t)&&(i=i.add2D(a?this:n))}return i},ti.prototype.isOnCurve=function(){var e=this.getX().toBigInteger(),t=this.getY().toBigInteger(),r=this.curve.getA().toBigInteger(),n=this.curve.getB().toBigInteger(),i=this.curve.getQ(),a=t.multiply(t).mod(i),o=e.multiply(e).multiply(e).add(r.multiply(e)).add(n).mod(i);return a.equals(o)},ti.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},ti.prototype.validate=function(){var e=this.curve.getQ();if(this.isInfinity())throw Error("Point is at infinity.");var t=this.getX().toBigInteger(),r=this.getY().toBigInteger();if(0>t.compareTo(E.ONE)||t.compareTo(e.subtract(E.ONE))>0)throw Error("x coordinate out of bounds");if(0>r.compareTo(E.ONE)||r.compareTo(e.subtract(E.ONE))>0)throw Error("y coordinate out of bounds");if(!this.isOnCurve())throw Error("Point is not on the curve.");if(this.multiply(e).isInfinity())throw Error("Point is not a scalar multiple of G.");return!0};/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval - */var to=function(){var e=RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),t=RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "};function n(e,t,n){return t?r[t]:String.fromCharCode(parseInt(n,16))}var i=new String(""),a=Object.hasOwnProperty;return function(r,o){var s,u,c,l=r.match(e),f=l[0],d=!1;"{"===f?s={}:"["===f?s=[]:(s=[],d=!0);for(var p=[s],h=1-d,m=l.length;h=0;)delete r[n[u]]}return o.call(e,t,r)};s=g({"":s},"")}return s}}();void 0!==d&&d||(d={}),void 0!==d.asn1&&d.asn1||(d.asn1={}),d.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i15)throw Error("ASN.1 length too long to represent by 8x: n = "+e.toString(16));return(128+r).toString(16)+t},this.tohex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(e){this.params=e},void 0!=e&&void 0!=e.tlv&&(this.hTLV=e.tlv,this.isModified=!1)},d.asn1.DERAbstractString=function(e){d.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=th(this.s).toLowerCase()},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},tD(d.asn1.DERAbstractString,d.asn1.ASN1Object),d.asn1.DERAbstractTime=function(e){d.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){var t=e.getTime()+6e4*e.getTimezoneOffset();return new Date(t)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),a=String(i.getFullYear());"utc"==t&&(a=a.substr(2,2));var o=a+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var s=i.getMilliseconds();if(0!=s){var u=n(String(s),3);o=o+"."+(u=u.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:Array(t-e.length+1).join("0")+e},this.setByParam=function(e){this.hV=null,this.hTLV=null,this.params=e},this.getString=function(){},this.setString=function(e){this.hTLV=null,this.isModified=!0,void 0==this.params&&(this.params={}),this.params.str=e},this.setByDate=function(e){this.hTLV=null,this.isModified=!0,void 0==this.params&&(this.params={}),this.params.date=e},this.setByDateValue=function(e,t,r,n,i,a){var o=new Date(Date.UTC(e,t-1,r,n,i,a,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},tD(d.asn1.DERAbstractTime,d.asn1.ASN1Object),d.asn1.DERAbstractStructured=function(e){d.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=[],void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},tD(d.asn1.DERAbstractStructured,d.asn1.ASN1Object),d.asn1.DERBoolean=function(e){d.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",!1==e?this.hTLV="010100":this.hTLV="0101ff"},tD(d.asn1.DERBoolean,d.asn1.ASN1Object),d.asn1.DERInteger=function(e){d.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=d.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new E(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},tD(d.asn1.DERInteger,d.asn1.ASN1Object),d.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=d.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.tohex()}d.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7>6,i=128|63&r;return tm(n.toString(16)+i.toString(16))}var n=224|(240&t)>>4,i=128|(15&t)<<2|(192&r)>>6;return tm(n.toString(16)+i.toString(16)+(128|63&r).toString(16))}).join("")}function t_(e){for(var t=encodeURIComponent(e),r="",n=0;n"7"?"00"+e:e}function tR(e){if(!tk(e))return null;try{var t=[],r=e.substr(0,2),n=parseInt(r,16);t[0]=new String(Math.floor(n/40)),t[1]=new String(n%40);for(var i=e.substr(2),a=[],o=0;o0&&(c=c+"."+s.join(".")),c}catch(e){return null}}ts.getLblen=function(e,t){if("8"!=e.substr(t+2,1))return 1;var r=parseInt(e.substr(t+3,1));return 0==r?-1:0=n)break}return a},ts.getNthChildIdx=function(e,t,r){return ts.getChildIdx(e,t)[r]},ts.getIdxbyList=function(e,t,r,n){var i,a;return 0==r.length?void 0!==n&&e.substr(t,2)!==n?-1:t:(i=r.shift())>=(a=ts.getChildIdx(e,t)).length?-1:ts.getIdxbyList(e,a[i],r,n)},ts.getIdxbyListEx=function(e,t,r,n){if(0==r.length)return void 0!==n&&e.substr(t,2)!==n?-1:t;i=r.shift(),a=ts.getChildIdx(e,t);for(var i,a,o=0,s=0;s=e.length?null:ts.getTLV(e,i)},ts.getTLVbyListEx=function(e,t,r,n){var i=ts.getIdxbyListEx(e,t,r,n);return -1==i?null:ts.getTLV(e,i)},ts.getVbyList=function(e,t,r,n,i){var a,o;return -1==(a=ts.getIdxbyList(e,t,r,n))||a>=e.length?null:(o=ts.getV(e,a),!0===i&&(o=o.substr(2)),o)},ts.getVbyListEx=function(e,t,r,n,i){var a,o;return -1==(a=ts.getIdxbyListEx(e,t,r,n))?null:(o=ts.getV(e,a),"03"==e.substr(a,2)&&!1!==i&&(o=o.substr(2)),o)},ts.getInt=function(e,t,r){void 0==r&&(r=-1);try{var n=e.substr(t,2);if("02"!=n&&"03"!=n)return r;var i=ts.getV(e,t);if("02"==n)return parseInt(i,16);return function(e){if(e.length%2!=0||null==(e=e.toLowerCase()).match(/^[0-9a-f]+$/))return -1;try{var t=e.substr(0,2);if("00"==t)return parseInt(e.substr(2),16);var r=parseInt(t,16);if(r>7)return -1;var n=e.substr(2),i=parseInt(n,16).toString(2);"0"==i&&(i="00000000"),i=i.slice(0,0-r);var a=parseInt(i,2);if(a==NaN)return -1;return a}catch(e){return -1}}(i)}catch(e){return r}},ts.getOID=function(e,t,r){void 0==r&&(r=null);try{if("06"!=e.substr(t,2))return r;var n=ts.getV(e,t);return tR(n)}catch(e){return r}},ts.getOIDName=function(e,t,r){void 0==r&&(r=null);try{var n=ts.getOID(e,t,r);if(n==r)return r;var i=d.asn1.x509.OID.oid2name(n);if(""==i)return n;return i}catch(e){return r}},ts.getString=function(e,t,r){void 0==r&&(r=null);try{var n=ts.getV(e,t);return tv(n)}catch(e){return r}},ts.hextooidstr=function(e){var t=function(e,t){return e.length>=t?e:Array(t-e.length+1).join("0")+e},r=[],n=parseInt(e.substr(0,2),16);r[0]=new String(Math.floor(n/40)),r[1]=new String(n%40);for(var i=e.substr(2),a=[],o=0;o0&&(c=c+"."+s.join(".")),c},ts.dump=function(e,t,r,n){var i=ts.getV,a=ts.dump,o=ts.getChildIdx,s=e;e instanceof d.asn1.ASN1Object&&(s=e.tohex());var u=function(e,t){return e.length<=2*t?e:e.substr(0,t)+"..(total "+e.length/2+"bytes).."+e.substr(e.length-t,t)};void 0===t&&(t={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var c=t.ommit_long_octet,l=s.substr(r,2);if("01"==l){var f=i(s,r);return"00"==f?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n"}if("02"==l){var f=i(s,r);return n+"INTEGER "+u(f,c)+"\n"}if("03"==l){var f=i(s,r);if(!ts.isASN1HEX(f.substr(2)))return n+"BITSTRING "+u(f,c)+"\n";var p=n+"BITSTRING, encapsulates\n";return p+a(f.substr(2),t,0,n+" ")}if("04"==l){var f=i(s,r);if(!ts.isASN1HEX(f))return n+"OCTETSTRING "+u(f,c)+"\n";var p=n+"OCTETSTRING, encapsulates\n";return p+a(f,t,0,n+" ")}if("05"==l)return n+"NULL\n";if("06"==l){var h=i(s,r),m=d.asn1.ASN1Util.oidHexToInt(h),g=d.asn1.x509.OID.oid2name(m),y=m.replace(/\./g," ");return""!=g?n+"ObjectIdentifier "+g+" ("+y+")\n":n+"ObjectIdentifier ("+y+")\n"}if("0a"==l)return n+"ENUMERATED "+parseInt(i(s,r))+"\n";if("0c"==l)return n+"UTF8String '"+tm(i(s,r))+"'\n";if("13"==l)return n+"PrintableString '"+tm(i(s,r))+"'\n";if("14"==l)return n+"TeletexString '"+tm(i(s,r))+"'\n";if("16"==l)return n+"IA5String '"+tm(i(s,r))+"'\n";if("17"==l)return n+"UTCTime "+tm(i(s,r))+"\n";if("18"==l)return n+"GeneralizedTime "+tm(i(s,r))+"\n";if("1a"==l)return n+"VisualString '"+tm(i(s,r))+"'\n";if("1e"==l)return n+"BMPString '"+tO(i(s,r))+"'\n";if("30"==l){if("3000"==s.substr(r,4))return n+"SEQUENCE {}\n";var p=n+"SEQUENCE\n",b=o(s,r),x=t;if((2==b.length||3==b.length)&&"06"==s.substr(b[0],2)&&"04"==s.substr(b[b.length-1],2)){var g=ts.oidname(i(s,b[0])),S=JSON.parse(JSON.stringify(t));S.x509ExtName=g,x=S}for(var w=0;w4?{enum:{hex:p}}:{enum:parseInt(p,16)};if("30"==l||"31"==l)return f[c[l]]=function(e){for(var r=[],n=a(e,0),o=0;o31)return!1;if((192&r)==128&&(31&r)==n)return!0;return!1}catch(e){return!1}},ts.isASN1HEX=function(e){if(e.length%2==1)return!1;var t=ts.getVblen(e,0),r=e.substr(0,2),n=ts.getL(e,0);return e.length-r.length-n.length==2*t},ts.checkStrictDER=function(e,t,r,n,i){if(void 0===r){if("string"!=typeof e||(e=e.toLowerCase(),!d.lang.String.isHex(e)))throw Error("not hex string");r=e.length,i=(n=e.length/2)<128?1:Math.ceil(n.toString(16))+1}if(ts.getL(e,t).length>2*i)throw Error("L of TLV too long: idx="+t);var a=ts.getVblen(e,t);if(a>n)throw Error("value of L too long than hex: idx="+t);var o=ts.getTLV(e,t),s=o.length-2-ts.getL(e,t).length;if(s!==2*a)throw Error("V string length and L's value not the same:"+s+"/"+2*a);if(0===t&&e.length!=o.length)throw Error("total length and TLV length unmatch:"+e.length+"!="+o.length);var u=e.substr(t,2);if("02"===u){var c=ts.getVidx(e,t);if("00"==e.substr(c,2)&&56>e.charCodeAt(c+2))throw Error("not least zeros for DER INTEGER")}if(32&parseInt(u,16)){for(var l=ts.getVblen(e,t),f=0,p=ts.getChildIdx(e,t),h=0;h0&&e.push(new n({tag:"a3",obj:new c(t.ext)})),new d.asn1.DERSequence({array:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&this.setByParam(e)},tD(d.asn1.x509.TBSCertificate,d.asn1.ASN1Object),d.asn1.x509.Extensions=function(e){d.asn1.x509.Extensions.superclass.constructor.call(this);var t=d.asn1,r=t.DERSequence,n=t.x509;this.aParam=[],this.setByParam=function(e){this.aParam=e},this.tohex=function(){for(var e=[],t=0;t-1&&e.push(new n({int:this.pathLen}));var t=new i({array:e});return this.asn1ExtnValue=t,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,void 0!==e&&(void 0!==e.cA&&(this.cA=e.cA),void 0!==e.pathLen&&(this.pathLen=e.pathLen))},tD(d.asn1.x509.BasicConstraints,d.asn1.x509.Extension),d.asn1.x509.CRLDistributionPoints=function(e){d.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,e);var t=d.asn1,r=t.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(e){for(var n=[],i=0;i0&&e.push(new r({array:t}))}return new r({array:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(this.params=e)},tD(d.asn1.x509.PolicyInformation,d.asn1.ASN1Object),d.asn1.x509.PolicyQualifierInfo=function(e){d.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,e);var t=d.asn1,r=t.DERSequence,n=t.DERIA5String,i=t.DERObjectIdentifier,a=t.x509.UserNotice;this.params=null,this.tohex=function(){if(void 0!==this.params.cps){var e=new r({array:[new i({oid:"1.3.6.1.5.5.7.2.1"}),new n({str:this.params.cps})]});return e.tohex()}if(void 0!=this.params.unotice){var e=new r({array:[new i({oid:"1.3.6.1.5.5.7.2.2"}),new a(this.params.unotice)]});return e.tohex()}},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(this.params=e)},tD(d.asn1.x509.PolicyQualifierInfo,d.asn1.ASN1Object),d.asn1.x509.UserNotice=function(e){d.asn1.x509.UserNotice.superclass.constructor.call(this,e);var t=d.asn1.DERSequence,r=(d.asn1.DERInteger,d.asn1.x509.DisplayText),n=d.asn1.x509.NoticeReference;this.params=null,this.tohex=function(){var e=[];return void 0!==this.params.noticeref&&e.push(new n(this.params.noticeref)),void 0!==this.params.exptext&&e.push(new r(this.params.exptext)),new t({array:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(this.params=e)},tD(d.asn1.x509.UserNotice,d.asn1.ASN1Object),d.asn1.x509.NoticeReference=function(e){d.asn1.x509.NoticeReference.superclass.constructor.call(this,e);var t=d.asn1.DERSequence,r=d.asn1.DERInteger,n=d.asn1.x509.DisplayText;this.params=null,this.tohex=function(){var e=[];if(void 0!==this.params.org&&e.push(new n(this.params.org)),void 0!==this.params.noticenum){for(var i=[],a=this.params.noticenum,o=0;o0)for(var e=0;e0;i++){var a=t.shift();if(!0===r){var o=(n.pop()+","+a).replace(/\\,/g,",");n.push(o),r=!1}else n.push(a);"\\"===a.substr(-1,1)&&(r=!0)}return(n=n.map(function(e){return e.replace("/","\\/")})).reverse(),"/"+n.join("/")},d.asn1.x509.X500Name.ldapToOneline=function(e){return d.asn1.x509.X500Name.ldapToCompat(e)},d.asn1.x509.RDN=function(e){d.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var t=d.asn1.x509.AttributeTypeAndValue;this.setByParam=function(e){void 0!==e.rule&&(this.sRule=e.rule),void 0!==e.str&&this.addByMultiValuedString(e.str),void 0!==e.array&&(this.paramArray=e.array)},this.addByString=function(e){this.asn1Array.push(new d.asn1.x509.AttributeTypeAndValue({str:e,rule:this.sRule}))},this.addByMultiValuedString=function(e){for(var t=d.asn1.x509.RDN.parseString(e),r=0;r0)for(var e=0;e0;i++){var a=t.shift();if(!0===r){var o=(n.pop()+"+"+a).replace(/\\\+/g,"+");n.push(o),r=!1}else n.push(a);"\\"===a.substr(-1,1)&&(r=!0)}for(var s=!1,u=[],i=0;n.length>0;i++){var a=n.shift();if(!0===s){var c=u.pop();if(a.match(/"$/)){var o=(c+"+"+a).replace(/^([^=]+)="(.*)"$/,"$1=$2");u.push(o),s=!1}else u.push(c+"+"+a)}else u.push(a);a.match(/^[^=]+="/)&&(s=!0)}return u},d.asn1.x509.AttributeTypeAndValue=function(e){d.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var t=d,r=t.asn1,n=r.DERSequence,i=r.DERUTF8String,a=r.DERPrintableString,o=r.DERTeletexString,s=r.DERIA5String,u=r.DERVisibleString,c=r.DERBMPString,l=t.lang.String.isMail,f=t.lang.String.isPrintable;this.setByParam=function(e){if(void 0!==e.rule&&(this.sRule=e.rule),void 0!==e.ds&&(this.dsType=e.ds),void 0===e.value&&void 0!==e.str){var t=e.str.match(/^([^=]+)=(.+)$/);if(t)this.sType=t[1],this.sValue=t[2];else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}else this.sType=e.type,this.sValue=e.value},this.setByString=function(e,t){void 0!==t&&(this.sRule=t);var r=e.match(/^([^=]+)=(.+)$/);if(r)this.setByAttrTypeAndValueStr(r[1],r[2]);else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)},this._getDsType=function(){var e=this.sType,t=this.sValue,r=this.sRule;if("prn"===r){if("CN"==e&&l(t))return"ia5";if(f(t))return"prn"}else if("utf8"===r){if("CN"==e&&l(t))return"ia5";if("C"==e)return"prn"}return"utf8"},this.setByAttrTypeAndValueStr=function(e,t,r){void 0!==r&&(this.sRule=r),this.sType=e,this.sValue=t},this.getValueObj=function(e,t){if("utf8"==e)return new i({str:t});if("prn"==e)return new a({str:t});if("tel"==e)return new o({str:t});if("ia5"==e)return new s({str:t});if("vis"==e)return new u({str:t});if("bmp"==e)return new c({str:t});throw Error("unsupported directory string type: type="+e+" value="+t)},this.tohex=function(){null==this.dsType&&(this.dsType=this._getDsType());var e=d.asn1.x509.OID.atype2obj(this.sType),t=this.getValueObj(this.dsType,this.sValue),r=new n({array:[e,t]});return this.TLV=r.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&this.setByParam(e)},tD(d.asn1.x509.AttributeTypeAndValue,d.asn1.ASN1Object),d.asn1.x509.SubjectPublicKeyInfo=function(e){d.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var t=d,r=t.asn1,n=r.DERInteger,i=r.DERBitString,a=r.DERObjectIdentifier,o=r.DERSequence,s=r.ASN1Util.newObject,u=r.x509.AlgorithmIdentifier,c=t.crypto;c.ECDSA,c.DSA,this.getASN1Object=function(){if(null==this.asn1AlgId||null==this.asn1SubjPKey)throw"algId and/or subjPubKey not set";return new o({array:[this.asn1AlgId,this.asn1SubjPKey]})},this.tohex=function(){var e=this.getASN1Object();return this.hTLV=e.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(e){try{if(e instanceof tt){var t=s({seq:[{int:{bigint:e.n}},{int:{int:e.e}}]}).tohex();this.asn1AlgId=new u({name:"rsaEncryption"}),this.asn1SubjPKey=new i({hex:"00"+t})}}catch(e){}try{if(e instanceof d.crypto.ECDSA){var r=new a({name:e.curveName});this.asn1AlgId=new u({name:"ecPublicKey",asn1params:r}),this.asn1SubjPKey=new i({hex:"00"+e.pubKeyHex})}}catch(e){}try{if(e instanceof d.crypto.DSA){var r=new s({seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]});this.asn1AlgId=new u({name:"dsa",asn1params:r});var o=new n({bigint:e.y});this.asn1SubjPKey=new i({hex:"00"+o.tohex()})}}catch(e){}},void 0!==e&&this.setPubKey(e)},tD(d.asn1.x509.SubjectPublicKeyInfo,d.asn1.ASN1Object),d.asn1.x509.Time=function(e){d.asn1.x509.Time.superclass.constructor.call(this);var t=d.asn1,r=t.DERUTCTime,n=t.DERGeneralizedTime;this.params=null,this.type=null,this.setTimeParams=function(e){this.timeParams=e},this.setByParam=function(e){this.params=e},this.getType=function(e){return e.match(/^[0-9]{12}Z$/)?"utc":e.match(/^[0-9]{14}Z$/)?"gen":e.match(/^[0-9]{12}\.[0-9]+Z$/)?"utc":e.match(/^[0-9]{14}\.[0-9]+Z$/)?"gen":null},this.tohex=function(){var e=this.params,t=null;if("string"==typeof e&&(e={str:e}),null!=e&&e.str&&(null==e.type||void 0==e.type)&&(e.type=this.getType(e.str)),null!=e&&e.str?("utc"==e.type&&(t=new r(e.str)),"gen"==e.type&&(t=new n(e.str))):t="gen"==this.type?new n:new r,null==t)throw Error("wrong setting for Time");return this.TLV=t.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},void 0!=e&&this.setByParam(e)},d.asn1.x509.Time_bak=function(e){d.asn1.x509.Time_bak.superclass.constructor.call(this);var t=d.asn1,r=t.DERUTCTime,n=t.DERGeneralizedTime;this.setTimeParams=function(e){this.timeParams=e},this.tohex=function(){var e=null;return e=null!=this.timeParams?"utc"==this.type?new r(this.timeParams):new n(this.timeParams):"utc"==this.type?new r:new n,this.TLV=e.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",void 0!==e&&(void 0!==e.type?this.type=e.type:void 0!==e.str&&(e.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),e.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=e)},tD(d.asn1.x509.Time,d.asn1.ASN1Object),d.asn1.x509.AlgorithmIdentifier=function(e){d.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var t=d.asn1,r=t.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(null===this.nameAlg&&null===this.asn1Alg)throw Error("algorithm not specified");if(null!==this.nameAlg){var e=null;for(var n in r)n===this.nameAlg&&(e=r[n]);if(null!==e)return this.hTLV=e,this.hTLV}null!==this.nameAlg&&null===this.asn1Alg&&(this.asn1Alg=t.x509.OID.name2obj(this.nameAlg));var i=[this.asn1Alg];null!==this.asn1Params&&i.push(this.asn1Params);var a=new t.DERSequence({array:i});return this.hTLV=a.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(void 0!==e.name&&(this.nameAlg=e.name),void 0!==e.asn1params&&(this.asn1Params=e.asn1params),void 0!==e.paramempty&&(this.paramEmpty=e.paramempty)),null===this.asn1Params&&!1===this.paramEmpty&&null!==this.nameAlg){void 0!==this.nameAlg.name&&(this.nameAlg=this.nameAlg.name);var n=this.nameAlg.toLowerCase();"withdsa"!==n.substr(-7,7)&&"withecdsa"!==n.substr(-9,9)&&(this.asn1Params=new t.DERNull)}},tD(d.asn1.x509.AlgorithmIdentifier,d.asn1.ASN1Object),d.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"},d.asn1.x509.GeneralName=function(e){d.asn1.x509.GeneralName.superclass.constructor.call(this);var t=d.asn1,r=t.x509,n=r.X500Name,i=r.OtherName,a=t.DERIA5String,o=(t.DERPrintableString,t.DEROctetString),s=t.DERTaggedObject,u=t.ASN1Object,c=Error;this.params=null,this.setByParam=function(e){this.params=e},this.tohex=function(){var e=this.params,t=!1;if(void 0!==e.other)r="a0",l=new i(e.other);else if(void 0!==e.rfc822)r="81",l=new a({str:e.rfc822});else if(void 0!==e.dns)r="82",l=new a({str:e.dns});else if(void 0!==e.dn)r="a4",t=!0,l="string"==typeof e.dn?new n({str:e.dn}):e.dn instanceof d.asn1.x509.X500Name?e.dn:new n(e.dn);else if(void 0!==e.ldapdn)r="a4",t=!0,l=new n({ldapstr:e.ldapdn});else if(void 0!==e.certissuer||void 0!==e.certsubj){r="a4",t=!0;var r,t,l,f,p,h,m=null;if(void 0!==e.certsubj?(f=!1,p=e.certsubj):(f=!0,p=e.certissuer),p.match(/^[0-9A-Fa-f]+$/),-1!=p.indexOf("-----BEGIN ")&&(m=tb(p)),null==m)throw Error("certsubj/certissuer not cert");var g=new tH;g.hex=m,h=f?g.getIssuerHex():g.getSubjectHex(),(l=new u).hTLV=h}else if(void 0!==e.uri)r="86",l=new a({str:e.uri});else if(void 0!==e.ip){r="87";var y,b=e.ip;try{if(b.match(/^[0-9a-f]+$/)){var x=b.length;if(8==x||16==x||32==x||64==x)y=b;else throw"err"}else y=function e(t){var r=Error("malformed IP address");if(!(t=t.toLowerCase(t)).match(/^[0-9a-f.:/]+$/))throw r;if(t.match(/^[0-9.]+$/)){var n=t.split(".");if(4!==n.length)throw r;var i="";try{for(var a=0;a<4;a++){var o=parseInt(n[a]);i+=("0"+o.toString(16)).slice(-2)}return i}catch(e){throw r}}else{if(t.match(/^[0-9.]+\/[0-9]+$/)){var s=t.split("/");return e(s[0])+tP(parseInt(s[1]),32)}if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return tw(t);if(t.match(/^[0-9a-f:]+\/[0-9]+$/)&&-1!==t.indexOf(":")){var s=t.split("/");return tw(s[0])+tP(parseInt(s[1]),128)}throw r}}(b)}catch(t){throw new c("malformed IP address: "+e.ip+":"+t.message)}l=new o({hex:y})}else throw new c("improper params");return new s({tag:r,explicit:t,obj:l}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&this.setByParam(e)},tD(d.asn1.x509.GeneralName,d.asn1.ASN1Object),d.asn1.x509.GeneralNames=function(e){d.asn1.x509.GeneralNames.superclass.constructor.call(this);var t=d.asn1;this.setByParamArray=function(e){for(var r=0;r0){for(var r=n(e.valhex,t[0]),i=u(r,0),a=[],o=0;o1){var l=n(e.valhex,t[1]);e.polhex=l}delete e.valhex},this.setSignaturePolicyIdentifier=function(e){var t=u(e.valhex,0);if(t.length>0){var i=ts.getOID(e.valhex,t[0]);e.oid=i}if(t.length>1){var a=new tH,o=u(e.valhex,t[1]),s=n(e.valhex,o[0]),c=a.getAlgorithmIdentifierName(s);e.alg=c;var l=r(e.valhex,o[1]);e.hash=l}delete e.valhex},this.setSigningCertificateV2=function(e){var t=u(e.valhex,0);if(t.length>0){for(var r=n(e.valhex,t[0]),i=u(r,0),a=[],o=0;o1){var l=n(e.valhex,t[1]);e.polhex=l}delete e.valhex},this.getESSCertID=function(e){var t={},i=u(e,0);if(i.length>0){var a=r(e,i[0]);t.hash=a}if(i.length>1){var o=n(e,i[1]),s=this.getIssuerSerial(o);void 0!=s.serial&&(t.serial=s.serial),void 0!=s.issuer&&(t.issuer=s.issuer)}return t},this.getESSCertIDv2=function(i){var a={},o=u(i,0);if(o.length<1||3s+1){var f=n(i,o[s+1]),d=this.getIssuerSerial(f);a.issuer=d.issuer,a.serial=d.serial}return a},this.getIssuerSerial=function(e){var i={},a=u(e,0),o=n(e,a[0]),s=t.getGeneralNames(o)[0].dn;i.issuer=s;var c=r(e,a[1]);return i.serial={hex:c},i},this.getCertificateSet=function(e){for(var t=u(e,0),r=[],i=0;i=0;o--)i+=n[o];return i}if("string"==typeof e&&void 0!=a[e])return tT([e],a);if("object"==typeof e&&void 0!=e.length)return tT(e,a);throw new t("wrong params")},this.tohex=function(){this.params;var e=this.getBinValue();return new n({bin:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!=e&&this.setByParam(e)},tD(d.asn1.tsp.PKIFailureInfo,d.asn1.ASN1Object),d.asn1.tsp.AbstractTSAAdapter=function(e){this.getTSTHex=function(e,t){throw"not implemented yet"}},d.asn1.tsp.SimpleTSAAdapter=function(e){var t=d,r=t.asn1.tsp,n=t.crypto.Util.hashHex;r.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(e,t){var i=n(e,t);return this.params.econtent.content.messageImprint={alg:t,hash:i},this.params.econtent.content.serial={int:this.serial++},this.params.econtent.content.nonce={int:Math.floor(1e9*Math.random())},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==e&&(this.params=e)},tD(d.asn1.tsp.SimpleTSAAdapter,d.asn1.tsp.AbstractTSAAdapter),d.asn1.tsp.FixedTSAAdapter=function(e){var t=d,r=t.asn1.tsp,n=t.crypto.Util.hashHex;r.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(e,t){var i=n(e,t);return this.params.econtent.content.messageImprint={alg:t,hash:i},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==e&&(this.params=e)},tD(d.asn1.tsp.FixedTSAAdapter,d.asn1.tsp.AbstractTSAAdapter),d.asn1.tsp.TSPUtil=new function(){},d.asn1.tsp.TSPUtil.newTimeStampToken=function(e){return new d.asn1.tsp.TimeStampToken(e)},d.asn1.tsp.TSPUtil.parseTimeStampReq=function(e){return new d.asn1.tsp.TSPParser().getTimeStampReq(e)},d.asn1.tsp.TSPUtil.parseMessageImprint=function(e){return new d.asn1.tsp.TSPParser().getMessageImprint(e)},d.asn1.tsp.TSPParser=function(){var e=new tH,t=ts.getV,r=ts.getTLV,n=ts.getIdxbyList,i=(ts.getTLVbyListEx,ts.getChildIdx),a=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],o={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(e){var t=i(e,0);if(1==t.length)return this.getPKIStatusInfo(r(e,t[0]));if(t.length>1){var n=this.getPKIStatusInfo(r(e,t[0])),a=r(e,t[1]),o=this.getToken(a);return o.statusinfo=n,o}},this.getToken=function(e){var t=(new d.asn1.cms.CMSParser).getCMSSignedData(e);return this.setTSTInfo(t),t},this.setTSTInfo=function(e){var t=e.econtent;if("tstinfo"==t.type){var r=t.content.hex,n=this.getTSTInfo(r);t.content=n}},this.getTSTInfo=function(n){var a={},o=i(n,0),s=t(n,o[1]);a.policy=tR(s);var u=r(n,o[2]);a.messageImprint=this.getMessageImprint(u);var c=t(n,o[3]);a.serial={hex:c};var l=t(n,o[4]);a.genTime={str:tm(l)};var f=0;if(o.length>5&&"30"==n.substr(o[5],2)){var d=r(n,o[5]);a.accuracy=this.getAccuracy(d),f++}if(o.length>5+f&&"01"==n.substr(o[5+f],2)&&("ff"==t(n,o[5+f])&&(a.ordering=!0),f++),o.length>5+f&&"02"==n.substr(o[5+f],2)){var p=t(n,o[5+f]);a.nonce={hex:p},f++}if(o.length>5+f&&"a0"==n.substr(o[5+f],2)){var h=r(n,o[5+f]);h="30"+h.substr(2);var m=(pGeneralNames=e.getGeneralNames(h))[0].dn;a.tsa=m,f++}if(o.length>5+f&&"a1"==n.substr(o[5+f],2)){var g=r(n,o[5+f]);g="30"+g.substr(2);var y=e.getExtParamArray(g);a.ext=y,f++}return a},this.getAccuracy=function(e){for(var r={},n=i(e,0),a=0;a1&&"30"==e.substr(o[1],2)){var l=r(e,o[1]);n.statusstr=this.getPKIFreeText(l),s++}if(o.length>s&&"03"==e.substr(o[1+s],2)){var f=r(e,o[1+s]);n.failinfo=this.getPKIFailureInfo(f)}return n},this.getPKIFreeText=function(e){for(var t=[],r=i(e,0),n=0;n=t)?e:Array(t-e.length+1).join(r)+e};function tT(e,t){for(var r=0,n=0;n=0;n--)a+=i[n];return a}function tD(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}void 0!==d&&d||(d={}),void 0!==d.crypto&&d.crypto||(d.crypto={}),d.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:b.algo.MD5,sha1:b.algo.SHA1,sha224:b.algo.SHA224,sha256:b.algo.SHA256,sha384:b.algo.SHA384,sha512:b.algo.SHA512,ripemd160:b.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(void 0===this.DIGESTINFOHEAD[t])throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,r){var n=this.getDigestInfoHex(e,t),i=r/4;if(n.length+22>i)throw"key is too short for SigAlg: keylen="+r+","+t;for(var a="0001",o="00"+n,s="",u=i-a.length-o.length,c=0;c=s.compareTo(E.ZERO));var u=o.modInverse(i).multiply(a.add(n.multiply(s))).mod(i);return r.biRSSigToASN1Sig(s,u)},this.sign=function(e,t){var r=this.ecparams.n,n=E.fromByteArrayUnsigned(e);do var i=this.getBigRandom(r),a=this.ecparams.G.multiply(i).getX().toBigInteger().mod(r);while(0>=a.compareTo(E.ZERO));var o=i.modInverse(r).multiply(n.add(t.multiply(a))).mod(r);return this.serializeSig(a,o)},this.verifyWithMessageHash=function(e,t){return this.verifyHex(e,t,this.pubKeyHex)},this.verifyHex=function(e,t,n){try{var i,a,o=r.parseSigHex(t);i=o.r,a=o.s;var s=ti.decodeFromHex(this.ecparams.curve,n),u=new E(e.substring(0,this.ecparams.keycharlen),16);return this.verifyRaw(u,i,a,s)}catch(e){return!1}},this.verify=function(e,t,r){if(Bitcoin.Util.isArray(t)){var n,i,a,o=this.parseSig(t);n=o.r,i=o.s}else if("object"==typeof t&&t.r&&t.s)n=t.r,i=t.s;else throw"Invalid value for signature";if(r instanceof ti)a=r;else if(Bitcoin.Util.isArray(r))a=ti.decodeFrom(this.ecparams.curve,r);else throw"Invalid format for pubkey value, must be byte array or ECPointFp";var s=E.fromByteArrayUnsigned(e);return this.verifyRaw(s,n,i,a)},this.verifyRaw=function(e,t,r,n){var i=this.ecparams.n,a=this.ecparams.G;if(0>t.compareTo(E.ONE)||t.compareTo(i)>=0||0>r.compareTo(E.ONE)||r.compareTo(i)>=0)return!1;var o=r.modInverse(i),s=e.multiply(o).mod(i),u=t.multiply(o).mod(i);return a.multiply(s).add(n.multiply(u)).getX().toBigInteger().mod(i).equals(t)},this.serializeSig=function(e,t){var r=e.toByteArraySigned(),n=t.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(e){if(48!=e[0])throw Error("Signature not a valid DERSequence");if(2!=e[t=2])throw Error("First element in signature must be a DERInteger");var t,r=e.slice(t+2,t+2+e[t+1]);if(t+=2+e[t+1],2!=e[t])throw Error("Second element in signature must be a DERInteger");var n=e.slice(t+2,t+2+e[t+1]);return t+=2+e[t+1],{r:E.fromByteArrayUnsigned(r),s:E.fromByteArrayUnsigned(n)}},this.parseSigCompact=function(e){if(65!==e.length)throw"Signature has the wrong length";var t=e[0]-27;if(t<0||t>7)throw"Invalid signature type";var r=this.ecparams.n;return{r:E.fromByteArrayUnsigned(e.slice(1,33)).mod(r),s:E.fromByteArrayUnsigned(e.slice(33,65)).mod(r),i:t}},this.readPKCS5PrvKeyHex=function(e){var t,r,n;if(!1===o(e))throw Error("not ASN.1 hex string");try{t=a(e,0,["[0]",0],"06"),r=a(e,0,[1],"04");try{n=a(e,0,["[1]",0],"03")}catch(e){}}catch(e){throw Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=i(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(e){var r,n,s;if(!1===o(e))throw new t("not ASN.1 hex string");try{a(e,0,[1,0],"06"),r=a(e,0,[1,1],"06"),n=a(e,0,[2,0,1],"04");try{s=a(e,0,[2,0,"[1]",0],"03")}catch(e){}}catch(e){throw new t("malformed PKCS#8 plain ECC private key")}if(this.curveName=i(r),void 0===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(s),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(e){var r,n;if(!1===o(e))throw new t("not ASN.1 hex string");try{a(e,0,[0,0],"06"),r=a(e,0,[0,1],"06"),n=a(e,0,[1],"03")}catch(e){throw new t("malformed PKCS#8 ECC public key")}if(this.curveName=i(r),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(e,r){var n,s;if(!1===o(e))throw new t("not ASN.1 hex string");try{n=a(e,0,[0,5,0,1],"06"),s=a(e,0,[0,5,1],"03")}catch(e){throw new t("malformed X.509 certificate ECC public key")}if(this.curveName=i(n),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(s)},void 0!==e&&void 0!==e.curve&&(this.curveName=e.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==e&&(void 0!==e.prv&&this.setPrivateKeyHex(e.prv),void 0!==e.pub&&this.setPublicKeyHex(e.pub))},d.crypto.ECDSA.parseSigHex=function(e){var t=d.crypto.ECDSA.parseSigHexInHexRS(e);return{r:new E(t.r,16),s:new E(t.s,16)}},d.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=ts.getChildIdx,r=ts.getV;if(ts.checkStrictDER(e,0),"30"!=e.substr(0,2))throw Error("signature is not a ASN.1 sequence");var n=t(e,0);if(2!=n.length)throw Error("signature shall have two elements");var i=n[0],a=n[1];if("02"!=e.substr(i,2))throw Error("1st item not ASN.1 integer");if("02"!=e.substr(a,2))throw Error("2nd item not ASN.1 integer");return{r:r(e,i),s:r(e,a)}},d.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=d.crypto.ECDSA.parseSigHexInHexRS(e),r=t.r,n=t.s;if(r.length>=130&&r.length<=134){if(r.length%2!=0)throw Error("unknown ECDSA sig r length error");if(n.length%2!=0)throw Error("unknown ECDSA sig s length error");"00"==r.substr(0,2)&&(r=r.substr(2)),"00"==n.substr(0,2)&&(n=n.substr(2));var i=Math.max(r.length,n.length);return(r=("000000"+r).slice(-i))+(n=("000000"+n).slice(-i))}if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw Error("unknown ECDSA sig r length error");if(n.length%32!=0)throw Error("unknown ECDSA sig s length error");return r+n},d.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var t=e.substr(0,e.length/2),r=e.substr(e.length/2);return d.crypto.ECDSA.hexRSSigToASN1Sig(t,r)},d.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var r=new E(e,16),n=new E(t,16);return d.crypto.ECDSA.biRSSigToASN1Sig(r,n)},d.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var r=d.asn1,n=new r.DERInteger({bigint:e}),i=new r.DERInteger({bigint:t});return new r.DERSequence({array:[n,i]}).tohex()},d.crypto.ECDSA.getName=function(e){return"2b8104001f"===e?"secp192k1":"2a8648ce3d030107"===e?"secp256r1":"2b8104000a"===e?"secp256k1":"2b81040021"===e?"secp224r1":"2b81040022"===e?"secp384r1":"2b81040023"===e?"secp521r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)?"secp256r1":-1!=="|secp256k1|".indexOf(e)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(e)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(e)?"secp384r1":-1!=="|secp521r1|NIST P-521|P-521|".indexOf(e)?"secp521r1":null},void 0!==d&&d||(d={}),void 0!==d.crypto&&d.crypto||(d.crypto={}),d.crypto.ECParameterDB=new function(){var e={},t={};function r(e){return new E(e,16)}this.getByName=function(r){var n=r;if(void 0!==t[n]&&(n=t[r]),void 0!==e[n])return e[n];throw"unregistered EC curve name: "+n},this.regist=function(n,i,a,o,s,u,c,l,f,d,p,h){e[n]={};var m=r(a),g=r(o),y=r(s),b=r(u),x=r(c),S=new ta(m,g,y),w=S.decodePointHex("04"+l+f);e[n].name=n,e[n].keylen=i,e[n].keycharlen=2*Math.ceil(i/8),e[n].curve=S,e[n].G=w,e[n].n=b,e[n].h=x,e[n].oid=p,e[n].info=h;for(var E=0;E1?new E(n,16):null,c=new E(i,16),this.setPrivate(a,o,s,u,c)},this.setPublic=function(e,t,r,n){this.isPublic=!0,this.p=e,this.q=t,this.g=r,this.y=n,this.x=null},this.setPublicHex=function(e,t,r,n){var i,a,o,s;i=new E(e,16),a=new E(t,16),o=new E(r,16),s=new E(n,16),this.setPublic(i,a,o,s)},this.signWithMessageHash=function(e){var t=this.p,r=this.q,n=this.g;this.y;var i=this.x,a=d.crypto.Util.getRandomBigIntegerMinToMax(E.ONE.add(E.ONE),r.subtract(E.ONE)),o=e.substr(0,r.bitLength()/4),s=new E(o,16),u=n.modPow(a,t).mod(r),c=a.modInverse(r).multiply(s.add(i.multiply(u))).mod(r);return d.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:u}},{int:{bigint:c}}]})},this.verifyWithMessageHash=function(e,t){var r=this.p,n=this.q,i=this.g,a=this.y,o=this.parseASN1Signature(t),s=o[0],u=o[1],c=e.substr(0,n.bitLength()/4),l=new E(c,16);if(E.ZERO.compareTo(s)>0||s.compareTo(n)>0||E.ZERO.compareTo(u)>=0||u.compareTo(n)>0)throw"invalid DSA signature";var f=u.modInverse(n),d=l.multiply(f).mod(n),p=s.multiply(f).mod(n);return 0==i.modPow(d,r).multiply(a.modPow(p,r)).mod(r).mod(n).compareTo(s)},this.parseASN1Signature=function(t){try{var r=new E(e(t,0,[0],"02"),16),n=new E(e(t,0,[1],"02"),16);return[r,n]}catch(e){throw Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(r){var n,i,a,o,s;if(!1===t(r))throw Error("not ASN.1 hex string");try{n=e(r,0,[1],"02"),i=e(r,0,[2],"02"),a=e(r,0,[3],"02"),o=e(r,0,[4],"02"),s=e(r,0,[5],"02")}catch(e){throw Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(n,i,a,o,s)},this.readPKCS8PrvKeyHex=function(r){var n,i,a,o;if(!1===t(r))throw Error("not ASN.1 hex string");try{n=e(r,0,[1,1,0],"02"),i=e(r,0,[1,1,1],"02"),a=e(r,0,[1,1,2],"02"),o=e(r,0,[2,0],"02")}catch(e){throw Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(n,i,a,null,o)},this.readPKCS8PubKeyHex=function(r){var n,i,a,o;if(!1===t(r))throw Error("not ASN.1 hex string");try{n=e(r,0,[0,1,0],"02"),i=e(r,0,[0,1,1],"02"),a=e(r,0,[0,1,2],"02"),o=e(r,0,[1,0],"02")}catch(e){throw Error("malformed PKCS#8 DSA public key")}this.setPublicHex(n,i,a,o)},this.readCertPubKeyHex=function(r,n){var i,a,o,s;if(!1===t(r))throw Error("not ASN.1 hex string");try{i=e(r,0,[0,5,0,1,0],"02"),a=e(r,0,[0,5,0,1,1],"02"),o=e(r,0,[0,5,0,1,2],"02"),s=e(r,0,[0,5,1,0],"02")}catch(e){throw Error("malformed X.509 certificate DSA public key")}this.setPublicHex(i,a,o,s)}};var tN=(n=function(e,t,r){return i(b.AES,e,t,r)},i=function(e,t,r,n){var i=b.enc.Hex.parse(t),a=b.enc.Hex.parse(r),o=b.enc.Hex.parse(n),s={};s.key=a,s.iv=o,s.ciphertext=i;var u=e.decrypt(s,a,{iv:o});return b.enc.Hex.stringify(u)},a=function(e,t,r){return o(b.AES,e,t,r)},o=function(e,t,r,n){var i=b.enc.Hex.parse(t),a=b.enc.Hex.parse(r),o=b.enc.Hex.parse(n),s=e.encrypt(i,a,{iv:o}),u=b.enc.Hex.parse(s.toString());return b.enc.Base64.stringify(u)},s={"AES-256-CBC":{proc:n,eproc:a,keylen:32,ivlen:16},"AES-192-CBC":{proc:n,eproc:a,keylen:24,ivlen:16},"AES-128-CBC":{proc:n,eproc:a,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(e,t,r){return i(b.TripleDES,e,t,r)},eproc:function(e,t,r){return o(b.TripleDES,e,t,r)},keylen:24,ivlen:8},"DES-CBC":{proc:function(e,t,r){return i(b.DES,e,t,r)},eproc:function(e,t,r){return o(b.DES,e,t,r)},keylen:8,ivlen:8}},u=function(e){var t=b.lib.WordArray.random(e);return b.enc.Hex.stringify(t)},c=function(e){var t={},r=e.match(RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));r&&(t.cipher=r[1],t.ivsalt=r[2]);var n=e.match(RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));n&&(t.type=n[1]);var i=-1,a=0;-1!=e.indexOf("\r\n\r\n")&&(i=e.indexOf("\r\n\r\n"),a=2),-1!=e.indexOf("\n\n")&&(i=e.indexOf("\n\n"),a=1);var o=e.indexOf("-----END");if(-1!=i&&-1!=o){var s=e.substring(i+2*a,o-a);s=s.replace(/\s+/g,""),t.data=s}return t},l=function(e,t,r){for(var n=r.substring(0,16),i=b.enc.Hex.parse(n),a=b.enc.Utf8.parse(t),o=s[e].keylen+s[e].ivlen,u="",c=null;;){var l=b.algo.MD5.create();if(null!=c&&l.update(c),l.update(a),l.update(i),c=l.finalize(),(u+=b.enc.Hex.stringify(c)).length>=2*o)break}var f={};return f.keyhex=u.substr(0,2*s[e].keylen),f.ivhex=u.substr(2*s[e].keylen,2*s[e].ivlen),f},f=function(e,t,r,n){var i=b.enc.Base64.parse(e),a=b.enc.Hex.stringify(i);return(0,s[t].proc)(a,r,n)},{version:"1.0.0",parsePKCS5PEM:function(e){return c(e)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(e,t,r){return l(e,t,r)},decryptKeyB64:function(e,t,r,n){return f(e,t,r,n)},getDecryptedKeyHex:function(e,t){var r=c(e);r.type;var n=r.cipher,i=r.ivsalt,a=r.data,o=l(n,t,i).keyhex;return f(a,n,o,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(e,t,r,n,i){var a,o,c="";if((void 0===n||null==n)&&(n="AES-256-CBC"),void 0===s[n])throw Error("KEYUTIL unsupported algorithm: "+n);(void 0===i||null==i)&&(i=u(s[n].ivlen).toUpperCase());var f=l(n,r,i).keyhex,d=(a=n,o=i,(0,s[a].eproc)(t,f,o)).replace(/(.{64})/g,"$1\r\n"),c="-----BEGIN "+e+" PRIVATE KEY-----\r\n";return c+("Proc-Type: 4,ENCRYPTED\r\n"+("DEK-Info: "+n+",")+i+"\r\n\r\n"+d+"\r\n-----END "+e)+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var t=ts.getChildIdx,r=ts.getV,n={},i=t(e,0);if(2!=i.length)throw Error("malformed format: SEQUENCE(0).items != 2: "+i.length);n.ciphertext=r(e,i[1]);var a=t(e,i[0]);if(2!=a.length)throw Error("malformed format: SEQUENCE(0.0).items != 2: "+a.length);if("2a864886f70d01050d"!=r(e,a[0]))throw Error("this only supports pkcs5PBES2");var o=t(e,a[1]);if(2!=a.length)throw Error("malformed format: SEQUENCE(0.0.1).items != 2: "+o.length);var s=t(e,o[1]);if(2!=s.length)throw Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+s.length);if("2a864886f70d0307"!=r(e,s[0]))throw"this only supports TripleDES";n.encryptionSchemeAlg="TripleDES",n.encryptionSchemeIV=r(e,s[1]);var u=t(e,o[0]);if(2!=u.length)throw Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+u.length);if("2a864886f70d01050c"!=r(e,u[0]))throw Error("this only supports pkcs5PBKDF2");var c=t(e,u[1]);if(c.length<2)throw Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+c.length);n.pbkdf2Salt=r(e,c[0]);var l=r(e,c[1]);try{n.pbkdf2Iter=parseInt(l,16)}catch(e){throw Error("malformed format pbkdf2Iter: "+l)}return n},getPBKDF2KeyHexFromParam:function(e,t){var r=b.enc.Hex.parse(e.pbkdf2Salt),n=e.pbkdf2Iter,i=b.PBKDF2(t,r,{keySize:6,iterations:n});return b.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(e,t){var r=tb(e,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=tN.getPBKDF2KeyHexFromParam(n,t),a={};a.ciphertext=b.enc.Hex.parse(n.ciphertext);var o=b.enc.Hex.parse(i),s=b.enc.Hex.parse(n.encryptionSchemeIV),u=b.TripleDES.decrypt(a,o,{iv:s});return b.enc.Hex.stringify(u)},getKeyFromEncryptedPKCS8PEM:function(e,t){var r=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(e,t);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(e){var t=ts.getChildIdx,r=ts.getV,n={};if(n.algparam=null,"30"!=e.substr(0,2))throw Error("malformed plain PKCS8 private key(code:001)");var i=t(e,0);if(i.length<3)throw Error("malformed plain PKCS8 private key(code:002)");if("30"!=e.substr(i[1],2))throw Error("malformed PKCS8 private key(code:003)");var a=t(e,i[1]);if(2!=a.length)throw Error("malformed PKCS8 private key(code:004)");if("06"!=e.substr(a[0],2))throw Error("malformed PKCS8 private key(code:005)");if(n.algoid=r(e,a[0]),"06"==e.substr(a[1],2)&&(n.algparam=r(e,a[1])),"04"!=e.substr(i[2],2))throw Error("malformed PKCS8 private key(code:006)");return n.keyidx=ts.getVidx(e,i[2]),n},getKeyFromPlainPrivatePKCS8PEM:function(e){var t=tb(e,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(t)},getKeyFromPlainPrivatePKCS8Hex:function(e){var t,r=this.parsePlainPrivatePKCS8Hex(e);if("2a864886f70d010101"==r.algoid)t=new tt;else if("2a8648ce380401"==r.algoid)t=new d.crypto.DSA;else if("2a8648ce3d0201"==r.algoid)t=new d.crypto.ECDSA;else throw Error("unsupported private key algorithm");return t.readPKCS8PrvKeyHex(e),t},_getKeyFromPublicPKCS8Hex:function(e){var t,r=ts.getVbyList(e,0,[0,0],"06");if("2a864886f70d010101"===r)t=new tt;else if("2a8648ce380401"===r)t=new d.crypto.DSA;else if("2a8648ce3d0201"===r)t=new d.crypto.ECDSA;else throw Error("unsupported PKCS#8 public key hex");return t.readPKCS8PubKeyHex(e),t},parsePublicRawRSAKeyHex:function(e){var t=ts.getChildIdx,r=ts.getV,n={};if("30"!=e.substr(0,2))throw Error("malformed RSA key(code:001)");var i=t(e,0);if(2!=i.length)throw Error("malformed RSA key(code:002)");if("02"!=e.substr(i[0],2))throw Error("malformed RSA key(code:003)");if(n.n=r(e,i[0]),"02"!=e.substr(i[1],2))throw Error("malformed RSA key(code:004)");return n.e=r(e,i[1]),n},parsePublicPKCS8Hex:function(e){var t=ts.getChildIdx,r=ts.getV,n={};n.algparam=null;var i=t(e,0);if(2!=i.length)throw Error("outer DERSequence shall have 2 elements: "+i.length);var a=i[0];if("30"!=e.substr(a,2))throw Error("malformed PKCS8 public key(code:001)");var o=t(e,a);if(2!=o.length)throw Error("malformed PKCS8 public key(code:002)");if("06"!=e.substr(o[0],2))throw Error("malformed PKCS8 public key(code:003)");if(n.algoid=r(e,o[0]),"06"==e.substr(o[1],2)?n.algparam=r(e,o[1]):"30"==e.substr(o[1],2)&&(n.algparam={},n.algparam.p=ts.getVbyList(e,o[1],[0],"02"),n.algparam.q=ts.getVbyList(e,o[1],[1],"02"),n.algparam.g=ts.getVbyList(e,o[1],[2],"02")),"03"!=e.substr(i[1],2))throw Error("malformed PKCS8 public key(code:004)");return n.key=r(e,i[1]).substr(2),n}});function tM(e,t){for(var r="",n=t/4-e.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function tB(e){for(var t in d.crypto.Util.DIGESTINFOHEAD){var r=d.crypto.Util.DIGESTINFOHEAD[t],n=r.length;if(e.substring(0,n)==r)return[t,e.substring(n)]}return[]}function tH(e){var t,r=ts.getChildIdx,n=ts.getV,i=(ts.dump,ts.parse),a=ts.getTLV,o=ts.getVbyList,s=ts.getVbyListEx,u=ts.getTLVbyList,c=ts.getTLVbyListEx,l=ts.getIdxbyList,f=ts.getIdxbyListEx,p=ts.getVidx,h=ts.getInt,m=ts.oidname,g=ts.hextooidstr;try{t=d.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(e){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(null===this.hex||0!==this.version)return this.version;var e=u(this.hex,0,[0,0]);if("a0"!=e.substr(0,2))return this.version=1,this.foffset=-1,1;var t=h(u(e,0,[0]),0);if(t<0||21){var s=a(e,o[1]),u=this.getGeneralName(s);void 0!=u.uri&&(i.uri=u.uri)}if(o.length>2){var c=a(e,o[2]);"0101ff"==c&&(i.reqauth=!0),"010100"==c&&(i.reqauth=!1)}return i};var y=function(e){var t={};try{var r=e.seq[0].oid,n=d.asn1.x509.OID.name2oid(r);t.type=d.asn1.x509.OID.oid2atype(n);var i=e.seq[1];if(void 0!=i.utf8str)t.ds="utf8",t.value=i.utf8str.str;else if(void 0!=i.numstr)t.ds="num",t.value=i.numstr.str;else if(void 0!=i.telstr)t.ds="tel",t.value=i.telstr.str;else if(void 0!=i.prnstr)t.ds="prn",t.value=i.prnstr.str;else if(void 0!=i.ia5str)t.ds="ia5",t.value=i.ia5str.str;else if(void 0!=i.visstr)t.ds="vis",t.value=i.visstr.str;else if(void 0!=i.bmpstr)t.ds="bmp",t.value=i.bmpstr.str;else throw"error";return t}catch(e){throw new Erorr("improper ASN.1 parsed AttrTypeAndValue")}},b=function(e){try{return e.set.map(function(e){return y(e)})}catch(e){throw Error("improper ASN.1 parsed RDN: "+e)}},x=function(e){try{return e.seq.map(function(e){return b(e)})}catch(e){throw Error("improper ASN.1 parsed X500Name: "+e)}};this.getX500NameRule=function(e){for(var t=null,r=[],n=0;n0&&(t.ext=this.getExtParamArray()),t.sighex=this.getSignatureValueHex(),"object"==typeof e&&(!0==e.tbshex&&(t.tbshex=u(this.hex,0,[0])),!0==e.nodnarray&&(delete t.issuer.array,delete t.subject.array)),t},this.getExtParamArray=function(e){void 0==e&&-1!=f(this.hex,0,[0,"[3]"])&&(e=c(this.hex,0,[0,"[3]",0],"30"));for(var t=[],n=r(e,0),i=0;i2&&"04"===e.substr(b[1],2))(l=new s).readPKCS5PrvKeyHex(e);else throw Error("unsupported PKCS#1/5 hexadecimal key");return l}if("pkcs8prv"===r){var l=tN.getKeyFromPlainPrivatePKCS8Hex(e);return l}if("pkcs8pub"===r)return tN._getKeyFromPublicPKCS8Hex(e);if("x509pub"===r)return tH.getPublicKeyFromCertHex(e);if(-1!=e.indexOf("-END CERTIFICATE-",0)||-1!=e.indexOf("-END X509 CERTIFICATE-",0)||-1!=e.indexOf("-END TRUSTED CERTIFICATE-",0))return tH.getPublicKeyFromCertPEM(e);if(-1!=e.indexOf("-END PUBLIC KEY-")){var x=tb(e,"PUBLIC KEY");return tN._getKeyFromPublicPKCS8Hex(x)}if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var S=c(e,"RSA PRIVATE KEY");return tN.getKey(S,null,"pkcs5prv")}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var w=c(e,"DSA PRIVATE KEY"),A=a(w,0,[1],"02"),C=a(w,0,[2],"02"),P=a(w,0,[3],"02"),O=a(w,0,[4],"02"),_=a(w,0,[5],"02"),l=new u;return l.setPrivate(new E(A,16),new E(C,16),new E(P,16),new E(O,16),new E(_,16)),l}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var S=c(e,"EC PRIVATE KEY");return tN.getKey(S,null,"pkcs5prv")}if(-1!=e.indexOf("-END PRIVATE KEY-"))return tN.getKeyFromPlainPrivatePKCS8PEM(e);if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var k=tN.getDecryptedKeyHex(e,t),F=new tt;return F.readPKCS5PrvKeyHex(k),F}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var w=tN.getDecryptedKeyHex(e,t),l=a(w,0,[1],"04"),j=a(w,0,[2,0],"06"),R=a(w,0,[3,0],"03").substr(2),I="";if(void 0!==d.crypto.OID.oidhex2name[j])I=d.crypto.OID.oidhex2name[j];else throw Error("undefined OID(hex) in KJUR.crypto.OID: "+j);var f=new s({curve:I});return f.setPublicKeyHex(R),f.setPrivateKeyHex(l),f.isPublic=!1,f}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var w=tN.getDecryptedKeyHex(e,t),A=a(w,0,[1],"02"),C=a(w,0,[2],"02"),P=a(w,0,[3],"02"),O=a(w,0,[4],"02"),_=a(w,0,[5],"02"),l=new u;return l.setPrivate(new E(A,16),new E(C,16),new E(P,16),new E(O,16),new E(_,16)),l}if(-1!=e.indexOf("-END ENCRYPTED PRIVATE KEY-"))return tN.getKeyFromEncryptedPKCS8PEM(e,t);throw Error("not supported argument")},tN.generateKeypair=function(e,t){if("RSA"==e){var r=new tt;r.generate(t,"10001"),r.isPrivate=!0,r.isPublic=!0;var n=new tt,i=r.n.toString(16),a=r.e.toString(16);n.setPublic(i,a),n.isPrivate=!1,n.isPublic=!0;var o={};return o.prvKeyObj=r,o.pubKeyObj=n,o}if("EC"==e){var s=new d.crypto.ECDSA({curve:t}).generateKeyPairHex(),r=new d.crypto.ECDSA({curve:t});r.setPublicKeyHex(s.ecpubhex),r.setPrivateKeyHex(s.ecprvhex),r.isPrivate=!0,r.isPublic=!1;var n=new d.crypto.ECDSA({curve:t});n.setPublicKeyHex(s.ecpubhex),n.isPrivate=!1,n.isPublic=!0;var o={};return o.prvKeyObj=r,o.pubKeyObj=n,o}throw Error("unknown algorithm: "+e)},tN.getPEM=function(e,t,r,n,i,a){var o=d,s=o.asn1,u=s.DERObjectIdentifier,c=s.DERInteger,l=s.ASN1Util.newObject,f=s.x509.SubjectPublicKeyInfo,p=o.crypto,h=p.DSA,m=p.ECDSA;function g(e){return l({seq:[{int:0},{int:{bigint:e.n}},{int:e.e},{int:{bigint:e.d}},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.dmp1}},{int:{bigint:e.dmq1}},{int:{bigint:e.coeff}}]})}function y(e){return l({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a0",!0,{oid:{name:e.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]})}function x(e){return l({seq:[{int:0},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}},{int:{bigint:e.y}},{int:{bigint:e.x}}]})}if((void 0!==tt&&e instanceof tt||void 0!==h&&e instanceof h||void 0!==m&&e instanceof m)&&!0==e.isPublic&&(void 0===t||"PKCS8PUB"==t)){var S=new f(e),w=S.tohex();return ty(w,"PUBLIC KEY")}if("PKCS1PRV"==t&&void 0!==tt&&e instanceof tt&&(void 0===r||null==r)&&!0==e.isPrivate){var S=g(e),w=S.tohex();return ty(w,"RSA PRIVATE KEY")}if("PKCS1PRV"==t&&void 0!==m&&e instanceof m&&(void 0===r||null==r)&&!0==e.isPrivate){var E=new u({name:e.curveName}).tohex(),A=y(e).tohex();return""+(ty(E,"EC PARAMETERS")+ty(A,"EC PRIVATE KEY"))}if("PKCS1PRV"==t&&void 0!==h&&e instanceof h&&(void 0===r||null==r)&&!0==e.isPrivate){var S=x(e),w=S.tohex();return ty(w,"DSA PRIVATE KEY")}if("PKCS5PRV"==t&&void 0!==tt&&e instanceof tt&&void 0!==r&&null!=r&&!0==e.isPrivate){var S=g(e),w=S.tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",w,r,n,a)}if("PKCS5PRV"==t&&void 0!==m&&e instanceof m&&void 0!==r&&null!=r&&!0==e.isPrivate){var S=y(e),w=S.tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",w,r,n,a)}if("PKCS5PRV"==t&&void 0!==h&&e instanceof h&&void 0!==r&&null!=r&&!0==e.isPrivate){var S=x(e),w=S.tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",w,r,n,a)}var C=function(e,t){var r=P(e,t);return new l({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:r.pbkdf2Salt}},{int:r.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:r.encryptionSchemeIV}}]}]}]},{octstr:{hex:r.ciphertext}}]}).tohex()},P=function(e,t){var r=b.lib.WordArray.random(8),n=b.lib.WordArray.random(8),i=b.PBKDF2(t,r,{keySize:6,iterations:100}),a=b.enc.Hex.parse(e),o=b.TripleDES.encrypt(a,i,{iv:n})+"",s={};return s.ciphertext=o,s.pbkdf2Salt=b.enc.Hex.stringify(r),s.pbkdf2Iter=100,s.encryptionSchemeAlg="DES-EDE3-CBC",s.encryptionSchemeIV=b.enc.Hex.stringify(n),s};if("PKCS8PRV"==t&&void 0!=tt&&e instanceof tt&&!0==e.isPrivate){var O=g(e),_=O.tohex(),S=l({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:_}}]}),w=S.tohex();if(void 0===r||null==r)return ty(w,"PRIVATE KEY");var A=C(w,r);return ty(A,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==m&&e instanceof m&&!0==e.isPrivate){var k={seq:[{int:1},{octstr:{hex:e.prvKeyHex}}]};"string"==typeof e.pubKeyHex&&k.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]});var O=new l(k),_=O.tohex(),S=l({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:_}}]}),w=S.tohex();if(void 0===r||null==r)return ty(w,"PRIVATE KEY");var A=C(w,r);return ty(A,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==h&&e instanceof h&&!0==e.isPrivate){var O=new c({bigint:e.x}),_=O.tohex(),S=l({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:_}}]}),w=S.tohex();if(void 0===r||null==r)return ty(w,"PRIVATE KEY");var A=C(w,r);return ty(A,"ENCRYPTED PRIVATE KEY")}throw Error("unsupported object nor format")},tN.getKeyFromCSRPEM=function(e){var t=tb(e,"CERTIFICATE REQUEST");return tN.getKeyFromCSRHex(t)},tN.getKeyFromCSRHex=function(e){var t=tN.parseCSRHex(e);return tN.getKey(t.p8pubkeyhex,null,"pkcs8pub")},tN.parseCSRHex=function(e){var t=ts.getChildIdx,r=ts.getTLV,n={};if("30"!=e.substr(0,2))throw Error("malformed CSR(code:001)");var i=t(e,0);if(i.length<1)throw Error("malformed CSR(code:002)");if("30"!=e.substr(i[0],2))throw Error("malformed CSR(code:003)");var a=t(e,i[0]);if(a.length<3)throw Error("malformed CSR(code:004)");return n.p8pubkeyhex=r(e,a[2]),n},tN.getKeyID=function(e){"string"==typeof e&&-1!=e.indexOf("BEGIN ")&&(e=tN.getKey(e));var t=tb(tN.getPEM(e)),r=ts.getIdxbyList(t,0,[1]),n=ts.getV(t,r).substring(2);return d.crypto.Util.hashHex(n,"sha1")},tN.getJWK=function(e,t,r,n,i){var a,o,s={},u=d.crypto.Util.hashHex;if("string"==typeof e)a=tN.getKey(e),-1!=e.indexOf("CERTIFICATE")&&(o=tb(e));else if("object"==typeof e)e instanceof tH?(a=e.getPublicKey(),o=e.hex):a=e;else throw Error("unsupported keyinfo type");if(a instanceof tt&&a.isPrivate)s.kty="RSA",s.n=td(a.n.toString(16)),s.e=td(a.e.toString(16)),s.d=td(a.d.toString(16)),s.p=td(a.p.toString(16)),s.q=td(a.q.toString(16)),s.dp=td(a.dmp1.toString(16)),s.dq=td(a.dmq1.toString(16)),s.qi=td(a.coeff.toString(16));else if(a instanceof tt&&a.isPublic)s.kty="RSA",s.n=td(a.n.toString(16)),s.e=td(a.e.toString(16));else if(a instanceof d.crypto.ECDSA&&a.isPrivate){var c=a.getShortNISTPCurveName();if("P-256"!==c&&"P-384"!==c&&"P-521"!==c)throw Error("unsupported curve name for JWT: "+c);var l=a.getPublicKeyXYHex();s.kty="EC",s.crv=c,s.x=td(l.x),s.y=td(l.y),s.d=td(a.prvKeyHex)}else if(a instanceof d.crypto.ECDSA&&a.isPublic){var c=a.getShortNISTPCurveName();if("P-256"!==c&&"P-384"!==c&&"P-521"!==c)throw Error("unsupported curve name for JWT: "+c);var l=a.getPublicKeyXYHex();s.kty="EC",s.crv=c,s.x=td(l.x),s.y=td(l.y)}if(void 0==s.kty)throw Error("unsupported keyinfo");return a.isPrivate||!0==t||(s.kid=d.jws.JWS.getJWKthumbprint(s)),void 0!=o&&!0!=r&&(s.x5c=[S(o)]),void 0!=o&&!0!=n&&(s.x5t=tl(S(u(o,"sha1")))),void 0!=o&&!0!=i&&(s["x5t#S256"]=tl(S(u(o,"sha256")))),s},tN.getJWKFromKey=function(e){return tN.getJWK(e,!0,!0,!0,!0)},tt.getPosArrayOfChildrenFromHex=function(e){return ts.getChildIdx(e,0)},tt.getHexValueArrayOfChildrenFromHex=function(e){var t=ts.getV,r=tt.getPosArrayOfChildrenFromHex(e),n=t(e,r[0]),i=t(e,r[1]),a=t(e,r[2]),o=t(e,r[3]),s=t(e,r[4]),u=t(e,r[5]),c=t(e,r[6]),l=t(e,r[7]),f=t(e,r[8]),r=[];return r.push(n,i,a,o,s,u,c,l,f),r},tt.prototype.readPrivateKeyFromPEMString=function(e){var t=tb(e),r=tt.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},tt.prototype.readPKCS5PrvKeyHex=function(e){var t=tt.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},tt.prototype.readPKCS8PrvKeyHex=function(e){var t,r,n,i,a,o,s,u,c=ts.getVbyListEx;if(!1===ts.isASN1HEX(e))throw Error("not ASN.1 hex string");try{t=c(e,0,[2,0,1],"02"),r=c(e,0,[2,0,2],"02"),n=c(e,0,[2,0,3],"02"),i=c(e,0,[2,0,4],"02"),a=c(e,0,[2,0,5],"02"),o=c(e,0,[2,0,6],"02"),s=c(e,0,[2,0,7],"02"),u=c(e,0,[2,0,8],"02")}catch(e){throw Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(t,r,n,i,a,o,s,u)},tt.prototype.readPKCS5PubKeyHex=function(e){var t=ts.getV;if(!1===ts.isASN1HEX(e))throw Error("keyHex is not ASN.1 hex string");var r=ts.getChildIdx(e,0);if(2!==r.length||"02"!==e.substr(r[0],2)||"02"!==e.substr(r[1],2))throw Error("wrong hex for PKCS#5 public key");var n=t(e,r[0]),i=t(e,r[1]);this.setPublic(n,i)},tt.prototype.readPKCS8PubKeyHex=function(e){if(!1===ts.isASN1HEX(e))throw Error("not ASN.1 hex string");if("06092a864886f70d010101"!==ts.getTLVbyListEx(e,0,[0,0]))throw Error("not PKCS8 RSA public key");var t=ts.getTLVbyListEx(e,0,[1,0]);this.readPKCS5PubKeyHex(t)},tt.prototype.readCertPubKeyHex=function(e,t){var r,n;(r=new tH).readCertHex(e),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)},tt.prototype.sign=function(e,t){var r=d.crypto.Util.hashString(e,t);return this.signWithMessageHash(r,t)},tt.prototype.signWithMessageHash=function(e,t){var r=d.crypto.Util.getPaddedDigestInfoHex(e,t,this.n.bitLength()),n=e7(r,16);return tM(this.doPrivate(n).toString(16),this.n.bitLength())},tt.prototype.signPSS=function(e,t,r){var n,i=(n=tg(e),d.crypto.Util.hashHex(n,t));return void 0===r&&(r=-1),this.signWithMessageHashPSS(i,t,r)},tt.prototype.signWithMessageHashPSS=function(e,t,r){var n,i=tv(e),a=i.length,o=this.n.bitLength()-1,s=Math.ceil(o/8),u=function(e){return d.crypto.Util.hashHex(e,t)};if(-1===r||void 0===r)r=a;else if(-2===r)r=s-a-2;else if(r<-2)throw Error("invalid salt length");if(s0&&(c=Array(r),new e9().nextBytes(c),c=String.fromCharCode.apply(String,c));var l=tv(u(tg("\x00\x00\x00\x00\x00\x00\x00\x00"+i+c))),f=[];for(n=0;n>8*s-o&255),n=0;nn)return!1;var i=this.doPublic(r).toString(16);if(i.length+3!=n/4)return!1;var a=tB(i.replace(/^1f+00/,""));if(0==a.length)return!1;var o=a[0],s=a[1],u=d.crypto.Util.hashString(e,o);return s==u},tt.prototype.verifyWithMessageHash=function(e,t){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=e7(t,16);if(r.bitLength()>this.n.bitLength())return 0;var n=tB(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==e)},tt.prototype.verifyPSS=function(e,t,r,n){var i,a=(i=tg(e),d.crypto.Util.hashHex(i,r));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(a,t,r,n)},tt.prototype.verifyWithMessageHashPSS=function(e,t,r,n){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,a=new E(t,16),o=function(e){return d.crypto.Util.hashHex(e,r)},s=tv(e),u=s.length,c=this.n.bitLength()-1,l=Math.ceil(c/8);if(-1===n||void 0===n)n=u;else if(-2===n)n=l-u-2;else if(n<-2)throw Error("invalid salt length");if(l>8*l-c&255;if((p.charCodeAt(0)&m)!=0)throw Error("bits beyond keysize not zero");var g=tL(h,p.length,o),y=[];for(i=0;i0&&-1==(":"+r.join(":")+":").indexOf(":"+g+":"))throw"algorithm '"+g+"' not accepted in the list";if("none"!=g&&null===t)throw"key shall be specified to verify.";if("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&(t=tN.getKey(t)),("RS"==y||"PS"==y)&&!(t instanceof tt))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==y&&!(t instanceof s))throw"key shall be a ECDSA obj for ES* algs";var b=null;if(void 0===i.jwsalg2sigalg[m.alg])throw"unsupported alg name: "+g;if("none"==(b=i.jwsalg2sigalg[g]))throw"not supported";if("Hmac"==b.substr(0,4)){if(void 0===t)throw"hexadecimal key shall be specified for HMAC";var x=new u({alg:b,pass:t});return x.updateString(f),p==x.doFinal()}if(-1!=b.indexOf("withECDSA")){var S=null;try{S=s.concatSigToASN1Sig(p)}catch(e){return!1}var w=new c({alg:b});return w.init(t),w.updateString(f),w.verify(S)}var w=new c({alg:b});return w.init(t),w.updateString(f),w.verify(p)},d.jws.JWS.parse=function(e){var t,r,n,i=e.split("."),a={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return t=i[0],r=i[1],3==i.length&&(n=i[2]),a.headerObj=d.jws.JWS.readSafeJSONString(h(t)),a.payloadObj=d.jws.JWS.readSafeJSONString(h(r)),a.headerPP=JSON.stringify(a.headerObj,null," "),null==a.payloadObj?a.payloadPP=h(r):a.payloadPP=JSON.stringify(a.payloadObj,null," "),void 0!==n&&(a.sigHex=tp(n)),a},d.jws.JWS.verifyJWT=function(e,t,r){var n=d.jws,i=n.JWS,a=i.readSafeJSONString,o=i.inArray,s=i.includedArray;if(!tF(e))return!1;var u=e.split(".");if(3!=u.length)return!1;var c=u[0],l=u[1];tp(u[2]);var f=a(h(c)),p=a(h(l));if(void 0===f.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!o(f.alg,r.alg)||void 0!==p.iss&&"object"==typeof r.iss&&!o(p.iss,r.iss)||void 0!==p.sub&&"object"==typeof r.sub&&!o(p.sub,r.sub))return!1;if(void 0!==p.aud&&"object"==typeof r.aud){if("string"==typeof p.aud){if(!o(p.aud,r.aud))return!1}else if("object"==typeof p.aud&&!s(p.aud,r.aud))return!1}var m=n.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(m=r.verifyAt),(void 0===r.gracePeriod||"number"!=typeof r.gracePeriod)&&(r.gracePeriod=0),(void 0===p.exp||"number"!=typeof p.exp||!(p.exp+r.gracePeriodi&&this.aHeader.pop(),this.aSignature.length>i&&this.aSignature.pop(),"addSignature failed: "+e}},this.verifyAll=function(e){if(this.aHeader.length!==e.length||this.aSignature.length!==e.length)return!1;for(var t=0;t0)this.aHeader=e.headers;else throw"malformed header";if("string"==typeof e.payload)this.sPayload=e.payload;else throw"malformed signatures";if(e.signatures.length>0)this.aSignature=e.signatures;else throw"malformed signatures"}catch(e){throw"malformed JWS-JS JSON object: "+e}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return 0==this.aHeader.length?1:0}},d.crypto.ECDSA,d.crypto.DSA,d.crypto.Signature,d.crypto.MessageDigest,d.crypto.Mac,d.crypto.Cipher,t.KZ=tN,t.fs=d,d.crypto,d.asn1,d.jws,d.lang},48094:function(e){var t=Object.prototype.toString;e.exports=function(e){return!0===e||!1===e||!!e&&"object"==typeof e&&"[object Boolean]"==t.call(e)}},98423:function(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")(),o=Object.prototype,s=o.hasOwnProperty,u=o.toString,c=a.Symbol,l=c?c.toStringTag:void 0;e.exports=function(e){if(t=typeof e,null==e||"object"!=t&&"function"!=t)return!1;var t,r=null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?function(e){var t=s.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var i=u.call(e);return n&&(t?e[l]=r:delete e[l]),i}(e):u.call(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},23126:function(e){var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==t.call(e)}},25751:function(e){var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){var n;return"string"==typeof e||!r(e)&&!!(n=e)&&"object"==typeof n&&"[object String]"==t.call(e)}},35683:function(e,t,r){var n,i,a=1/0,o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u="\ud800-\udfff",c="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="['’]",h="["+d+"]",m="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",g="["+l+"]",y="[^"+u+d+"\\d+"+c+l+f+"]",b="(?:\ud83c[\udde6-\uddff]){2}",x="[\ud800-\udbff][\udc00-\udfff]",S="["+f+"]",w="(?:"+g+"|"+y+")",E="(?:"+p+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+p+"(?:D|LL|M|RE|S|T|VE))?",C="(?:"+m+"|\ud83c[\udffb-\udfff])?",P="[\\ufe0e\\ufe0f]?",O="(?:\\u200d(?:"+["[^"+u+"]",b,x].join("|")+")"+P+C+")*",_="(?:"+["["+c+"]",b,x].join("|")+")"+(P+C+O),k=RegExp(p,"g"),F=RegExp(m,"g"),j=RegExp([S+"?"+g+"+"+E+"(?="+[h,S,"$"].join("|")+")","(?:"+S+"|"+y+")+"+A+"(?="+[h,S+w,"$"].join("|")+")",S+"?"+w+"+"+E,S+"+"+A,"\\d+",_].join("|"),"g"),R=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,I="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,T="object"==typeof self&&self&&self.Object===Object&&self,D=I||T||Function("return this")(),N=(n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==n?void 0:n[e]}),M=Object.prototype.toString,L=D.Symbol,B=L?L.prototype:void 0,H=B?B.toString:void 0;function z(e){return null==e?"":function(e){if("string"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==M.call(t))return H?H.call(e):"";var t,r=e+"";return"0"==r&&1/e==-a?"-0":r}(e)}var $=(i=function(e,t,r){return e+(r?"-":"")+t.toLowerCase()},function(e){var t;return function(e,t,r,n){for(var i=-1,a=e?e.length:0;++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++nl))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,g=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++h-1&&e%1==0&&e-1}},54705:function(e,t,r){var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:function(e,t,r){var n=r(1989),i=r(38407),a=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},11285:function(e,t,r){var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:function(e,t,r){var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:function(e,t,r){var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:function(e,t,r){var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},42634:function(e){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},24523:function(e,t,r){var n=r(88306);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},94536:function(e,t,r){var n=r(10852)(Object,"create");e.exports=n},86916:function(e,t,r){var n=r(5569)(Object.keys,Object);e.exports=n},33498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},31167:function(e,t,r){e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,o=a&&a.exports===i&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;if(e)return e;return o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(r){return e(t(r))}}},45357:function(e,t,r){var n=r(96874),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=i(a.length-t,0),u=Array(s);++o0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},37465:function(e,t,r){var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:function(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:function(e){e.exports=function(e){return this.__data__.get(e)}},44758:function(e){e.exports=function(e){return this.__data__.has(e)}},34309:function(e,t,r){var n=r(38407),i=r(57071),a=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(e,t),this.size=r.size,this}},55514:function(e,t,r){var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(a,"$1"):r||e)}),t});e.exports=o},40327:function(e,t,r){var n=r(33448),i=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},80346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},75703:function(e){e.exports=function(e){return function(){return e}}},77813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},84486:function(e,t,r){var n=r(77412),i=r(89881),a=r(54290),o=r(1469);e.exports=function(e,t){return(o(e)?n:i)(e,a(t))}},27361:function(e,t,r){var n=r(97786);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},79095:function(e,t,r){var n=r(13),i=r(222);e.exports=function(e,t){return null!=e&&i(e,t,n)}},6557:function(e){e.exports=function(e){return e}},35694:function(e,t,r){var n=r(9454),i=r(37005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},98612:function(e,t,r){var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},29246:function(e,t,r){var n=r(98612),i=r(37005);e.exports=function(e){return i(e)&&n(e)}},51584:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==n(e)}},44144:function(e,t,r){e=r.nmd(e);var n=r(55639),i=r(95062),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a?n.Buffer:void 0,u=s?s.isBuffer:void 0;e.exports=u||i},23560:function(e,t,r){var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},81763:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},68630:function(e,t,r){var n=r(44239),i=r(85924),a=r(37005),o=Object.prototype,s=Function.prototype.toString,u=o.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==c}},47037:function(e,t,r){var n=r(44239),i=r(1469),a=r(37005);e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&"[object String]"==n(e)}},33448:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},36719:function(e,t,r){var n=r(38749),i=r(7518),a=r(31167),o=a&&a.isTypedArray,s=o?i(o):n;e.exports=s},3674:function(e,t,r){var n=r(14636),i=r(280),a=r(98612);e.exports=function(e){return a(e)?n(e):i(e)}},81704:function(e,t,r){var n=r(14636),i=r(10313),a=r(98612);e.exports=function(e){return a(e)?n(e,!0):i(e)}},66604:function(e,t,r){var n=r(89465),i=r(47816),a=r(11243);e.exports=function(e,t){var r={};return t=a(t,3),i(e,function(e,i,a){n(r,i,t(e,i,a))}),r}},88306:function(e,t,r){var n=r(83369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},82492:function(e,t,r){var n=r(42980),i=r(21463)(function(e,t,r){n(e,t,r)});e.exports=i},35937:function(e,t,r){var n=r(29932),i=r(11243),a=r(63012),o=r(46904);e.exports=function(e,t){if(null==e)return{};var r=n(o(e),function(e){return[e]});return t=i(t),a(e,r,function(e,r){return t(e,r[0])})}},39601:function(e,t,r){var n=r(40371),i=r(79152),a=r(15403),o=r(40327);e.exports=function(e){return a(e)?n(o(e)):i(e)}},54061:function(e,t,r){var n=r(62663),i=r(89881),a=r(11243),o=r(10107),s=r(1469);e.exports=function(e,t,r){var u=s(e)?n:o,c=arguments.length<3;return u(e,a(t,4),r,c,i)}},36968:function(e,t,r){var n=r(10611);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},70479:function(e){e.exports=function(){return[]}},95062:function(e){e.exports=function(){return!1}},30084:function(e,t,r){var n=r(29932),i=r(278),a=r(1469),o=r(33448),s=r(55514),u=r(40327),c=r(79833);e.exports=function(e){return a(e)?n(e,u):o(e)?[e]:i(s(c(e)))}},59881:function(e,t,r){var n=r(98363),i=r(81704);e.exports=function(e){return n(e,i(e))}},79833:function(e,t,r){var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},63947:function(e,t,r){var n,i;n=r(23126),i={"minor second":16/15,"major second":9/8,"minor third":1.2,"major third":4/3,"diminished fourth":Math.sqrt(2),"perfect fifth":1.5,"minor sixth":1.6,golden:1.61803398875,phi:1.61803398875,"major sixth":5/3,"minor seventh":16/9,"major seventh":15/8,octave:2,"major tenth":2.5,"major eleventh":8/3,"major twelfth":3,"double octave":4},e.exports=function(e,t){return null==e&&(e=0),null==t&&(t="golden"),Math.pow(n(t)?t:null!=i[t]?i[t]:i.golden,e)}},11752:function(e,t,r){e.exports=r(62156)},61165:function(e,t,r){"use strict";var n,i,a,o,s,u=r(50029),c=r(71383),l=r(87794),f=r.n(l),d=r(67294),p=r(69696),h=r(99603),m=r(71893),g=r(42894),y=r(59417),b=r(85330),x=r(35683),S=r.n(x),w=r(85893),E=(0,m.ZP)(p.ZP)(n||(n=(0,c.Z)(["\n display: flex;\n align-items: center;\n text-align: left !important;\n\n & .pg-modal-main {\n max-width: 700px;\n margin: auto;\n box-shadow: 5px 5px 10px black;\n }\n"]))),A=(0,m.ZP)(p.ZP.Header)(i||(i=(0,c.Z)(["\n font-size: 1.5em;\n padding: 0.75em;\n background: #38598a;\n color: #fff;\n & a {\n float: right;\n }\n"]))),C=(0,m.ZP)(h.G)(a||(a=(0,c.Z)(["\n margin-right: 5px;\n height: 30px;\n"]))),P=m.ZP.div(o||(o=(0,c.Z)(["\n color: #000;\n cursor: default;\n font-weight: 400;\n"]))),O=m.ZP.div(s||(s=(0,c.Z)(["\n margin-top: 20px;\n display: flex;\n justify-content: "," & button {\n min-width: 150px;\n margin-right: 20px;\n display: inline-block;\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n"])),function(e){return"center"===e.buttonAlign?"center;":"space-between;"});t.Z=function(e){var t,r,n=e.onConfirm,i=e.onClose,a=e.content,o=e.id,s=e.title,c=e.closable,l=e.icon,m=void 0===l?y.eHv:l,x=e.confirmText,_=e.showCancel,k=void 0===_||_,F=e.showConfirm,j=void 0===F||F,R=e.buttonStyle,I=e.buttonAlign,T=e.skipCloseOnConfirm,D=void 0!==T&&T,N=e.style,M=e.disableConfirm,L=(0,d.useState)(!1),B=L[0],H=L[1],z="bcSecondary",$="bcPrimary",U="confirm-delete-"+S()(s),V="cancel-"+S()(s);switch(void 0===R?"bcgov":R){case"bcgov":break;case"custom":z="secondary",$="primary";break;case"danger":z="secondary",$="danger"}var K=(t=(0,u.Z)(f().mark(function e(){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(H(!0),!n){e.next=4;break}return e.next=4,n();case 4:H(!1),D||(window.location.hash="#");case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),W=(r=(0,u.Z)(f().mark(function e(){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i&&i(),window.location.hash="#";case 2:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)});return(0,w.jsxs)(E,{id:o,children:[(0,w.jsxs)(A,{title:s,as:"div",children:[m&&(0,w.jsx)(C,{icon:m,title:"Information",size:"2x",style:{paddingRight:"10px"}}),s,c&&(0,w.jsx)(p.ZP.Close,{onClick:W,title:"exit",children:(0,w.jsx)(h.G,{icon:y.NBC,size:"lg"})})]}),(0,w.jsxs)(p.ZP.Content,{style:void 0===N?{}:N,children:[(0,w.jsx)(P,{children:a}),(k||j)&&(0,w.jsxs)(O,{buttonAlign:void 0===I?"default":I,children:[k&&(0,w.jsx)(b.zx,{variant:z,onClick:W,type:"button","data-testid":V,children:"Cancel"}),j&&(0,w.jsx)(b.zx,{"data-testid":U,onClick:K,variant:$,type:"button",className:"text-center",disabled:void 0!==M&&M,children:B?(0,w.jsx)(g.rj,{color:"#FFF",height:18,width:50,wrapperClass:"d-block",visible:B}):void 0===x?"Confirm":x})]})]})]})}},30233:function(e,t,r){"use strict";r.d(t,{V:function(){return j}});var n,i,a,o,s=r(50029),u=r(59499),c=r(71383),l=r(87794),f=r.n(l),d=r(67294),p=r(69696),h=r(99603),m=r(34798),g=r.n(m),y=r(71893),b=r(42894),x=r(59417),S=r(85330),w=r(35683),E=r.n(w),A=r(85893);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function P(e){for(var t=1;t0&&(n=I(r.width)/o||1),a>0&&(i=I(r.height)/a||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function D(e){var t=T(e),r=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-r)&&(r=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function N(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&F(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function M(e){return e?(e.nodeName||"").toLowerCase():null}function L(e){return O(e).getComputedStyle(e)}function B(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function H(e){return"html"===M(e)?e:e.assignedSlot||e.parentNode||(F(e)?e.host:null)||B(e)}function z(e){return k(e)&&"fixed"!==L(e).position?e.offsetParent:null}function $(e){for(var t=O(e),r=z(e);r&&["table","td","th"].indexOf(M(r))>=0&&"static"===L(r).position;)r=z(r);return r&&("html"===M(r)||"body"===M(r)&&"static"===L(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&k(e)&&"fixed"===L(e).position)return null;var r=H(e);for(F(r)&&(r=r.host);k(r)&&0>["html","body"].indexOf(M(r));){var n=L(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function V(e,t,r){return j(e,R(t,r))}function K(){return{top:0,right:0,bottom:0,left:0}}function W(e){return Object.assign({},K(),e)}function q(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}var Z="bottom",G="right",Y="left",J="auto",X=["top",Z,G,Y],Q="start",ee="viewport",et="popper",er=X.reduce(function(e,t){return e.concat([t+"-"+Q,t+"-end"])},[]),en=[].concat(X,[J]).reduce(function(e,t){return e.concat([t,t+"-"+Q,t+"-end"])},[]),ei=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ea(e){return e.split("-")[1]}var eo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function es(e){var t,r,n,i,a,o,s=e.popper,u=e.popperRect,c=e.placement,l=e.variation,f=e.offsets,d=e.position,p=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,g=e.isFixed,y=f.x,b=void 0===y?0:y,x=f.y,S=void 0===x?0:x,w="function"==typeof m?m({x:b,y:S}):{x:b,y:S};b=w.x,S=w.y;var E=f.hasOwnProperty("x"),A=f.hasOwnProperty("y"),C=Y,P="top",_=window;if(h){var k=$(s),F="clientHeight",j="clientWidth";k===O(s)&&"static"!==L(k=B(s)).position&&"absolute"===d&&(F="scrollHeight",j="scrollWidth"),("top"===c||(c===Y||c===G)&&"end"===l)&&(P=Z,S-=(g&&k===_&&_.visualViewport?_.visualViewport.height:k[F])-u.height,S*=p?1:-1),(c===Y||("top"===c||c===Z)&&"end"===l)&&(C=G,b-=(g&&k===_&&_.visualViewport?_.visualViewport.width:k[j])-u.width,b*=p?1:-1)}var R=Object.assign({position:d},h&&eo),T=!0===m?(r=(t={x:b,y:S}).x,n=t.y,{x:I(r*(i=window.devicePixelRatio||1))/i||0,y:I(n*i)/i||0}):{x:b,y:S};return(b=T.x,S=T.y,p)?Object.assign({},R,((o={})[P]=A?"0":"",o[C]=E?"0":"",o.transform=1>=(_.devicePixelRatio||1)?"translate("+b+"px, "+S+"px)":"translate3d("+b+"px, "+S+"px, 0)",o)):Object.assign({},R,((a={})[P]=A?S+"px":"",a[C]=E?b+"px":"",a.transform="",a))}var eu={passive:!0},ec={left:"right",right:"left",bottom:"top",top:"bottom"};function el(e){return e.replace(/left|right|bottom|top/g,function(e){return ec[e]})}var ef={start:"end",end:"start"};function ed(e){return e.replace(/start|end/g,function(e){return ef[e]})}function ep(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function eh(e){return T(B(e)).left+ep(e).scrollLeft}function em(e){var t=L(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ev(e,t){void 0===t&&(t=[]);var r,n=function e(t){return["html","body","#document"].indexOf(M(t))>=0?t.ownerDocument.body:k(t)&&em(t)?t:e(H(t))}(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),a=O(n),o=i?[a].concat(a.visualViewport||[],em(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(ev(H(o)))}function eg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ey(e,t){var r,n,i,a,o,s,u,c,l,f,d,p,h,m,g,y,b;return t===ee?eg((r=O(e),n=B(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,u=0,i&&(a=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,u=i.offsetTop)),{width:a,height:o,x:s+eh(e),y:u})):_(t)?((c=T(t)).top=c.top+t.clientTop,c.left=c.left+t.clientLeft,c.bottom=c.top+t.clientHeight,c.right=c.left+t.clientWidth,c.width=t.clientWidth,c.height=t.clientHeight,c.x=c.left,c.y=c.top,c):eg((l=B(e),d=B(l),p=ep(l),h=null==(f=l.ownerDocument)?void 0:f.body,m=j(d.scrollWidth,d.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),g=j(d.scrollHeight,d.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),y=-p.scrollLeft+eh(l),b=-p.scrollTop,"rtl"===L(h||d).direction&&(y+=j(d.clientWidth,h?h.clientWidth:0)-m),{width:m,height:g,x:y,y:b}))}function eb(e){var t,r=e.reference,n=e.element,i=e.placement,a=i?P(i):null,o=i?ea(i):null,s=r.x+r.width/2-n.width/2,u=r.y+r.height/2-n.height/2;switch(a){case"top":t={x:s,y:r.y-n.height};break;case Z:t={x:s,y:r.y+r.height};break;case G:t={x:r.x+r.width,y:u};break;case Y:t={x:r.x-n.width,y:u};break;default:t={x:r.x,y:r.y}}var c=a?U(a):null;if(null!=c){var l="y"===c?"height":"width";switch(o){case Q:t[c]=t[c]-(r[l]/2-n[l]/2);break;case"end":t[c]=t[c]+(r[l]/2-n[l]/2)}}return t}function ex(e,t){void 0===t&&(t={});var r,n,i,a,o,s,u,c=t,l=c.placement,f=void 0===l?e.placement:l,d=c.boundary,p=c.rootBoundary,h=c.elementContext,m=void 0===h?et:h,g=c.altBoundary,y=c.padding,b=void 0===y?0:y,x=W("number"!=typeof b?b:q(b,X)),S=e.rects.popper,w=e.elements[void 0!==g&&g?m===et?"reference":et:m],E=(r=_(w)?w:w.contextElement||B(e.elements.popper),s=(o=[].concat("clippingParents"===(n=void 0===d?"clippingParents":d)?(i=ev(H(r)),_(a=["absolute","fixed"].indexOf(L(r).position)>=0&&k(r)?$(r):r)?i.filter(function(e){return _(e)&&N(e,a)&&"body"!==M(e)}):[]):[].concat(n),[void 0===p?ee:p]))[0],(u=o.reduce(function(e,t){var n=ey(r,t);return e.top=j(n.top,e.top),e.right=R(n.right,e.right),e.bottom=R(n.bottom,e.bottom),e.left=j(n.left,e.left),e},ey(r,s))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),A=T(e.elements.reference),C=eb({reference:A,element:S,strategy:"absolute",placement:f}),P=eg(Object.assign({},S,C)),O=m===et?P:A,F={top:E.top-O.top+x.top,bottom:O.bottom-E.bottom+x.bottom,left:E.left-O.left+x.left,right:O.right-E.right+x.right},I=e.modifiersData.offset;if(m===et&&I){var D=I[f];Object.keys(F).forEach(function(e){var t=[G,Z].indexOf(e)>=0?1:-1,r=["top",Z].indexOf(e)>=0?"y":"x";F[e]+=D[r]*t})}return F}function eS(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ew(e){return["top",G,Z,Y].some(function(t){return e[t]>=0})}var eE={placement:"bottom",modifiers:[],strategy:"absolute"};function eA(){for(var e=arguments.length,t=Array(e),r=0;r=0?-1:1,u=(s="function"==typeof a?a(Object.assign({},n,{placement:r})):a)[0],c=s[1],u=u||0,c=(c||0)*o,[Y,G].indexOf(i)>=0?{x:c,y:u}:{x:u,y:c}),e},{}),s=o[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=void 0===i||i,o=r.altAxis,s=void 0===o||o,u=r.fallbackPlacements,c=r.padding,l=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,h=void 0===p||p,m=r.allowedAutoPlacements,g=t.options.placement,y=P(g),b=[g].concat(u||(y!==g&&h?function(e){if(P(e)===J)return[];var t=el(e);return[ed(e),t,ed(t)]}(g):[el(g)])).reduce(function(e,r){var n,i,a,o,s,u,d,p,g,y,b,x;return e.concat(P(r)===J?(i=(n={placement:r,boundary:l,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:m}).placement,a=n.boundary,o=n.rootBoundary,s=n.padding,u=n.flipVariations,p=void 0===(d=n.allowedAutoPlacements)?en:d,0===(b=(y=(g=ea(i))?u?er:er.filter(function(e){return ea(e)===g}):X).filter(function(e){return p.indexOf(e)>=0})).length&&(b=y),Object.keys(x=b.reduce(function(e,r){return e[r]=ex(t,{placement:r,boundary:a,rootBoundary:o,padding:s})[P(r)],e},{})).sort(function(e,t){return x[e]-x[t]})):r)},[]),x=t.rects.reference,S=t.rects.popper,w=new Map,E=!0,A=b[0],C=0;C=0,j=F?"width":"height",R=ex(t,{placement:O,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),I=F?k?G:Y:k?Z:"top";x[j]>S[j]&&(I=el(I));var T=el(I),D=[];if(a&&D.push(R[_]<=0),s&&D.push(R[I]<=0,R[T]<=0),D.every(function(e){return e})){A=O,E=!1;break}w.set(O,D)}if(E)for(var N=h?3:1,M=function(e){var t=b.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},L=N;L>0&&"break"!==M(L);L--);t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=r.altAxis,o=r.boundary,s=r.rootBoundary,u=r.altBoundary,c=r.padding,l=r.tether,f=void 0===l||l,d=r.tetherOffset,p=void 0===d?0:d,h=ex(t,{boundary:o,rootBoundary:s,padding:c,altBoundary:u}),m=P(t.placement),g=ea(t.placement),y=!g,b=U(m),x="x"===b?"y":"x",S=t.modifiersData.popperOffsets,w=t.rects.reference,E=t.rects.popper,A="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,C="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(S){if(void 0===i||i){var k,F="y"===b?"top":Y,I="y"===b?Z:G,T="y"===b?"height":"width",N=S[b],M=N+h[F],L=N-h[I],B=f?-E[T]/2:0,H=g===Q?w[T]:E[T],z=g===Q?-E[T]:-w[T],W=t.elements.arrow,q=f&&W?D(W):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:K(),X=J[F],ee=J[I],et=V(0,w[T],q[T]),er=y?w[T]/2-B-et-X-C.mainAxis:H-et-X-C.mainAxis,en=y?-w[T]/2+B+et+ee+C.mainAxis:z+et+ee+C.mainAxis,ei=t.elements.arrow&&$(t.elements.arrow),eo=ei?"y"===b?ei.clientTop||0:ei.clientLeft||0:0,es=null!=(k=null==O?void 0:O[b])?k:0,eu=V(f?R(M,N+er-es-eo):M,N,f?j(L,N+en-es):L);S[b]=eu,_[b]=eu-N}if(void 0!==a&&a){var ec,el,ef=S[x],ed="y"===x?"height":"width",ep=ef+h["x"===b?"top":Y],eh=ef-h["x"===b?Z:G],em=-1!==["top",Y].indexOf(m),ev=null!=(ec=null==O?void 0:O[x])?ec:0,eg=em?ep:ef-w[ed]-E[ed]-ev+C.altAxis,ey=em?ef+w[ed]+E[ed]-ev-C.altAxis:eh,eb=f&&em?(el=V(eg,ef,ey))>ey?ey:el:V(f?eg:ep,ef,f?ey:eh);S[x]=eb,_[x]=eb-ef}t.modifiersData[n]=_}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r,n=e.state,i=e.name,a=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,u=P(n.placement),c=U(u),l=[Y,G].indexOf(u)>=0?"height":"width";if(o&&s){var f=W("number"!=typeof(t="function"==typeof(t=a.padding)?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:q(t,X)),d=D(o),p=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],h=s[c]-n.rects.reference[c],m=$(o),g=m?"y"===c?m.clientHeight||0:m.clientWidth||0:0,y=f["y"===c?"top":Y],b=g-d[l]-f["y"===c?Z:G],x=g/2-d[l]/2+(p/2-h/2),S=V(y,x,b);n.modifiersData[i]=((r={})[c]=S,r.centerOffset=S-x,r)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&N(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:i,s=void 0===(o=n.defaultOptions)?eE:o,function(e,t,r){void 0===r&&(r=s);var n,i={placement:"bottom",orderedModifiers:[],options:Object.assign({},eE,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],u=!1,c={state:i,setOptions:function(r){var n,u,f,d,p,h="function"==typeof r?r(i.options):r;l(),i.options=Object.assign({},s,i.options,h),i.scrollParents={reference:_(e)?ev(e):e.contextElement?ev(e.contextElement):[],popper:ev(t)};var m=(u=Object.keys(n=[].concat(a,i.options.modifiers).reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{})).map(function(e){return n[e]}),f=new Map,d=new Set,p=[],u.forEach(function(e){f.set(e.name,e)}),u.forEach(function(e){d.has(e.name)||function e(t){d.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!d.has(t)){var r=f.get(t);r&&e(r)}}),p.push(t)}(e)}),ei.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return i.orderedModifiers=m.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=e.effect;if("function"==typeof n){var a=n({state:i,name:t,instance:c,options:void 0===r?{}:r});o.push(a||function(){})}}),c.update()},forceUpdate:function(){if(!u){var e,t,r,n,a,o,s,l,f,d,p,h,m=i.elements,g=m.reference,y=m.popper;if(eA(g,y)){i.rects={reference:(t=$(y),r="fixed"===i.options.strategy,n=k(t),l=k(t)&&(o=I((a=t.getBoundingClientRect()).width)/t.offsetWidth||1,s=I(a.height)/t.offsetHeight||1,1!==o||1!==s),f=B(t),d=T(g,l),p={scrollLeft:0,scrollTop:0},h={x:0,y:0},(n||!n&&!r)&&(("body"!==M(t)||em(f))&&(p=(e=t)!==O(e)&&k(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:ep(e)),k(t)?(h=T(t,!0),h.x+=t.clientLeft,h.y+=t.clientTop):f&&(h.x=eh(f))),{x:d.left+p.scrollLeft-h.x,y:d.top+p.scrollTop-h.y,width:d.width,height:d.height}),popper:D(y)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var b=0;bvoid 0},e_={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:r}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==r.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:r,reference:n}=e.elements,i=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===i&&"setAttribute"in n){let e=n.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(r.id))return;n.setAttribute("aria-describedby",e?`${e},${r.id}`:r.id)}}},ek=[];var eF=function(e,t,r={}){let{enabled:n=!0,placement:i="bottom",strategy:a="absolute",modifiers:o=ek}=r,s=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(r,eP),u=(0,l.useRef)(o),c=(0,l.useRef)(),f=(0,l.useCallback)(()=>{var e;null==(e=c.current)||e.update()},[]),d=(0,l.useCallback)(()=>{var e;null==(e=c.current)||e.forceUpdate()},[]),[p,h]=C((0,l.useState)({placement:i,update:f,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),m=(0,l.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},r={};Object.keys(e.elements).forEach(n=>{t[n]=e.styles[n],r[n]=e.attributes[n]}),h({state:e,styles:t,attributes:r,update:f,forceUpdate:d,placement:e.placement})}}),[f,d,h]),g=(0,l.useMemo)(()=>(A(u.current,o)||(u.current=o),u.current),[o]);return(0,l.useEffect)(()=>{c.current&&n&&c.current.setOptions({placement:i,strategy:a,modifiers:[...g,m,eO]})},[a,i,m,n,g]),(0,l.useEffect)(()=>{if(n&&null!=e&&null!=t)return c.current=eC(e,t,Object.assign({},s,{placement:i,strategy:a,modifiers:[...g,e_,m]})),()=>{null!=c.current&&(c.current.destroy(),c.current=void 0,h(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[n,e,t]),p},ej=!!("undefined"!=typeof window&&window.document&&window.document.createElement),eR=!1,eI=!1;try{var eT={get passive(){return eR=!0},get once(){return eI=eR=!0}};ej&&(window.addEventListener("test",eT,eT),window.removeEventListener("test",eT,!0))}catch(e){}var eD=function(e,t,r,n){if(n&&"boolean"!=typeof n&&!eI){var i=n.once,a=n.capture,o=r;!eI&&i&&(o=r.__once||function e(n){this.removeEventListener(t,e,a),r.call(this,n)},r.__once=o),e.addEventListener(t,o,eR?n:a)}e.addEventListener(t,r,n)},eN=function(e,t,r,n){var i=n&&"boolean"!=typeof n?n.capture:n;e.removeEventListener(t,r,i),r.__once&&e.removeEventListener(t,r.__once,i)},eM=function(e,t,r,n){return eD(e,t,r,n),function(){eN(e,t,r,n)}};function eL(e){return e&&e.ownerDocument||document}var eB=r(78146);let eH=()=>{},ez=e=>e&&("current"in e?e.current:e),e$={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};var eU=function(e,t=eH,{disabled:r,clickTrigger:n="click"}={}){let i=(0,l.useRef)(!1),a=(0,l.useRef)(!1),o=(0,l.useCallback)(t=>{let r=ez(e);h()(!!r,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!r||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!f(r,t.target)||a.current,a.current=!1},[e]),s=(0,eB.Z)(t=>{let r=ez(e);r&&f(r,t.target)&&(a.current=!0)}),u=(0,eB.Z)(e=>{i.current||t(e)});(0,l.useEffect)(()=>{if(r||null==e)return;let t=eL(ez(e)),i=(t.defaultView||window).event,a=null;e$[n]&&(a=eM(t,e$[n],s,!0));let c=eM(t,n,o,!0),l=eM(t,n,e=>{if(e===i){i=void 0;return}u(e)}),f=[];return"ontouchstart"in t.documentElement&&(f=[].slice.call(t.body.children).map(e=>eM(e,"mousemove",eH))),()=>{null==a||a(),c(),l(),f.forEach(e=>e())}},[e,r,n,o,s,u])};let eV=()=>{};var eK=function(e,t,{disabled:r,clickTrigger:n}={}){let i=t||eV;eU(e,i,{disabled:r,clickTrigger:n});let a=(0,eB.Z)(e=>{27===e.keyCode&&i(e)});(0,l.useEffect)(()=>{if(r||null==e)return;let t=eL(ez(e)),n=(t.defaultView||window).event,i=eM(t,"keyup",e=>{if(e===n){n=void 0;return}a(e)});return()=>{i()}},[e,r,a])};let eW=(0,l.createContext)(ej?window:void 0);eW.Provider;let eq=(e,t)=>ej?null==e?(t||eL()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function eZ(e,t){let r=(0,l.useContext)(eW),[n,i]=(0,l.useState)(()=>eq(e,null==r?void 0:r.document));if(!n){let t=eq(e);t&&i(t)}return(0,l.useEffect)(()=>{t&&n&&t(n)},[t,n]),(0,l.useEffect)(()=>{let t=eq(e);t!==n&&i(t)},[e,n]),n}var eG=r(85893);let eY=l.forwardRef((e,t)=>{let{flip:r,offset:n,placement:i,containerPadding:a,popperConfig:o={},transition:s}=e,[u,c]=(0,S.Z)(),[f,d]=(0,S.Z)(),p=g(c,t),h=eZ(e.container),m=eZ(e.target),[y,b]=(0,l.useState)(!e.show),w=eF(m,u,function({enabled:e,enableEvents:t,placement:r,flip:n,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:u={}}){var c,l,f,d;let p=function(e){let t={};return Array.isArray(e)?(null==e||e.forEach(e=>{t[e.name]=e}),t):e||t}(u.modifiers);return Object.assign({},u,{placement:r,enabled:e,strategy:a?"fixed":u.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},p,{eventListeners:{enabled:t},preventOverflow:Object.assign({},p.preventOverflow,{options:o?Object.assign({padding:o},null==(c=p.preventOverflow)?void 0:c.options):null==(l=p.preventOverflow)?void 0:l.options}),offset:{options:Object.assign({offset:i},null==(f=p.offset)?void 0:f.options)},arrow:Object.assign({},p.arrow,{enabled:!!s,options:Object.assign({},null==(d=p.arrow)?void 0:d.options,{element:s})}),flip:Object.assign({enabled:!!n},p.flip)}))})}({placement:i,enableEvents:!!e.show,containerPadding:a||5,flip:r,offset:n,arrowElement:f,popperConfig:o}));e.show?y&&b(!1):e.transition||y||b(!0);let E=(...t)=>{b(!0),e.onExited&&e.onExited(...t)},A=e.show||s&&!y;if(eK(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!A)return null;let C=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:p}),{popper:w,placement:i,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:d})});if(s){let{onExit:t,onExiting:r,onEnter:n,onEntering:i,onEntered:a}=e;C=(0,eG.jsx)(s,{in:e.show,appear:!0,onExit:t,onExiting:r,onExited:E,onEnter:n,onEntering:i,onEntered:a,children:C})}return h?x.createPortal(C,h):null});eY.displayName="Overlay";var eJ=r(99585),eX=r(76792),eQ=/-(.)/g;let e0=e=>e[0].toUpperCase()+e.replace(eQ,function(e,t){return t.toUpperCase()}).slice(1);function e1(e,{displayName:t=e0(e),Component:r,defaultProps:n}={}){let i=l.forwardRef(({className:t,bsPrefix:n,as:i=r||"div",...a},o)=>{let s=(0,eX.vE)(n,e);return(0,eG.jsx)(i,{ref:o,className:b()(t,s),...a})});return i.defaultProps=n,i.displayName=t,i}var e2=e1("popover-header"),e4=e1("popover-body");let e3=l.forwardRef(({bsPrefix:e,placement:t,className:r,style:n,children:i,body:a,arrowProps:o,popper:s,show:u,...c},l)=>{let f;let d=(0,eX.vE)(e,"popover"),p=(0,eX.SC)(),[h]=(null==t?void 0:t.split("-"))||[],m=(f=h,"left"===h?f=p?"end":"start":"right"===h&&(f=p?"start":"end"),f);return(0,eG.jsxs)("div",{ref:l,role:"tooltip",style:n,"x-placement":h,className:b()(r,d,h&&`bs-popover-${m}`),...c,children:[(0,eG.jsx)("div",{className:"popover-arrow",...o}),a?(0,eG.jsx)(e4,{children:i}):i]})});e3.defaultProps={placement:"right"};var e6=Object.assign(e3,{Header:e2,Body:e4,POPPER_OFFSET:[0,8]});function e5(e,t){return(e5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var e8={disabled:!1},e9=l.createContext(null),e7="unmounted",te="exited",tt="entering",tr="entered",tn="exiting",ti=function(e){function t(t,r){n=e.call(this,t,r)||this;var n,i,a=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?a?(i=te,n.appearStatus=tt):i=tr:i=t.unmountOnExit||t.mountOnEnter?e7:te,n.state={status:i},n.nextCallback=null,n}(r=t).prototype=Object.create(e.prototype),r.prototype.constructor=r,e5(r,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===e7?{status:te}:null};var r,n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==tt&&r!==tr&&(t=tt):(r===tt||r===tr)&&(t=tn)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===tt){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:x.findDOMNode(this);r&&r.scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===te&&this.setState({status:e7})},n.performEnter=function(e){var t=this,r=this.props.enter,n=this.context?this.context.isMounting:e,i=this.props.nodeRef?[n]:[x.findDOMNode(this),n],a=i[0],o=i[1],s=this.getTimeouts(),u=n?s.appear:s.enter;if(!e&&!r||e8.disabled){this.safeSetState({status:tr},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:tt},function(){t.props.onEntering(a,o),t.onTransitionEnd(u,function(){t.safeSetState({status:tr},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:x.findDOMNode(this);if(!t||e8.disabled){this.safeSetState({status:te},function(){e.props.onExited(n)});return}this.props.onExit(n),this.safeSetState({status:tn},function(){e.props.onExiting(n),e.onTransitionEnd(r.exit,function(){e.safeSetState({status:te},function(){e.props.onExited(n)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:x.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(!r||n){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===e7)return null;var t=this.props,r=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l.createElement(e9.Provider,{value:null},"function"==typeof r?r(e,n):l.cloneElement(l.Children.only(r),n))},t}(l.Component);function ta(){}ti.contextType=e9,ti.propTypes={},ti.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ta,onEntering:ta,onEntered:ta,onExit:ta,onExiting:ta,onExited:ta},ti.UNMOUNTED=e7,ti.EXITED=te,ti.ENTERING=tt,ti.ENTERED=tr,ti.EXITING=tn;var to=/([A-Z])/g,ts=/^ms-/;function tu(e){return e.replace(to,"-$1").toLowerCase().replace(ts,"-ms-")}var tc=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,tl=function(e,t){var r,n="",i="";if("string"==typeof t)return e.style.getPropertyValue(tu(t))||((r=eL(e))&&r.defaultView||window).getComputedStyle(e,void 0).getPropertyValue(tu(t));Object.keys(t).forEach(function(r){var a=t[r];a||0===a?r&&tc.test(r)?i+=r+"("+a+") ":n+=tu(r)+": "+a+";":e.style.removeProperty(tu(r))}),i&&(n+="transform: "+i+";"),e.style.cssText+=";"+n};function tf(e,t){let r=tl(e,t)||"",n=-1===r.indexOf("ms")?1e3:1;return parseFloat(r)*n}function td(e,t){var r,n,i,a,o,s,u,c,l,f,d,p;let h=tf(e,"transitionDuration"),m=tf(e,"transitionDelay"),g=(r=e,n=r=>{r.target===e&&(g(),t(r))},null==(i=h+m)&&(s=-1===(o=tl(r,"transitionDuration")||"").indexOf("ms")?1e3:1,i=parseFloat(o)*s||0),d=(c=!1,l=setTimeout(function(){c||function(e,t,r,n){if(void 0===r&&(r=!1),void 0===n&&(n=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,r,n),e.dispatchEvent(i)}}(r,"transitionend",!0)},i+5),f=eM(r,"transitionend",function(){c=!0},{once:!0}),function(){clearTimeout(l),f()}),p=eM(r,"transitionend",n),function(){d(),p()})}function tp(e){return e&&"setState"in e?x.findDOMNode(e):null!=e?e:null}let th=l.forwardRef(({onEnter:e,onEntering:t,onEntered:r,onExit:n,onExiting:i,onExited:a,addEndListener:o,children:s,childRef:u,...c},f)=>{let d=(0,l.useRef)(null),p=g(d,u),h=e=>{p(tp(e))},m=e=>t=>{e&&d.current&&e(d.current,t)},y=(0,l.useCallback)(m(e),[e]),b=(0,l.useCallback)(m(t),[t]),x=(0,l.useCallback)(m(r),[r]),S=(0,l.useCallback)(m(n),[n]),w=(0,l.useCallback)(m(i),[i]),E=(0,l.useCallback)(m(a),[a]),A=(0,l.useCallback)(m(o),[o]);return(0,eG.jsx)(ti,{ref:f,...c,onEnter:y,onEntered:x,onEntering:b,onExit:S,onExited:E,onExiting:w,addEndListener:A,nodeRef:d,children:"function"==typeof s?(e,t)=>s(e,{...t,ref:h}):l.cloneElement(s,{ref:h})})}),tm={[tt]:"show",[tr]:"show"},tv=l.forwardRef(({className:e,children:t,transitionClasses:r={},...n},i)=>{let a=(0,l.useCallback)((e,t)=>{e.offsetHeight,null==n.onEnter||n.onEnter(e,t)},[n]);return(0,eG.jsx)(th,{ref:i,addEndListener:td,...n,onEnter:a,childRef:t.ref,children:(n,i)=>l.cloneElement(t,{...i,className:b()("fade",e,t.props.className,tm[n],r[n])})})});tv.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},tv.displayName="Fade";let tg=l.forwardRef(({children:e,transition:t,popperConfig:r={},...n},i)=>{let a=(0,l.useRef)({}),[o,s]=(0,S.Z)(),[u,c]=function(e){let t=(0,l.useRef)(null),r=(0,eX.vE)(void 0,"popover"),n=(0,l.useMemo)(()=>({name:"offset",options:{offset:()=>{var n;return t.current&&((n=t.current).classList?!!r&&n.classList.contains(r):-1!==(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+r+" "))?e||e6.POPPER_OFFSET:e||[0,0]}}}),[e,r]);return[t,[n]]}(n.offset),f=g(i,u),d=!0===t?tv:t||void 0,p=(0,eB.Z)(e=>{s(e),null==r||null==r.onFirstUpdate||r.onFirstUpdate(e)});return(0,eJ.Z)(()=>{o&&(null==a.current.scheduleUpdate||a.current.scheduleUpdate())},[o]),(0,eG.jsx)(eY,{...n,ref:f,popperConfig:{...r,modifiers:c.concat(r.modifiers||[]),onFirstUpdate:p},transition:d,children:(r,{arrowProps:n,popper:i,show:o})=>{var s,u;!function(e,t){let{ref:r}=e,{ref:n}=t;e.ref=r.__wrapped||(r.__wrapped=e=>r(tp(e))),t.ref=n.__wrapped||(n.__wrapped=e=>n(tp(e)))}(r,n);let c=null==i?void 0:i.placement,f=Object.assign(a.current,{state:null==i?void 0:i.state,scheduleUpdate:null==i?void 0:i.update,placement:c,outOfBoundaries:(null==i?void 0:null==(s=i.state)?void 0:null==(u=s.modifiersData.hide)?void 0:u.isReferenceHidden)||!1});return"function"==typeof e?e({...r,placement:c,show:o,...!t&&o&&{className:"show"},popper:f,arrowProps:n}):l.cloneElement(e,{...r,placement:c,arrowProps:n,popper:f,className:b()(e.props.className,!t&&o&&"show"),style:{...e.props.style,...r.style}})}})});function ty(e,t,r){let[n]=t,i=n.currentTarget,a=n.relatedTarget||n.nativeEvent[r];a&&a===i||f(i,a)||e(...t)}function tb({trigger:e,overlay:t,children:r,popperConfig:n={},show:i,defaultShow:a=!1,onToggle:o,delay:s,placement:u,flip:c=u&&-1!==u.indexOf("auto"),...f}){var p,h,m,y,b,x,S,w,E,A;let C=(0,l.useRef)(null),P=g(C,r.ref),O=(E=(0,d.Z)(),A=(0,l.useRef)(),S=function(){return clearTimeout(A.current)},(w=(0,l.useRef)(S)).current=S,(0,l.useEffect)(function(){return function(){return w.current()}},[]),(0,l.useMemo)(function(){var e=function(){return clearTimeout(A.current)};return{set:function(t,r){void 0===r&&(r=0),E()&&(e(),r<=2147483647?A.current=setTimeout(t,r):function e(t,r,n){var i=n-Date.now();t.current=i<=2147483647?setTimeout(r,i):setTimeout(function(){return e(t,r,n)},2147483647)}(A,t,Date.now()+r))},clear:e}},[])),_=(0,l.useRef)(""),[k,F]=(p=(0,l.useRef)(void 0!==i),m=(h=(0,l.useState)(a))[0],y=h[1],b=void 0!==i,x=p.current,p.current=b,!b&&x&&m!==a&&y(a),[b?i:m,(0,l.useCallback)(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{P(tp(e))},N=(0,l.useCallback)(()=>{if(O.clear(),_.current="show",!j.show){F(!0);return}O.set(()=>{"show"===_.current&&F(!0)},j.show)},[j.show,F,O]),M=(0,l.useCallback)(()=>{if(O.clear(),_.current="hide",!j.hide){F(!1);return}O.set(()=>{"hide"===_.current&&F(!1)},j.hide)},[j.hide,F,O]),L=(0,l.useCallback)((...e)=>{N(),null==R||R(...e)},[N,R]),B=(0,l.useCallback)((...e)=>{M(),null==I||I(...e)},[M,I]),H=(0,l.useCallback)((...e)=>{F(!k),null==T||T(...e)},[T,F,k]),z=(0,l.useCallback)((...e)=>{ty(N,e,"fromElement")},[N]),$=(0,l.useCallback)((...e)=>{ty(M,e,"toElement")},[M]),U=null==e?[]:[].concat(e),V={ref:D};return -1!==U.indexOf("click")&&(V.onClick=H),-1!==U.indexOf("focus")&&(V.onFocus=L,V.onBlur=B),-1!==U.indexOf("hover")&&(V.onMouseOver=z,V.onMouseOut=$),(0,eG.jsxs)(eG.Fragment,{children:["function"==typeof r?r(V):(0,l.cloneElement)(r,V),(0,eG.jsx)(tg,{...f,show:k,onHide:M,flip:c,placement:u,popperConfig:n,target:C.current,children:t})]})}tg.displayName="Overlay",tg.defaultProps={transition:tv,rootClose:!1,show:!1,placement:"top"},tb.defaultProps={defaultShow:!1,trigger:["hover","focus"]};var tx=r(71893),tS=r(34798),tw=r.n(tS),tE=r(99603),tA=r(59417),tC=r(63055);function tP(e){var t=e.title,r=e.content,n=e.show,i=e.hide,a=e.icon,o=void 0===a?tA.sqG:a,s=e.onClick,u=void 0===s?tw():s,c=e.trigger,l=e.style,f=e.children,d=(0,eG.jsxs)(e6,{id:"popover-basic",style:l,children:[t&&(0,eG.jsx)(e2,{children:t}),r&&(0,eG.jsx)(e4,{dangerouslySetInnerHTML:{__html:r}})]});return(0,eG.jsx)(tb,{trigger:void 0===c?["hover","focus","click"]:c,placement:"right-start",overlay:d,delay:{show:void 0===n?150:n,hide:void 0===i?250:i},children:(0,eG.jsx)("span",{children:f||(0,eG.jsx)(tE.G,{color:"#777777",icon:o,onClick:u})})})}(0,tx.ZP)(e6)(u||(u=(0,c.Z)(["\n font-size: "," !important;\n font-family: "," !important;\n"])),tC.n5,tC.rk)},31637:function(e,t,r){"use strict";var n,i=r(71383),a=r(42894),o=r(71893),s=r(63055),u=r(85893),c=o.ZP.div(n||(n=(0,i.Z)(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n margin-top: ",";\n\n & p {\n margin-top: 10px;\n }\n"])),s.SI);t.Z=function(){return(0,u.jsxs)(c,{children:[(0,u.jsx)(a.rj,{color:"#000",height:45,width:45,visible:!0}),(0,u.jsx)("p",{children:"Loading information..."})]})}},59912:function(e,t,r){"use strict";r.d(t,{I:function(){return o}});var n,i=r(71383),a=r(71893),o=[{maxWidth:767,marginTop:10},{maxWidth:991,width:723,marginTop:20},{maxWidth:1199,width:933,marginTop:50},{width:1127,marginTop:80}],s=function(e,t,r,n){if("left"===e)return"\n margin-right: auto !important;\n ";if("right"===e)return"\n margin-left: auto !important;\n ";if("center"===e)return"\n margin-left: auto !important;\n margin-right: auto !important;\n ";var i="";return t&&(i+="margin-left: ".concat(t).concat(n," !important;")),r&&(i+="margin-right: ".concat(r).concat(n," !important;")),i},u=a.ZP.div(n||(n=(0,i.Z)(["\n display: block;\n max-width: 100% !important;\n\n ","\n"])),function(e){return e.rules.map(function(t,r){return 0===r?"@media only screen and (max-width: ".concat(t.maxWidth,"px) {\n & {\n ").concat(t.marginTop&&"margin-top: ".concat(t.marginTop,"px;"),"\n width: auto !important;\n ").concat(s(t.horizontalAlign||"none",1,1,"em"),"\n }\n }"):r===e.rules.length-1?"@media only screen and (min-width: ".concat((e.rules[r-1].maxWidth||0)+1,"px) {\n & {\n ").concat(t.marginTop&&"margin-top: ".concat(t.marginTop,"px;"),"\n width: ").concat(t.width,"px;\n ").concat(s(t.horizontalAlign||"center",t.marginLeft,t.marginRight,t.marginUnit),"\n }\n }"):"@media only screen and (min-width: ".concat((e.rules[r-1].maxWidth||0)+1,"px) and (max-width: ").concat(t.maxWidth,"px) {\n & {\n ").concat(t.marginTop&&"margin-top: ".concat(t.marginTop,"px;"),"\n width: ").concat(t.width,"px;\n ").concat(s(t.horizontalAlign||"center",t.marginLeft,t.marginRight,t.marginUnit),"\n }\n }")})});t.Z=u},19287:function(e,t,r){"use strict";var n,i=r(71383),a=r(71893);t.Z=a.ZP.div(n||(n=(0,i.Z)(["\n width: 100%;\n\n & .pg-notification-close {\n padding: 0 0.5rem;\n }\n"])))},99154:function(e,t,r){"use strict";r.d(t,{DK:function(){return h},Es:function(){return l},JK:function(){return u},Jx:function(){return g},Qf:function(){return p},S3:function(){return b},TW:function(){return f},YC:function(){return d},_x:function(){return m},dV:function(){return y},e$:function(){return x},ne:function(){return c},rp:function(){return s},uA:function(){return n}});var n=function(e){return"bceidboth"===e},i=function(e){return"digitalcredential"===e},a=function(e){return"bcservicescard"===e},o=function(e){return["idir","azureidir"].includes(e)},s=function(e){return e.startsWith("bceid")},u=function(e){return!s(e)},c=function(e){return["bceidbasic","bceidbusiness"].includes(e)},l=function(e){return o(e)||"bceidboth"!==e},f=function(e){return o(e)||!c(e)},d=function(e){return["githubpublic","githubbcgov"].includes(e)},p=function(e){return!d(e)},h=function(e){return!i(e)},m=function(e){return!a(e)},g=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(s)},y=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(d)},b=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(i)},x=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(a)}},15812:function(e,t,r){"use strict";r.d(t,{bD:function(){return x},ZP:function(){return b},hU:function(){return S}});var n,i=r(59499),a=r(67294),o=r(48094),s=r.n(o),u=r(85330),c=r(85893),l=function(e){var t=e.children,r=e.variant,n=e.size,i=e.closable,o=e.content,s=e.fadeOut,l=(0,a.useState)(!1),f=l[0],d=l[1];return((0,a.useEffect)(function(){var e=s?setTimeout(function(){d(!0)},s):null;return function(){e&&clearTimeout(e)}},[]),f)?null:(0,c.jsx)(u.bZ,{variant:r,size:n,closable:i,content:o,children:t})},f=r(19287),d=r(71383),p=r(71893).ZP.div(n||(n=(0,d.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 2000;\n"])));function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t0;t&&r&&t(r)})},e),elements:i},u.push(r),s.set(r,t),t}({root:null==t?void 0:t.current,rootMargin:r})).id,i=e.observer,(l=e.elements).set(h,function(e){return e&&d(e)}),i.observe(h),function(){if(l.delete(h),i.unobserve(h),0===l.size){i.disconnect(),s.delete(n);var e=u.findIndex(function(e){return e.root===n.root&&e.margin===n.margin});e>-1&&u.splice(e,1)}}}}else if(!f){var m=a.requestIdleCallback(function(){return d(!0)});return function(){return a.cancelIdleCallback(m)}}},[c,r,t,f,p.current]),[h,f,i.useCallback(function(){d(!1)},[])]};var i=r(67294),a=r(98065),o="function"==typeof IntersectionObserver,s=new Map,u=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},17285:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmpStateContext=void 0;var n=(0,r(92648).Z)(r(67294)).default.createContext({});t.AmpStateContext=n},80354:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInAmpMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ampFirst,r=e.hybrid,n=e.hasQuery;return void 0!==t&&t||void 0!==r&&r&&void 0!==n&&n}},16505:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHead=l,t.default=void 0;var n=r(6495).Z,i=r(92648).Z,a=(0,r(91598).Z)(r(67294)),o=i(r(70148)),s=r(17285),u=r(60523),c=r(80354);function l(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[a.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(a.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce(function(e,t){return"string"==typeof t||"number"==typeof t?e:e.concat(t)},[])):e.concat(t)}r(92783);var d=["name","httpEquiv","charSet","itemProp"];function p(e,t){var r,i,o,s,u=t.inAmpMode;return e.reduce(f,[]).reverse().concat(l(u).reverse()).filter((r=new Set,i=new Set,o=new Set,s={},function(e){var t=!0,n=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){n=!0;var a=e.key.slice(e.key.indexOf("$")+1);r.has(a)?t=!1:r.add(a)}switch(e.type){case"title":case"base":i.has(e.type)?t=!1:i.add(e.type);break;case"meta":for(var u=0,c=d.length;u0&&!eb().isEmail(f))){e.next=3;break}return s("Please provide a valid email address"),e.abrupt("return");case 3:return e.next=5,(0,B.ck)({additionalEmail:f});case 5:t=e.sent,n=(r=(0,P.Z)(t,2))[0],(a=r[1])?(console.error(a),h(a)):n&&i.show({variant:"success",fadeOut:2500,closable:!0,content:"Your additional email has successfully been updated"}),window.location.hash="#";case 11:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),y="".concat(null==c?void 0:c.given_name," ").concat(null==c?void 0:c.family_name),b=(0,et.jsxs)(ex,{children:[(0,et.jsx)(em.default,{label:"Name",fullWidth:!0,value:y,disabled:!0}),(0,et.jsx)("br",{}),(0,et.jsx)(em.default,{label:"Default Email",fullWidth:!0,value:null==c?void 0:c.email,disabled:!0}),(0,et.jsx)("br",{}),(0,et.jsxs)("div",{children:[(0,et.jsx)("span",{className:"strong",children:"Additional Email"})," \xa0",(0,et.jsx)(eg.Z,{title:"",content:"You can add a work email address in addition to your @gov.bc.ca to keep you informed of your integration progress. Note IDIR login/authentication is required to access the CSS App.",hide:200})]}),(0,et.jsx)(em.default,{"data-testid":"addi-email",type:"email",fullWidth:!0,maxLength:"100",value:f,onChange:function(e){eb().isEmail(e.target.value)&&s(""),d(e.target.value)}}),o&&(0,et.jsx)(eS,{children:o})]});return(0,et.jsxs)(et.Fragment,{children:[n(p,function(){return window.location.hash=p}),(0,et.jsx)(ev.Z,{id:p,content:b,onConfirm:g,icon:K.m08,title:"My Profile",confirmText:"Save",skipCloseOnConfirm:!0,closable:!0})]})}),eE=r(85330),eA=Z.ZP.div(d||(d=(0,z.Z)(["\n font-size: 1.2rem;\n display: flex;\n\n & > div:first-child {\n color: red;\n font-size: 2rem;\n width: 120px;\n }\n\n & > div:nth-child(2) {\n & > p:first-child {\n color: red;\n font-weight: bold;\n }\n }\n"]))),eC="gold-notification",eP=function(){var e,t,r=(0,j.useContext)(tA)||{},n=r.user,i=r.session,a=(e=(0,_.Z)(F().mark(function e(){var t;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!i||!n)){e.next=2;break}return e.abrupt("return");case 2:!i.isAdmin&&!n.hasReadGoldNotification&&null!==(t=n.integrations)&&void 0!==t&&t.find(function(e){return"gold"!==e.serviceType})&&(window.location.hash=eC);case 3:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});(0,j.useEffect)(function(){i&&n&&a()},[n]);var o=(t=(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.ck)({hasReadGoldNotification:!0});case 2:window.location.hash="#";case 3:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),s=(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(eA,{children:[(0,et.jsx)("div",{children:(0,et.jsx)(V.G,{icon:K.RLE,size:"lg"})}),(0,et.jsxs)("div",{children:[(0,et.jsx)("p",{children:"At this time, the Silver realms are being retired on Jan. 30 2023*. Projects on these realms will no longer be supported by the SSO team."}),(0,et.jsxs)("p",{children:["Please complete a ",(0,et.jsx)("span",{className:"strong",children:"Change Impact Assessment"}),", for each of your projects in the Silver realms."]})]})]}),(0,et.jsx)("div",{className:"text-center",children:(0,et.jsx)(eE.zx,{variant:"primary",type:"button",onClick:function(){return window.open("https://docs.google.com/forms/d/1MMPeMB0A2076xkXIZRaErAwZe9QDsSwSAWqe-uvm3ys","_blank")},children:"Complete Change Impact Assessment"})})]});return(0,et.jsx)(et.Fragment,{children:(0,et.jsx)(ev.Z,{id:eC,content:s,showCancel:!1,showConfirm:!1,onClose:o,icon:K.RLE,title:"Please upgrade from Silver to Gold",closable:!0})})},eO=r(90352),e_=Z.ZP.span(p||(p=(0,z.Z)(["\n font-weight: 600;\n font-size: 1.3em;\n display: flex;\n align-items: end;\n"]))),ek=Z.ZP.div(h||(h=(0,z.Z)(["\n padding: 1rem 0;\n min-height: calc(100vh - ",");\n"])),"152px"),eF=Z.ZP.ul(m||(m=(0,z.Z)(["\n padding-left: 2rem;\n padding-right: 2rem;\n\n li a {\n display: inline-block !important;\n font-size: unset !important;\n padding: 0 !important;\n border-right: none !important;\n }\n"]))),ej=Z.ZP.div(g||(g=(0,z.Z)(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n padding-left: 2rem;\n padding-right: 2rem;\n"]))),eR=Z.ZP.ul(y||(y=(0,z.Z)(["\n & a {\n font-size: 1rem !important;\n }\n\n & a.current {\n font-weight: bold;\n }\n\n & li.current {\n padding-bottom: 6px;\n border-bottom: none;\n background: linear-gradient(orange, orange) bottom /* left or right or else */ no-repeat;\n background-size: calc(100% - 2rem) 4px;\n }\n"]))),eI=Z.ZP.ul(b||(b=(0,z.Z)(["\n padding-right: 2rem;\n"]))),eT=Z.ZP.div(x||(x=(0,z.Z)(["\n padding-left: 2rem;\n padding-right: 2rem;\n"]))),eD=Z.ZP.li(S||(S=(0,z.Z)(["\n &:hover {\n opacity: 0.8;\n }\n"]))),eN=Z.ZP.div(w||(w=(0,z.Z)(["\n height: 100%;\n"]))),eM=[{path:"/",label:"Home",roles:["guest","user","sso-admin"]},{path:"/terms-conditions",label:"Terms and Conditions",roles:["guest"]},{path:"/my-dashboard",label:"My Dashboard",roles:["user","sso-admin"]},{path:"/admin-dashboard",label:"SSO Dashboard",roles:["sso-admin"]},{path:"/admin-reports",label:"SSO Reports",roles:["sso-admin"]},{path:"/request",label:"Request Details",roles:["user","sso-admin"],hide:!0},{path:"/faq",label:"FAQ",roles:["guest","user","sso-admin"]}],eL=function(e){var t,r=e.session,n=e.currentPath,i=e.query,a=["guest"];r&&(a=(null==r?void 0:null===(t=r.client_roles)||void 0===t?void 0:t.length)>0?r.client_roles:["user"]);var o=function(e){return n===e||n.startsWith("".concat(e,"/"))};return(0,et.jsx)(et.Fragment,{children:eM.filter(function(e){return e.roles.some(function(e){return a.includes(e)})&&(!e.hide||o(e.path))}).map(function(e){return(0,et.jsx)("li",{className:o(e.path)?"current":"",children:(0,et.jsx)(U(),{href:e.path,children:X()(e.label)?e.label(i):e.label})},e.path)})})},eB=function(){return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(ew,{children:function(e,t){return(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:"#".concat(e),title:"My Profile",children:(0,et.jsx)(V.G,{size:"2x",icon:K.U6l})})})}}),(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:"https://chat.developer.gov.bc.ca/channel/sso",target:"_blank",title:"Rocket Chat",children:(0,et.jsx)(V.G,{size:"2x",icon:K.Z6I})})}),(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:"mailto:bcgov.sso@gov.bc.ca",title:"Pathfinder SSO",children:(0,et.jsx)(V.G,{size:"2x",icon:K.FU$})})}),(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:(0,eO.eO)(),target:"_blank",title:"Documentation",children:(0,et.jsx)(V.G,{size:"2x",icon:K.cwv})})})]})},eH=function(e){var t=e.children,r=e.session,n=(e.user,e.onLoginClick),i=e.onLogoutClick,a=(0,R.useRouter)(),o=a.pathname,s=r?(0,et.jsxs)(e_,{children:[(0,et.jsxs)("div",{className:"welcome",children:["Welcome ","".concat(r.given_name," ").concat(r.family_name),"\xa0",(null==r?void 0:r.client_roles)&&(0,et.jsxs)("span",{className:"small",children:["(",Y()(null==r?void 0:r.client_roles[0]),")"]})]}),"\xa0\xa0",(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"medium",onClick:i,children:"Log out"})]}):(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"medium",onClick:n,children:"Log in"});return(0,et.jsxs)(eh.ZP,{children:[(0,et.jsx)(er,{}),(0,et.jsx)(ep,{title:function(){return(0,et.jsx)(eN,{children:"Common Hosted Single Sign-on (CSS)"})},rightSide:s,mobileMenu:function(){return(0,et.jsxs)(eF,{children:[(0,et.jsx)(eL,{session:r,currentPath:o,query:a.query}),(0,et.jsxs)("li",{children:["Need help?\xa0\xa0",(0,et.jsx)("a",{href:"https://chat.developer.gov.bc.ca/",target:"_blank",title:"Rocket Chat",children:(0,et.jsx)(V.G,{size:"2x",icon:K.Z6I})}),"\xa0\xa0",(0,et.jsx)("a",{href:"mailto:bcgov.sso@gov.bc.ca",title:"SSO Team",children:(0,et.jsx)(V.G,{size:"2x",icon:K.FU$})}),"\xa0\xa0",(0,et.jsx)("a",{href:(0,eO.eO)(),target:"_blank",title:"Wiki",children:(0,et.jsx)(V.G,{size:"2x",icon:K.cwv})})]}),(0,et.jsx)("li",{children:r?(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"small",onClick:i,children:"Logout"}):(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"small",onClick:n,children:"Login with IDIR"})})]})},onBannerClick:console.log,children:(0,et.jsxs)(ej,{children:[(0,et.jsx)(eR,{children:(0,et.jsx)(eL,{session:r,currentPath:o,query:a.query})}),(0,et.jsx)(eI,{children:(0,et.jsx)(eB,{})})]})}),(0,et.jsx)(ek,{children:(0,et.jsx)(eh.bD,{children:t})}),(0,et.jsx)(q.default,{children:(0,et.jsx)(eT,{children:(0,et.jsxs)("ul",{children:[(0,et.jsx)("li",{children:(0,et.jsx)(U(),{href:"/",children:"Home"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/disclaimer",target:"_blank",rel:"noreferrer",children:"Disclaimer"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/privacy",target:"_blank",rel:"noreferrer",children:"Privacy"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/accessible-government",target:"_blank",rel:"noreferrer",children:"Accessibility"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/copyright",target:"_blank",rel:"noreferrer",children:"Copyright"})})]})})}),(0,et.jsx)(eP,{})]})},ez=r(31637),e$=r(9008),eU=r.n(e$);r(87266),r(90458);var eV=Object.create,eK=Object.defineProperty,eW=Object.getOwnPropertyDescriptor,eq=Object.getOwnPropertyNames,eZ=Object.getPrototypeOf,eG=Object.prototype.hasOwnProperty,eY=(s=null!=(o=(i=(e,t)=>{var n,i;n=e,i=function(e){var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=2*536870912,i=new WeakMap,a=(t=function(e,t){return i.set(e,t),t},function(e){var a=i.get(e),o=void 0===a?e.size:ar)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(o);)o=Math.floor(Math.random()*r);return t(e,o)});e.addUniqueNumber=function(e){var t=a(e);return e.add(t),t},e.generateUniqueNumber=a},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&r.amdO?define(["exports"],i):i((n="u">typeof globalThis?globalThis:n||self).fastUniqueNumbers={})},()=>(a||i((a={exports:{}}).exports,a),a.exports))())?eV(eZ(o)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of eq(t))eG.call(e,r)||void 0===r||eK(e,r,{get:()=>t[r],enumerable:!(n=eW(t,r))||n.enumerable});return e})(o&&o.__esModule?s:eK(s,"default",{value:o,enumerable:!0}),o)),eJ=e=>void 0!==e.method&&"call"===e.method,eX=e=>null===e.error&&"number"==typeof e.id,eQ=e=>{let t=new Map([[0,()=>{}]]),r=new Map([[0,()=>{}]]),n=new Map,i=new Worker(e);return i.addEventListener("message",({data:e})=>{if(eJ(e)){let{params:{timerId:i,timerType:a}}=e;if("interval"===a){let e=t.get(i);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==i||t.timerType!==a)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===a){let e=r.get(i);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==i||t.timerType!==a)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),r.delete(i);else throw Error("The timer is in an undefined state.")}}else if(eX(e)){let{id:i}=e,a=n.get(i);if(void 0===a)throw Error("The timer is in an undefined state.");let{timerId:o,timerType:s}=a;n.delete(i),"interval"===s?t.delete(o):r.delete(o)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let r=(0,eY.generateUniqueNumber)(n);n.set(r,{timerId:e,timerType:"interval"}),t.set(e,r),i.postMessage({id:r,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,eY.generateUniqueNumber)(n);n.set(t,{timerId:e,timerType:"timeout"}),r.set(e,t),i.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,r)=>{let n=(0,eY.generateUniqueNumber)(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&i.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}})}),i.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{let n=(0,eY.generateUniqueNumber)(r);return r.set(n,e),i.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}};n=null,()=>{if(null!==n)return n;let e=new Blob(['(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return n=eQ(t),setTimeout(()=>URL.revokeObjectURL(t)),n};var e0=(typeof window>"u"?"undefined":typeof window)=="object",e1={setTimeout:e0?setTimeout.bind(window):setTimeout,clearTimeout:e0?clearTimeout.bind(window):clearTimeout,setInterval:e0?setInterval.bind(window):setInterval,clearInterval:e0?clearInterval.bind(window):clearInterval},e2={},e4=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,e2[e]=e2[e]||[],e2[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),r=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(r,t),e1.setTimeout(()=>{window.localStorage.removeItem(r)},500),e2[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=e2[this.name].indexOf(this);e2[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},e3=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:e4;function e6(){return Math.random().toString(36).substring(2)}var e5=class{options;channel;token=e6();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:r,action:n}=t.data;r!==this.token&&(0===n&&r>this.token&&(e=!0),1===n&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>e1.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(r=>{let n=()=>{if(e)return;e=!0;try{e1.clearInterval(t)}catch{}let n=this.intervals.indexOf(t);n>=0&&this.intervals.splice(n,1),this.channel.removeEventListener("message",i),r()};t=e1.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(t);let i=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&n()})};this.channel.addEventListener("message",i)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>e1.clearInterval(e))}catch{}}}},e8=class{channel;options;elector;token=e6();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new e3(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new e5(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:r,data:n}=e.data;switch(t){case 3:this.registry.set(r,2);break;case 4:this.registry.delete(r);break;case 5:this.idle(r);break;case 6:this.active(r);break;case 7:this.prompt(r);break;case 8:this.start(r);break;case 9:this.reset(r);break;case 10:this.activate(r);break;case 11:this.pause(r);break;case 12:this.resume(r);break;case 13:this.options.onMessage(n)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},e9=e0?document:null,e7=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function te(e,t){let r=0;return function(...n){let i=new Date().getTime();if(!(i-rDate.now();(0,j.createContext)(null).Consumer;var tr=r(30233),tn=r(31513),ti=r(63055),ta=r(30996);function to(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ts(e){for(var t=1;t0){e.next=3;break}return e.abrupt("return",m("Please select a rating."));case 3:o&&(0,B.xc)({triggerEvent:o,message:f,rating:u.filter(function(e){return e.selected}).length}),n(!1),r(!1);case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),b="".concat(i?"open":"closed"," ").concat(!a&&"hidden");return(0,et.jsx)(tc,{children:(0,et.jsxs)(tl,{className:b,children:[(0,et.jsxs)("div",{className:"header",onClick:function(){r(!i)},children:[(0,et.jsx)("p",{children:"We'd love to hear from you"}),(0,et.jsx)(V.G,{icon:i?K.Qbq:K.K96})]}),(0,et.jsxs)("div",{className:"body",children:[(0,et.jsx)("p",{className:"title",children:(0,et.jsx)("strong",{children:"Rate our service"})}),(0,et.jsx)("p",{children:"How was your experience with the CSS app?"}),(0,et.jsxs)(tf,{children:[(0,et.jsx)("div",{className:"stars-box",children:u.map(function(e,t){return(0,et.jsx)(V.G,{style:{cursor:"pointer"},role:"button",size:"3x",icon:K.Tab,color:e.selected?"gold":"grey",onClick:function(){return g(t)}},e.id)})}),(0,et.jsxs)("div",{className:"stars-text",children:[(0,et.jsx)("span",{children:"Bad"}),(0,et.jsx)("span",{children:"Great"})]})]}),(0,et.jsx)(ta.default,{fullWidth:!0,placeholder:"Leave a message...",rows:4,value:f,onChange:function(e){m(""),e.target.value.length<=700?d(e.target.value):m("Messages are at most ".concat(700," characters."))}}),h&&(0,et.jsx)("p",{className:"error-message",children:h}),(0,et.jsxs)("div",{className:"button-container",children:[(0,et.jsx)(W.default,{variant:"secondary",onClick:function(){return n(!1)},children:"Close"}),(0,et.jsx)(W.default,{onClick:y,children:"Rate now"})]})]})]})})};function th(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tm(e){for(var t=1;t{},onPrompt:u=()=>{},onIdle:c=()=>{},onActive:l=()=>{},onAction:f=()=>{},onMessage:d=()=>{},debounce:p=0,throttle:h=0,eventsThrottle:m=200,startOnMount:g=!0,startManually:y=!1,stopOnIdle:b=!1,crossTab:x=!1,name:S="idle-timer",syncTimers:w=0,leaderElection:E=!1,disabled:A=!1}={}){let C=(0,j.useRef)(tt()),P=(0,j.useRef)(tt()),O=(0,j.useRef)(null),_=(0,j.useRef)(null),k=(0,j.useRef)(0),F=(0,j.useRef)(0),R=(0,j.useRef)(0),I=(0,j.useRef)(0),T=(0,j.useRef)(!1),D=(0,j.useRef)(!1),N=(0,j.useRef)(!1),M=(0,j.useRef)(!0),L=(0,j.useRef)(!1),B=(0,j.useRef)(null),H=(0,j.useRef)(null),z=(0,j.useRef)(e),$=(0,j.useRef)(0);(0,j.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),r&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(r>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(r>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(r?(z.current=e-r,$.current=r):(z.current=e,$.current=t),!M.current){if(y||A)return;T.current&&(J.current(null,eR),H.current&&H.current.active()),ed()}},[e,t,r,y,A]);let U=(0,j.useRef)(b);(0,j.useEffect)(()=>{U.current=b},[b]);let V=(0,j.useRef)(o),K=(0,j.useRef)(n),W=(0,j.useRef)([...new Set([...i,...o]).values()]),q=(0,j.useRef)(A);(0,j.useEffect)(()=>{q.current=A,!M.current&&(A?em():y||ed())},[A]);let Z=(0,j.useRef)(s);(0,j.useEffect)(()=>{Z.current=s},[s]);let G=(0,j.useRef)(u);(0,j.useEffect)(()=>{G.current=u},[u]);let Y=(0,j.useRef)(c);(0,j.useEffect)(()=>{Y.current=c},[c]);let J=(0,j.useRef)(l);(0,j.useEffect)(()=>{J.current=l},[l]);let X=(0,j.useRef)(f);(0,j.useEffect)(()=>{X.current=f},[f]);let Q=(0,j.useRef)(d);(0,j.useEffect)(()=>{Q.current=d},[d]);let ee=(0,j.useMemo)(()=>{let e=(e,t)=>X.current(e,t);return p>0?function(e,t){let r;function n(...i){r&&clearTimeout(r),r=setTimeout(()=>{e(...i),r=null},t)}return n.cancel=function(){clearTimeout(r)},n}(e,p):h>0?te(e,h):e},[h,p]),et=(0,j.useRef)();(0,j.useEffect)(()=>{x&&w&&(et.current=te(()=>{H.current.active()},w))},[x,w]);let er=()=>{null!==B.current&&(e1.clearTimeout(B.current),B.current=null)},en=(e,t=!0)=>{er(),B.current=e1.setTimeout(es,e||z.current),t&&(_.current=tt())},ei=e=>{D.current||T.current||(G.current(e,eR),Z.current({type:"active",prompted:!0},eR)),I.current=0,R.current=tt(),D.current=!0,en($.current,!1)},ea=()=>{er(),T.current||(Y.current(null,eR),Z.current({type:"idle"},eR)),T.current=!0,O.current=tt(),U.current?ef():D.current&&(R.current=0,D.current=!1)},eo=e=>{er(),(T.current||D.current)&&(J.current(e,eR),Z.current({type:"active",prompted:!1},eR)),D.current=!1,R.current=0,T.current=!1,k.current+=tt()-O.current,F.current+=tt()-O.current,el(),en()},es=e=>{if(!T.current){ee.cancel&&ee.cancel();let t=tt()-_.current;if(!(z.current+$.current0&&!D.current){H.current?H.current.prompt():ei(e);return}H.current?H.current.idle():ea();return}H.current?H.current.active():eo(e)},eu=e=>{if(g||_.current||(_.current=tt(),J.current(null,eR)),ee(e,eR),D.current)return;if(er(),!T.current&&V.current.includes(e.type)){es(e);return}let t=tt()-_.current;if(T.current&&!b||!T.current&&t>=z.current){es(e);return}N.current=!1,I.current=0,R.current=0,en(),x&&w&&et.current()},ec=(0,j.useRef)(eu);(0,j.useEffect)(()=>{let e=L.current;e&&ef(),m>0?ec.current=te(eu,m):ec.current=eu,e&&el()},[m,h,p,X,x,w]);let el=()=>{e0&&K.current&&(L.current||(W.current.forEach(e=>{K.current.addEventListener(e,ec.current,{capture:!0,passive:!0})}),L.current=!0))},ef=(e=!1)=>{e0&&K.current&&(L.current||e)&&(W.current.forEach(e=>{K.current.removeEventListener(e,ec.current,{capture:!0})}),L.current=!1)},ed=(0,j.useCallback)(e=>!q.current&&(er(),el(),T.current=!1,D.current=!1,N.current=!1,I.current=0,R.current=0,H.current&&!e&&H.current.start(),en(),!0),[B,T,q,z,H]),ep=(0,j.useCallback)(e=>!q.current&&(er(),el(),P.current=tt(),k.current+=tt()-O.current,F.current+=tt()-O.current,k.current=0,T.current=!1,D.current=!1,N.current=!1,I.current=0,R.current=0,H.current&&!e&&H.current.reset(),y||en(),!0),[B,T,z,y,q,H]),eh=(0,j.useCallback)(e=>!q.current&&(er(),el(),(T.current||D.current)&&eo(),T.current=!1,D.current=!1,N.current=!1,I.current=0,R.current=0,P.current=tt(),H.current&&!e&&H.current.activate(),en(),!0),[B,T,D,q,z,H]),em=(0,j.useCallback)((e=!1)=>!q.current&&!N.current&&(I.current=eE(),N.current=!0,ef(),er(),H.current&&!e&&H.current.pause(),!0),[B,q,H]),ev=(0,j.useCallback)((e=!1)=>!q.current&&!!N.current&&(N.current=!1,D.current||el(),T.current||en(I.current),R.current&&(R.current=tt()),H.current&&!e&&H.current.resume(),!0),[B,z,q,I,H]),eg=(0,j.useCallback)((e,t)=>(H.current?(t&&Q.current(e,eR),H.current.message(e)):t&&Q.current(e,eR),!0),[d]),ey=(0,j.useCallback)(()=>T.current,[T]),eb=(0,j.useCallback)(()=>D.current,[D]),ex=(0,j.useCallback)(()=>H.current?H.current.isLeader:null,[H]),eS=(0,j.useCallback)(()=>H.current?H.current.isLastActive:null,[H]),ew=(0,j.useCallback)(()=>H.current?H.current.token:null,[H]),eE=(0,j.useCallback)(()=>{if(N.current)return I.current;let e=Math.floor((I.current?I.current:$.current+z.current)-(_.current?tt()-_.current:0));return e<0?0:Math.abs(e)},[z,$,D,I,_]),eA=(0,j.useCallback)(()=>Math.round(tt()-P.current),[P]),eC=(0,j.useCallback)(()=>Math.round(tt()-C.current),[C]),eP=(0,j.useCallback)(()=>O.current?new Date(O.current):null,[O]),eO=(0,j.useCallback)(()=>_.current?new Date(_.current):null,[_]),e_=(0,j.useCallback)(()=>T.current?Math.round(tt()-O.current+k.current):Math.round(k.current),[O,k]),ek=(0,j.useCallback)(()=>T.current?Math.round(tt()-O.current+F.current):Math.round(F.current),[O,F]),eF=(0,j.useCallback)(()=>{let e=Math.round(eA()-e_());return e>=0?e:0},[O,k]),ej=(0,j.useCallback)(()=>{let e=Math.round(eC()-ek());return e>=0?e:0},[O,k]);(0,j.useEffect)(()=>{if(p>0&&h>0)throw Error("❌ onAction can either be throttled or debounced, not both.");a&&(e1.setTimeout=a.setTimeout,e1.clearTimeout=a.clearTimeout,e1.setInterval=a.setInterval,e1.clearInterval=a.clearInterval);let e=()=>{H.current&&H.current.close(),ee.cancel&&ee.cancel(),er(),ef(!0)};return e0&&window.addEventListener("beforeunload",e),()=>{e0&&window.removeEventListener("beforeunload",e),H.current&&H.current.close(),ee.cancel&&ee.cancel(),er(),ef(!0)}},[]),(0,j.useEffect)(()=>{H.current&&H.current.close(),x?H.current=new e8({channelName:S,leaderElection:E,onPrompt:()=>{ei()},onIdle:()=>{ea()},onActive:()=>{eo()},onMessage:e=>{Q.current(e,eR)},start:ed,reset:ep,activate:eh,pause:em,resume:ev}):H.current=null},[x,S,E,G,Y,J,Q,ed,ep,em,ev]),(0,j.useEffect)(()=>{M.current||(er(),ef(!0)),y||A||(g?ed():el())},[y,g,A,M]),(0,j.useEffect)(()=>{if(!M.current){let e=[...new Set([...i,...o]).values()];ef(),W.current=e,K.current=n,V.current=o,y||A||(g?ed():el())}},[n,JSON.stringify(i),JSON.stringify(o),M,A,y,g]),(0,j.useEffect)(()=>{M.current&&(M.current=!1)},[M]);let eR={message:eg,start:ed,reset:ep,activate:eh,pause:em,resume:ev,isIdle:ey,isPrompted:eb,isLeader:ex,isLastActiveTab:eS,getTabId:ew,getRemainingTime:eE,getElapsedTime:eA,getTotalElapsedTime:eC,getLastIdleTime:eP,getLastActiveTime:eO,getIdleTime:e_,getTotalIdleTime:ek,getActiveTime:eF,getTotalActiveTime:ej,setOnPresenceChange:e=>{s=e,Z.current=e},setOnPrompt:e=>{u=e,G.current=e},setOnIdle:e=>{c=e,Y.current=e},setOnActive:e=>{l=e,J.current=e},setOnAction:e=>{f=e,X.current=e},setOnMessage:e=>{d=e,Q.current=e}}}({onPrompt:function(){"expired"!==S&&o.current.open()},timeout:3e5,promptBeforeIdle:1e4,throttle:500,disabled:null===l}),(0,j.useEffect)(function(){function e(e,r){return t.apply(this,arguments)}function t(){return(t=(0,_.Z)(F().mark(function e(t,r){var n,i,a,o;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.W)(t.id_token);case 2:if(n=e.sent,a=(i=(0,P.Z)(n,2))[0],o=i[1],!a){e.next=14;break}if(!r){e.next=11;break}return(0,H.d0)(t),e.next=11,u.push("/my-dashboard");case 11:f(tw(a)),e.next=17;break;case 14:(0,H.Zz)(),f(tw(null)),r&&u.push({pathname:"/application-error",query:{error:o}});case 17:y(!1);case 18:case"end":return e.stop()}},e)}))).apply(this,arguments)}function r(){return(r=(0,_.Z)(F().mark(function t(){var r,n,i,a,o;return F().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),t.prev=1,t.next=4,(0,D.M)();case 4:if(n=(r=(0,N.rg)()).code,i=r.state,!n){t.next=13;break}return t.next=8,(0,N.hP)({code:n,state:i});case 8:return a=t.sent,t.next=11,e(a,!0);case 11:t.next=16;break;case 13:return o=(0,H.lz)(),t.next=16,e(o,!1);case 16:t.next=25;break;case 18:t.prev=18,t.t0=t.catch(1),console.log(t.t0),(0,H.Zz)(),f(tw(null)),y(!1),b(t.t0);case 25:case"end":return t.stop()}},t,null,[[1,18]])}))).apply(this,arguments)}console.log("app started..."),tx&&"true"===tx&&u.push({pathname:"/application-error",query:{error:"maintenance"}}),(0,L.Nu)(),function(){r.apply(this,arguments)}()},[]),(0,j.useEffect)(function(){var e,t=(e=(0,_.Z)(F().mark(function e(){var t,r,n;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.Ai)();case 2:t=e.sent,n=(r=(0,P.Z)(t,2))[0],r[1],h(n);case 7:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});l&&t()},[l]),(0,j.useEffect)(function(){if(l){var e=setInterval((0,_.Z)(F().mark(function e(){var t;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,tn.QE)((0,H.lz)().refresh_token),Date.now()>=(null==t?void 0:t.exp)*1e3?(w("expired"),o.current.close(),s.current.open()):w("");case 2:case"end":return e.stop()}},e)})),5e3);return function(){clearInterval(e)}}});var W=(r=(0,_.Z)(F().mark(function e(){var t;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,N.iq)({kc_idp_hint:tb});case 2:t=e.sent,window.location.href=t;case 4:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),q=(n=(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(0,H.Zz)(),window.location.href=(0,N.kG)();case 2:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),Z=(0,j.useMemo)(function(){return{setShowSurvey:V}},[p]);return g?(0,et.jsx)(ez.Z,{}):tS.some(function(e){return window.location.pathname.startsWith(e)})&&!l?(u.push("/"),null):(0,et.jsx)(tA.Provider,{value:{session:l,user:p},children:(0,et.jsx)(tC.Provider,{value:Z,children:tx&&"true"===tx?(0,et.jsx)(i,tm({},a)):(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(eH,{session:l,user:p,onLoginClick:W,onLogoutClick:q,children:[(0,et.jsxs)(eU(),{children:[(0,et.jsx)("html",{lang:"en"}),(0,et.jsx)("title",{children:"Common Hosted Single Sign-on (CSS)"}),(0,et.jsx)("link",{rel:"icon",href:"/bootstrap-theme/dist/images/bcid-favicon-32x32.png"})]}),(0,et.jsx)(i,tm(tm({},a),{},{session:l,onLoginClick:W,onLogoutClick:q}))]}),(0,et.jsx)(tr.Z,{ref:o,style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},title:"Session expiring",icon:K.eHv,onConfirm:(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.Ai)();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),onCancel:function(){q()},confirmButtonText:"Confirm",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",showConfirmButton:!0,showCancelButton:!0,children:(0,et.jsxs)("div",{children:[(0,et.jsx)("div",{children:"Your session will expire soon and you will be signed out automatically."}),(0,et.jsx)("br",{}),(0,et.jsx)("div",{children:"Do you want to stay signed in?"})," "]})}),(0,et.jsx)(tr.Z,{ref:s,style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},title:"Session expired",icon:K.eHv,onConfirm:function(){return W()},onCancel:(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.Ai)();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),confirmButtonText:"Login",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",showConfirmButton:!0,showCancelButton:!0,children:(0,et.jsxs)("div",{children:[(0,et.jsx)("div",{children:"Your session has expired."}),(0,et.jsx)("br",{}),(0,et.jsx)("div",{children:"Please login again."})," "]})}),p&&(0,et.jsx)(tp,{setOpenSurvey:U,open:$,display:I,setDisplaySurvey:T,triggerEvent:A})]})})})}},64730:function(e,t,r){"use strict";r.d(t,{Ek:function(){return y},Nu:function(){return b}});var n,i,a,o=r(16835),s=r(50029),u=r(87794),c=r.n(u),l=r(21963),f=r(54494),d=r(88757),p=r(84595),h=r(11752),m=(r.n(h)()()||{}).publicRuntimeConfig,g=(void 0===m?{}:m).base_path,y=(n=(0,s.Z)(c().mark(function e(){var t;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:return t=(0,f.lz)(),e.abrupt("return","Bearer ".concat(t.id_token));case 4:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});function b(){return x.apply(this,arguments)}function x(){return(x=(0,s.Z)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",l.e.get("heartbeat",{headers:{skipAuth:!0}}).then(function(e){return e.data}));case 4:return e.prev=4,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",null);case 8:case"end":return e.stop()}},e,null,[[0,4]])}))).apply(this,arguments)}var S=(i=(0,s.Z)(c().mark(function e(t){var r,n;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.dx)({refreshToken:t.refresh_token});case 2:return r=e.sent,e.next=5,(0,p.W)(null==r?void 0:r.id_token);case 5:n=e.sent,(0,o.Z)(n,1)[0]?(0,f.d0)(r):((0,f.Zz)(),console.error("failed to refresh the token"),window.location.href="".concat(g));case 9:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),w=(a=(0,s.Z)(c().mark(function e(){var t,r,n;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,f.lz)(),e.next=3,(0,p.W)(t.id_token);case 3:r=e.sent,(n=(0,o.Z)(r,1)[0])?1e3*n.exp-Date.now()<12e4&&S(t):S(t);case 7:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},21963:function(e,t,r){"use strict";r.d(t,{e:function(){return x},z:function(){return S}});var n,i=r(59499),a=r(50029),o=r(87794),s=r.n(o),u=r(11752),c=r.n(u),l=r(9669),f=r.n(l),d=r(64730),p=r(11163),h=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e){for(var t=1;t=2 set to 'VerifiedIndividual' else set to 'Individual'.",data_type:"xs:string",scope:"profile"},{name:"birthdate",user_friendly_name:"Date of Birth",user_friendly_description:"The individual's documented birth date recorded from valid identification.",data_type:"xs:date",scope:"profile"},{name:"family_name",user_friendly_name:"Surname",user_friendly_description:"The individual's documented surname recorded from valid identification.",data_type:"xs:string",scope:"profile"},{name:"gender",user_friendly_name:"Sex",user_friendly_description:"The individual's documented sex recorded from valid identification. Values include male, female, unknown and diverse.",data_type:"xs:string",scope:"profile"},{name:"address",user_friendly_name:"Address",user_friendly_description:"All address lines of the individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"authoritative_party_name",user_friendly_name:"Authoritative Party Name",user_friendly_description:"The common name of the system or organization that is authoritative for the information provided as identity claims.",data_type:"xs:string",scope:"profile"},{name:"locality",user_friendly_name:"City/town",user_friendly_description:"The city, municipality or district of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"region",user_friendly_name:"State Or Province",user_friendly_description:"The province or state code of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"authoritative_party_identifier",user_friendly_name:"Authoritative Party Identifier",user_friendly_description:"A unique identifier of the system or organization that is authoritative for the information provided as identity claims.",data_type:"xs:string",scope:"profile"},{name:"authentication_zone_identifier",user_friendly_name:"Authentication Zone Identifier",user_friendly_description:"A unique identifier for the authentication zone this client is in.",data_type:"xs:anyURI",scope:"profile"},{name:"sector_identifier_uri",user_friendly_name:"Privacy Zone Identifier",user_friendly_description:"An identifier issued by IAS that represents a privacy zone.\xc2 A privacy zone is used to distinguish a set of relying parties that have the authority to share user identifiers.",data_type:"xs:anyURI",scope:"profile"},{name:"display_name",user_friendly_name:"Name",user_friendly_description:"The individual's name which their preferred name if available or composed of their documented name.",data_type:"xs:string",scope:"profile"},{name:"identity_assurance_level3",user_friendly_name:"Identity Assurance Level 3",user_friendly_description:"An indicator that there is high confidence in the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:boolean",scope:"profile"},{name:"transaction_type",user_friendly_name:"Transaction Type",user_friendly_description:"An indicator of which channel was used to authenticate the individual.",data_type:"xs:string",scope:"profile"},{name:"given_name",user_friendly_name:"Given Name",user_friendly_description:"The individual's documented given name (first name only) recorded from valid identification.",data_type:"xs:string",scope:"profile"},{name:"identity_assurance_level1",user_friendly_name:"Identity Assurance Level 1",user_friendly_description:"An indicator that there is low confidence in the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:boolean",scope:"profile"},{name:"age_19_or_over",user_friendly_name:"Age 19 Or Over",user_friendly_description:"An indicator of whether the individual's age is 19 years or greater based on the documented birth date recorded from valid identification.",data_type:"xs:boolean",scope:"profile"},{name:"transaction_identifier",user_friendly_name:"Transaction Identifier",user_friendly_description:"A unique identifier of the transaction that was used to authenticate the individual.",data_type:"xs:string",scope:"profile"},{name:"given_names",user_friendly_name:"Given Names",user_friendly_description:"The individual's documented given names (first and middle) recorded from valid identification",data_type:"xs:string",scope:"profile"},{name:"street_address",user_friendly_name:"Street Address",user_friendly_description:"The street address lines of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"country",user_friendly_name:"Country",user_friendly_description:"The country code of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"age",user_friendly_name:"Age",user_friendly_description:"The individual's age in years based on the documented birth date recorded from valid identification.",data_type:"xs:integer",scope:"profile"},{name:"identity_assurance_level2",user_friendly_name:"Identity Assurance Level 2",user_friendly_description:"An indicator that there is medium confidence in the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:boolean",scope:"profile"},{name:"identification_level",user_friendly_name:"Identification Level",user_friendly_description:"The level of confidence in the certainty of the identification of the individual according to the OCIO Evidence of Identity Standard.",data_type:"xs:integer",scope:"profile"},{name:"email",user_friendly_name:"Email Address",user_friendly_description:"The email address provided by an individual (and verified by IAS)",data_type:"xs:string",scope:"email"},{name:"identity_assurance_level",user_friendly_name:"Identity Assurance Level",user_friendly_description:"The level of confidence in the certainty of the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:integer",scope:"profile"}]}},31513:function(e,t,r){"use strict";r.d(t,{Dy:function(){return g},F3:function(){return D},O5:function(){return C},QE:function(){return b},R5:function(){return R},Sx:function(){return P},UB:function(){return A},UT:function(){return m},Wv:function(){return _},he:function(){return j},jt:function(){return I},kC:function(){return k},kF:function(){return T},ob:function(){return x},qu:function(){return w},rn:function(){return O},z9:function(){return E},zO:function(){return S}});var n,i=r(50029),a=r(16835),o=r(59499),s=r(87794),u=r.n(s);r(25751);var c=r(90352),l=r(62248),f=r(99154),d=r(85893);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t0?i:null,a=a.length>0?a:null;var o=t.map(function(e){return e.value});return[a,i,o=o.length>0?o:null]},g=function(e){var t=e.bceidApproved,r=e.githubApproved,n=e.digitalCredentialApproved,i=e.bcServicesCardApproved,a=e.environments,o=void 0===a?[]:a,s=e.serviceType,u=(0,f.Jx)(e),l=(0,f.dV)(e),d=(0,f.S3)(e),p=(0,f.e$)(e),m=c.TJ.map(function(t){var r=e.devIdps;return h(h({},t),{},{idps:r||[]})});if("gold"===s){var g=j(e),y=R(e),b=I(e),x=T(e),S=m.filter(function(e){return o.includes(e.name)});return u&&(!t||g)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f.JK)),e})),l&&(!r||y)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f.Qf)),e})),d&&(!n||b)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f.DK)),e})),p&&(!i||x)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f._x)),e})),S}var w=o.concat()||[];return u&&!t&&(w=w.filter(function(e){return"prod"!==e})),m.filter(function(e){return w.includes(e.name)})},y=function(e){return e?JSON.parse(decodeURIComponent(Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/"))).reduce(function(e,t){var r=("00"+t.charCodeAt(0).toString(16)).slice(-2);return"".concat(e,"%").concat(r)},""))):null},b=function(e){if(!e)return null;var t=e.split(".");return y((0,a.Z)(t,2)[1])},x=function(e){if(!e)return null;var t=e.split(".");return y((0,a.Z)(t,1)[0])},S=function(){var e=new Uint32Array(28);crypto.getRandomValues(e);var t=[];return e.forEach(function(e){return t.push("0".concat(e.toString(16).substr(-2)))}),t.reduce(function(e,t){return"".concat(e).concat(t)},"")},w=(n=(0,i.Z)(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new TextEncoder().encode(t),e.abrupt("return",crypto.subtle.digest("SHA-256",r));case 4:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),E=function(e){return btoa(new Uint8Array(e).reduce(function(e,t){return"".concat(e).concat(String.fromCharCode(t))},"")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},A=function(e){var t;return e.devValidRedirectUris&&0!==e.devValidRedirectUris.length||(e.devValidRedirectUris=[""]),e.testValidRedirectUris&&0!==e.testValidRedirectUris.length||(e.testValidRedirectUris=[""]),e.prodValidRedirectUris&&0!==e.prodValidRedirectUris.length||(e.prodValidRedirectUris=[""]),e.teamId?e.teamId=String(e.teamId):e.usesTeam=!1,Object.entries(t=e).forEach(function(e){var r=(0,a.Z)(e,2),n=r[0];null===r[1]&&delete t[n]}),t},C=function(e){return e.map(function(e){if(Object.keys(c.Qj).map(function(e){return".".concat(e)}).includes(e.property)){var t=e.property.slice(1);e.message=c.Qj[t]||e.message}else(e.property.includes("ValidRedirectUris")||e.property.includes("SamlLogoutPostBindingUri")||e.property.includes("bcscAttributes"))&&("should be string"===e.message?e.message="":"should NOT have fewer than 1 items"===e.message?e.message="":e.message=c.Qj.redirectUris);return e})},P=function(e){if(!e||0===e.length)return(0,d.jsx)("div",{children:"No changes"});var t=e.map(function(e){var t=e.kind,r=e.lhs,n=e.rhs,i=e.path,a=e.item,o=i[0];switch(t){case"E":return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Edited ",o,": "]}),"Changed ",(0,d.jsx)("code",{children:String(r)})," to ",(0,d.jsx)("code",{children:String(n)})]});case"A":if((null==a?void 0:a.kind)==="D")return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Changed Array ",o,": "]}),"Deleted ",(0,d.jsxs)("code",{children:[" ",null==a?void 0:a.lhs]})]});if((null==a?void 0:a.kind)==="N")return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Changed Array ",o,": "]}),"Added ",(0,d.jsx)("code",{children:null==a?void 0:a.rhs})]});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Changed Array ",o,": "]}),"Edited"," ",(0,d.jsxs)("code",{children:[null==a?void 0:a.lhs," to ",null==a?void 0:a.rhs]})]});case"N":return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Added ",o,": "]}),(0,d.jsx)("code",{children:a})]});case"D":return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("strong",{children:["Deleted ",o," "]})});default:return(0,d.jsx)("code",{children:JSON.stringify(e,null,2)})}});return(0,d.jsx)("ul",{children:t.map(function(e,t){return(0,d.jsx)("li",{children:e},t)})})},O=function(e){return e.some(function(e){return["submitted","pr","prFailed","planned","planFailed","approved","applyFailed"].includes(e.status||"")})};function _(e,t){if(1===e.length)return!1;var r=e.find(function(e){return e.id===t});return 1!==e.filter(function(e){return"admin"===e.role}).length||(null==r?void 0:r.role)!=="admin"}var k=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},F=function(e,t){return"Submitted"===(0,l.n)(e.status||"draft")&&!!e.lastChanges&&0!==e.lastChanges.length&&e.lastChanges.some(function(e){return e.path[0]===t&&!1===e.lhs&&!0===e.rhs})},j=function(e){return F(e,"bceidApproved")},R=function(e){return F(e,"githubApproved")},I=function(e){return F(e,"digitalCredentialApproved")},T=function(e){return F(e,"bcServicesCardApproved")},D=function(e){var t=new Date;return t.setDate(t.getDate()-e),t}},84595:function(e,t,r){"use strict";r.d(t,{W:function(){return h}});var n,i=r(50029),a=r(87794),o=r.n(a),s=r(31166),u=r(11752),c=r.n(u),l=r(16689),f=r(31513),d=(c()()||{}).publicRuntimeConfig,p=(void 0===d?{}:d).sso_client_id,h=(n=(0,i.Z)(o().mark(function e(t){var r,n,i,a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[,"e02"]);case 2:if(r=l.$.keys,n=(0,f.ob)(t),void 0!==(i=null==r?void 0:r.find(function(e){return e.kid===n.kid}))){e.next=8;break}return console.error("public key not found in JWK jwks.json"),e.abrupt("return",[,"e02"]);case 8:if(a=(0,f.QE)(t),!(Date.now()>=1e3*a.exp)){e.next=12;break}return console.log("token has expired"),e.abrupt("return",[,"e02"]);case 12:if(u=s.KZ.getKey(i),s.fs.jws.JWS.verifyJWT(t,u,{alg:["RS256"],gracePeriod:28800})){e.next=17;break}return console.error("signature verification failed"),e.abrupt("return",[,"e02"]);case 17:if(!(0!==a.aud.localeCompare(p))){e.next=21;break}return console.error("token was not issued for this audience"),e.abrupt("return",[,"e02"]);case 21:if(["idir","azureidir"].includes(a.identity_provider)){e.next=24;break}return console.error("invalid identity provider ".concat(a.identity_provider)),e.abrupt("return",[,"e03"]);case 24:if(!(!a.idir_user_guid||!a.email)){e.next=27;break}return console.error("invalid user account"),e.abrupt("return",[,"e03"]);case 27:return e.abrupt("return",[a]);case 28:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},88757:function(e,t,r){"use strict";r.d(t,{dx:function(){return j},hP:function(){return k},iq:function(){return _},kG:function(){return F},rg:function(){return R}});var n,i,a,o=r(59499),s=r(50029),u=r(87794),c=r.n(u),l=r(9669),f=r.n(l),d=r(80129),p=r.n(d),h=r(11752),m=r.n(h),g=r(16689),y=r(31513);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var x=(m()()||{}).publicRuntimeConfig,S=void 0===x?{}:x,w=S.sso_client_id,E=S.sso_authorization_scope,A=S.sso_authorization_response_mode,C=S.sso_authorization_response_type,P=S.sso_redirect_uri,O=S.sso_token_grant_type,_=(n=(0,s.Z)(c().mark(function e(t){var r,n,i,a,s,u;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,y.zO)(),n=(0,y.zO)(),sessionStorage.setItem("oauth_state",r),sessionStorage.setItem("oidc_nonce",n),i=(0,y.zO)(),sessionStorage.setItem("code_verifier",i),e.next=8,(0,y.qu)(i);case 8:return a=e.sent,s=(0,y.z9)(a),sessionStorage.setItem("code_challenge",s),u=function(e){for(var t=1;tf&&t[r].addError("Must be ".concat(f/60," minutes or fewer."))}},J=function(e,r){return function(){e>d&&t[r].addError("Must be ".concat(d/60," minutes or fewer."))}},X={projectName:function(){/^\d/.test(i)&&t.projectName.addError("Please have your project name start with a letter")},authType:function(){"browser-login"!==K&&W&&t.authType.addError("Ensure your access is confidential when using a service account.")},devSessionIdleTimeout:Y(B,"devSessionIdleTimeout"),testSessionIdleTimeout:Y(H,"testSessionIdleTimeout"),prodSessionIdleTimeout:Y(z,"prodSessionIdleTimeout"),devSessionMaxLifespan:J($,"devSessionMaxLifespan"),testSessionMaxLifespan:J(U,"testSessionMaxLifespan"),prodSessionMaxLifespan:J(V,"prodSessionMaxLifespan"),devValidRedirectUris:function(){p.every(u)||h(p,t,"devValidRedirectUris",u)},testValidRedirectUris:function(){S.includes("test")&&!g.every(u)&&h(g,t,"testValidRedirectUris",u)},prodValidRedirectUris:function(){S.includes("prod")&&!b.every(c)&&h(b,t,"prodValidRedirectUris",c)},createTeam:function(){if(w&&(!E||""==E)){var e;null===(e=t.createTeam)||void 0===e||e.addError("Please select or create a team")}},additionalRoleAttribute:function(){a.hL.includes(C.trim())&&t.additionalRoleAttribute.addError("Please use a different name as existing claim '".concat(C.trim(),"' cannot be overwritten"))},devSamlLogoutPostBindingUri:function(){""===O||null===O||u(O)||t.devSamlLogoutPostBindingUri.addError(l)},testSamlLogoutPostBindingUri:function(){""===k||null===k||u(k)||t.testSamlLogoutPostBindingUri.addError(l)},prodSamlLogoutPostBindingUri:function(){""===j||null===j||c(j)||t.prodSamlLogoutPostBindingUri.addError(l)},clientId:function(){""!==I&&null!==I&&(I!==I.trim()||I.match(/\s/))&&t.clientId.addError("Client id is not valid")},devIdps:function(){"saml"===M&&D.length>1&&t.devIdps.addError("Only one identity provider is allowed for saml integrations"),"saml"===M&&(0,o.S3)(e)&&t.devIdps.addError("Digital Credential is not allowed for saml integrations")},projectLead:function(){!1===w&&!1===L&&t.projectLead.addError("")},bcscPrivacyZone:function(){if(D.includes("bcservicescard")&&!q){var e;null===(e=t.bcscPrivacyZone)||void 0===e||e.addError("Privacy zone is required for BC Services Card")}},bcscAttributes:function(){if(D.includes("bcservicescard")&&(null==G?void 0:G.length)===0){var e;null===(e=t.bcscAttributes)||void 0===e||e.addError("Please select at least one attribute")}}};["dev","test","prod"].map(function(r){X["".concat(r,"HomePageUri")]=function(){if(D.includes("bcservicescard")&&!c(e["".concat(r,"HomePageUri")])){var n;null===(n=t["".concat(r,"HomePageUri")])||void 0===n||n.addError(l)}}}),r||(r=Object.keys(X));for(var Q=0;Q0,u=i()(e,t,s?(o=t.customValidation,function(e,t){return p(e,t,o)}):void 0).errors;u.length>0&&(n[a]=u)}}),n}},96086:function(e){"use strict";var t=Object.assign.bind(Object);e.exports=t,e.exports.default=e.exports},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(24444)}])},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,a=u(e),o=a[0],s=a[1],c=new i((o+s)*3/4-s),l=0,f=s>0?o-4:o;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;o>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&a.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";/*! + */var to=function(){var e=RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),t=RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "};function n(e,t,n){return t?r[t]:String.fromCharCode(parseInt(n,16))}var i=new String(""),a=Object.hasOwnProperty;return function(r,o){var s,u,c,l=r.match(e),f=l[0],d=!1;"{"===f?s={}:"["===f?s=[]:(s=[],d=!0);for(var p=[s],h=1-d,m=l.length;h=0;)delete r[n[u]]}return o.call(e,t,r)};s=g({"":s},"")}return s}}();void 0!==d&&d||(d={}),void 0!==d.asn1&&d.asn1||(d.asn1={}),d.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i15)throw Error("ASN.1 length too long to represent by 8x: n = "+e.toString(16));return(128+r).toString(16)+t},this.tohex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(e){this.params=e},void 0!=e&&void 0!=e.tlv&&(this.hTLV=e.tlv,this.isModified=!1)},d.asn1.DERAbstractString=function(e){d.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=th(this.s).toLowerCase()},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},tD(d.asn1.DERAbstractString,d.asn1.ASN1Object),d.asn1.DERAbstractTime=function(e){d.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){var t=e.getTime()+6e4*e.getTimezoneOffset();return new Date(t)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),a=String(i.getFullYear());"utc"==t&&(a=a.substr(2,2));var o=a+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var s=i.getMilliseconds();if(0!=s){var u=n(String(s),3);o=o+"."+(u=u.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:Array(t-e.length+1).join("0")+e},this.setByParam=function(e){this.hV=null,this.hTLV=null,this.params=e},this.getString=function(){},this.setString=function(e){this.hTLV=null,this.isModified=!0,void 0==this.params&&(this.params={}),this.params.str=e},this.setByDate=function(e){this.hTLV=null,this.isModified=!0,void 0==this.params&&(this.params={}),this.params.date=e},this.setByDateValue=function(e,t,r,n,i,a){var o=new Date(Date.UTC(e,t-1,r,n,i,a,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},tD(d.asn1.DERAbstractTime,d.asn1.ASN1Object),d.asn1.DERAbstractStructured=function(e){d.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=[],void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},tD(d.asn1.DERAbstractStructured,d.asn1.ASN1Object),d.asn1.DERBoolean=function(e){d.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",!1==e?this.hTLV="010100":this.hTLV="0101ff"},tD(d.asn1.DERBoolean,d.asn1.ASN1Object),d.asn1.DERInteger=function(e){d.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=d.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new E(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},tD(d.asn1.DERInteger,d.asn1.ASN1Object),d.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=d.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.tohex()}d.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7>6,i=128|63&r;return tm(n.toString(16)+i.toString(16))}var n=224|(240&t)>>4,i=128|(15&t)<<2|(192&r)>>6;return tm(n.toString(16)+i.toString(16)+(128|63&r).toString(16))}).join("")}function t_(e){for(var t=encodeURIComponent(e),r="",n=0;n"7"?"00"+e:e}function tR(e){if(!tk(e))return null;try{var t=[],r=e.substr(0,2),n=parseInt(r,16);t[0]=new String(Math.floor(n/40)),t[1]=new String(n%40);for(var i=e.substr(2),a=[],o=0;o0&&(c=c+"."+s.join(".")),c}catch(e){return null}}ts.getLblen=function(e,t){if("8"!=e.substr(t+2,1))return 1;var r=parseInt(e.substr(t+3,1));return 0==r?-1:0=n)break}return a},ts.getNthChildIdx=function(e,t,r){return ts.getChildIdx(e,t)[r]},ts.getIdxbyList=function(e,t,r,n){var i,a;return 0==r.length?void 0!==n&&e.substr(t,2)!==n?-1:t:(i=r.shift())>=(a=ts.getChildIdx(e,t)).length?-1:ts.getIdxbyList(e,a[i],r,n)},ts.getIdxbyListEx=function(e,t,r,n){if(0==r.length)return void 0!==n&&e.substr(t,2)!==n?-1:t;i=r.shift(),a=ts.getChildIdx(e,t);for(var i,a,o=0,s=0;s=e.length?null:ts.getTLV(e,i)},ts.getTLVbyListEx=function(e,t,r,n){var i=ts.getIdxbyListEx(e,t,r,n);return -1==i?null:ts.getTLV(e,i)},ts.getVbyList=function(e,t,r,n,i){var a,o;return -1==(a=ts.getIdxbyList(e,t,r,n))||a>=e.length?null:(o=ts.getV(e,a),!0===i&&(o=o.substr(2)),o)},ts.getVbyListEx=function(e,t,r,n,i){var a,o;return -1==(a=ts.getIdxbyListEx(e,t,r,n))?null:(o=ts.getV(e,a),"03"==e.substr(a,2)&&!1!==i&&(o=o.substr(2)),o)},ts.getInt=function(e,t,r){void 0==r&&(r=-1);try{var n=e.substr(t,2);if("02"!=n&&"03"!=n)return r;var i=ts.getV(e,t);if("02"==n)return parseInt(i,16);return function(e){if(e.length%2!=0||null==(e=e.toLowerCase()).match(/^[0-9a-f]+$/))return -1;try{var t=e.substr(0,2);if("00"==t)return parseInt(e.substr(2),16);var r=parseInt(t,16);if(r>7)return -1;var n=e.substr(2),i=parseInt(n,16).toString(2);"0"==i&&(i="00000000"),i=i.slice(0,0-r);var a=parseInt(i,2);if(a==NaN)return -1;return a}catch(e){return -1}}(i)}catch(e){return r}},ts.getOID=function(e,t,r){void 0==r&&(r=null);try{if("06"!=e.substr(t,2))return r;var n=ts.getV(e,t);return tR(n)}catch(e){return r}},ts.getOIDName=function(e,t,r){void 0==r&&(r=null);try{var n=ts.getOID(e,t,r);if(n==r)return r;var i=d.asn1.x509.OID.oid2name(n);if(""==i)return n;return i}catch(e){return r}},ts.getString=function(e,t,r){void 0==r&&(r=null);try{var n=ts.getV(e,t);return tv(n)}catch(e){return r}},ts.hextooidstr=function(e){var t=function(e,t){return e.length>=t?e:Array(t-e.length+1).join("0")+e},r=[],n=parseInt(e.substr(0,2),16);r[0]=new String(Math.floor(n/40)),r[1]=new String(n%40);for(var i=e.substr(2),a=[],o=0;o0&&(c=c+"."+s.join(".")),c},ts.dump=function(e,t,r,n){var i=ts.getV,a=ts.dump,o=ts.getChildIdx,s=e;e instanceof d.asn1.ASN1Object&&(s=e.tohex());var u=function(e,t){return e.length<=2*t?e:e.substr(0,t)+"..(total "+e.length/2+"bytes).."+e.substr(e.length-t,t)};void 0===t&&(t={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var c=t.ommit_long_octet,l=s.substr(r,2);if("01"==l){var f=i(s,r);return"00"==f?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n"}if("02"==l){var f=i(s,r);return n+"INTEGER "+u(f,c)+"\n"}if("03"==l){var f=i(s,r);if(!ts.isASN1HEX(f.substr(2)))return n+"BITSTRING "+u(f,c)+"\n";var p=n+"BITSTRING, encapsulates\n";return p+a(f.substr(2),t,0,n+" ")}if("04"==l){var f=i(s,r);if(!ts.isASN1HEX(f))return n+"OCTETSTRING "+u(f,c)+"\n";var p=n+"OCTETSTRING, encapsulates\n";return p+a(f,t,0,n+" ")}if("05"==l)return n+"NULL\n";if("06"==l){var h=i(s,r),m=d.asn1.ASN1Util.oidHexToInt(h),g=d.asn1.x509.OID.oid2name(m),y=m.replace(/\./g," ");return""!=g?n+"ObjectIdentifier "+g+" ("+y+")\n":n+"ObjectIdentifier ("+y+")\n"}if("0a"==l)return n+"ENUMERATED "+parseInt(i(s,r))+"\n";if("0c"==l)return n+"UTF8String '"+tm(i(s,r))+"'\n";if("13"==l)return n+"PrintableString '"+tm(i(s,r))+"'\n";if("14"==l)return n+"TeletexString '"+tm(i(s,r))+"'\n";if("16"==l)return n+"IA5String '"+tm(i(s,r))+"'\n";if("17"==l)return n+"UTCTime "+tm(i(s,r))+"\n";if("18"==l)return n+"GeneralizedTime "+tm(i(s,r))+"\n";if("1a"==l)return n+"VisualString '"+tm(i(s,r))+"'\n";if("1e"==l)return n+"BMPString '"+tO(i(s,r))+"'\n";if("30"==l){if("3000"==s.substr(r,4))return n+"SEQUENCE {}\n";var p=n+"SEQUENCE\n",b=o(s,r),x=t;if((2==b.length||3==b.length)&&"06"==s.substr(b[0],2)&&"04"==s.substr(b[b.length-1],2)){var g=ts.oidname(i(s,b[0])),S=JSON.parse(JSON.stringify(t));S.x509ExtName=g,x=S}for(var w=0;w4?{enum:{hex:p}}:{enum:parseInt(p,16)};if("30"==l||"31"==l)return f[c[l]]=function(e){for(var r=[],n=a(e,0),o=0;o31)return!1;if((192&r)==128&&(31&r)==n)return!0;return!1}catch(e){return!1}},ts.isASN1HEX=function(e){if(e.length%2==1)return!1;var t=ts.getVblen(e,0),r=e.substr(0,2),n=ts.getL(e,0);return e.length-r.length-n.length==2*t},ts.checkStrictDER=function(e,t,r,n,i){if(void 0===r){if("string"!=typeof e||(e=e.toLowerCase(),!d.lang.String.isHex(e)))throw Error("not hex string");r=e.length,i=(n=e.length/2)<128?1:Math.ceil(n.toString(16))+1}if(ts.getL(e,t).length>2*i)throw Error("L of TLV too long: idx="+t);var a=ts.getVblen(e,t);if(a>n)throw Error("value of L too long than hex: idx="+t);var o=ts.getTLV(e,t),s=o.length-2-ts.getL(e,t).length;if(s!==2*a)throw Error("V string length and L's value not the same:"+s+"/"+2*a);if(0===t&&e.length!=o.length)throw Error("total length and TLV length unmatch:"+e.length+"!="+o.length);var u=e.substr(t,2);if("02"===u){var c=ts.getVidx(e,t);if("00"==e.substr(c,2)&&56>e.charCodeAt(c+2))throw Error("not least zeros for DER INTEGER")}if(32&parseInt(u,16)){for(var l=ts.getVblen(e,t),f=0,p=ts.getChildIdx(e,t),h=0;h0&&e.push(new n({tag:"a3",obj:new c(t.ext)})),new d.asn1.DERSequence({array:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&this.setByParam(e)},tD(d.asn1.x509.TBSCertificate,d.asn1.ASN1Object),d.asn1.x509.Extensions=function(e){d.asn1.x509.Extensions.superclass.constructor.call(this);var t=d.asn1,r=t.DERSequence,n=t.x509;this.aParam=[],this.setByParam=function(e){this.aParam=e},this.tohex=function(){for(var e=[],t=0;t-1&&e.push(new n({int:this.pathLen}));var t=new i({array:e});return this.asn1ExtnValue=t,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,void 0!==e&&(void 0!==e.cA&&(this.cA=e.cA),void 0!==e.pathLen&&(this.pathLen=e.pathLen))},tD(d.asn1.x509.BasicConstraints,d.asn1.x509.Extension),d.asn1.x509.CRLDistributionPoints=function(e){d.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,e);var t=d.asn1,r=t.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(e){for(var n=[],i=0;i0&&e.push(new r({array:t}))}return new r({array:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(this.params=e)},tD(d.asn1.x509.PolicyInformation,d.asn1.ASN1Object),d.asn1.x509.PolicyQualifierInfo=function(e){d.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,e);var t=d.asn1,r=t.DERSequence,n=t.DERIA5String,i=t.DERObjectIdentifier,a=t.x509.UserNotice;this.params=null,this.tohex=function(){if(void 0!==this.params.cps){var e=new r({array:[new i({oid:"1.3.6.1.5.5.7.2.1"}),new n({str:this.params.cps})]});return e.tohex()}if(void 0!=this.params.unotice){var e=new r({array:[new i({oid:"1.3.6.1.5.5.7.2.2"}),new a(this.params.unotice)]});return e.tohex()}},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(this.params=e)},tD(d.asn1.x509.PolicyQualifierInfo,d.asn1.ASN1Object),d.asn1.x509.UserNotice=function(e){d.asn1.x509.UserNotice.superclass.constructor.call(this,e);var t=d.asn1.DERSequence,r=(d.asn1.DERInteger,d.asn1.x509.DisplayText),n=d.asn1.x509.NoticeReference;this.params=null,this.tohex=function(){var e=[];return void 0!==this.params.noticeref&&e.push(new n(this.params.noticeref)),void 0!==this.params.exptext&&e.push(new r(this.params.exptext)),new t({array:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(this.params=e)},tD(d.asn1.x509.UserNotice,d.asn1.ASN1Object),d.asn1.x509.NoticeReference=function(e){d.asn1.x509.NoticeReference.superclass.constructor.call(this,e);var t=d.asn1.DERSequence,r=d.asn1.DERInteger,n=d.asn1.x509.DisplayText;this.params=null,this.tohex=function(){var e=[];if(void 0!==this.params.org&&e.push(new n(this.params.org)),void 0!==this.params.noticenum){for(var i=[],a=this.params.noticenum,o=0;o0)for(var e=0;e0;i++){var a=t.shift();if(!0===r){var o=(n.pop()+","+a).replace(/\\,/g,",");n.push(o),r=!1}else n.push(a);"\\"===a.substr(-1,1)&&(r=!0)}return(n=n.map(function(e){return e.replace("/","\\/")})).reverse(),"/"+n.join("/")},d.asn1.x509.X500Name.ldapToOneline=function(e){return d.asn1.x509.X500Name.ldapToCompat(e)},d.asn1.x509.RDN=function(e){d.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var t=d.asn1.x509.AttributeTypeAndValue;this.setByParam=function(e){void 0!==e.rule&&(this.sRule=e.rule),void 0!==e.str&&this.addByMultiValuedString(e.str),void 0!==e.array&&(this.paramArray=e.array)},this.addByString=function(e){this.asn1Array.push(new d.asn1.x509.AttributeTypeAndValue({str:e,rule:this.sRule}))},this.addByMultiValuedString=function(e){for(var t=d.asn1.x509.RDN.parseString(e),r=0;r0)for(var e=0;e0;i++){var a=t.shift();if(!0===r){var o=(n.pop()+"+"+a).replace(/\\\+/g,"+");n.push(o),r=!1}else n.push(a);"\\"===a.substr(-1,1)&&(r=!0)}for(var s=!1,u=[],i=0;n.length>0;i++){var a=n.shift();if(!0===s){var c=u.pop();if(a.match(/"$/)){var o=(c+"+"+a).replace(/^([^=]+)="(.*)"$/,"$1=$2");u.push(o),s=!1}else u.push(c+"+"+a)}else u.push(a);a.match(/^[^=]+="/)&&(s=!0)}return u},d.asn1.x509.AttributeTypeAndValue=function(e){d.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var t=d,r=t.asn1,n=r.DERSequence,i=r.DERUTF8String,a=r.DERPrintableString,o=r.DERTeletexString,s=r.DERIA5String,u=r.DERVisibleString,c=r.DERBMPString,l=t.lang.String.isMail,f=t.lang.String.isPrintable;this.setByParam=function(e){if(void 0!==e.rule&&(this.sRule=e.rule),void 0!==e.ds&&(this.dsType=e.ds),void 0===e.value&&void 0!==e.str){var t=e.str.match(/^([^=]+)=(.+)$/);if(t)this.sType=t[1],this.sValue=t[2];else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}else this.sType=e.type,this.sValue=e.value},this.setByString=function(e,t){void 0!==t&&(this.sRule=t);var r=e.match(/^([^=]+)=(.+)$/);if(r)this.setByAttrTypeAndValueStr(r[1],r[2]);else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)},this._getDsType=function(){var e=this.sType,t=this.sValue,r=this.sRule;if("prn"===r){if("CN"==e&&l(t))return"ia5";if(f(t))return"prn"}else if("utf8"===r){if("CN"==e&&l(t))return"ia5";if("C"==e)return"prn"}return"utf8"},this.setByAttrTypeAndValueStr=function(e,t,r){void 0!==r&&(this.sRule=r),this.sType=e,this.sValue=t},this.getValueObj=function(e,t){if("utf8"==e)return new i({str:t});if("prn"==e)return new a({str:t});if("tel"==e)return new o({str:t});if("ia5"==e)return new s({str:t});if("vis"==e)return new u({str:t});if("bmp"==e)return new c({str:t});throw Error("unsupported directory string type: type="+e+" value="+t)},this.tohex=function(){null==this.dsType&&(this.dsType=this._getDsType());var e=d.asn1.x509.OID.atype2obj(this.sType),t=this.getValueObj(this.dsType,this.sValue),r=new n({array:[e,t]});return this.TLV=r.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&this.setByParam(e)},tD(d.asn1.x509.AttributeTypeAndValue,d.asn1.ASN1Object),d.asn1.x509.SubjectPublicKeyInfo=function(e){d.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var t=d,r=t.asn1,n=r.DERInteger,i=r.DERBitString,a=r.DERObjectIdentifier,o=r.DERSequence,s=r.ASN1Util.newObject,u=r.x509.AlgorithmIdentifier,c=t.crypto;c.ECDSA,c.DSA,this.getASN1Object=function(){if(null==this.asn1AlgId||null==this.asn1SubjPKey)throw"algId and/or subjPubKey not set";return new o({array:[this.asn1AlgId,this.asn1SubjPKey]})},this.tohex=function(){var e=this.getASN1Object();return this.hTLV=e.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(e){try{if(e instanceof tt){var t=s({seq:[{int:{bigint:e.n}},{int:{int:e.e}}]}).tohex();this.asn1AlgId=new u({name:"rsaEncryption"}),this.asn1SubjPKey=new i({hex:"00"+t})}}catch(e){}try{if(e instanceof d.crypto.ECDSA){var r=new a({name:e.curveName});this.asn1AlgId=new u({name:"ecPublicKey",asn1params:r}),this.asn1SubjPKey=new i({hex:"00"+e.pubKeyHex})}}catch(e){}try{if(e instanceof d.crypto.DSA){var r=new s({seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]});this.asn1AlgId=new u({name:"dsa",asn1params:r});var o=new n({bigint:e.y});this.asn1SubjPKey=new i({hex:"00"+o.tohex()})}}catch(e){}},void 0!==e&&this.setPubKey(e)},tD(d.asn1.x509.SubjectPublicKeyInfo,d.asn1.ASN1Object),d.asn1.x509.Time=function(e){d.asn1.x509.Time.superclass.constructor.call(this);var t=d.asn1,r=t.DERUTCTime,n=t.DERGeneralizedTime;this.params=null,this.type=null,this.setTimeParams=function(e){this.timeParams=e},this.setByParam=function(e){this.params=e},this.getType=function(e){return e.match(/^[0-9]{12}Z$/)?"utc":e.match(/^[0-9]{14}Z$/)?"gen":e.match(/^[0-9]{12}\.[0-9]+Z$/)?"utc":e.match(/^[0-9]{14}\.[0-9]+Z$/)?"gen":null},this.tohex=function(){var e=this.params,t=null;if("string"==typeof e&&(e={str:e}),null!=e&&e.str&&(null==e.type||void 0==e.type)&&(e.type=this.getType(e.str)),null!=e&&e.str?("utc"==e.type&&(t=new r(e.str)),"gen"==e.type&&(t=new n(e.str))):t="gen"==this.type?new n:new r,null==t)throw Error("wrong setting for Time");return this.TLV=t.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},void 0!=e&&this.setByParam(e)},d.asn1.x509.Time_bak=function(e){d.asn1.x509.Time_bak.superclass.constructor.call(this);var t=d.asn1,r=t.DERUTCTime,n=t.DERGeneralizedTime;this.setTimeParams=function(e){this.timeParams=e},this.tohex=function(){var e=null;return e=null!=this.timeParams?"utc"==this.type?new r(this.timeParams):new n(this.timeParams):"utc"==this.type?new r:new n,this.TLV=e.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",void 0!==e&&(void 0!==e.type?this.type=e.type:void 0!==e.str&&(e.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),e.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=e)},tD(d.asn1.x509.Time,d.asn1.ASN1Object),d.asn1.x509.AlgorithmIdentifier=function(e){d.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var t=d.asn1,r=t.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(null===this.nameAlg&&null===this.asn1Alg)throw Error("algorithm not specified");if(null!==this.nameAlg){var e=null;for(var n in r)n===this.nameAlg&&(e=r[n]);if(null!==e)return this.hTLV=e,this.hTLV}null!==this.nameAlg&&null===this.asn1Alg&&(this.asn1Alg=t.x509.OID.name2obj(this.nameAlg));var i=[this.asn1Alg];null!==this.asn1Params&&i.push(this.asn1Params);var a=new t.DERSequence({array:i});return this.hTLV=a.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&(void 0!==e.name&&(this.nameAlg=e.name),void 0!==e.asn1params&&(this.asn1Params=e.asn1params),void 0!==e.paramempty&&(this.paramEmpty=e.paramempty)),null===this.asn1Params&&!1===this.paramEmpty&&null!==this.nameAlg){void 0!==this.nameAlg.name&&(this.nameAlg=this.nameAlg.name);var n=this.nameAlg.toLowerCase();"withdsa"!==n.substr(-7,7)&&"withecdsa"!==n.substr(-9,9)&&(this.asn1Params=new t.DERNull)}},tD(d.asn1.x509.AlgorithmIdentifier,d.asn1.ASN1Object),d.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"},d.asn1.x509.GeneralName=function(e){d.asn1.x509.GeneralName.superclass.constructor.call(this);var t=d.asn1,r=t.x509,n=r.X500Name,i=r.OtherName,a=t.DERIA5String,o=(t.DERPrintableString,t.DEROctetString),s=t.DERTaggedObject,u=t.ASN1Object,c=Error;this.params=null,this.setByParam=function(e){this.params=e},this.tohex=function(){var e=this.params,t=!1;if(void 0!==e.other)r="a0",l=new i(e.other);else if(void 0!==e.rfc822)r="81",l=new a({str:e.rfc822});else if(void 0!==e.dns)r="82",l=new a({str:e.dns});else if(void 0!==e.dn)r="a4",t=!0,l="string"==typeof e.dn?new n({str:e.dn}):e.dn instanceof d.asn1.x509.X500Name?e.dn:new n(e.dn);else if(void 0!==e.ldapdn)r="a4",t=!0,l=new n({ldapstr:e.ldapdn});else if(void 0!==e.certissuer||void 0!==e.certsubj){r="a4",t=!0;var r,t,l,f,p,h,m=null;if(void 0!==e.certsubj?(f=!1,p=e.certsubj):(f=!0,p=e.certissuer),p.match(/^[0-9A-Fa-f]+$/),-1!=p.indexOf("-----BEGIN ")&&(m=tb(p)),null==m)throw Error("certsubj/certissuer not cert");var g=new tH;g.hex=m,h=f?g.getIssuerHex():g.getSubjectHex(),(l=new u).hTLV=h}else if(void 0!==e.uri)r="86",l=new a({str:e.uri});else if(void 0!==e.ip){r="87";var y,b=e.ip;try{if(b.match(/^[0-9a-f]+$/)){var x=b.length;if(8==x||16==x||32==x||64==x)y=b;else throw"err"}else y=function e(t){var r=Error("malformed IP address");if(!(t=t.toLowerCase(t)).match(/^[0-9a-f.:/]+$/))throw r;if(t.match(/^[0-9.]+$/)){var n=t.split(".");if(4!==n.length)throw r;var i="";try{for(var a=0;a<4;a++){var o=parseInt(n[a]);i+=("0"+o.toString(16)).slice(-2)}return i}catch(e){throw r}}else{if(t.match(/^[0-9.]+\/[0-9]+$/)){var s=t.split("/");return e(s[0])+tP(parseInt(s[1]),32)}if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return tw(t);if(t.match(/^[0-9a-f:]+\/[0-9]+$/)&&-1!==t.indexOf(":")){var s=t.split("/");return tw(s[0])+tP(parseInt(s[1]),128)}throw r}}(b)}catch(t){throw new c("malformed IP address: "+e.ip+":"+t.message)}l=new o({hex:y})}else throw new c("improper params");return new s({tag:r,explicit:t,obj:l}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==e&&this.setByParam(e)},tD(d.asn1.x509.GeneralName,d.asn1.ASN1Object),d.asn1.x509.GeneralNames=function(e){d.asn1.x509.GeneralNames.superclass.constructor.call(this);var t=d.asn1;this.setByParamArray=function(e){for(var r=0;r0){for(var r=n(e.valhex,t[0]),i=u(r,0),a=[],o=0;o1){var l=n(e.valhex,t[1]);e.polhex=l}delete e.valhex},this.setSignaturePolicyIdentifier=function(e){var t=u(e.valhex,0);if(t.length>0){var i=ts.getOID(e.valhex,t[0]);e.oid=i}if(t.length>1){var a=new tH,o=u(e.valhex,t[1]),s=n(e.valhex,o[0]),c=a.getAlgorithmIdentifierName(s);e.alg=c;var l=r(e.valhex,o[1]);e.hash=l}delete e.valhex},this.setSigningCertificateV2=function(e){var t=u(e.valhex,0);if(t.length>0){for(var r=n(e.valhex,t[0]),i=u(r,0),a=[],o=0;o1){var l=n(e.valhex,t[1]);e.polhex=l}delete e.valhex},this.getESSCertID=function(e){var t={},i=u(e,0);if(i.length>0){var a=r(e,i[0]);t.hash=a}if(i.length>1){var o=n(e,i[1]),s=this.getIssuerSerial(o);void 0!=s.serial&&(t.serial=s.serial),void 0!=s.issuer&&(t.issuer=s.issuer)}return t},this.getESSCertIDv2=function(i){var a={},o=u(i,0);if(o.length<1||3s+1){var f=n(i,o[s+1]),d=this.getIssuerSerial(f);a.issuer=d.issuer,a.serial=d.serial}return a},this.getIssuerSerial=function(e){var i={},a=u(e,0),o=n(e,a[0]),s=t.getGeneralNames(o)[0].dn;i.issuer=s;var c=r(e,a[1]);return i.serial={hex:c},i},this.getCertificateSet=function(e){for(var t=u(e,0),r=[],i=0;i=0;o--)i+=n[o];return i}if("string"==typeof e&&void 0!=a[e])return tT([e],a);if("object"==typeof e&&void 0!=e.length)return tT(e,a);throw new t("wrong params")},this.tohex=function(){this.params;var e=this.getBinValue();return new n({bin:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!=e&&this.setByParam(e)},tD(d.asn1.tsp.PKIFailureInfo,d.asn1.ASN1Object),d.asn1.tsp.AbstractTSAAdapter=function(e){this.getTSTHex=function(e,t){throw"not implemented yet"}},d.asn1.tsp.SimpleTSAAdapter=function(e){var t=d,r=t.asn1.tsp,n=t.crypto.Util.hashHex;r.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(e,t){var i=n(e,t);return this.params.econtent.content.messageImprint={alg:t,hash:i},this.params.econtent.content.serial={int:this.serial++},this.params.econtent.content.nonce={int:Math.floor(1e9*Math.random())},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==e&&(this.params=e)},tD(d.asn1.tsp.SimpleTSAAdapter,d.asn1.tsp.AbstractTSAAdapter),d.asn1.tsp.FixedTSAAdapter=function(e){var t=d,r=t.asn1.tsp,n=t.crypto.Util.hashHex;r.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(e,t){var i=n(e,t);return this.params.econtent.content.messageImprint={alg:t,hash:i},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==e&&(this.params=e)},tD(d.asn1.tsp.FixedTSAAdapter,d.asn1.tsp.AbstractTSAAdapter),d.asn1.tsp.TSPUtil=new function(){},d.asn1.tsp.TSPUtil.newTimeStampToken=function(e){return new d.asn1.tsp.TimeStampToken(e)},d.asn1.tsp.TSPUtil.parseTimeStampReq=function(e){return new d.asn1.tsp.TSPParser().getTimeStampReq(e)},d.asn1.tsp.TSPUtil.parseMessageImprint=function(e){return new d.asn1.tsp.TSPParser().getMessageImprint(e)},d.asn1.tsp.TSPParser=function(){var e=new tH,t=ts.getV,r=ts.getTLV,n=ts.getIdxbyList,i=(ts.getTLVbyListEx,ts.getChildIdx),a=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],o={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(e){var t=i(e,0);if(1==t.length)return this.getPKIStatusInfo(r(e,t[0]));if(t.length>1){var n=this.getPKIStatusInfo(r(e,t[0])),a=r(e,t[1]),o=this.getToken(a);return o.statusinfo=n,o}},this.getToken=function(e){var t=(new d.asn1.cms.CMSParser).getCMSSignedData(e);return this.setTSTInfo(t),t},this.setTSTInfo=function(e){var t=e.econtent;if("tstinfo"==t.type){var r=t.content.hex,n=this.getTSTInfo(r);t.content=n}},this.getTSTInfo=function(n){var a={},o=i(n,0),s=t(n,o[1]);a.policy=tR(s);var u=r(n,o[2]);a.messageImprint=this.getMessageImprint(u);var c=t(n,o[3]);a.serial={hex:c};var l=t(n,o[4]);a.genTime={str:tm(l)};var f=0;if(o.length>5&&"30"==n.substr(o[5],2)){var d=r(n,o[5]);a.accuracy=this.getAccuracy(d),f++}if(o.length>5+f&&"01"==n.substr(o[5+f],2)&&("ff"==t(n,o[5+f])&&(a.ordering=!0),f++),o.length>5+f&&"02"==n.substr(o[5+f],2)){var p=t(n,o[5+f]);a.nonce={hex:p},f++}if(o.length>5+f&&"a0"==n.substr(o[5+f],2)){var h=r(n,o[5+f]);h="30"+h.substr(2);var m=(pGeneralNames=e.getGeneralNames(h))[0].dn;a.tsa=m,f++}if(o.length>5+f&&"a1"==n.substr(o[5+f],2)){var g=r(n,o[5+f]);g="30"+g.substr(2);var y=e.getExtParamArray(g);a.ext=y,f++}return a},this.getAccuracy=function(e){for(var r={},n=i(e,0),a=0;a1&&"30"==e.substr(o[1],2)){var l=r(e,o[1]);n.statusstr=this.getPKIFreeText(l),s++}if(o.length>s&&"03"==e.substr(o[1+s],2)){var f=r(e,o[1+s]);n.failinfo=this.getPKIFailureInfo(f)}return n},this.getPKIFreeText=function(e){for(var t=[],r=i(e,0),n=0;n=t)?e:Array(t-e.length+1).join(r)+e};function tT(e,t){for(var r=0,n=0;n=0;n--)a+=i[n];return a}function tD(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}void 0!==d&&d||(d={}),void 0!==d.crypto&&d.crypto||(d.crypto={}),d.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:b.algo.MD5,sha1:b.algo.SHA1,sha224:b.algo.SHA224,sha256:b.algo.SHA256,sha384:b.algo.SHA384,sha512:b.algo.SHA512,ripemd160:b.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(void 0===this.DIGESTINFOHEAD[t])throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,r){var n=this.getDigestInfoHex(e,t),i=r/4;if(n.length+22>i)throw"key is too short for SigAlg: keylen="+r+","+t;for(var a="0001",o="00"+n,s="",u=i-a.length-o.length,c=0;c=s.compareTo(E.ZERO));var u=o.modInverse(i).multiply(a.add(n.multiply(s))).mod(i);return r.biRSSigToASN1Sig(s,u)},this.sign=function(e,t){var r=this.ecparams.n,n=E.fromByteArrayUnsigned(e);do var i=this.getBigRandom(r),a=this.ecparams.G.multiply(i).getX().toBigInteger().mod(r);while(0>=a.compareTo(E.ZERO));var o=i.modInverse(r).multiply(n.add(t.multiply(a))).mod(r);return this.serializeSig(a,o)},this.verifyWithMessageHash=function(e,t){return this.verifyHex(e,t,this.pubKeyHex)},this.verifyHex=function(e,t,n){try{var i,a,o=r.parseSigHex(t);i=o.r,a=o.s;var s=ti.decodeFromHex(this.ecparams.curve,n),u=new E(e.substring(0,this.ecparams.keycharlen),16);return this.verifyRaw(u,i,a,s)}catch(e){return!1}},this.verify=function(e,t,r){if(Bitcoin.Util.isArray(t)){var n,i,a,o=this.parseSig(t);n=o.r,i=o.s}else if("object"==typeof t&&t.r&&t.s)n=t.r,i=t.s;else throw"Invalid value for signature";if(r instanceof ti)a=r;else if(Bitcoin.Util.isArray(r))a=ti.decodeFrom(this.ecparams.curve,r);else throw"Invalid format for pubkey value, must be byte array or ECPointFp";var s=E.fromByteArrayUnsigned(e);return this.verifyRaw(s,n,i,a)},this.verifyRaw=function(e,t,r,n){var i=this.ecparams.n,a=this.ecparams.G;if(0>t.compareTo(E.ONE)||t.compareTo(i)>=0||0>r.compareTo(E.ONE)||r.compareTo(i)>=0)return!1;var o=r.modInverse(i),s=e.multiply(o).mod(i),u=t.multiply(o).mod(i);return a.multiply(s).add(n.multiply(u)).getX().toBigInteger().mod(i).equals(t)},this.serializeSig=function(e,t){var r=e.toByteArraySigned(),n=t.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(e){if(48!=e[0])throw Error("Signature not a valid DERSequence");if(2!=e[t=2])throw Error("First element in signature must be a DERInteger");var t,r=e.slice(t+2,t+2+e[t+1]);if(t+=2+e[t+1],2!=e[t])throw Error("Second element in signature must be a DERInteger");var n=e.slice(t+2,t+2+e[t+1]);return t+=2+e[t+1],{r:E.fromByteArrayUnsigned(r),s:E.fromByteArrayUnsigned(n)}},this.parseSigCompact=function(e){if(65!==e.length)throw"Signature has the wrong length";var t=e[0]-27;if(t<0||t>7)throw"Invalid signature type";var r=this.ecparams.n;return{r:E.fromByteArrayUnsigned(e.slice(1,33)).mod(r),s:E.fromByteArrayUnsigned(e.slice(33,65)).mod(r),i:t}},this.readPKCS5PrvKeyHex=function(e){var t,r,n;if(!1===o(e))throw Error("not ASN.1 hex string");try{t=a(e,0,["[0]",0],"06"),r=a(e,0,[1],"04");try{n=a(e,0,["[1]",0],"03")}catch(e){}}catch(e){throw Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=i(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(e){var r,n,s;if(!1===o(e))throw new t("not ASN.1 hex string");try{a(e,0,[1,0],"06"),r=a(e,0,[1,1],"06"),n=a(e,0,[2,0,1],"04");try{s=a(e,0,[2,0,"[1]",0],"03")}catch(e){}}catch(e){throw new t("malformed PKCS#8 plain ECC private key")}if(this.curveName=i(r),void 0===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(s),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(e){var r,n;if(!1===o(e))throw new t("not ASN.1 hex string");try{a(e,0,[0,0],"06"),r=a(e,0,[0,1],"06"),n=a(e,0,[1],"03")}catch(e){throw new t("malformed PKCS#8 ECC public key")}if(this.curveName=i(r),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(e,r){var n,s;if(!1===o(e))throw new t("not ASN.1 hex string");try{n=a(e,0,[0,5,0,1],"06"),s=a(e,0,[0,5,1],"03")}catch(e){throw new t("malformed X.509 certificate ECC public key")}if(this.curveName=i(n),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(s)},void 0!==e&&void 0!==e.curve&&(this.curveName=e.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==e&&(void 0!==e.prv&&this.setPrivateKeyHex(e.prv),void 0!==e.pub&&this.setPublicKeyHex(e.pub))},d.crypto.ECDSA.parseSigHex=function(e){var t=d.crypto.ECDSA.parseSigHexInHexRS(e);return{r:new E(t.r,16),s:new E(t.s,16)}},d.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=ts.getChildIdx,r=ts.getV;if(ts.checkStrictDER(e,0),"30"!=e.substr(0,2))throw Error("signature is not a ASN.1 sequence");var n=t(e,0);if(2!=n.length)throw Error("signature shall have two elements");var i=n[0],a=n[1];if("02"!=e.substr(i,2))throw Error("1st item not ASN.1 integer");if("02"!=e.substr(a,2))throw Error("2nd item not ASN.1 integer");return{r:r(e,i),s:r(e,a)}},d.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=d.crypto.ECDSA.parseSigHexInHexRS(e),r=t.r,n=t.s;if(r.length>=130&&r.length<=134){if(r.length%2!=0)throw Error("unknown ECDSA sig r length error");if(n.length%2!=0)throw Error("unknown ECDSA sig s length error");"00"==r.substr(0,2)&&(r=r.substr(2)),"00"==n.substr(0,2)&&(n=n.substr(2));var i=Math.max(r.length,n.length);return(r=("000000"+r).slice(-i))+(n=("000000"+n).slice(-i))}if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw Error("unknown ECDSA sig r length error");if(n.length%32!=0)throw Error("unknown ECDSA sig s length error");return r+n},d.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var t=e.substr(0,e.length/2),r=e.substr(e.length/2);return d.crypto.ECDSA.hexRSSigToASN1Sig(t,r)},d.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var r=new E(e,16),n=new E(t,16);return d.crypto.ECDSA.biRSSigToASN1Sig(r,n)},d.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var r=d.asn1,n=new r.DERInteger({bigint:e}),i=new r.DERInteger({bigint:t});return new r.DERSequence({array:[n,i]}).tohex()},d.crypto.ECDSA.getName=function(e){return"2b8104001f"===e?"secp192k1":"2a8648ce3d030107"===e?"secp256r1":"2b8104000a"===e?"secp256k1":"2b81040021"===e?"secp224r1":"2b81040022"===e?"secp384r1":"2b81040023"===e?"secp521r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)?"secp256r1":-1!=="|secp256k1|".indexOf(e)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(e)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(e)?"secp384r1":-1!=="|secp521r1|NIST P-521|P-521|".indexOf(e)?"secp521r1":null},void 0!==d&&d||(d={}),void 0!==d.crypto&&d.crypto||(d.crypto={}),d.crypto.ECParameterDB=new function(){var e={},t={};function r(e){return new E(e,16)}this.getByName=function(r){var n=r;if(void 0!==t[n]&&(n=t[r]),void 0!==e[n])return e[n];throw"unregistered EC curve name: "+n},this.regist=function(n,i,a,o,s,u,c,l,f,d,p,h){e[n]={};var m=r(a),g=r(o),y=r(s),b=r(u),x=r(c),S=new ta(m,g,y),w=S.decodePointHex("04"+l+f);e[n].name=n,e[n].keylen=i,e[n].keycharlen=2*Math.ceil(i/8),e[n].curve=S,e[n].G=w,e[n].n=b,e[n].h=x,e[n].oid=p,e[n].info=h;for(var E=0;E1?new E(n,16):null,c=new E(i,16),this.setPrivate(a,o,s,u,c)},this.setPublic=function(e,t,r,n){this.isPublic=!0,this.p=e,this.q=t,this.g=r,this.y=n,this.x=null},this.setPublicHex=function(e,t,r,n){var i,a,o,s;i=new E(e,16),a=new E(t,16),o=new E(r,16),s=new E(n,16),this.setPublic(i,a,o,s)},this.signWithMessageHash=function(e){var t=this.p,r=this.q,n=this.g;this.y;var i=this.x,a=d.crypto.Util.getRandomBigIntegerMinToMax(E.ONE.add(E.ONE),r.subtract(E.ONE)),o=e.substr(0,r.bitLength()/4),s=new E(o,16),u=n.modPow(a,t).mod(r),c=a.modInverse(r).multiply(s.add(i.multiply(u))).mod(r);return d.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:u}},{int:{bigint:c}}]})},this.verifyWithMessageHash=function(e,t){var r=this.p,n=this.q,i=this.g,a=this.y,o=this.parseASN1Signature(t),s=o[0],u=o[1],c=e.substr(0,n.bitLength()/4),l=new E(c,16);if(E.ZERO.compareTo(s)>0||s.compareTo(n)>0||E.ZERO.compareTo(u)>=0||u.compareTo(n)>0)throw"invalid DSA signature";var f=u.modInverse(n),d=l.multiply(f).mod(n),p=s.multiply(f).mod(n);return 0==i.modPow(d,r).multiply(a.modPow(p,r)).mod(r).mod(n).compareTo(s)},this.parseASN1Signature=function(t){try{var r=new E(e(t,0,[0],"02"),16),n=new E(e(t,0,[1],"02"),16);return[r,n]}catch(e){throw Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(r){var n,i,a,o,s;if(!1===t(r))throw Error("not ASN.1 hex string");try{n=e(r,0,[1],"02"),i=e(r,0,[2],"02"),a=e(r,0,[3],"02"),o=e(r,0,[4],"02"),s=e(r,0,[5],"02")}catch(e){throw Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(n,i,a,o,s)},this.readPKCS8PrvKeyHex=function(r){var n,i,a,o;if(!1===t(r))throw Error("not ASN.1 hex string");try{n=e(r,0,[1,1,0],"02"),i=e(r,0,[1,1,1],"02"),a=e(r,0,[1,1,2],"02"),o=e(r,0,[2,0],"02")}catch(e){throw Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(n,i,a,null,o)},this.readPKCS8PubKeyHex=function(r){var n,i,a,o;if(!1===t(r))throw Error("not ASN.1 hex string");try{n=e(r,0,[0,1,0],"02"),i=e(r,0,[0,1,1],"02"),a=e(r,0,[0,1,2],"02"),o=e(r,0,[1,0],"02")}catch(e){throw Error("malformed PKCS#8 DSA public key")}this.setPublicHex(n,i,a,o)},this.readCertPubKeyHex=function(r,n){var i,a,o,s;if(!1===t(r))throw Error("not ASN.1 hex string");try{i=e(r,0,[0,5,0,1,0],"02"),a=e(r,0,[0,5,0,1,1],"02"),o=e(r,0,[0,5,0,1,2],"02"),s=e(r,0,[0,5,1,0],"02")}catch(e){throw Error("malformed X.509 certificate DSA public key")}this.setPublicHex(i,a,o,s)}};var tN=(n=function(e,t,r){return i(b.AES,e,t,r)},i=function(e,t,r,n){var i=b.enc.Hex.parse(t),a=b.enc.Hex.parse(r),o=b.enc.Hex.parse(n),s={};s.key=a,s.iv=o,s.ciphertext=i;var u=e.decrypt(s,a,{iv:o});return b.enc.Hex.stringify(u)},a=function(e,t,r){return o(b.AES,e,t,r)},o=function(e,t,r,n){var i=b.enc.Hex.parse(t),a=b.enc.Hex.parse(r),o=b.enc.Hex.parse(n),s=e.encrypt(i,a,{iv:o}),u=b.enc.Hex.parse(s.toString());return b.enc.Base64.stringify(u)},s={"AES-256-CBC":{proc:n,eproc:a,keylen:32,ivlen:16},"AES-192-CBC":{proc:n,eproc:a,keylen:24,ivlen:16},"AES-128-CBC":{proc:n,eproc:a,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(e,t,r){return i(b.TripleDES,e,t,r)},eproc:function(e,t,r){return o(b.TripleDES,e,t,r)},keylen:24,ivlen:8},"DES-CBC":{proc:function(e,t,r){return i(b.DES,e,t,r)},eproc:function(e,t,r){return o(b.DES,e,t,r)},keylen:8,ivlen:8}},u=function(e){var t=b.lib.WordArray.random(e);return b.enc.Hex.stringify(t)},c=function(e){var t={},r=e.match(RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));r&&(t.cipher=r[1],t.ivsalt=r[2]);var n=e.match(RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));n&&(t.type=n[1]);var i=-1,a=0;-1!=e.indexOf("\r\n\r\n")&&(i=e.indexOf("\r\n\r\n"),a=2),-1!=e.indexOf("\n\n")&&(i=e.indexOf("\n\n"),a=1);var o=e.indexOf("-----END");if(-1!=i&&-1!=o){var s=e.substring(i+2*a,o-a);s=s.replace(/\s+/g,""),t.data=s}return t},l=function(e,t,r){for(var n=r.substring(0,16),i=b.enc.Hex.parse(n),a=b.enc.Utf8.parse(t),o=s[e].keylen+s[e].ivlen,u="",c=null;;){var l=b.algo.MD5.create();if(null!=c&&l.update(c),l.update(a),l.update(i),c=l.finalize(),(u+=b.enc.Hex.stringify(c)).length>=2*o)break}var f={};return f.keyhex=u.substr(0,2*s[e].keylen),f.ivhex=u.substr(2*s[e].keylen,2*s[e].ivlen),f},f=function(e,t,r,n){var i=b.enc.Base64.parse(e),a=b.enc.Hex.stringify(i);return(0,s[t].proc)(a,r,n)},{version:"1.0.0",parsePKCS5PEM:function(e){return c(e)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(e,t,r){return l(e,t,r)},decryptKeyB64:function(e,t,r,n){return f(e,t,r,n)},getDecryptedKeyHex:function(e,t){var r=c(e);r.type;var n=r.cipher,i=r.ivsalt,a=r.data,o=l(n,t,i).keyhex;return f(a,n,o,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(e,t,r,n,i){var a,o,c="";if((void 0===n||null==n)&&(n="AES-256-CBC"),void 0===s[n])throw Error("KEYUTIL unsupported algorithm: "+n);(void 0===i||null==i)&&(i=u(s[n].ivlen).toUpperCase());var f=l(n,r,i).keyhex,d=(a=n,o=i,(0,s[a].eproc)(t,f,o)).replace(/(.{64})/g,"$1\r\n"),c="-----BEGIN "+e+" PRIVATE KEY-----\r\n";return c+("Proc-Type: 4,ENCRYPTED\r\n"+("DEK-Info: "+n+",")+i+"\r\n\r\n"+d+"\r\n-----END "+e)+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var t=ts.getChildIdx,r=ts.getV,n={},i=t(e,0);if(2!=i.length)throw Error("malformed format: SEQUENCE(0).items != 2: "+i.length);n.ciphertext=r(e,i[1]);var a=t(e,i[0]);if(2!=a.length)throw Error("malformed format: SEQUENCE(0.0).items != 2: "+a.length);if("2a864886f70d01050d"!=r(e,a[0]))throw Error("this only supports pkcs5PBES2");var o=t(e,a[1]);if(2!=a.length)throw Error("malformed format: SEQUENCE(0.0.1).items != 2: "+o.length);var s=t(e,o[1]);if(2!=s.length)throw Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+s.length);if("2a864886f70d0307"!=r(e,s[0]))throw"this only supports TripleDES";n.encryptionSchemeAlg="TripleDES",n.encryptionSchemeIV=r(e,s[1]);var u=t(e,o[0]);if(2!=u.length)throw Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+u.length);if("2a864886f70d01050c"!=r(e,u[0]))throw Error("this only supports pkcs5PBKDF2");var c=t(e,u[1]);if(c.length<2)throw Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+c.length);n.pbkdf2Salt=r(e,c[0]);var l=r(e,c[1]);try{n.pbkdf2Iter=parseInt(l,16)}catch(e){throw Error("malformed format pbkdf2Iter: "+l)}return n},getPBKDF2KeyHexFromParam:function(e,t){var r=b.enc.Hex.parse(e.pbkdf2Salt),n=e.pbkdf2Iter,i=b.PBKDF2(t,r,{keySize:6,iterations:n});return b.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(e,t){var r=tb(e,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=tN.getPBKDF2KeyHexFromParam(n,t),a={};a.ciphertext=b.enc.Hex.parse(n.ciphertext);var o=b.enc.Hex.parse(i),s=b.enc.Hex.parse(n.encryptionSchemeIV),u=b.TripleDES.decrypt(a,o,{iv:s});return b.enc.Hex.stringify(u)},getKeyFromEncryptedPKCS8PEM:function(e,t){var r=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(e,t);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(e){var t=ts.getChildIdx,r=ts.getV,n={};if(n.algparam=null,"30"!=e.substr(0,2))throw Error("malformed plain PKCS8 private key(code:001)");var i=t(e,0);if(i.length<3)throw Error("malformed plain PKCS8 private key(code:002)");if("30"!=e.substr(i[1],2))throw Error("malformed PKCS8 private key(code:003)");var a=t(e,i[1]);if(2!=a.length)throw Error("malformed PKCS8 private key(code:004)");if("06"!=e.substr(a[0],2))throw Error("malformed PKCS8 private key(code:005)");if(n.algoid=r(e,a[0]),"06"==e.substr(a[1],2)&&(n.algparam=r(e,a[1])),"04"!=e.substr(i[2],2))throw Error("malformed PKCS8 private key(code:006)");return n.keyidx=ts.getVidx(e,i[2]),n},getKeyFromPlainPrivatePKCS8PEM:function(e){var t=tb(e,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(t)},getKeyFromPlainPrivatePKCS8Hex:function(e){var t,r=this.parsePlainPrivatePKCS8Hex(e);if("2a864886f70d010101"==r.algoid)t=new tt;else if("2a8648ce380401"==r.algoid)t=new d.crypto.DSA;else if("2a8648ce3d0201"==r.algoid)t=new d.crypto.ECDSA;else throw Error("unsupported private key algorithm");return t.readPKCS8PrvKeyHex(e),t},_getKeyFromPublicPKCS8Hex:function(e){var t,r=ts.getVbyList(e,0,[0,0],"06");if("2a864886f70d010101"===r)t=new tt;else if("2a8648ce380401"===r)t=new d.crypto.DSA;else if("2a8648ce3d0201"===r)t=new d.crypto.ECDSA;else throw Error("unsupported PKCS#8 public key hex");return t.readPKCS8PubKeyHex(e),t},parsePublicRawRSAKeyHex:function(e){var t=ts.getChildIdx,r=ts.getV,n={};if("30"!=e.substr(0,2))throw Error("malformed RSA key(code:001)");var i=t(e,0);if(2!=i.length)throw Error("malformed RSA key(code:002)");if("02"!=e.substr(i[0],2))throw Error("malformed RSA key(code:003)");if(n.n=r(e,i[0]),"02"!=e.substr(i[1],2))throw Error("malformed RSA key(code:004)");return n.e=r(e,i[1]),n},parsePublicPKCS8Hex:function(e){var t=ts.getChildIdx,r=ts.getV,n={};n.algparam=null;var i=t(e,0);if(2!=i.length)throw Error("outer DERSequence shall have 2 elements: "+i.length);var a=i[0];if("30"!=e.substr(a,2))throw Error("malformed PKCS8 public key(code:001)");var o=t(e,a);if(2!=o.length)throw Error("malformed PKCS8 public key(code:002)");if("06"!=e.substr(o[0],2))throw Error("malformed PKCS8 public key(code:003)");if(n.algoid=r(e,o[0]),"06"==e.substr(o[1],2)?n.algparam=r(e,o[1]):"30"==e.substr(o[1],2)&&(n.algparam={},n.algparam.p=ts.getVbyList(e,o[1],[0],"02"),n.algparam.q=ts.getVbyList(e,o[1],[1],"02"),n.algparam.g=ts.getVbyList(e,o[1],[2],"02")),"03"!=e.substr(i[1],2))throw Error("malformed PKCS8 public key(code:004)");return n.key=r(e,i[1]).substr(2),n}});function tM(e,t){for(var r="",n=t/4-e.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function tB(e){for(var t in d.crypto.Util.DIGESTINFOHEAD){var r=d.crypto.Util.DIGESTINFOHEAD[t],n=r.length;if(e.substring(0,n)==r)return[t,e.substring(n)]}return[]}function tH(e){var t,r=ts.getChildIdx,n=ts.getV,i=(ts.dump,ts.parse),a=ts.getTLV,o=ts.getVbyList,s=ts.getVbyListEx,u=ts.getTLVbyList,c=ts.getTLVbyListEx,l=ts.getIdxbyList,f=ts.getIdxbyListEx,p=ts.getVidx,h=ts.getInt,m=ts.oidname,g=ts.hextooidstr;try{t=d.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(e){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(null===this.hex||0!==this.version)return this.version;var e=u(this.hex,0,[0,0]);if("a0"!=e.substr(0,2))return this.version=1,this.foffset=-1,1;var t=h(u(e,0,[0]),0);if(t<0||21){var s=a(e,o[1]),u=this.getGeneralName(s);void 0!=u.uri&&(i.uri=u.uri)}if(o.length>2){var c=a(e,o[2]);"0101ff"==c&&(i.reqauth=!0),"010100"==c&&(i.reqauth=!1)}return i};var y=function(e){var t={};try{var r=e.seq[0].oid,n=d.asn1.x509.OID.name2oid(r);t.type=d.asn1.x509.OID.oid2atype(n);var i=e.seq[1];if(void 0!=i.utf8str)t.ds="utf8",t.value=i.utf8str.str;else if(void 0!=i.numstr)t.ds="num",t.value=i.numstr.str;else if(void 0!=i.telstr)t.ds="tel",t.value=i.telstr.str;else if(void 0!=i.prnstr)t.ds="prn",t.value=i.prnstr.str;else if(void 0!=i.ia5str)t.ds="ia5",t.value=i.ia5str.str;else if(void 0!=i.visstr)t.ds="vis",t.value=i.visstr.str;else if(void 0!=i.bmpstr)t.ds="bmp",t.value=i.bmpstr.str;else throw"error";return t}catch(e){throw new Erorr("improper ASN.1 parsed AttrTypeAndValue")}},b=function(e){try{return e.set.map(function(e){return y(e)})}catch(e){throw Error("improper ASN.1 parsed RDN: "+e)}},x=function(e){try{return e.seq.map(function(e){return b(e)})}catch(e){throw Error("improper ASN.1 parsed X500Name: "+e)}};this.getX500NameRule=function(e){for(var t=null,r=[],n=0;n0&&(t.ext=this.getExtParamArray()),t.sighex=this.getSignatureValueHex(),"object"==typeof e&&(!0==e.tbshex&&(t.tbshex=u(this.hex,0,[0])),!0==e.nodnarray&&(delete t.issuer.array,delete t.subject.array)),t},this.getExtParamArray=function(e){void 0==e&&-1!=f(this.hex,0,[0,"[3]"])&&(e=c(this.hex,0,[0,"[3]",0],"30"));for(var t=[],n=r(e,0),i=0;i2&&"04"===e.substr(b[1],2))(l=new s).readPKCS5PrvKeyHex(e);else throw Error("unsupported PKCS#1/5 hexadecimal key");return l}if("pkcs8prv"===r){var l=tN.getKeyFromPlainPrivatePKCS8Hex(e);return l}if("pkcs8pub"===r)return tN._getKeyFromPublicPKCS8Hex(e);if("x509pub"===r)return tH.getPublicKeyFromCertHex(e);if(-1!=e.indexOf("-END CERTIFICATE-",0)||-1!=e.indexOf("-END X509 CERTIFICATE-",0)||-1!=e.indexOf("-END TRUSTED CERTIFICATE-",0))return tH.getPublicKeyFromCertPEM(e);if(-1!=e.indexOf("-END PUBLIC KEY-")){var x=tb(e,"PUBLIC KEY");return tN._getKeyFromPublicPKCS8Hex(x)}if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var S=c(e,"RSA PRIVATE KEY");return tN.getKey(S,null,"pkcs5prv")}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var w=c(e,"DSA PRIVATE KEY"),A=a(w,0,[1],"02"),C=a(w,0,[2],"02"),P=a(w,0,[3],"02"),O=a(w,0,[4],"02"),_=a(w,0,[5],"02"),l=new u;return l.setPrivate(new E(A,16),new E(C,16),new E(P,16),new E(O,16),new E(_,16)),l}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var S=c(e,"EC PRIVATE KEY");return tN.getKey(S,null,"pkcs5prv")}if(-1!=e.indexOf("-END PRIVATE KEY-"))return tN.getKeyFromPlainPrivatePKCS8PEM(e);if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var k=tN.getDecryptedKeyHex(e,t),F=new tt;return F.readPKCS5PrvKeyHex(k),F}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var w=tN.getDecryptedKeyHex(e,t),l=a(w,0,[1],"04"),j=a(w,0,[2,0],"06"),R=a(w,0,[3,0],"03").substr(2),I="";if(void 0!==d.crypto.OID.oidhex2name[j])I=d.crypto.OID.oidhex2name[j];else throw Error("undefined OID(hex) in KJUR.crypto.OID: "+j);var f=new s({curve:I});return f.setPublicKeyHex(R),f.setPrivateKeyHex(l),f.isPublic=!1,f}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var w=tN.getDecryptedKeyHex(e,t),A=a(w,0,[1],"02"),C=a(w,0,[2],"02"),P=a(w,0,[3],"02"),O=a(w,0,[4],"02"),_=a(w,0,[5],"02"),l=new u;return l.setPrivate(new E(A,16),new E(C,16),new E(P,16),new E(O,16),new E(_,16)),l}if(-1!=e.indexOf("-END ENCRYPTED PRIVATE KEY-"))return tN.getKeyFromEncryptedPKCS8PEM(e,t);throw Error("not supported argument")},tN.generateKeypair=function(e,t){if("RSA"==e){var r=new tt;r.generate(t,"10001"),r.isPrivate=!0,r.isPublic=!0;var n=new tt,i=r.n.toString(16),a=r.e.toString(16);n.setPublic(i,a),n.isPrivate=!1,n.isPublic=!0;var o={};return o.prvKeyObj=r,o.pubKeyObj=n,o}if("EC"==e){var s=new d.crypto.ECDSA({curve:t}).generateKeyPairHex(),r=new d.crypto.ECDSA({curve:t});r.setPublicKeyHex(s.ecpubhex),r.setPrivateKeyHex(s.ecprvhex),r.isPrivate=!0,r.isPublic=!1;var n=new d.crypto.ECDSA({curve:t});n.setPublicKeyHex(s.ecpubhex),n.isPrivate=!1,n.isPublic=!0;var o={};return o.prvKeyObj=r,o.pubKeyObj=n,o}throw Error("unknown algorithm: "+e)},tN.getPEM=function(e,t,r,n,i,a){var o=d,s=o.asn1,u=s.DERObjectIdentifier,c=s.DERInteger,l=s.ASN1Util.newObject,f=s.x509.SubjectPublicKeyInfo,p=o.crypto,h=p.DSA,m=p.ECDSA;function g(e){return l({seq:[{int:0},{int:{bigint:e.n}},{int:e.e},{int:{bigint:e.d}},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.dmp1}},{int:{bigint:e.dmq1}},{int:{bigint:e.coeff}}]})}function y(e){return l({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a0",!0,{oid:{name:e.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]})}function x(e){return l({seq:[{int:0},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}},{int:{bigint:e.y}},{int:{bigint:e.x}}]})}if((void 0!==tt&&e instanceof tt||void 0!==h&&e instanceof h||void 0!==m&&e instanceof m)&&!0==e.isPublic&&(void 0===t||"PKCS8PUB"==t)){var S=new f(e),w=S.tohex();return ty(w,"PUBLIC KEY")}if("PKCS1PRV"==t&&void 0!==tt&&e instanceof tt&&(void 0===r||null==r)&&!0==e.isPrivate){var S=g(e),w=S.tohex();return ty(w,"RSA PRIVATE KEY")}if("PKCS1PRV"==t&&void 0!==m&&e instanceof m&&(void 0===r||null==r)&&!0==e.isPrivate){var E=new u({name:e.curveName}).tohex(),A=y(e).tohex();return""+(ty(E,"EC PARAMETERS")+ty(A,"EC PRIVATE KEY"))}if("PKCS1PRV"==t&&void 0!==h&&e instanceof h&&(void 0===r||null==r)&&!0==e.isPrivate){var S=x(e),w=S.tohex();return ty(w,"DSA PRIVATE KEY")}if("PKCS5PRV"==t&&void 0!==tt&&e instanceof tt&&void 0!==r&&null!=r&&!0==e.isPrivate){var S=g(e),w=S.tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",w,r,n,a)}if("PKCS5PRV"==t&&void 0!==m&&e instanceof m&&void 0!==r&&null!=r&&!0==e.isPrivate){var S=y(e),w=S.tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",w,r,n,a)}if("PKCS5PRV"==t&&void 0!==h&&e instanceof h&&void 0!==r&&null!=r&&!0==e.isPrivate){var S=x(e),w=S.tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",w,r,n,a)}var C=function(e,t){var r=P(e,t);return new l({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:r.pbkdf2Salt}},{int:r.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:r.encryptionSchemeIV}}]}]}]},{octstr:{hex:r.ciphertext}}]}).tohex()},P=function(e,t){var r=b.lib.WordArray.random(8),n=b.lib.WordArray.random(8),i=b.PBKDF2(t,r,{keySize:6,iterations:100}),a=b.enc.Hex.parse(e),o=b.TripleDES.encrypt(a,i,{iv:n})+"",s={};return s.ciphertext=o,s.pbkdf2Salt=b.enc.Hex.stringify(r),s.pbkdf2Iter=100,s.encryptionSchemeAlg="DES-EDE3-CBC",s.encryptionSchemeIV=b.enc.Hex.stringify(n),s};if("PKCS8PRV"==t&&void 0!=tt&&e instanceof tt&&!0==e.isPrivate){var O=g(e),_=O.tohex(),S=l({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:_}}]}),w=S.tohex();if(void 0===r||null==r)return ty(w,"PRIVATE KEY");var A=C(w,r);return ty(A,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==m&&e instanceof m&&!0==e.isPrivate){var k={seq:[{int:1},{octstr:{hex:e.prvKeyHex}}]};"string"==typeof e.pubKeyHex&&k.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]});var O=new l(k),_=O.tohex(),S=l({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:_}}]}),w=S.tohex();if(void 0===r||null==r)return ty(w,"PRIVATE KEY");var A=C(w,r);return ty(A,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==h&&e instanceof h&&!0==e.isPrivate){var O=new c({bigint:e.x}),_=O.tohex(),S=l({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:_}}]}),w=S.tohex();if(void 0===r||null==r)return ty(w,"PRIVATE KEY");var A=C(w,r);return ty(A,"ENCRYPTED PRIVATE KEY")}throw Error("unsupported object nor format")},tN.getKeyFromCSRPEM=function(e){var t=tb(e,"CERTIFICATE REQUEST");return tN.getKeyFromCSRHex(t)},tN.getKeyFromCSRHex=function(e){var t=tN.parseCSRHex(e);return tN.getKey(t.p8pubkeyhex,null,"pkcs8pub")},tN.parseCSRHex=function(e){var t=ts.getChildIdx,r=ts.getTLV,n={};if("30"!=e.substr(0,2))throw Error("malformed CSR(code:001)");var i=t(e,0);if(i.length<1)throw Error("malformed CSR(code:002)");if("30"!=e.substr(i[0],2))throw Error("malformed CSR(code:003)");var a=t(e,i[0]);if(a.length<3)throw Error("malformed CSR(code:004)");return n.p8pubkeyhex=r(e,a[2]),n},tN.getKeyID=function(e){"string"==typeof e&&-1!=e.indexOf("BEGIN ")&&(e=tN.getKey(e));var t=tb(tN.getPEM(e)),r=ts.getIdxbyList(t,0,[1]),n=ts.getV(t,r).substring(2);return d.crypto.Util.hashHex(n,"sha1")},tN.getJWK=function(e,t,r,n,i){var a,o,s={},u=d.crypto.Util.hashHex;if("string"==typeof e)a=tN.getKey(e),-1!=e.indexOf("CERTIFICATE")&&(o=tb(e));else if("object"==typeof e)e instanceof tH?(a=e.getPublicKey(),o=e.hex):a=e;else throw Error("unsupported keyinfo type");if(a instanceof tt&&a.isPrivate)s.kty="RSA",s.n=td(a.n.toString(16)),s.e=td(a.e.toString(16)),s.d=td(a.d.toString(16)),s.p=td(a.p.toString(16)),s.q=td(a.q.toString(16)),s.dp=td(a.dmp1.toString(16)),s.dq=td(a.dmq1.toString(16)),s.qi=td(a.coeff.toString(16));else if(a instanceof tt&&a.isPublic)s.kty="RSA",s.n=td(a.n.toString(16)),s.e=td(a.e.toString(16));else if(a instanceof d.crypto.ECDSA&&a.isPrivate){var c=a.getShortNISTPCurveName();if("P-256"!==c&&"P-384"!==c&&"P-521"!==c)throw Error("unsupported curve name for JWT: "+c);var l=a.getPublicKeyXYHex();s.kty="EC",s.crv=c,s.x=td(l.x),s.y=td(l.y),s.d=td(a.prvKeyHex)}else if(a instanceof d.crypto.ECDSA&&a.isPublic){var c=a.getShortNISTPCurveName();if("P-256"!==c&&"P-384"!==c&&"P-521"!==c)throw Error("unsupported curve name for JWT: "+c);var l=a.getPublicKeyXYHex();s.kty="EC",s.crv=c,s.x=td(l.x),s.y=td(l.y)}if(void 0==s.kty)throw Error("unsupported keyinfo");return a.isPrivate||!0==t||(s.kid=d.jws.JWS.getJWKthumbprint(s)),void 0!=o&&!0!=r&&(s.x5c=[S(o)]),void 0!=o&&!0!=n&&(s.x5t=tl(S(u(o,"sha1")))),void 0!=o&&!0!=i&&(s["x5t#S256"]=tl(S(u(o,"sha256")))),s},tN.getJWKFromKey=function(e){return tN.getJWK(e,!0,!0,!0,!0)},tt.getPosArrayOfChildrenFromHex=function(e){return ts.getChildIdx(e,0)},tt.getHexValueArrayOfChildrenFromHex=function(e){var t=ts.getV,r=tt.getPosArrayOfChildrenFromHex(e),n=t(e,r[0]),i=t(e,r[1]),a=t(e,r[2]),o=t(e,r[3]),s=t(e,r[4]),u=t(e,r[5]),c=t(e,r[6]),l=t(e,r[7]),f=t(e,r[8]),r=[];return r.push(n,i,a,o,s,u,c,l,f),r},tt.prototype.readPrivateKeyFromPEMString=function(e){var t=tb(e),r=tt.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},tt.prototype.readPKCS5PrvKeyHex=function(e){var t=tt.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},tt.prototype.readPKCS8PrvKeyHex=function(e){var t,r,n,i,a,o,s,u,c=ts.getVbyListEx;if(!1===ts.isASN1HEX(e))throw Error("not ASN.1 hex string");try{t=c(e,0,[2,0,1],"02"),r=c(e,0,[2,0,2],"02"),n=c(e,0,[2,0,3],"02"),i=c(e,0,[2,0,4],"02"),a=c(e,0,[2,0,5],"02"),o=c(e,0,[2,0,6],"02"),s=c(e,0,[2,0,7],"02"),u=c(e,0,[2,0,8],"02")}catch(e){throw Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(t,r,n,i,a,o,s,u)},tt.prototype.readPKCS5PubKeyHex=function(e){var t=ts.getV;if(!1===ts.isASN1HEX(e))throw Error("keyHex is not ASN.1 hex string");var r=ts.getChildIdx(e,0);if(2!==r.length||"02"!==e.substr(r[0],2)||"02"!==e.substr(r[1],2))throw Error("wrong hex for PKCS#5 public key");var n=t(e,r[0]),i=t(e,r[1]);this.setPublic(n,i)},tt.prototype.readPKCS8PubKeyHex=function(e){if(!1===ts.isASN1HEX(e))throw Error("not ASN.1 hex string");if("06092a864886f70d010101"!==ts.getTLVbyListEx(e,0,[0,0]))throw Error("not PKCS8 RSA public key");var t=ts.getTLVbyListEx(e,0,[1,0]);this.readPKCS5PubKeyHex(t)},tt.prototype.readCertPubKeyHex=function(e,t){var r,n;(r=new tH).readCertHex(e),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)},tt.prototype.sign=function(e,t){var r=d.crypto.Util.hashString(e,t);return this.signWithMessageHash(r,t)},tt.prototype.signWithMessageHash=function(e,t){var r=d.crypto.Util.getPaddedDigestInfoHex(e,t,this.n.bitLength()),n=e7(r,16);return tM(this.doPrivate(n).toString(16),this.n.bitLength())},tt.prototype.signPSS=function(e,t,r){var n,i=(n=tg(e),d.crypto.Util.hashHex(n,t));return void 0===r&&(r=-1),this.signWithMessageHashPSS(i,t,r)},tt.prototype.signWithMessageHashPSS=function(e,t,r){var n,i=tv(e),a=i.length,o=this.n.bitLength()-1,s=Math.ceil(o/8),u=function(e){return d.crypto.Util.hashHex(e,t)};if(-1===r||void 0===r)r=a;else if(-2===r)r=s-a-2;else if(r<-2)throw Error("invalid salt length");if(s0&&(c=Array(r),new e9().nextBytes(c),c=String.fromCharCode.apply(String,c));var l=tv(u(tg("\x00\x00\x00\x00\x00\x00\x00\x00"+i+c))),f=[];for(n=0;n>8*s-o&255),n=0;nn)return!1;var i=this.doPublic(r).toString(16);if(i.length+3!=n/4)return!1;var a=tB(i.replace(/^1f+00/,""));if(0==a.length)return!1;var o=a[0],s=a[1],u=d.crypto.Util.hashString(e,o);return s==u},tt.prototype.verifyWithMessageHash=function(e,t){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=e7(t,16);if(r.bitLength()>this.n.bitLength())return 0;var n=tB(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==e)},tt.prototype.verifyPSS=function(e,t,r,n){var i,a=(i=tg(e),d.crypto.Util.hashHex(i,r));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(a,t,r,n)},tt.prototype.verifyWithMessageHashPSS=function(e,t,r,n){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,a=new E(t,16),o=function(e){return d.crypto.Util.hashHex(e,r)},s=tv(e),u=s.length,c=this.n.bitLength()-1,l=Math.ceil(c/8);if(-1===n||void 0===n)n=u;else if(-2===n)n=l-u-2;else if(n<-2)throw Error("invalid salt length");if(l>8*l-c&255;if((p.charCodeAt(0)&m)!=0)throw Error("bits beyond keysize not zero");var g=tL(h,p.length,o),y=[];for(i=0;i0&&-1==(":"+r.join(":")+":").indexOf(":"+g+":"))throw"algorithm '"+g+"' not accepted in the list";if("none"!=g&&null===t)throw"key shall be specified to verify.";if("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&(t=tN.getKey(t)),("RS"==y||"PS"==y)&&!(t instanceof tt))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==y&&!(t instanceof s))throw"key shall be a ECDSA obj for ES* algs";var b=null;if(void 0===i.jwsalg2sigalg[m.alg])throw"unsupported alg name: "+g;if("none"==(b=i.jwsalg2sigalg[g]))throw"not supported";if("Hmac"==b.substr(0,4)){if(void 0===t)throw"hexadecimal key shall be specified for HMAC";var x=new u({alg:b,pass:t});return x.updateString(f),p==x.doFinal()}if(-1!=b.indexOf("withECDSA")){var S=null;try{S=s.concatSigToASN1Sig(p)}catch(e){return!1}var w=new c({alg:b});return w.init(t),w.updateString(f),w.verify(S)}var w=new c({alg:b});return w.init(t),w.updateString(f),w.verify(p)},d.jws.JWS.parse=function(e){var t,r,n,i=e.split("."),a={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return t=i[0],r=i[1],3==i.length&&(n=i[2]),a.headerObj=d.jws.JWS.readSafeJSONString(h(t)),a.payloadObj=d.jws.JWS.readSafeJSONString(h(r)),a.headerPP=JSON.stringify(a.headerObj,null," "),null==a.payloadObj?a.payloadPP=h(r):a.payloadPP=JSON.stringify(a.payloadObj,null," "),void 0!==n&&(a.sigHex=tp(n)),a},d.jws.JWS.verifyJWT=function(e,t,r){var n=d.jws,i=n.JWS,a=i.readSafeJSONString,o=i.inArray,s=i.includedArray;if(!tF(e))return!1;var u=e.split(".");if(3!=u.length)return!1;var c=u[0],l=u[1];tp(u[2]);var f=a(h(c)),p=a(h(l));if(void 0===f.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!o(f.alg,r.alg)||void 0!==p.iss&&"object"==typeof r.iss&&!o(p.iss,r.iss)||void 0!==p.sub&&"object"==typeof r.sub&&!o(p.sub,r.sub))return!1;if(void 0!==p.aud&&"object"==typeof r.aud){if("string"==typeof p.aud){if(!o(p.aud,r.aud))return!1}else if("object"==typeof p.aud&&!s(p.aud,r.aud))return!1}var m=n.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(m=r.verifyAt),(void 0===r.gracePeriod||"number"!=typeof r.gracePeriod)&&(r.gracePeriod=0),(void 0===p.exp||"number"!=typeof p.exp||!(p.exp+r.gracePeriodi&&this.aHeader.pop(),this.aSignature.length>i&&this.aSignature.pop(),"addSignature failed: "+e}},this.verifyAll=function(e){if(this.aHeader.length!==e.length||this.aSignature.length!==e.length)return!1;for(var t=0;t0)this.aHeader=e.headers;else throw"malformed header";if("string"==typeof e.payload)this.sPayload=e.payload;else throw"malformed signatures";if(e.signatures.length>0)this.aSignature=e.signatures;else throw"malformed signatures"}catch(e){throw"malformed JWS-JS JSON object: "+e}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return 0==this.aHeader.length?1:0}},d.crypto.ECDSA,d.crypto.DSA,d.crypto.Signature,d.crypto.MessageDigest,d.crypto.Mac,d.crypto.Cipher,t.KZ=tN,t.fs=d,d.crypto,d.asn1,d.jws,d.lang},48094:function(e){var t=Object.prototype.toString;e.exports=function(e){return!0===e||!1===e||!!e&&"object"==typeof e&&"[object Boolean]"==t.call(e)}},98423:function(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")(),o=Object.prototype,s=o.hasOwnProperty,u=o.toString,c=a.Symbol,l=c?c.toStringTag:void 0;e.exports=function(e){if(t=typeof e,null==e||"object"!=t&&"function"!=t)return!1;var t,r=null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?function(e){var t=s.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var i=u.call(e);return n&&(t?e[l]=r:delete e[l]),i}(e):u.call(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},23126:function(e){var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==t.call(e)}},25751:function(e){var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){var n;return"string"==typeof e||!r(e)&&!!(n=e)&&"object"==typeof n&&"[object String]"==t.call(e)}},35683:function(e,t,r){var n,i,a=1/0,o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u="\ud800-\udfff",c="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="['’]",h="["+d+"]",m="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",g="["+l+"]",y="[^"+u+d+"\\d+"+c+l+f+"]",b="(?:\ud83c[\udde6-\uddff]){2}",x="[\ud800-\udbff][\udc00-\udfff]",S="["+f+"]",w="(?:"+g+"|"+y+")",E="(?:"+p+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+p+"(?:D|LL|M|RE|S|T|VE))?",C="(?:"+m+"|\ud83c[\udffb-\udfff])?",P="[\\ufe0e\\ufe0f]?",O="(?:\\u200d(?:"+["[^"+u+"]",b,x].join("|")+")"+P+C+")*",_="(?:"+["["+c+"]",b,x].join("|")+")"+(P+C+O),k=RegExp(p,"g"),F=RegExp(m,"g"),j=RegExp([S+"?"+g+"+"+E+"(?="+[h,S,"$"].join("|")+")","(?:"+S+"|"+y+")+"+A+"(?="+[h,S+w,"$"].join("|")+")",S+"?"+w+"+"+E,S+"+"+A,"\\d+",_].join("|"),"g"),R=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,I="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,T="object"==typeof self&&self&&self.Object===Object&&self,D=I||T||Function("return this")(),N=(n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==n?void 0:n[e]}),M=Object.prototype.toString,L=D.Symbol,B=L?L.prototype:void 0,H=B?B.toString:void 0;function z(e){return null==e?"":function(e){if("string"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==M.call(t))return H?H.call(e):"";var t,r=e+"";return"0"==r&&1/e==-a?"-0":r}(e)}var $=(i=function(e,t,r){return e+(r?"-":"")+t.toLowerCase()},function(e){var t;return function(e,t,r,n){for(var i=-1,a=e?e.length:0;++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++nl))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,g=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++h-1&&e%1==0&&e-1}},54705:function(e,t,r){var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:function(e,t,r){var n=r(1989),i=r(38407),a=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},11285:function(e,t,r){var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:function(e,t,r){var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:function(e,t,r){var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:function(e,t,r){var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},42634:function(e){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},24523:function(e,t,r){var n=r(88306);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},94536:function(e,t,r){var n=r(10852)(Object,"create");e.exports=n},86916:function(e,t,r){var n=r(5569)(Object.keys,Object);e.exports=n},33498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},31167:function(e,t,r){e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,o=a&&a.exports===i&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;if(e)return e;return o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(r){return e(t(r))}}},45357:function(e,t,r){var n=r(96874),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=i(a.length-t,0),u=Array(s);++o0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},37465:function(e,t,r){var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:function(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:function(e){e.exports=function(e){return this.__data__.get(e)}},44758:function(e){e.exports=function(e){return this.__data__.has(e)}},34309:function(e,t,r){var n=r(38407),i=r(57071),a=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(e,t),this.size=r.size,this}},55514:function(e,t,r){var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(a,"$1"):r||e)}),t});e.exports=o},40327:function(e,t,r){var n=r(33448),i=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},80346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},75703:function(e){e.exports=function(e){return function(){return e}}},77813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},84486:function(e,t,r){var n=r(77412),i=r(89881),a=r(54290),o=r(1469);e.exports=function(e,t){return(o(e)?n:i)(e,a(t))}},27361:function(e,t,r){var n=r(97786);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},79095:function(e,t,r){var n=r(13),i=r(222);e.exports=function(e,t){return null!=e&&i(e,t,n)}},6557:function(e){e.exports=function(e){return e}},35694:function(e,t,r){var n=r(9454),i=r(37005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},98612:function(e,t,r){var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},29246:function(e,t,r){var n=r(98612),i=r(37005);e.exports=function(e){return i(e)&&n(e)}},51584:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==n(e)}},44144:function(e,t,r){e=r.nmd(e);var n=r(55639),i=r(95062),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a?n.Buffer:void 0,u=s?s.isBuffer:void 0;e.exports=u||i},23560:function(e,t,r){var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},81763:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},68630:function(e,t,r){var n=r(44239),i=r(85924),a=r(37005),o=Object.prototype,s=Function.prototype.toString,u=o.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==c}},47037:function(e,t,r){var n=r(44239),i=r(1469),a=r(37005);e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&"[object String]"==n(e)}},33448:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},36719:function(e,t,r){var n=r(38749),i=r(7518),a=r(31167),o=a&&a.isTypedArray,s=o?i(o):n;e.exports=s},3674:function(e,t,r){var n=r(14636),i=r(280),a=r(98612);e.exports=function(e){return a(e)?n(e):i(e)}},81704:function(e,t,r){var n=r(14636),i=r(10313),a=r(98612);e.exports=function(e){return a(e)?n(e,!0):i(e)}},66604:function(e,t,r){var n=r(89465),i=r(47816),a=r(11243);e.exports=function(e,t){var r={};return t=a(t,3),i(e,function(e,i,a){n(r,i,t(e,i,a))}),r}},88306:function(e,t,r){var n=r(83369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},82492:function(e,t,r){var n=r(42980),i=r(21463)(function(e,t,r){n(e,t,r)});e.exports=i},35937:function(e,t,r){var n=r(29932),i=r(11243),a=r(63012),o=r(46904);e.exports=function(e,t){if(null==e)return{};var r=n(o(e),function(e){return[e]});return t=i(t),a(e,r,function(e,r){return t(e,r[0])})}},39601:function(e,t,r){var n=r(40371),i=r(79152),a=r(15403),o=r(40327);e.exports=function(e){return a(e)?n(o(e)):i(e)}},54061:function(e,t,r){var n=r(62663),i=r(89881),a=r(11243),o=r(10107),s=r(1469);e.exports=function(e,t,r){var u=s(e)?n:o,c=arguments.length<3;return u(e,a(t,4),r,c,i)}},36968:function(e,t,r){var n=r(10611);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},70479:function(e){e.exports=function(){return[]}},95062:function(e){e.exports=function(){return!1}},30084:function(e,t,r){var n=r(29932),i=r(278),a=r(1469),o=r(33448),s=r(55514),u=r(40327),c=r(79833);e.exports=function(e){return a(e)?n(e,u):o(e)?[e]:i(s(c(e)))}},59881:function(e,t,r){var n=r(98363),i=r(81704);e.exports=function(e){return n(e,i(e))}},79833:function(e,t,r){var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},63947:function(e,t,r){var n,i;n=r(23126),i={"minor second":16/15,"major second":9/8,"minor third":1.2,"major third":4/3,"diminished fourth":Math.sqrt(2),"perfect fifth":1.5,"minor sixth":1.6,golden:1.61803398875,phi:1.61803398875,"major sixth":5/3,"minor seventh":16/9,"major seventh":15/8,octave:2,"major tenth":2.5,"major eleventh":8/3,"major twelfth":3,"double octave":4},e.exports=function(e,t){return null==e&&(e=0),null==t&&(t="golden"),Math.pow(n(t)?t:null!=i[t]?i[t]:i.golden,e)}},11752:function(e,t,r){e.exports=r(62156)},61165:function(e,t,r){"use strict";var n,i,a,o,s,u=r(50029),c=r(71383),l=r(87794),f=r.n(l),d=r(67294),p=r(69696),h=r(99603),m=r(71893),g=r(42894),y=r(59417),b=r(85330),x=r(35683),S=r.n(x),w=r(85893),E=(0,m.ZP)(p.ZP)(n||(n=(0,c.Z)(["\n display: flex;\n align-items: center;\n text-align: left !important;\n\n & .pg-modal-main {\n max-width: 700px;\n margin: auto;\n box-shadow: 5px 5px 10px black;\n }\n"]))),A=(0,m.ZP)(p.ZP.Header)(i||(i=(0,c.Z)(["\n font-size: 1.5em;\n padding: 0.75em;\n background: #38598a;\n color: #fff;\n & a {\n float: right;\n }\n"]))),C=(0,m.ZP)(h.G)(a||(a=(0,c.Z)(["\n margin-right: 5px;\n height: 30px;\n"]))),P=m.ZP.div(o||(o=(0,c.Z)(["\n color: #000;\n cursor: default;\n font-weight: 400;\n"]))),O=m.ZP.div(s||(s=(0,c.Z)(["\n margin-top: 20px;\n display: flex;\n justify-content: "," & button {\n min-width: 150px;\n margin-right: 20px;\n display: inline-block;\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n"])),function(e){return"center"===e.buttonAlign?"center;":"space-between;"});t.Z=function(e){var t,r,n=e.onConfirm,i=e.onClose,a=e.content,o=e.id,s=e.title,c=e.closable,l=e.icon,m=void 0===l?y.eHv:l,x=e.confirmText,_=e.showCancel,k=void 0===_||_,F=e.showConfirm,j=void 0===F||F,R=e.buttonStyle,I=e.buttonAlign,T=e.skipCloseOnConfirm,D=void 0!==T&&T,N=e.style,M=e.disableConfirm,L=(0,d.useState)(!1),B=L[0],H=L[1],z="bcSecondary",$="bcPrimary",U="confirm-delete-"+S()(s),V="cancel-"+S()(s);switch(void 0===R?"bcgov":R){case"bcgov":break;case"custom":z="secondary",$="primary";break;case"danger":z="secondary",$="danger"}var K=(t=(0,u.Z)(f().mark(function e(){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(H(!0),!n){e.next=4;break}return e.next=4,n();case 4:H(!1),D||(window.location.hash="#");case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),W=(r=(0,u.Z)(f().mark(function e(){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i&&i(),window.location.hash="#";case 2:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)});return(0,w.jsxs)(E,{id:o,children:[(0,w.jsxs)(A,{title:s,as:"div",children:[m&&(0,w.jsx)(C,{icon:m,title:"Information",size:"2x",style:{paddingRight:"10px"}}),s,c&&(0,w.jsx)(p.ZP.Close,{onClick:W,title:"exit",children:(0,w.jsx)(h.G,{icon:y.NBC,size:"lg"})})]}),(0,w.jsxs)(p.ZP.Content,{style:void 0===N?{}:N,children:[(0,w.jsx)(P,{children:a}),(k||j)&&(0,w.jsxs)(O,{buttonAlign:void 0===I?"default":I,children:[k&&(0,w.jsx)(b.zx,{variant:z,onClick:W,type:"button","data-testid":V,children:"Cancel"}),j&&(0,w.jsx)(b.zx,{"data-testid":U,onClick:K,variant:$,type:"button",className:"text-center",disabled:void 0!==M&&M,children:B?(0,w.jsx)(g.rj,{color:"#FFF",height:18,width:50,wrapperClass:"d-block",visible:B}):void 0===x?"Confirm":x})]})]})]})}},30233:function(e,t,r){"use strict";r.d(t,{V:function(){return j}});var n,i,a,o,s=r(50029),u=r(59499),c=r(71383),l=r(87794),f=r.n(l),d=r(67294),p=r(69696),h=r(99603),m=r(34798),g=r.n(m),y=r(71893),b=r(42894),x=r(59417),S=r(85330),w=r(35683),E=r.n(w),A=r(85893);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function P(e){for(var t=1;t0&&(n=I(r.width)/o||1),a>0&&(i=I(r.height)/a||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function D(e){var t=T(e),r=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-r)&&(r=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function N(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&F(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function M(e){return e?(e.nodeName||"").toLowerCase():null}function L(e){return O(e).getComputedStyle(e)}function B(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function H(e){return"html"===M(e)?e:e.assignedSlot||e.parentNode||(F(e)?e.host:null)||B(e)}function z(e){return k(e)&&"fixed"!==L(e).position?e.offsetParent:null}function $(e){for(var t=O(e),r=z(e);r&&["table","td","th"].indexOf(M(r))>=0&&"static"===L(r).position;)r=z(r);return r&&("html"===M(r)||"body"===M(r)&&"static"===L(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&k(e)&&"fixed"===L(e).position)return null;var r=H(e);for(F(r)&&(r=r.host);k(r)&&0>["html","body"].indexOf(M(r));){var n=L(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function V(e,t,r){return j(e,R(t,r))}function K(){return{top:0,right:0,bottom:0,left:0}}function W(e){return Object.assign({},K(),e)}function q(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}var Z="bottom",G="right",Y="left",J="auto",X=["top",Z,G,Y],Q="start",ee="viewport",et="popper",er=X.reduce(function(e,t){return e.concat([t+"-"+Q,t+"-end"])},[]),en=[].concat(X,[J]).reduce(function(e,t){return e.concat([t,t+"-"+Q,t+"-end"])},[]),ei=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ea(e){return e.split("-")[1]}var eo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function es(e){var t,r,n,i,a,o,s=e.popper,u=e.popperRect,c=e.placement,l=e.variation,f=e.offsets,d=e.position,p=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,g=e.isFixed,y=f.x,b=void 0===y?0:y,x=f.y,S=void 0===x?0:x,w="function"==typeof m?m({x:b,y:S}):{x:b,y:S};b=w.x,S=w.y;var E=f.hasOwnProperty("x"),A=f.hasOwnProperty("y"),C=Y,P="top",_=window;if(h){var k=$(s),F="clientHeight",j="clientWidth";k===O(s)&&"static"!==L(k=B(s)).position&&"absolute"===d&&(F="scrollHeight",j="scrollWidth"),("top"===c||(c===Y||c===G)&&"end"===l)&&(P=Z,S-=(g&&k===_&&_.visualViewport?_.visualViewport.height:k[F])-u.height,S*=p?1:-1),(c===Y||("top"===c||c===Z)&&"end"===l)&&(C=G,b-=(g&&k===_&&_.visualViewport?_.visualViewport.width:k[j])-u.width,b*=p?1:-1)}var R=Object.assign({position:d},h&&eo),T=!0===m?(r=(t={x:b,y:S}).x,n=t.y,{x:I(r*(i=window.devicePixelRatio||1))/i||0,y:I(n*i)/i||0}):{x:b,y:S};return(b=T.x,S=T.y,p)?Object.assign({},R,((o={})[P]=A?"0":"",o[C]=E?"0":"",o.transform=1>=(_.devicePixelRatio||1)?"translate("+b+"px, "+S+"px)":"translate3d("+b+"px, "+S+"px, 0)",o)):Object.assign({},R,((a={})[P]=A?S+"px":"",a[C]=E?b+"px":"",a.transform="",a))}var eu={passive:!0},ec={left:"right",right:"left",bottom:"top",top:"bottom"};function el(e){return e.replace(/left|right|bottom|top/g,function(e){return ec[e]})}var ef={start:"end",end:"start"};function ed(e){return e.replace(/start|end/g,function(e){return ef[e]})}function ep(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function eh(e){return T(B(e)).left+ep(e).scrollLeft}function em(e){var t=L(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ev(e,t){void 0===t&&(t=[]);var r,n=function e(t){return["html","body","#document"].indexOf(M(t))>=0?t.ownerDocument.body:k(t)&&em(t)?t:e(H(t))}(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),a=O(n),o=i?[a].concat(a.visualViewport||[],em(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(ev(H(o)))}function eg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ey(e,t){var r,n,i,a,o,s,u,c,l,f,d,p,h,m,g,y,b;return t===ee?eg((r=O(e),n=B(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,u=0,i&&(a=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,u=i.offsetTop)),{width:a,height:o,x:s+eh(e),y:u})):_(t)?((c=T(t)).top=c.top+t.clientTop,c.left=c.left+t.clientLeft,c.bottom=c.top+t.clientHeight,c.right=c.left+t.clientWidth,c.width=t.clientWidth,c.height=t.clientHeight,c.x=c.left,c.y=c.top,c):eg((l=B(e),d=B(l),p=ep(l),h=null==(f=l.ownerDocument)?void 0:f.body,m=j(d.scrollWidth,d.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),g=j(d.scrollHeight,d.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),y=-p.scrollLeft+eh(l),b=-p.scrollTop,"rtl"===L(h||d).direction&&(y+=j(d.clientWidth,h?h.clientWidth:0)-m),{width:m,height:g,x:y,y:b}))}function eb(e){var t,r=e.reference,n=e.element,i=e.placement,a=i?P(i):null,o=i?ea(i):null,s=r.x+r.width/2-n.width/2,u=r.y+r.height/2-n.height/2;switch(a){case"top":t={x:s,y:r.y-n.height};break;case Z:t={x:s,y:r.y+r.height};break;case G:t={x:r.x+r.width,y:u};break;case Y:t={x:r.x-n.width,y:u};break;default:t={x:r.x,y:r.y}}var c=a?U(a):null;if(null!=c){var l="y"===c?"height":"width";switch(o){case Q:t[c]=t[c]-(r[l]/2-n[l]/2);break;case"end":t[c]=t[c]+(r[l]/2-n[l]/2)}}return t}function ex(e,t){void 0===t&&(t={});var r,n,i,a,o,s,u,c=t,l=c.placement,f=void 0===l?e.placement:l,d=c.boundary,p=c.rootBoundary,h=c.elementContext,m=void 0===h?et:h,g=c.altBoundary,y=c.padding,b=void 0===y?0:y,x=W("number"!=typeof b?b:q(b,X)),S=e.rects.popper,w=e.elements[void 0!==g&&g?m===et?"reference":et:m],E=(r=_(w)?w:w.contextElement||B(e.elements.popper),s=(o=[].concat("clippingParents"===(n=void 0===d?"clippingParents":d)?(i=ev(H(r)),_(a=["absolute","fixed"].indexOf(L(r).position)>=0&&k(r)?$(r):r)?i.filter(function(e){return _(e)&&N(e,a)&&"body"!==M(e)}):[]):[].concat(n),[void 0===p?ee:p]))[0],(u=o.reduce(function(e,t){var n=ey(r,t);return e.top=j(n.top,e.top),e.right=R(n.right,e.right),e.bottom=R(n.bottom,e.bottom),e.left=j(n.left,e.left),e},ey(r,s))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),A=T(e.elements.reference),C=eb({reference:A,element:S,strategy:"absolute",placement:f}),P=eg(Object.assign({},S,C)),O=m===et?P:A,F={top:E.top-O.top+x.top,bottom:O.bottom-E.bottom+x.bottom,left:E.left-O.left+x.left,right:O.right-E.right+x.right},I=e.modifiersData.offset;if(m===et&&I){var D=I[f];Object.keys(F).forEach(function(e){var t=[G,Z].indexOf(e)>=0?1:-1,r=["top",Z].indexOf(e)>=0?"y":"x";F[e]+=D[r]*t})}return F}function eS(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ew(e){return["top",G,Z,Y].some(function(t){return e[t]>=0})}var eE={placement:"bottom",modifiers:[],strategy:"absolute"};function eA(){for(var e=arguments.length,t=Array(e),r=0;r=0?-1:1,u=(s="function"==typeof a?a(Object.assign({},n,{placement:r})):a)[0],c=s[1],u=u||0,c=(c||0)*o,[Y,G].indexOf(i)>=0?{x:c,y:u}:{x:u,y:c}),e},{}),s=o[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=void 0===i||i,o=r.altAxis,s=void 0===o||o,u=r.fallbackPlacements,c=r.padding,l=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,h=void 0===p||p,m=r.allowedAutoPlacements,g=t.options.placement,y=P(g),b=[g].concat(u||(y!==g&&h?function(e){if(P(e)===J)return[];var t=el(e);return[ed(e),t,ed(t)]}(g):[el(g)])).reduce(function(e,r){var n,i,a,o,s,u,d,p,g,y,b,x;return e.concat(P(r)===J?(i=(n={placement:r,boundary:l,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:m}).placement,a=n.boundary,o=n.rootBoundary,s=n.padding,u=n.flipVariations,p=void 0===(d=n.allowedAutoPlacements)?en:d,0===(b=(y=(g=ea(i))?u?er:er.filter(function(e){return ea(e)===g}):X).filter(function(e){return p.indexOf(e)>=0})).length&&(b=y),Object.keys(x=b.reduce(function(e,r){return e[r]=ex(t,{placement:r,boundary:a,rootBoundary:o,padding:s})[P(r)],e},{})).sort(function(e,t){return x[e]-x[t]})):r)},[]),x=t.rects.reference,S=t.rects.popper,w=new Map,E=!0,A=b[0],C=0;C=0,j=F?"width":"height",R=ex(t,{placement:O,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),I=F?k?G:Y:k?Z:"top";x[j]>S[j]&&(I=el(I));var T=el(I),D=[];if(a&&D.push(R[_]<=0),s&&D.push(R[I]<=0,R[T]<=0),D.every(function(e){return e})){A=O,E=!1;break}w.set(O,D)}if(E)for(var N=h?3:1,M=function(e){var t=b.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},L=N;L>0&&"break"!==M(L);L--);t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=r.altAxis,o=r.boundary,s=r.rootBoundary,u=r.altBoundary,c=r.padding,l=r.tether,f=void 0===l||l,d=r.tetherOffset,p=void 0===d?0:d,h=ex(t,{boundary:o,rootBoundary:s,padding:c,altBoundary:u}),m=P(t.placement),g=ea(t.placement),y=!g,b=U(m),x="x"===b?"y":"x",S=t.modifiersData.popperOffsets,w=t.rects.reference,E=t.rects.popper,A="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,C="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(S){if(void 0===i||i){var k,F="y"===b?"top":Y,I="y"===b?Z:G,T="y"===b?"height":"width",N=S[b],M=N+h[F],L=N-h[I],B=f?-E[T]/2:0,H=g===Q?w[T]:E[T],z=g===Q?-E[T]:-w[T],W=t.elements.arrow,q=f&&W?D(W):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:K(),X=J[F],ee=J[I],et=V(0,w[T],q[T]),er=y?w[T]/2-B-et-X-C.mainAxis:H-et-X-C.mainAxis,en=y?-w[T]/2+B+et+ee+C.mainAxis:z+et+ee+C.mainAxis,ei=t.elements.arrow&&$(t.elements.arrow),eo=ei?"y"===b?ei.clientTop||0:ei.clientLeft||0:0,es=null!=(k=null==O?void 0:O[b])?k:0,eu=V(f?R(M,N+er-es-eo):M,N,f?j(L,N+en-es):L);S[b]=eu,_[b]=eu-N}if(void 0!==a&&a){var ec,el,ef=S[x],ed="y"===x?"height":"width",ep=ef+h["x"===b?"top":Y],eh=ef-h["x"===b?Z:G],em=-1!==["top",Y].indexOf(m),ev=null!=(ec=null==O?void 0:O[x])?ec:0,eg=em?ep:ef-w[ed]-E[ed]-ev+C.altAxis,ey=em?ef+w[ed]+E[ed]-ev-C.altAxis:eh,eb=f&&em?(el=V(eg,ef,ey))>ey?ey:el:V(f?eg:ep,ef,f?ey:eh);S[x]=eb,_[x]=eb-ef}t.modifiersData[n]=_}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r,n=e.state,i=e.name,a=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,u=P(n.placement),c=U(u),l=[Y,G].indexOf(u)>=0?"height":"width";if(o&&s){var f=W("number"!=typeof(t="function"==typeof(t=a.padding)?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:q(t,X)),d=D(o),p=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],h=s[c]-n.rects.reference[c],m=$(o),g=m?"y"===c?m.clientHeight||0:m.clientWidth||0:0,y=f["y"===c?"top":Y],b=g-d[l]-f["y"===c?Z:G],x=g/2-d[l]/2+(p/2-h/2),S=V(y,x,b);n.modifiersData[i]=((r={})[c]=S,r.centerOffset=S-x,r)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&N(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:i,s=void 0===(o=n.defaultOptions)?eE:o,function(e,t,r){void 0===r&&(r=s);var n,i={placement:"bottom",orderedModifiers:[],options:Object.assign({},eE,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],u=!1,c={state:i,setOptions:function(r){var n,u,f,d,p,h="function"==typeof r?r(i.options):r;l(),i.options=Object.assign({},s,i.options,h),i.scrollParents={reference:_(e)?ev(e):e.contextElement?ev(e.contextElement):[],popper:ev(t)};var m=(u=Object.keys(n=[].concat(a,i.options.modifiers).reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{})).map(function(e){return n[e]}),f=new Map,d=new Set,p=[],u.forEach(function(e){f.set(e.name,e)}),u.forEach(function(e){d.has(e.name)||function e(t){d.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!d.has(t)){var r=f.get(t);r&&e(r)}}),p.push(t)}(e)}),ei.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return i.orderedModifiers=m.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=e.effect;if("function"==typeof n){var a=n({state:i,name:t,instance:c,options:void 0===r?{}:r});o.push(a||function(){})}}),c.update()},forceUpdate:function(){if(!u){var e,t,r,n,a,o,s,l,f,d,p,h,m=i.elements,g=m.reference,y=m.popper;if(eA(g,y)){i.rects={reference:(t=$(y),r="fixed"===i.options.strategy,n=k(t),l=k(t)&&(o=I((a=t.getBoundingClientRect()).width)/t.offsetWidth||1,s=I(a.height)/t.offsetHeight||1,1!==o||1!==s),f=B(t),d=T(g,l),p={scrollLeft:0,scrollTop:0},h={x:0,y:0},(n||!n&&!r)&&(("body"!==M(t)||em(f))&&(p=(e=t)!==O(e)&&k(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:ep(e)),k(t)?(h=T(t,!0),h.x+=t.clientLeft,h.y+=t.clientTop):f&&(h.x=eh(f))),{x:d.left+p.scrollLeft-h.x,y:d.top+p.scrollTop-h.y,width:d.width,height:d.height}),popper:D(y)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var b=0;bvoid 0},e_={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:r}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==r.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:r,reference:n}=e.elements,i=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===i&&"setAttribute"in n){let e=n.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(r.id))return;n.setAttribute("aria-describedby",e?`${e},${r.id}`:r.id)}}},ek=[];var eF=function(e,t,r={}){let{enabled:n=!0,placement:i="bottom",strategy:a="absolute",modifiers:o=ek}=r,s=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(r,eP),u=(0,l.useRef)(o),c=(0,l.useRef)(),f=(0,l.useCallback)(()=>{var e;null==(e=c.current)||e.update()},[]),d=(0,l.useCallback)(()=>{var e;null==(e=c.current)||e.forceUpdate()},[]),[p,h]=C((0,l.useState)({placement:i,update:f,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),m=(0,l.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},r={};Object.keys(e.elements).forEach(n=>{t[n]=e.styles[n],r[n]=e.attributes[n]}),h({state:e,styles:t,attributes:r,update:f,forceUpdate:d,placement:e.placement})}}),[f,d,h]),g=(0,l.useMemo)(()=>(A(u.current,o)||(u.current=o),u.current),[o]);return(0,l.useEffect)(()=>{c.current&&n&&c.current.setOptions({placement:i,strategy:a,modifiers:[...g,m,eO]})},[a,i,m,n,g]),(0,l.useEffect)(()=>{if(n&&null!=e&&null!=t)return c.current=eC(e,t,Object.assign({},s,{placement:i,strategy:a,modifiers:[...g,e_,m]})),()=>{null!=c.current&&(c.current.destroy(),c.current=void 0,h(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[n,e,t]),p},ej=!!("undefined"!=typeof window&&window.document&&window.document.createElement),eR=!1,eI=!1;try{var eT={get passive(){return eR=!0},get once(){return eI=eR=!0}};ej&&(window.addEventListener("test",eT,eT),window.removeEventListener("test",eT,!0))}catch(e){}var eD=function(e,t,r,n){if(n&&"boolean"!=typeof n&&!eI){var i=n.once,a=n.capture,o=r;!eI&&i&&(o=r.__once||function e(n){this.removeEventListener(t,e,a),r.call(this,n)},r.__once=o),e.addEventListener(t,o,eR?n:a)}e.addEventListener(t,r,n)},eN=function(e,t,r,n){var i=n&&"boolean"!=typeof n?n.capture:n;e.removeEventListener(t,r,i),r.__once&&e.removeEventListener(t,r.__once,i)},eM=function(e,t,r,n){return eD(e,t,r,n),function(){eN(e,t,r,n)}};function eL(e){return e&&e.ownerDocument||document}var eB=r(78146);let eH=()=>{},ez=e=>e&&("current"in e?e.current:e),e$={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};var eU=function(e,t=eH,{disabled:r,clickTrigger:n="click"}={}){let i=(0,l.useRef)(!1),a=(0,l.useRef)(!1),o=(0,l.useCallback)(t=>{let r=ez(e);h()(!!r,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!r||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!f(r,t.target)||a.current,a.current=!1},[e]),s=(0,eB.Z)(t=>{let r=ez(e);r&&f(r,t.target)&&(a.current=!0)}),u=(0,eB.Z)(e=>{i.current||t(e)});(0,l.useEffect)(()=>{if(r||null==e)return;let t=eL(ez(e)),i=(t.defaultView||window).event,a=null;e$[n]&&(a=eM(t,e$[n],s,!0));let c=eM(t,n,o,!0),l=eM(t,n,e=>{if(e===i){i=void 0;return}u(e)}),f=[];return"ontouchstart"in t.documentElement&&(f=[].slice.call(t.body.children).map(e=>eM(e,"mousemove",eH))),()=>{null==a||a(),c(),l(),f.forEach(e=>e())}},[e,r,n,o,s,u])};let eV=()=>{};var eK=function(e,t,{disabled:r,clickTrigger:n}={}){let i=t||eV;eU(e,i,{disabled:r,clickTrigger:n});let a=(0,eB.Z)(e=>{27===e.keyCode&&i(e)});(0,l.useEffect)(()=>{if(r||null==e)return;let t=eL(ez(e)),n=(t.defaultView||window).event,i=eM(t,"keyup",e=>{if(e===n){n=void 0;return}a(e)});return()=>{i()}},[e,r,a])};let eW=(0,l.createContext)(ej?window:void 0);eW.Provider;let eq=(e,t)=>ej?null==e?(t||eL()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function eZ(e,t){let r=(0,l.useContext)(eW),[n,i]=(0,l.useState)(()=>eq(e,null==r?void 0:r.document));if(!n){let t=eq(e);t&&i(t)}return(0,l.useEffect)(()=>{t&&n&&t(n)},[t,n]),(0,l.useEffect)(()=>{let t=eq(e);t!==n&&i(t)},[e,n]),n}var eG=r(85893);let eY=l.forwardRef((e,t)=>{let{flip:r,offset:n,placement:i,containerPadding:a,popperConfig:o={},transition:s}=e,[u,c]=(0,S.Z)(),[f,d]=(0,S.Z)(),p=g(c,t),h=eZ(e.container),m=eZ(e.target),[y,b]=(0,l.useState)(!e.show),w=eF(m,u,function({enabled:e,enableEvents:t,placement:r,flip:n,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:u={}}){var c,l,f,d;let p=function(e){let t={};return Array.isArray(e)?(null==e||e.forEach(e=>{t[e.name]=e}),t):e||t}(u.modifiers);return Object.assign({},u,{placement:r,enabled:e,strategy:a?"fixed":u.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},p,{eventListeners:{enabled:t},preventOverflow:Object.assign({},p.preventOverflow,{options:o?Object.assign({padding:o},null==(c=p.preventOverflow)?void 0:c.options):null==(l=p.preventOverflow)?void 0:l.options}),offset:{options:Object.assign({offset:i},null==(f=p.offset)?void 0:f.options)},arrow:Object.assign({},p.arrow,{enabled:!!s,options:Object.assign({},null==(d=p.arrow)?void 0:d.options,{element:s})}),flip:Object.assign({enabled:!!n},p.flip)}))})}({placement:i,enableEvents:!!e.show,containerPadding:a||5,flip:r,offset:n,arrowElement:f,popperConfig:o}));e.show?y&&b(!1):e.transition||y||b(!0);let E=(...t)=>{b(!0),e.onExited&&e.onExited(...t)},A=e.show||s&&!y;if(eK(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!A)return null;let C=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:p}),{popper:w,placement:i,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:d})});if(s){let{onExit:t,onExiting:r,onEnter:n,onEntering:i,onEntered:a}=e;C=(0,eG.jsx)(s,{in:e.show,appear:!0,onExit:t,onExiting:r,onExited:E,onEnter:n,onEntering:i,onEntered:a,children:C})}return h?x.createPortal(C,h):null});eY.displayName="Overlay";var eJ=r(99585),eX=r(76792),eQ=/-(.)/g;let e0=e=>e[0].toUpperCase()+e.replace(eQ,function(e,t){return t.toUpperCase()}).slice(1);function e1(e,{displayName:t=e0(e),Component:r,defaultProps:n}={}){let i=l.forwardRef(({className:t,bsPrefix:n,as:i=r||"div",...a},o)=>{let s=(0,eX.vE)(n,e);return(0,eG.jsx)(i,{ref:o,className:b()(t,s),...a})});return i.defaultProps=n,i.displayName=t,i}var e2=e1("popover-header"),e4=e1("popover-body");let e3=l.forwardRef(({bsPrefix:e,placement:t,className:r,style:n,children:i,body:a,arrowProps:o,popper:s,show:u,...c},l)=>{let f;let d=(0,eX.vE)(e,"popover"),p=(0,eX.SC)(),[h]=(null==t?void 0:t.split("-"))||[],m=(f=h,"left"===h?f=p?"end":"start":"right"===h&&(f=p?"start":"end"),f);return(0,eG.jsxs)("div",{ref:l,role:"tooltip",style:n,"x-placement":h,className:b()(r,d,h&&`bs-popover-${m}`),...c,children:[(0,eG.jsx)("div",{className:"popover-arrow",...o}),a?(0,eG.jsx)(e4,{children:i}):i]})});e3.defaultProps={placement:"right"};var e6=Object.assign(e3,{Header:e2,Body:e4,POPPER_OFFSET:[0,8]});function e5(e,t){return(e5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var e8={disabled:!1},e9=l.createContext(null),e7="unmounted",te="exited",tt="entering",tr="entered",tn="exiting",ti=function(e){function t(t,r){n=e.call(this,t,r)||this;var n,i,a=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?a?(i=te,n.appearStatus=tt):i=tr:i=t.unmountOnExit||t.mountOnEnter?e7:te,n.state={status:i},n.nextCallback=null,n}(r=t).prototype=Object.create(e.prototype),r.prototype.constructor=r,e5(r,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===e7?{status:te}:null};var r,n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==tt&&r!==tr&&(t=tt):(r===tt||r===tr)&&(t=tn)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===tt){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:x.findDOMNode(this);r&&r.scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===te&&this.setState({status:e7})},n.performEnter=function(e){var t=this,r=this.props.enter,n=this.context?this.context.isMounting:e,i=this.props.nodeRef?[n]:[x.findDOMNode(this),n],a=i[0],o=i[1],s=this.getTimeouts(),u=n?s.appear:s.enter;if(!e&&!r||e8.disabled){this.safeSetState({status:tr},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:tt},function(){t.props.onEntering(a,o),t.onTransitionEnd(u,function(){t.safeSetState({status:tr},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:x.findDOMNode(this);if(!t||e8.disabled){this.safeSetState({status:te},function(){e.props.onExited(n)});return}this.props.onExit(n),this.safeSetState({status:tn},function(){e.props.onExiting(n),e.onTransitionEnd(r.exit,function(){e.safeSetState({status:te},function(){e.props.onExited(n)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:x.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(!r||n){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===e7)return null;var t=this.props,r=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l.createElement(e9.Provider,{value:null},"function"==typeof r?r(e,n):l.cloneElement(l.Children.only(r),n))},t}(l.Component);function ta(){}ti.contextType=e9,ti.propTypes={},ti.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ta,onEntering:ta,onEntered:ta,onExit:ta,onExiting:ta,onExited:ta},ti.UNMOUNTED=e7,ti.EXITED=te,ti.ENTERING=tt,ti.ENTERED=tr,ti.EXITING=tn;var to=/([A-Z])/g,ts=/^ms-/;function tu(e){return e.replace(to,"-$1").toLowerCase().replace(ts,"-ms-")}var tc=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,tl=function(e,t){var r,n="",i="";if("string"==typeof t)return e.style.getPropertyValue(tu(t))||((r=eL(e))&&r.defaultView||window).getComputedStyle(e,void 0).getPropertyValue(tu(t));Object.keys(t).forEach(function(r){var a=t[r];a||0===a?r&&tc.test(r)?i+=r+"("+a+") ":n+=tu(r)+": "+a+";":e.style.removeProperty(tu(r))}),i&&(n+="transform: "+i+";"),e.style.cssText+=";"+n};function tf(e,t){let r=tl(e,t)||"",n=-1===r.indexOf("ms")?1e3:1;return parseFloat(r)*n}function td(e,t){var r,n,i,a,o,s,u,c,l,f,d,p;let h=tf(e,"transitionDuration"),m=tf(e,"transitionDelay"),g=(r=e,n=r=>{r.target===e&&(g(),t(r))},null==(i=h+m)&&(s=-1===(o=tl(r,"transitionDuration")||"").indexOf("ms")?1e3:1,i=parseFloat(o)*s||0),d=(c=!1,l=setTimeout(function(){c||function(e,t,r,n){if(void 0===r&&(r=!1),void 0===n&&(n=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,r,n),e.dispatchEvent(i)}}(r,"transitionend",!0)},i+5),f=eM(r,"transitionend",function(){c=!0},{once:!0}),function(){clearTimeout(l),f()}),p=eM(r,"transitionend",n),function(){d(),p()})}function tp(e){return e&&"setState"in e?x.findDOMNode(e):null!=e?e:null}let th=l.forwardRef(({onEnter:e,onEntering:t,onEntered:r,onExit:n,onExiting:i,onExited:a,addEndListener:o,children:s,childRef:u,...c},f)=>{let d=(0,l.useRef)(null),p=g(d,u),h=e=>{p(tp(e))},m=e=>t=>{e&&d.current&&e(d.current,t)},y=(0,l.useCallback)(m(e),[e]),b=(0,l.useCallback)(m(t),[t]),x=(0,l.useCallback)(m(r),[r]),S=(0,l.useCallback)(m(n),[n]),w=(0,l.useCallback)(m(i),[i]),E=(0,l.useCallback)(m(a),[a]),A=(0,l.useCallback)(m(o),[o]);return(0,eG.jsx)(ti,{ref:f,...c,onEnter:y,onEntered:x,onEntering:b,onExit:S,onExited:E,onExiting:w,addEndListener:A,nodeRef:d,children:"function"==typeof s?(e,t)=>s(e,{...t,ref:h}):l.cloneElement(s,{ref:h})})}),tm={[tt]:"show",[tr]:"show"},tv=l.forwardRef(({className:e,children:t,transitionClasses:r={},...n},i)=>{let a=(0,l.useCallback)((e,t)=>{e.offsetHeight,null==n.onEnter||n.onEnter(e,t)},[n]);return(0,eG.jsx)(th,{ref:i,addEndListener:td,...n,onEnter:a,childRef:t.ref,children:(n,i)=>l.cloneElement(t,{...i,className:b()("fade",e,t.props.className,tm[n],r[n])})})});tv.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},tv.displayName="Fade";let tg=l.forwardRef(({children:e,transition:t,popperConfig:r={},...n},i)=>{let a=(0,l.useRef)({}),[o,s]=(0,S.Z)(),[u,c]=function(e){let t=(0,l.useRef)(null),r=(0,eX.vE)(void 0,"popover"),n=(0,l.useMemo)(()=>({name:"offset",options:{offset:()=>{var n;return t.current&&((n=t.current).classList?!!r&&n.classList.contains(r):-1!==(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+r+" "))?e||e6.POPPER_OFFSET:e||[0,0]}}}),[e,r]);return[t,[n]]}(n.offset),f=g(i,u),d=!0===t?tv:t||void 0,p=(0,eB.Z)(e=>{s(e),null==r||null==r.onFirstUpdate||r.onFirstUpdate(e)});return(0,eJ.Z)(()=>{o&&(null==a.current.scheduleUpdate||a.current.scheduleUpdate())},[o]),(0,eG.jsx)(eY,{...n,ref:f,popperConfig:{...r,modifiers:c.concat(r.modifiers||[]),onFirstUpdate:p},transition:d,children:(r,{arrowProps:n,popper:i,show:o})=>{var s,u;!function(e,t){let{ref:r}=e,{ref:n}=t;e.ref=r.__wrapped||(r.__wrapped=e=>r(tp(e))),t.ref=n.__wrapped||(n.__wrapped=e=>n(tp(e)))}(r,n);let c=null==i?void 0:i.placement,f=Object.assign(a.current,{state:null==i?void 0:i.state,scheduleUpdate:null==i?void 0:i.update,placement:c,outOfBoundaries:(null==i?void 0:null==(s=i.state)?void 0:null==(u=s.modifiersData.hide)?void 0:u.isReferenceHidden)||!1});return"function"==typeof e?e({...r,placement:c,show:o,...!t&&o&&{className:"show"},popper:f,arrowProps:n}):l.cloneElement(e,{...r,placement:c,arrowProps:n,popper:f,className:b()(e.props.className,!t&&o&&"show"),style:{...e.props.style,...r.style}})}})});function ty(e,t,r){let[n]=t,i=n.currentTarget,a=n.relatedTarget||n.nativeEvent[r];a&&a===i||f(i,a)||e(...t)}function tb({trigger:e,overlay:t,children:r,popperConfig:n={},show:i,defaultShow:a=!1,onToggle:o,delay:s,placement:u,flip:c=u&&-1!==u.indexOf("auto"),...f}){var p,h,m,y,b,x,S,w,E,A;let C=(0,l.useRef)(null),P=g(C,r.ref),O=(E=(0,d.Z)(),A=(0,l.useRef)(),S=function(){return clearTimeout(A.current)},(w=(0,l.useRef)(S)).current=S,(0,l.useEffect)(function(){return function(){return w.current()}},[]),(0,l.useMemo)(function(){var e=function(){return clearTimeout(A.current)};return{set:function(t,r){void 0===r&&(r=0),E()&&(e(),r<=2147483647?A.current=setTimeout(t,r):function e(t,r,n){var i=n-Date.now();t.current=i<=2147483647?setTimeout(r,i):setTimeout(function(){return e(t,r,n)},2147483647)}(A,t,Date.now()+r))},clear:e}},[])),_=(0,l.useRef)(""),[k,F]=(p=(0,l.useRef)(void 0!==i),m=(h=(0,l.useState)(a))[0],y=h[1],b=void 0!==i,x=p.current,p.current=b,!b&&x&&m!==a&&y(a),[b?i:m,(0,l.useCallback)(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{P(tp(e))},N=(0,l.useCallback)(()=>{if(O.clear(),_.current="show",!j.show){F(!0);return}O.set(()=>{"show"===_.current&&F(!0)},j.show)},[j.show,F,O]),M=(0,l.useCallback)(()=>{if(O.clear(),_.current="hide",!j.hide){F(!1);return}O.set(()=>{"hide"===_.current&&F(!1)},j.hide)},[j.hide,F,O]),L=(0,l.useCallback)((...e)=>{N(),null==R||R(...e)},[N,R]),B=(0,l.useCallback)((...e)=>{M(),null==I||I(...e)},[M,I]),H=(0,l.useCallback)((...e)=>{F(!k),null==T||T(...e)},[T,F,k]),z=(0,l.useCallback)((...e)=>{ty(N,e,"fromElement")},[N]),$=(0,l.useCallback)((...e)=>{ty(M,e,"toElement")},[M]),U=null==e?[]:[].concat(e),V={ref:D};return -1!==U.indexOf("click")&&(V.onClick=H),-1!==U.indexOf("focus")&&(V.onFocus=L,V.onBlur=B),-1!==U.indexOf("hover")&&(V.onMouseOver=z,V.onMouseOut=$),(0,eG.jsxs)(eG.Fragment,{children:["function"==typeof r?r(V):(0,l.cloneElement)(r,V),(0,eG.jsx)(tg,{...f,show:k,onHide:M,flip:c,placement:u,popperConfig:n,target:C.current,children:t})]})}tg.displayName="Overlay",tg.defaultProps={transition:tv,rootClose:!1,show:!1,placement:"top"},tb.defaultProps={defaultShow:!1,trigger:["hover","focus"]};var tx=r(71893),tS=r(34798),tw=r.n(tS),tE=r(99603),tA=r(59417),tC=r(63055);function tP(e){var t=e.title,r=e.content,n=e.show,i=e.hide,a=e.icon,o=void 0===a?tA.sqG:a,s=e.onClick,u=void 0===s?tw():s,c=e.trigger,l=e.style,f=e.children,d=(0,eG.jsxs)(e6,{id:"popover-basic",style:l,children:[t&&(0,eG.jsx)(e2,{children:t}),r&&(0,eG.jsx)(e4,{dangerouslySetInnerHTML:{__html:r}})]});return(0,eG.jsx)(tb,{trigger:void 0===c?["hover","focus","click"]:c,placement:"right-start",overlay:d,delay:{show:void 0===n?150:n,hide:void 0===i?250:i},children:(0,eG.jsx)("span",{children:f||(0,eG.jsx)(tE.G,{color:"#777777",icon:o,onClick:u})})})}(0,tx.ZP)(e6)(u||(u=(0,c.Z)(["\n font-size: "," !important;\n font-family: "," !important;\n"])),tC.n5,tC.rk)},31637:function(e,t,r){"use strict";var n,i=r(71383),a=r(42894),o=r(71893),s=r(63055),u=r(85893),c=o.ZP.div(n||(n=(0,i.Z)(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n margin-top: ",";\n\n & p {\n margin-top: 10px;\n }\n"])),s.SI);t.Z=function(){return(0,u.jsxs)(c,{children:[(0,u.jsx)(a.rj,{color:"#000",height:45,width:45,visible:!0}),(0,u.jsx)("p",{children:"Loading information..."})]})}},59912:function(e,t,r){"use strict";r.d(t,{I:function(){return o}});var n,i=r(71383),a=r(71893),o=[{maxWidth:767,marginTop:10},{maxWidth:991,width:723,marginTop:20},{maxWidth:1199,width:933,marginTop:50},{width:1127,marginTop:80}],s=function(e,t,r,n){if("left"===e)return"\n margin-right: auto !important;\n ";if("right"===e)return"\n margin-left: auto !important;\n ";if("center"===e)return"\n margin-left: auto !important;\n margin-right: auto !important;\n ";var i="";return t&&(i+="margin-left: ".concat(t).concat(n," !important;")),r&&(i+="margin-right: ".concat(r).concat(n," !important;")),i},u=a.ZP.div(n||(n=(0,i.Z)(["\n display: block;\n max-width: 100% !important;\n\n ","\n"])),function(e){return e.rules.map(function(t,r){return 0===r?"@media only screen and (max-width: ".concat(t.maxWidth,"px) {\n & {\n ").concat(t.marginTop&&"margin-top: ".concat(t.marginTop,"px;"),"\n width: auto !important;\n ").concat(s(t.horizontalAlign||"none",1,1,"em"),"\n }\n }"):r===e.rules.length-1?"@media only screen and (min-width: ".concat((e.rules[r-1].maxWidth||0)+1,"px) {\n & {\n ").concat(t.marginTop&&"margin-top: ".concat(t.marginTop,"px;"),"\n width: ").concat(t.width,"px;\n ").concat(s(t.horizontalAlign||"center",t.marginLeft,t.marginRight,t.marginUnit),"\n }\n }"):"@media only screen and (min-width: ".concat((e.rules[r-1].maxWidth||0)+1,"px) and (max-width: ").concat(t.maxWidth,"px) {\n & {\n ").concat(t.marginTop&&"margin-top: ".concat(t.marginTop,"px;"),"\n width: ").concat(t.width,"px;\n ").concat(s(t.horizontalAlign||"center",t.marginLeft,t.marginRight,t.marginUnit),"\n }\n }")})});t.Z=u},19287:function(e,t,r){"use strict";var n,i=r(71383),a=r(71893);t.Z=a.ZP.div(n||(n=(0,i.Z)(["\n width: 100%;\n\n & .pg-notification-close {\n padding: 0 0.5rem;\n }\n"])))},99154:function(e,t,r){"use strict";r.d(t,{DK:function(){return m},Es:function(){return f},JK:function(){return c},Jx:function(){return y},Qf:function(){return h},S3:function(){return x},TW:function(){return d},YC:function(){return p},_x:function(){return g},dV:function(){return b},e$:function(){return S},ne:function(){return l},rp:function(){return u},uA:function(){return i},xN:function(){return w}});var n=r(90352),i=function(e){return"bceidboth"===e},a=function(e){return"digitalcredential"===e},o=function(e){return"bcservicescard"===e},s=function(e){return["idir","azureidir"].includes(e)},u=function(e){return e.startsWith("bceid")},c=function(e){return!u(e)},l=function(e){return["bceidbasic","bceidbusiness"].includes(e)},f=function(e){return s(e)||"bceidboth"!==e},d=function(e){return s(e)||!l(e)},p=function(e){return["githubpublic","githubbcgov"].includes(e)},h=function(e){return!p(e)},m=function(e){return!a(e)},g=function(e){return!o(e)},y=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(u)},b=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(p)},x=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(a)},S=function(e){if(!e)return!1;var t=e.devIdps;return(void 0===t?[]:t).some(o)},w=function(e,t){var r,i=function(e){return(null==e?void 0:e.privacy_zone_uri)===t},a=null==e?void 0:e.find(i);return a||(a=(0,n.S2)().find(i)),(null===(r=a)||void 0===r?void 0:r.privacy_zone_name)||"Unavailable"}},15812:function(e,t,r){"use strict";r.d(t,{bD:function(){return x},ZP:function(){return b},hU:function(){return S}});var n,i=r(59499),a=r(67294),o=r(48094),s=r.n(o),u=r(85330),c=r(85893),l=function(e){var t=e.children,r=e.variant,n=e.size,i=e.closable,o=e.content,s=e.fadeOut,l=(0,a.useState)(!1),f=l[0],d=l[1];return((0,a.useEffect)(function(){var e=s?setTimeout(function(){d(!0)},s):null;return function(){e&&clearTimeout(e)}},[]),f)?null:(0,c.jsx)(u.bZ,{variant:r,size:n,closable:i,content:o,children:t})},f=r(19287),d=r(71383),p=r(71893).ZP.div(n||(n=(0,d.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 2000;\n"])));function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t0;t&&r&&t(r)})},e),elements:i},u.push(r),s.set(r,t),t}({root:null==t?void 0:t.current,rootMargin:r})).id,i=e.observer,(l=e.elements).set(h,function(e){return e&&d(e)}),i.observe(h),function(){if(l.delete(h),i.unobserve(h),0===l.size){i.disconnect(),s.delete(n);var e=u.findIndex(function(e){return e.root===n.root&&e.margin===n.margin});e>-1&&u.splice(e,1)}}}}else if(!f){var m=a.requestIdleCallback(function(){return d(!0)});return function(){return a.cancelIdleCallback(m)}}},[c,r,t,f,p.current]),[h,f,i.useCallback(function(){d(!1)},[])]};var i=r(67294),a=r(98065),o="function"==typeof IntersectionObserver,s=new Map,u=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},17285:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmpStateContext=void 0;var n=(0,r(92648).Z)(r(67294)).default.createContext({});t.AmpStateContext=n},80354:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInAmpMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ampFirst,r=e.hybrid,n=e.hasQuery;return void 0!==t&&t||void 0!==r&&r&&void 0!==n&&n}},16505:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHead=l,t.default=void 0;var n=r(6495).Z,i=r(92648).Z,a=(0,r(91598).Z)(r(67294)),o=i(r(70148)),s=r(17285),u=r(60523),c=r(80354);function l(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[a.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(a.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce(function(e,t){return"string"==typeof t||"number"==typeof t?e:e.concat(t)},[])):e.concat(t)}r(92783);var d=["name","httpEquiv","charSet","itemProp"];function p(e,t){var r,i,o,s,u=t.inAmpMode;return e.reduce(f,[]).reverse().concat(l(u).reverse()).filter((r=new Set,i=new Set,o=new Set,s={},function(e){var t=!0,n=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){n=!0;var a=e.key.slice(e.key.indexOf("$")+1);r.has(a)?t=!1:r.add(a)}switch(e.type){case"title":case"base":i.has(e.type)?t=!1:i.add(e.type);break;case"meta":for(var u=0,c=d.length;u0&&!eb().isEmail(f))){e.next=3;break}return s("Please provide a valid email address"),e.abrupt("return");case 3:return e.next=5,(0,B.ck)({additionalEmail:f});case 5:t=e.sent,n=(r=(0,P.Z)(t,2))[0],(a=r[1])?(console.error(a),h(a)):n&&i.show({variant:"success",fadeOut:2500,closable:!0,content:"Your additional email has successfully been updated"}),window.location.hash="#";case 11:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),y="".concat(null==c?void 0:c.given_name," ").concat(null==c?void 0:c.family_name),b=(0,et.jsxs)(ex,{children:[(0,et.jsx)(em.default,{label:"Name",fullWidth:!0,value:y,disabled:!0}),(0,et.jsx)("br",{}),(0,et.jsx)(em.default,{label:"Default Email",fullWidth:!0,value:null==c?void 0:c.email,disabled:!0}),(0,et.jsx)("br",{}),(0,et.jsxs)("div",{children:[(0,et.jsx)("span",{className:"strong",children:"Additional Email"})," \xa0",(0,et.jsx)(eg.Z,{title:"",content:"You can add a work email address in addition to your @gov.bc.ca to keep you informed of your integration progress. Note IDIR login/authentication is required to access the CSS App.",hide:200})]}),(0,et.jsx)(em.default,{"data-testid":"addi-email",type:"email",fullWidth:!0,maxLength:"100",value:f,onChange:function(e){eb().isEmail(e.target.value)&&s(""),d(e.target.value)}}),o&&(0,et.jsx)(eS,{children:o})]});return(0,et.jsxs)(et.Fragment,{children:[n(p,function(){return window.location.hash=p}),(0,et.jsx)(ev.Z,{id:p,content:b,onConfirm:g,icon:K.m08,title:"My Profile",confirmText:"Save",skipCloseOnConfirm:!0,closable:!0})]})}),eE=r(85330),eA=Z.ZP.div(d||(d=(0,z.Z)(["\n font-size: 1.2rem;\n display: flex;\n\n & > div:first-child {\n color: red;\n font-size: 2rem;\n width: 120px;\n }\n\n & > div:nth-child(2) {\n & > p:first-child {\n color: red;\n font-weight: bold;\n }\n }\n"]))),eC="gold-notification",eP=function(){var e,t,r=(0,j.useContext)(tA)||{},n=r.user,i=r.session,a=(e=(0,_.Z)(F().mark(function e(){var t;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!i||!n)){e.next=2;break}return e.abrupt("return");case 2:!i.isAdmin&&!n.hasReadGoldNotification&&null!==(t=n.integrations)&&void 0!==t&&t.find(function(e){return"gold"!==e.serviceType})&&(window.location.hash=eC);case 3:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});(0,j.useEffect)(function(){i&&n&&a()},[n]);var o=(t=(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.ck)({hasReadGoldNotification:!0});case 2:window.location.hash="#";case 3:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),s=(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(eA,{children:[(0,et.jsx)("div",{children:(0,et.jsx)(V.G,{icon:K.RLE,size:"lg"})}),(0,et.jsxs)("div",{children:[(0,et.jsx)("p",{children:"At this time, the Silver realms are being retired on Jan. 30 2023*. Projects on these realms will no longer be supported by the SSO team."}),(0,et.jsxs)("p",{children:["Please complete a ",(0,et.jsx)("span",{className:"strong",children:"Change Impact Assessment"}),", for each of your projects in the Silver realms."]})]})]}),(0,et.jsx)("div",{className:"text-center",children:(0,et.jsx)(eE.zx,{variant:"primary",type:"button",onClick:function(){return window.open("https://docs.google.com/forms/d/1MMPeMB0A2076xkXIZRaErAwZe9QDsSwSAWqe-uvm3ys","_blank")},children:"Complete Change Impact Assessment"})})]});return(0,et.jsx)(et.Fragment,{children:(0,et.jsx)(ev.Z,{id:eC,content:s,showCancel:!1,showConfirm:!1,onClose:o,icon:K.RLE,title:"Please upgrade from Silver to Gold",closable:!0})})},eO=r(90352),e_=Z.ZP.span(p||(p=(0,z.Z)(["\n font-weight: 600;\n font-size: 1.3em;\n display: flex;\n align-items: end;\n"]))),ek=Z.ZP.div(h||(h=(0,z.Z)(["\n padding: 1rem 0;\n min-height: calc(100vh - ",");\n"])),"152px"),eF=Z.ZP.ul(m||(m=(0,z.Z)(["\n padding-left: 2rem;\n padding-right: 2rem;\n\n li a {\n display: inline-block !important;\n font-size: unset !important;\n padding: 0 !important;\n border-right: none !important;\n }\n"]))),ej=Z.ZP.div(g||(g=(0,z.Z)(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n padding-left: 2rem;\n padding-right: 2rem;\n"]))),eR=Z.ZP.ul(y||(y=(0,z.Z)(["\n & a {\n font-size: 1rem !important;\n }\n\n & a.current {\n font-weight: bold;\n }\n\n & li.current {\n padding-bottom: 6px;\n border-bottom: none;\n background: linear-gradient(orange, orange) bottom /* left or right or else */ no-repeat;\n background-size: calc(100% - 2rem) 4px;\n }\n"]))),eI=Z.ZP.ul(b||(b=(0,z.Z)(["\n padding-right: 2rem;\n"]))),eT=Z.ZP.div(x||(x=(0,z.Z)(["\n padding-left: 2rem;\n padding-right: 2rem;\n"]))),eD=Z.ZP.li(S||(S=(0,z.Z)(["\n &:hover {\n opacity: 0.8;\n }\n"]))),eN=Z.ZP.div(w||(w=(0,z.Z)(["\n height: 100%;\n"]))),eM=[{path:"/",label:"Home",roles:["guest","user","sso-admin"]},{path:"/terms-conditions",label:"Terms and Conditions",roles:["guest"]},{path:"/my-dashboard",label:"My Dashboard",roles:["user","sso-admin"]},{path:"/admin-dashboard",label:"SSO Dashboard",roles:["sso-admin"]},{path:"/admin-reports",label:"SSO Reports",roles:["sso-admin"]},{path:"/request",label:"Request Details",roles:["user","sso-admin"],hide:!0},{path:"/faq",label:"FAQ",roles:["guest","user","sso-admin"]}],eL=function(e){var t,r=e.session,n=e.currentPath,i=e.query,a=["guest"];r&&(a=(null==r?void 0:null===(t=r.client_roles)||void 0===t?void 0:t.length)>0?r.client_roles:["user"]);var o=function(e){return n===e||n.startsWith("".concat(e,"/"))};return(0,et.jsx)(et.Fragment,{children:eM.filter(function(e){return e.roles.some(function(e){return a.includes(e)})&&(!e.hide||o(e.path))}).map(function(e){return(0,et.jsx)("li",{className:o(e.path)?"current":"",children:(0,et.jsx)(U(),{href:e.path,children:X()(e.label)?e.label(i):e.label})},e.path)})})},eB=function(){return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(ew,{children:function(e,t){return(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:"#".concat(e),title:"My Profile",children:(0,et.jsx)(V.G,{size:"2x",icon:K.U6l})})})}}),(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:"https://chat.developer.gov.bc.ca/channel/sso",target:"_blank",title:"Rocket Chat",children:(0,et.jsx)(V.G,{size:"2x",icon:K.Z6I})})}),(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:"mailto:bcgov.sso@gov.bc.ca",title:"Pathfinder SSO",children:(0,et.jsx)(V.G,{size:"2x",icon:K.FU$})})}),(0,et.jsx)(eD,{children:(0,et.jsx)("a",{href:(0,eO.eO)(),target:"_blank",title:"Documentation",children:(0,et.jsx)(V.G,{size:"2x",icon:K.cwv})})})]})},eH=function(e){var t=e.children,r=e.session,n=(e.user,e.onLoginClick),i=e.onLogoutClick,a=(0,R.useRouter)(),o=a.pathname,s=r?(0,et.jsxs)(e_,{children:[(0,et.jsxs)("div",{className:"welcome",children:["Welcome ","".concat(r.given_name," ").concat(r.family_name),"\xa0",(null==r?void 0:r.client_roles)&&(0,et.jsxs)("span",{className:"small",children:["(",Y()(null==r?void 0:r.client_roles[0]),")"]})]}),"\xa0\xa0",(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"medium",onClick:i,children:"Log out"})]}):(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"medium",onClick:n,children:"Log in"});return(0,et.jsxs)(eh.ZP,{children:[(0,et.jsx)(er,{}),(0,et.jsx)(ep,{title:function(){return(0,et.jsx)(eN,{children:"Common Hosted Single Sign-on (CSS)"})},rightSide:s,mobileMenu:function(){return(0,et.jsxs)(eF,{children:[(0,et.jsx)(eL,{session:r,currentPath:o,query:a.query}),(0,et.jsxs)("li",{children:["Need help?\xa0\xa0",(0,et.jsx)("a",{href:"https://chat.developer.gov.bc.ca/",target:"_blank",title:"Rocket Chat",children:(0,et.jsx)(V.G,{size:"2x",icon:K.Z6I})}),"\xa0\xa0",(0,et.jsx)("a",{href:"mailto:bcgov.sso@gov.bc.ca",title:"SSO Team",children:(0,et.jsx)(V.G,{size:"2x",icon:K.FU$})}),"\xa0\xa0",(0,et.jsx)("a",{href:(0,eO.eO)(),target:"_blank",title:"Wiki",children:(0,et.jsx)(V.G,{size:"2x",icon:K.cwv})})]}),(0,et.jsx)("li",{children:r?(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"small",onClick:i,children:"Logout"}):(0,et.jsx)(W.default,{variant:"secondary-inverse",size:"small",onClick:n,children:"Login with IDIR"})})]})},onBannerClick:console.log,children:(0,et.jsxs)(ej,{children:[(0,et.jsx)(eR,{children:(0,et.jsx)(eL,{session:r,currentPath:o,query:a.query})}),(0,et.jsx)(eI,{children:(0,et.jsx)(eB,{})})]})}),(0,et.jsx)(ek,{children:(0,et.jsx)(eh.bD,{children:t})}),(0,et.jsx)(q.default,{children:(0,et.jsx)(eT,{children:(0,et.jsxs)("ul",{children:[(0,et.jsx)("li",{children:(0,et.jsx)(U(),{href:"/",children:"Home"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/disclaimer",target:"_blank",rel:"noreferrer",children:"Disclaimer"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/privacy",target:"_blank",rel:"noreferrer",children:"Privacy"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/accessible-government",target:"_blank",rel:"noreferrer",children:"Accessibility"})}),(0,et.jsx)("li",{children:(0,et.jsx)("a",{href:"https://www2.gov.bc.ca/gov/content/home/copyright",target:"_blank",rel:"noreferrer",children:"Copyright"})})]})})}),(0,et.jsx)(eP,{})]})},ez=r(31637),e$=r(9008),eU=r.n(e$);r(87266),r(90458);var eV=Object.create,eK=Object.defineProperty,eW=Object.getOwnPropertyDescriptor,eq=Object.getOwnPropertyNames,eZ=Object.getPrototypeOf,eG=Object.prototype.hasOwnProperty,eY=(s=null!=(o=(i=(e,t)=>{var n,i;n=e,i=function(e){var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=2*536870912,i=new WeakMap,a=(t=function(e,t){return i.set(e,t),t},function(e){var a=i.get(e),o=void 0===a?e.size:ar)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(o);)o=Math.floor(Math.random()*r);return t(e,o)});e.addUniqueNumber=function(e){var t=a(e);return e.add(t),t},e.generateUniqueNumber=a},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&r.amdO?define(["exports"],i):i((n="u">typeof globalThis?globalThis:n||self).fastUniqueNumbers={})},()=>(a||i((a={exports:{}}).exports,a),a.exports))())?eV(eZ(o)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of eq(t))eG.call(e,r)||void 0===r||eK(e,r,{get:()=>t[r],enumerable:!(n=eW(t,r))||n.enumerable});return e})(o&&o.__esModule?s:eK(s,"default",{value:o,enumerable:!0}),o)),eJ=e=>void 0!==e.method&&"call"===e.method,eX=e=>null===e.error&&"number"==typeof e.id,eQ=e=>{let t=new Map([[0,()=>{}]]),r=new Map([[0,()=>{}]]),n=new Map,i=new Worker(e);return i.addEventListener("message",({data:e})=>{if(eJ(e)){let{params:{timerId:i,timerType:a}}=e;if("interval"===a){let e=t.get(i);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==i||t.timerType!==a)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===a){let e=r.get(i);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==i||t.timerType!==a)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),r.delete(i);else throw Error("The timer is in an undefined state.")}}else if(eX(e)){let{id:i}=e,a=n.get(i);if(void 0===a)throw Error("The timer is in an undefined state.");let{timerId:o,timerType:s}=a;n.delete(i),"interval"===s?t.delete(o):r.delete(o)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let r=(0,eY.generateUniqueNumber)(n);n.set(r,{timerId:e,timerType:"interval"}),t.set(e,r),i.postMessage({id:r,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,eY.generateUniqueNumber)(n);n.set(t,{timerId:e,timerType:"timeout"}),r.set(e,t),i.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,r)=>{let n=(0,eY.generateUniqueNumber)(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&i.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}})}),i.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{let n=(0,eY.generateUniqueNumber)(r);return r.set(n,e),i.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}};n=null,()=>{if(null!==n)return n;let e=new Blob(['(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return n=eQ(t),setTimeout(()=>URL.revokeObjectURL(t)),n};var e0=(typeof window>"u"?"undefined":typeof window)=="object",e1={setTimeout:e0?setTimeout.bind(window):setTimeout,clearTimeout:e0?clearTimeout.bind(window):clearTimeout,setInterval:e0?setInterval.bind(window):setInterval,clearInterval:e0?clearInterval.bind(window):clearInterval},e2={},e4=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,e2[e]=e2[e]||[],e2[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),r=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(r,t),e1.setTimeout(()=>{window.localStorage.removeItem(r)},500),e2[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=e2[this.name].indexOf(this);e2[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},e3=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:e4;function e6(){return Math.random().toString(36).substring(2)}var e5=class{options;channel;token=e6();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:r,action:n}=t.data;r!==this.token&&(0===n&&r>this.token&&(e=!0),1===n&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>e1.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(r=>{let n=()=>{if(e)return;e=!0;try{e1.clearInterval(t)}catch{}let n=this.intervals.indexOf(t);n>=0&&this.intervals.splice(n,1),this.channel.removeEventListener("message",i),r()};t=e1.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(t);let i=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&n()})};this.channel.addEventListener("message",i)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>e1.clearInterval(e))}catch{}}}},e8=class{channel;options;elector;token=e6();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new e3(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new e5(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:r,data:n}=e.data;switch(t){case 3:this.registry.set(r,2);break;case 4:this.registry.delete(r);break;case 5:this.idle(r);break;case 6:this.active(r);break;case 7:this.prompt(r);break;case 8:this.start(r);break;case 9:this.reset(r);break;case 10:this.activate(r);break;case 11:this.pause(r);break;case 12:this.resume(r);break;case 13:this.options.onMessage(n)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},e9=e0?document:null,e7=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function te(e,t){let r=0;return function(...n){let i=new Date().getTime();if(!(i-rDate.now();(0,j.createContext)(null).Consumer;var tr=r(30233),tn=r(31513),ti=r(63055),ta=r(30996);function to(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ts(e){for(var t=1;t0){e.next=3;break}return e.abrupt("return",m("Please select a rating."));case 3:o&&(0,B.xc)({triggerEvent:o,message:f,rating:u.filter(function(e){return e.selected}).length}),n(!1),r(!1);case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),b="".concat(i?"open":"closed"," ").concat(!a&&"hidden");return(0,et.jsx)(tc,{children:(0,et.jsxs)(tl,{className:b,children:[(0,et.jsxs)("div",{className:"header",onClick:function(){r(!i)},children:[(0,et.jsx)("p",{children:"We'd love to hear from you"}),(0,et.jsx)(V.G,{icon:i?K.Qbq:K.K96})]}),(0,et.jsxs)("div",{className:"body",children:[(0,et.jsx)("p",{className:"title",children:(0,et.jsx)("strong",{children:"Rate our service"})}),(0,et.jsx)("p",{children:"How was your experience with the CSS app?"}),(0,et.jsxs)(tf,{children:[(0,et.jsx)("div",{className:"stars-box",children:u.map(function(e,t){return(0,et.jsx)(V.G,{style:{cursor:"pointer"},role:"button",size:"3x",icon:K.Tab,color:e.selected?"gold":"grey",onClick:function(){return g(t)}},e.id)})}),(0,et.jsxs)("div",{className:"stars-text",children:[(0,et.jsx)("span",{children:"Bad"}),(0,et.jsx)("span",{children:"Great"})]})]}),(0,et.jsx)(ta.default,{fullWidth:!0,placeholder:"Leave a message...",rows:4,value:f,onChange:function(e){m(""),e.target.value.length<=700?d(e.target.value):m("Messages are at most ".concat(700," characters."))}}),h&&(0,et.jsx)("p",{className:"error-message",children:h}),(0,et.jsxs)("div",{className:"button-container",children:[(0,et.jsx)(W.default,{variant:"secondary",onClick:function(){return n(!1)},children:"Close"}),(0,et.jsx)(W.default,{onClick:y,children:"Rate now"})]})]})]})})};function th(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tm(e){for(var t=1;t{},onPrompt:u=()=>{},onIdle:c=()=>{},onActive:l=()=>{},onAction:f=()=>{},onMessage:d=()=>{},debounce:p=0,throttle:h=0,eventsThrottle:m=200,startOnMount:g=!0,startManually:y=!1,stopOnIdle:b=!1,crossTab:x=!1,name:S="idle-timer",syncTimers:w=0,leaderElection:E=!1,disabled:A=!1}={}){let C=(0,j.useRef)(tt()),P=(0,j.useRef)(tt()),O=(0,j.useRef)(null),_=(0,j.useRef)(null),k=(0,j.useRef)(0),F=(0,j.useRef)(0),R=(0,j.useRef)(0),I=(0,j.useRef)(0),T=(0,j.useRef)(!1),D=(0,j.useRef)(!1),N=(0,j.useRef)(!1),M=(0,j.useRef)(!0),L=(0,j.useRef)(!1),B=(0,j.useRef)(null),H=(0,j.useRef)(null),z=(0,j.useRef)(e),$=(0,j.useRef)(0);(0,j.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),r&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(r>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(r>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(r?(z.current=e-r,$.current=r):(z.current=e,$.current=t),!M.current){if(y||A)return;T.current&&(J.current(null,eR),H.current&&H.current.active()),ed()}},[e,t,r,y,A]);let U=(0,j.useRef)(b);(0,j.useEffect)(()=>{U.current=b},[b]);let V=(0,j.useRef)(o),K=(0,j.useRef)(n),W=(0,j.useRef)([...new Set([...i,...o]).values()]),q=(0,j.useRef)(A);(0,j.useEffect)(()=>{q.current=A,!M.current&&(A?em():y||ed())},[A]);let Z=(0,j.useRef)(s);(0,j.useEffect)(()=>{Z.current=s},[s]);let G=(0,j.useRef)(u);(0,j.useEffect)(()=>{G.current=u},[u]);let Y=(0,j.useRef)(c);(0,j.useEffect)(()=>{Y.current=c},[c]);let J=(0,j.useRef)(l);(0,j.useEffect)(()=>{J.current=l},[l]);let X=(0,j.useRef)(f);(0,j.useEffect)(()=>{X.current=f},[f]);let Q=(0,j.useRef)(d);(0,j.useEffect)(()=>{Q.current=d},[d]);let ee=(0,j.useMemo)(()=>{let e=(e,t)=>X.current(e,t);return p>0?function(e,t){let r;function n(...i){r&&clearTimeout(r),r=setTimeout(()=>{e(...i),r=null},t)}return n.cancel=function(){clearTimeout(r)},n}(e,p):h>0?te(e,h):e},[h,p]),et=(0,j.useRef)();(0,j.useEffect)(()=>{x&&w&&(et.current=te(()=>{H.current.active()},w))},[x,w]);let er=()=>{null!==B.current&&(e1.clearTimeout(B.current),B.current=null)},en=(e,t=!0)=>{er(),B.current=e1.setTimeout(es,e||z.current),t&&(_.current=tt())},ei=e=>{D.current||T.current||(G.current(e,eR),Z.current({type:"active",prompted:!0},eR)),I.current=0,R.current=tt(),D.current=!0,en($.current,!1)},ea=()=>{er(),T.current||(Y.current(null,eR),Z.current({type:"idle"},eR)),T.current=!0,O.current=tt(),U.current?ef():D.current&&(R.current=0,D.current=!1)},eo=e=>{er(),(T.current||D.current)&&(J.current(e,eR),Z.current({type:"active",prompted:!1},eR)),D.current=!1,R.current=0,T.current=!1,k.current+=tt()-O.current,F.current+=tt()-O.current,el(),en()},es=e=>{if(!T.current){ee.cancel&&ee.cancel();let t=tt()-_.current;if(!(z.current+$.current0&&!D.current){H.current?H.current.prompt():ei(e);return}H.current?H.current.idle():ea();return}H.current?H.current.active():eo(e)},eu=e=>{if(g||_.current||(_.current=tt(),J.current(null,eR)),ee(e,eR),D.current)return;if(er(),!T.current&&V.current.includes(e.type)){es(e);return}let t=tt()-_.current;if(T.current&&!b||!T.current&&t>=z.current){es(e);return}N.current=!1,I.current=0,R.current=0,en(),x&&w&&et.current()},ec=(0,j.useRef)(eu);(0,j.useEffect)(()=>{let e=L.current;e&&ef(),m>0?ec.current=te(eu,m):ec.current=eu,e&&el()},[m,h,p,X,x,w]);let el=()=>{e0&&K.current&&(L.current||(W.current.forEach(e=>{K.current.addEventListener(e,ec.current,{capture:!0,passive:!0})}),L.current=!0))},ef=(e=!1)=>{e0&&K.current&&(L.current||e)&&(W.current.forEach(e=>{K.current.removeEventListener(e,ec.current,{capture:!0})}),L.current=!1)},ed=(0,j.useCallback)(e=>!q.current&&(er(),el(),T.current=!1,D.current=!1,N.current=!1,I.current=0,R.current=0,H.current&&!e&&H.current.start(),en(),!0),[B,T,q,z,H]),ep=(0,j.useCallback)(e=>!q.current&&(er(),el(),P.current=tt(),k.current+=tt()-O.current,F.current+=tt()-O.current,k.current=0,T.current=!1,D.current=!1,N.current=!1,I.current=0,R.current=0,H.current&&!e&&H.current.reset(),y||en(),!0),[B,T,z,y,q,H]),eh=(0,j.useCallback)(e=>!q.current&&(er(),el(),(T.current||D.current)&&eo(),T.current=!1,D.current=!1,N.current=!1,I.current=0,R.current=0,P.current=tt(),H.current&&!e&&H.current.activate(),en(),!0),[B,T,D,q,z,H]),em=(0,j.useCallback)((e=!1)=>!q.current&&!N.current&&(I.current=eE(),N.current=!0,ef(),er(),H.current&&!e&&H.current.pause(),!0),[B,q,H]),ev=(0,j.useCallback)((e=!1)=>!q.current&&!!N.current&&(N.current=!1,D.current||el(),T.current||en(I.current),R.current&&(R.current=tt()),H.current&&!e&&H.current.resume(),!0),[B,z,q,I,H]),eg=(0,j.useCallback)((e,t)=>(H.current?(t&&Q.current(e,eR),H.current.message(e)):t&&Q.current(e,eR),!0),[d]),ey=(0,j.useCallback)(()=>T.current,[T]),eb=(0,j.useCallback)(()=>D.current,[D]),ex=(0,j.useCallback)(()=>H.current?H.current.isLeader:null,[H]),eS=(0,j.useCallback)(()=>H.current?H.current.isLastActive:null,[H]),ew=(0,j.useCallback)(()=>H.current?H.current.token:null,[H]),eE=(0,j.useCallback)(()=>{if(N.current)return I.current;let e=Math.floor((I.current?I.current:$.current+z.current)-(_.current?tt()-_.current:0));return e<0?0:Math.abs(e)},[z,$,D,I,_]),eA=(0,j.useCallback)(()=>Math.round(tt()-P.current),[P]),eC=(0,j.useCallback)(()=>Math.round(tt()-C.current),[C]),eP=(0,j.useCallback)(()=>O.current?new Date(O.current):null,[O]),eO=(0,j.useCallback)(()=>_.current?new Date(_.current):null,[_]),e_=(0,j.useCallback)(()=>T.current?Math.round(tt()-O.current+k.current):Math.round(k.current),[O,k]),ek=(0,j.useCallback)(()=>T.current?Math.round(tt()-O.current+F.current):Math.round(F.current),[O,F]),eF=(0,j.useCallback)(()=>{let e=Math.round(eA()-e_());return e>=0?e:0},[O,k]),ej=(0,j.useCallback)(()=>{let e=Math.round(eC()-ek());return e>=0?e:0},[O,k]);(0,j.useEffect)(()=>{if(p>0&&h>0)throw Error("❌ onAction can either be throttled or debounced, not both.");a&&(e1.setTimeout=a.setTimeout,e1.clearTimeout=a.clearTimeout,e1.setInterval=a.setInterval,e1.clearInterval=a.clearInterval);let e=()=>{H.current&&H.current.close(),ee.cancel&&ee.cancel(),er(),ef(!0)};return e0&&window.addEventListener("beforeunload",e),()=>{e0&&window.removeEventListener("beforeunload",e),H.current&&H.current.close(),ee.cancel&&ee.cancel(),er(),ef(!0)}},[]),(0,j.useEffect)(()=>{H.current&&H.current.close(),x?H.current=new e8({channelName:S,leaderElection:E,onPrompt:()=>{ei()},onIdle:()=>{ea()},onActive:()=>{eo()},onMessage:e=>{Q.current(e,eR)},start:ed,reset:ep,activate:eh,pause:em,resume:ev}):H.current=null},[x,S,E,G,Y,J,Q,ed,ep,em,ev]),(0,j.useEffect)(()=>{M.current||(er(),ef(!0)),y||A||(g?ed():el())},[y,g,A,M]),(0,j.useEffect)(()=>{if(!M.current){let e=[...new Set([...i,...o]).values()];ef(),W.current=e,K.current=n,V.current=o,y||A||(g?ed():el())}},[n,JSON.stringify(i),JSON.stringify(o),M,A,y,g]),(0,j.useEffect)(()=>{M.current&&(M.current=!1)},[M]);let eR={message:eg,start:ed,reset:ep,activate:eh,pause:em,resume:ev,isIdle:ey,isPrompted:eb,isLeader:ex,isLastActiveTab:eS,getTabId:ew,getRemainingTime:eE,getElapsedTime:eA,getTotalElapsedTime:eC,getLastIdleTime:eP,getLastActiveTime:eO,getIdleTime:e_,getTotalIdleTime:ek,getActiveTime:eF,getTotalActiveTime:ej,setOnPresenceChange:e=>{s=e,Z.current=e},setOnPrompt:e=>{u=e,G.current=e},setOnIdle:e=>{c=e,Y.current=e},setOnActive:e=>{l=e,J.current=e},setOnAction:e=>{f=e,X.current=e},setOnMessage:e=>{d=e,Q.current=e}}}({onPrompt:function(){"expired"!==S&&o.current.open()},timeout:3e5,promptBeforeIdle:1e4,throttle:500,disabled:null===l}),(0,j.useEffect)(function(){function e(e,r){return t.apply(this,arguments)}function t(){return(t=(0,_.Z)(F().mark(function e(t,r){var n,i,a,o;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.W)(t.id_token);case 2:if(n=e.sent,a=(i=(0,P.Z)(n,2))[0],o=i[1],!a){e.next=14;break}if(!r){e.next=11;break}return(0,H.d0)(t),e.next=11,u.push("/my-dashboard");case 11:f(tw(a)),e.next=17;break;case 14:(0,H.Zz)(),f(tw(null)),r&&u.push({pathname:"/application-error",query:{error:o}});case 17:y(!1);case 18:case"end":return e.stop()}},e)}))).apply(this,arguments)}function r(){return(r=(0,_.Z)(F().mark(function t(){var r,n,i,a,o;return F().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),t.prev=1,t.next=4,(0,D.M)();case 4:if(n=(r=(0,N.rg)()).code,i=r.state,!n){t.next=13;break}return t.next=8,(0,N.hP)({code:n,state:i});case 8:return a=t.sent,t.next=11,e(a,!0);case 11:t.next=16;break;case 13:return o=(0,H.lz)(),t.next=16,e(o,!1);case 16:t.next=25;break;case 18:t.prev=18,t.t0=t.catch(1),console.log(t.t0),(0,H.Zz)(),f(tw(null)),y(!1),b(t.t0);case 25:case"end":return t.stop()}},t,null,[[1,18]])}))).apply(this,arguments)}console.log("app started..."),tx&&"true"===tx&&u.push({pathname:"/application-error",query:{error:"maintenance"}}),(0,L.Nu)(),function(){r.apply(this,arguments)}()},[]),(0,j.useEffect)(function(){var e,t=(e=(0,_.Z)(F().mark(function e(){var t,r,n;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.Ai)();case 2:t=e.sent,n=(r=(0,P.Z)(t,2))[0],r[1],h(n);case 7:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});l&&t()},[l]),(0,j.useEffect)(function(){if(l){var e=setInterval((0,_.Z)(F().mark(function e(){var t;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,tn.QE)((0,H.lz)().refresh_token),Date.now()>=(null==t?void 0:t.exp)*1e3?(w("expired"),o.current.close(),s.current.open()):w("");case 2:case"end":return e.stop()}},e)})),5e3);return function(){clearInterval(e)}}});var W=(r=(0,_.Z)(F().mark(function e(){var t;return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,N.iq)({kc_idp_hint:tb});case 2:t=e.sent,window.location.href=t;case 4:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),q=(n=(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(0,H.Zz)(),window.location.href=(0,N.kG)();case 2:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),Z=(0,j.useMemo)(function(){return{setShowSurvey:V}},[p]);return g?(0,et.jsx)(ez.Z,{}):tS.some(function(e){return window.location.pathname.startsWith(e)})&&!l?(u.push("/"),null):(0,et.jsx)(tA.Provider,{value:{session:l,user:p},children:(0,et.jsx)(tC.Provider,{value:Z,children:tx&&"true"===tx?(0,et.jsx)(i,tm({},a)):(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(eH,{session:l,user:p,onLoginClick:W,onLogoutClick:q,children:[(0,et.jsxs)(eU(),{children:[(0,et.jsx)("html",{lang:"en"}),(0,et.jsx)("title",{children:"Common Hosted Single Sign-on (CSS)"}),(0,et.jsx)("link",{rel:"icon",href:"/bootstrap-theme/dist/images/bcid-favicon-32x32.png"})]}),(0,et.jsx)(i,tm(tm({},a),{},{session:l,onLoginClick:W,onLogoutClick:q}))]}),(0,et.jsx)(tr.Z,{ref:o,style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},title:"Session expiring",icon:K.eHv,onConfirm:(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.Ai)();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),onCancel:function(){q()},confirmButtonText:"Confirm",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",showConfirmButton:!0,showCancelButton:!0,children:(0,et.jsxs)("div",{children:[(0,et.jsx)("div",{children:"Your session will expire soon and you will be signed out automatically."}),(0,et.jsx)("br",{}),(0,et.jsx)("div",{children:"Do you want to stay signed in?"})," "]})}),(0,et.jsx)(tr.Z,{ref:s,style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},title:"Session expired",icon:K.eHv,onConfirm:function(){return W()},onCancel:(0,_.Z)(F().mark(function e(){return F().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.Ai)();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),confirmButtonText:"Login",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",showConfirmButton:!0,showCancelButton:!0,children:(0,et.jsxs)("div",{children:[(0,et.jsx)("div",{children:"Your session has expired."}),(0,et.jsx)("br",{}),(0,et.jsx)("div",{children:"Please login again."})," "]})}),p&&(0,et.jsx)(tp,{setOpenSurvey:U,open:$,display:I,setDisplaySurvey:T,triggerEvent:A})]})})})}},64730:function(e,t,r){"use strict";r.d(t,{Ek:function(){return y},Nu:function(){return b}});var n,i,a,o=r(16835),s=r(50029),u=r(87794),c=r.n(u),l=r(21963),f=r(54494),d=r(88757),p=r(84595),h=r(11752),m=(r.n(h)()()||{}).publicRuntimeConfig,g=(void 0===m?{}:m).base_path,y=(n=(0,s.Z)(c().mark(function e(){var t;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:return t=(0,f.lz)(),e.abrupt("return","Bearer ".concat(t.id_token));case 4:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});function b(){return x.apply(this,arguments)}function x(){return(x=(0,s.Z)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",l.e.get("heartbeat",{headers:{skipAuth:!0}}).then(function(e){return e.data}));case 4:return e.prev=4,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",null);case 8:case"end":return e.stop()}},e,null,[[0,4]])}))).apply(this,arguments)}var S=(i=(0,s.Z)(c().mark(function e(t){var r,n;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.dx)({refreshToken:t.refresh_token});case 2:return r=e.sent,e.next=5,(0,p.W)(null==r?void 0:r.id_token);case 5:n=e.sent,(0,o.Z)(n,1)[0]?(0,f.d0)(r):((0,f.Zz)(),console.error("failed to refresh the token"),window.location.href="".concat(g));case 9:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),w=(a=(0,s.Z)(c().mark(function e(){var t,r,n;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,f.lz)(),e.next=3,(0,p.W)(t.id_token);case 3:r=e.sent,(n=(0,o.Z)(r,1)[0])?1e3*n.exp-Date.now()<12e4&&S(t):S(t);case 7:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},21963:function(e,t,r){"use strict";r.d(t,{e:function(){return x},z:function(){return S}});var n,i=r(59499),a=r(50029),o=r(87794),s=r.n(o),u=r(11752),c=r.n(u),l=r(9669),f=r.n(l),d=r(64730),p=r(11163),h=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e){for(var t=1;t=2 set to 'VerifiedIndividual' else set to 'Individual'.",data_type:"xs:string",scope:"profile"},{name:"birthdate",user_friendly_name:"Date of Birth",user_friendly_description:"The individual's documented birth date recorded from valid identification.",data_type:"xs:date",scope:"profile"},{name:"family_name",user_friendly_name:"Surname",user_friendly_description:"The individual's documented surname recorded from valid identification.",data_type:"xs:string",scope:"profile"},{name:"gender",user_friendly_name:"Sex",user_friendly_description:"The individual's documented sex recorded from valid identification. Values include male, female, unknown and diverse.",data_type:"xs:string",scope:"profile"},{name:"address",user_friendly_name:"Address",user_friendly_description:"All address lines of the individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"authoritative_party_name",user_friendly_name:"Authoritative Party Name",user_friendly_description:"The common name of the system or organization that is authoritative for the information provided as identity claims.",data_type:"xs:string",scope:"profile"},{name:"locality",user_friendly_name:"City/town",user_friendly_description:"The city, municipality or district of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"region",user_friendly_name:"State Or Province",user_friendly_description:"The province or state code of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"authoritative_party_identifier",user_friendly_name:"Authoritative Party Identifier",user_friendly_description:"A unique identifier of the system or organization that is authoritative for the information provided as identity claims.",data_type:"xs:string",scope:"profile"},{name:"authentication_zone_identifier",user_friendly_name:"Authentication Zone Identifier",user_friendly_description:"A unique identifier for the authentication zone this client is in.",data_type:"xs:anyURI",scope:"profile"},{name:"sector_identifier_uri",user_friendly_name:"Privacy Zone Identifier",user_friendly_description:"An identifier issued by IAS that represents a privacy zone.\xc2 A privacy zone is used to distinguish a set of relying parties that have the authority to share user identifiers.",data_type:"xs:anyURI",scope:"profile"},{name:"display_name",user_friendly_name:"Name",user_friendly_description:"The individual's name which their preferred name if available or composed of their documented name.",data_type:"xs:string",scope:"profile"},{name:"identity_assurance_level3",user_friendly_name:"Identity Assurance Level 3",user_friendly_description:"An indicator that there is high confidence in the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:boolean",scope:"profile"},{name:"transaction_type",user_friendly_name:"Transaction Type",user_friendly_description:"An indicator of which channel was used to authenticate the individual.",data_type:"xs:string",scope:"profile"},{name:"given_name",user_friendly_name:"Given Name",user_friendly_description:"The individual's documented given name (first name only) recorded from valid identification.",data_type:"xs:string",scope:"profile"},{name:"identity_assurance_level1",user_friendly_name:"Identity Assurance Level 1",user_friendly_description:"An indicator that there is low confidence in the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:boolean",scope:"profile"},{name:"age_19_or_over",user_friendly_name:"Age 19 Or Over",user_friendly_description:"An indicator of whether the individual's age is 19 years or greater based on the documented birth date recorded from valid identification.",data_type:"xs:boolean",scope:"profile"},{name:"transaction_identifier",user_friendly_name:"Transaction Identifier",user_friendly_description:"A unique identifier of the transaction that was used to authenticate the individual.",data_type:"xs:string",scope:"profile"},{name:"given_names",user_friendly_name:"Given Names",user_friendly_description:"The individual's documented given names (first and middle) recorded from valid identification",data_type:"xs:string",scope:"profile"},{name:"street_address",user_friendly_name:"Street Address",user_friendly_description:"The street address lines of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"country",user_friendly_name:"Country",user_friendly_description:"The country code of an individual's provided residential address.",data_type:"xs:string",scope:"address"},{name:"age",user_friendly_name:"Age",user_friendly_description:"The individual's age in years based on the documented birth date recorded from valid identification.",data_type:"xs:integer",scope:"profile"},{name:"identity_assurance_level2",user_friendly_name:"Identity Assurance Level 2",user_friendly_description:"An indicator that there is medium confidence in the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:boolean",scope:"profile"},{name:"identification_level",user_friendly_name:"Identification Level",user_friendly_description:"The level of confidence in the certainty of the identification of the individual according to the OCIO Evidence of Identity Standard.",data_type:"xs:integer",scope:"profile"},{name:"email",user_friendly_name:"Email Address",user_friendly_description:"The email address provided by an individual (and verified by IAS)",data_type:"xs:string",scope:"email"},{name:"identity_assurance_level",user_friendly_name:"Identity Assurance Level",user_friendly_description:"The level of confidence in the certainty of the identity claims of the individual according to the OCIO Identity Assurance Standard.",data_type:"xs:integer",scope:"profile"}]}},31513:function(e,t,r){"use strict";r.d(t,{Dy:function(){return g},F3:function(){return D},O5:function(){return C},QE:function(){return b},R5:function(){return R},Sx:function(){return P},UB:function(){return A},UT:function(){return m},Wv:function(){return _},he:function(){return j},jt:function(){return I},kC:function(){return k},kF:function(){return T},ob:function(){return x},qu:function(){return w},rn:function(){return O},z9:function(){return E},zO:function(){return S}});var n,i=r(50029),a=r(16835),o=r(59499),s=r(87794),u=r.n(s);r(25751);var c=r(90352),l=r(62248),f=r(99154),d=r(85893);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t0?i:null,a=a.length>0?a:null;var o=t.map(function(e){return e.value});return[a,i,o=o.length>0?o:null]},g=function(e){var t=e.bceidApproved,r=e.githubApproved,n=e.digitalCredentialApproved,i=e.bcServicesCardApproved,a=e.environments,o=void 0===a?[]:a,s=e.serviceType,u=(0,f.Jx)(e),l=(0,f.dV)(e),d=(0,f.S3)(e),p=(0,f.e$)(e),m=c.TJ.map(function(t){var r=e.devIdps;return h(h({},t),{},{idps:r||[]})});if("gold"===s){var g=j(e),y=R(e),b=I(e),x=T(e),S=m.filter(function(e){return o.includes(e.name)});return u&&(!t||g)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f.JK)),e})),l&&(!r||y)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f.Qf)),e})),d&&(!n||b)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f.DK)),e})),p&&(!i||x)&&(S=S.map(function(e){return"prod"===e.name&&(e.idps=e.idps.filter(f._x)),e})),S}var w=o.concat()||[];return u&&!t&&(w=w.filter(function(e){return"prod"!==e})),m.filter(function(e){return w.includes(e.name)})},y=function(e){return e?JSON.parse(decodeURIComponent(Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/"))).reduce(function(e,t){var r=("00"+t.charCodeAt(0).toString(16)).slice(-2);return"".concat(e,"%").concat(r)},""))):null},b=function(e){if(!e)return null;var t=e.split(".");return y((0,a.Z)(t,2)[1])},x=function(e){if(!e)return null;var t=e.split(".");return y((0,a.Z)(t,1)[0])},S=function(){var e=new Uint32Array(28);crypto.getRandomValues(e);var t=[];return e.forEach(function(e){return t.push("0".concat(e.toString(16).substr(-2)))}),t.reduce(function(e,t){return"".concat(e).concat(t)},"")},w=(n=(0,i.Z)(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new TextEncoder().encode(t),e.abrupt("return",crypto.subtle.digest("SHA-256",r));case 4:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),E=function(e){return btoa(new Uint8Array(e).reduce(function(e,t){return"".concat(e).concat(String.fromCharCode(t))},"")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},A=function(e){var t;return e.devValidRedirectUris&&0!==e.devValidRedirectUris.length||(e.devValidRedirectUris=[""]),e.testValidRedirectUris&&0!==e.testValidRedirectUris.length||(e.testValidRedirectUris=[""]),e.prodValidRedirectUris&&0!==e.prodValidRedirectUris.length||(e.prodValidRedirectUris=[""]),e.teamId?e.teamId=String(e.teamId):e.usesTeam=!1,Object.entries(t=e).forEach(function(e){var r=(0,a.Z)(e,2),n=r[0];null===r[1]&&delete t[n]}),t},C=function(e){return e.map(function(e){if(Object.keys(c.Qj).map(function(e){return".".concat(e)}).includes(e.property)){var t=e.property.slice(1);e.message=c.Qj[t]||e.message}else(e.property.includes("ValidRedirectUris")||e.property.includes("SamlLogoutPostBindingUri")||e.property.includes("bcscAttributes"))&&("should be string"===e.message?e.message="":"should NOT have fewer than 1 items"===e.message?e.message="":e.message=c.Qj.redirectUris);return e})},P=function(e){if(!e||0===e.length)return(0,d.jsx)("div",{children:"No changes"});var t=e.map(function(e){var t=e.kind,r=e.lhs,n=e.rhs,i=e.path,a=e.item,o=i[0];switch(t){case"E":return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Edited ",o,": "]}),"Changed ",(0,d.jsx)("code",{children:String(r)})," to ",(0,d.jsx)("code",{children:String(n)})]});case"A":if((null==a?void 0:a.kind)==="D")return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Changed Array ",o,": "]}),"Deleted ",(0,d.jsxs)("code",{children:[" ",null==a?void 0:a.lhs]})]});if((null==a?void 0:a.kind)==="N")return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Changed Array ",o,": "]}),"Added ",(0,d.jsx)("code",{children:null==a?void 0:a.rhs})]});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Changed Array ",o,": "]}),"Edited"," ",(0,d.jsxs)("code",{children:[null==a?void 0:a.lhs," to ",null==a?void 0:a.rhs]})]});case"N":return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("strong",{children:["Added ",o,": "]}),(0,d.jsx)("code",{children:a})]});case"D":return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("strong",{children:["Deleted ",o," "]})});default:return(0,d.jsx)("code",{children:JSON.stringify(e,null,2)})}});return(0,d.jsx)("ul",{children:t.map(function(e,t){return(0,d.jsx)("li",{children:e},t)})})},O=function(e){return e.some(function(e){return["submitted","pr","prFailed","planned","planFailed","approved","applyFailed"].includes(e.status||"")})};function _(e,t){if(1===e.length)return!1;var r=e.find(function(e){return e.id===t});return 1!==e.filter(function(e){return"admin"===e.role}).length||(null==r?void 0:r.role)!=="admin"}var k=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},F=function(e,t){return"Submitted"===(0,l.n)(e.status||"draft")&&!!e.lastChanges&&0!==e.lastChanges.length&&e.lastChanges.some(function(e){return e.path[0]===t&&!1===e.lhs&&!0===e.rhs})},j=function(e){return F(e,"bceidApproved")},R=function(e){return F(e,"githubApproved")},I=function(e){return F(e,"digitalCredentialApproved")},T=function(e){return F(e,"bcServicesCardApproved")},D=function(e){var t=new Date;return t.setDate(t.getDate()-e),t}},84595:function(e,t,r){"use strict";r.d(t,{W:function(){return h}});var n,i=r(50029),a=r(87794),o=r.n(a),s=r(31166),u=r(11752),c=r.n(u),l=r(16689),f=r(31513),d=(c()()||{}).publicRuntimeConfig,p=(void 0===d?{}:d).sso_client_id,h=(n=(0,i.Z)(o().mark(function e(t){var r,n,i,a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[,"e02"]);case 2:if(r=l.$.keys,n=(0,f.ob)(t),void 0!==(i=null==r?void 0:r.find(function(e){return e.kid===n.kid}))){e.next=8;break}return console.error("public key not found in JWK jwks.json"),e.abrupt("return",[,"e02"]);case 8:if(a=(0,f.QE)(t),!(Date.now()>=1e3*a.exp)){e.next=12;break}return console.log("token has expired"),e.abrupt("return",[,"e02"]);case 12:if(u=s.KZ.getKey(i),s.fs.jws.JWS.verifyJWT(t,u,{alg:["RS256"],gracePeriod:28800})){e.next=17;break}return console.error("signature verification failed"),e.abrupt("return",[,"e02"]);case 17:if(!(0!==a.aud.localeCompare(p))){e.next=21;break}return console.error("token was not issued for this audience"),e.abrupt("return",[,"e02"]);case 21:if(["idir","azureidir"].includes(a.identity_provider)){e.next=24;break}return console.error("invalid identity provider ".concat(a.identity_provider)),e.abrupt("return",[,"e03"]);case 24:if(!(!a.idir_user_guid||!a.email)){e.next=27;break}return console.error("invalid user account"),e.abrupt("return",[,"e03"]);case 27:return e.abrupt("return",[a]);case 28:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},88757:function(e,t,r){"use strict";r.d(t,{dx:function(){return j},hP:function(){return k},iq:function(){return _},kG:function(){return F},rg:function(){return R}});var n,i,a,o=r(59499),s=r(50029),u=r(87794),c=r.n(u),l=r(9669),f=r.n(l),d=r(80129),p=r.n(d),h=r(11752),m=r.n(h),g=r(16689),y=r(31513);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var x=(m()()||{}).publicRuntimeConfig,S=void 0===x?{}:x,w=S.sso_client_id,E=S.sso_authorization_scope,A=S.sso_authorization_response_mode,C=S.sso_authorization_response_type,P=S.sso_redirect_uri,O=S.sso_token_grant_type,_=(n=(0,s.Z)(c().mark(function e(t){var r,n,i,a,s,u;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,y.zO)(),n=(0,y.zO)(),sessionStorage.setItem("oauth_state",r),sessionStorage.setItem("oidc_nonce",n),i=(0,y.zO)(),sessionStorage.setItem("code_verifier",i),e.next=8,(0,y.qu)(i);case 8:return a=e.sent,s=(0,y.z9)(a),sessionStorage.setItem("code_challenge",s),u=function(e){for(var t=1;tf&&t[r].addError("Must be ".concat(f/60," minutes or fewer."))}},J=function(e,r){return function(){e>d&&t[r].addError("Must be ".concat(d/60," minutes or fewer."))}},X={projectName:function(){/^\d/.test(i)&&t.projectName.addError("Please have your project name start with a letter")},authType:function(){"browser-login"!==K&&W&&t.authType.addError("Ensure your access is confidential when using a service account.")},devSessionIdleTimeout:Y(B,"devSessionIdleTimeout"),testSessionIdleTimeout:Y(H,"testSessionIdleTimeout"),prodSessionIdleTimeout:Y(z,"prodSessionIdleTimeout"),devSessionMaxLifespan:J($,"devSessionMaxLifespan"),testSessionMaxLifespan:J(U,"testSessionMaxLifespan"),prodSessionMaxLifespan:J(V,"prodSessionMaxLifespan"),devValidRedirectUris:function(){p.every(u)||h(p,t,"devValidRedirectUris",u)},testValidRedirectUris:function(){S.includes("test")&&!g.every(u)&&h(g,t,"testValidRedirectUris",u)},prodValidRedirectUris:function(){S.includes("prod")&&!b.every(c)&&h(b,t,"prodValidRedirectUris",c)},createTeam:function(){if(w&&(!E||""==E)){var e;null===(e=t.createTeam)||void 0===e||e.addError("Please select or create a team")}},additionalRoleAttribute:function(){a.hL.includes(C.trim())&&t.additionalRoleAttribute.addError("Please use a different name as existing claim '".concat(C.trim(),"' cannot be overwritten"))},devSamlLogoutPostBindingUri:function(){""===O||null===O||u(O)||t.devSamlLogoutPostBindingUri.addError(l)},testSamlLogoutPostBindingUri:function(){""===k||null===k||u(k)||t.testSamlLogoutPostBindingUri.addError(l)},prodSamlLogoutPostBindingUri:function(){""===j||null===j||c(j)||t.prodSamlLogoutPostBindingUri.addError(l)},clientId:function(){""!==I&&null!==I&&(I!==I.trim()||I.match(/\s/))&&t.clientId.addError("Client id is not valid")},devIdps:function(){"saml"===M&&D.length>1&&t.devIdps.addError("Only one identity provider is allowed for saml integrations"),"saml"===M&&(0,o.S3)(e)&&t.devIdps.addError("Digital Credential is not allowed for saml integrations")},projectLead:function(){!1===w&&!1===L&&t.projectLead.addError("")},bcscPrivacyZone:function(){if(D.includes("bcservicescard")&&!q){var e;null===(e=t.bcscPrivacyZone)||void 0===e||e.addError("Privacy zone is required for BC Services Card")}},bcscAttributes:function(){if(D.includes("bcservicescard")&&(null==G?void 0:G.length)===0){var e;null===(e=t.bcscAttributes)||void 0===e||e.addError("Please select at least one attribute")}}};["dev","test","prod"].map(function(r){X["".concat(r,"HomePageUri")]=function(){if(D.includes("bcservicescard")&&!c(e["".concat(r,"HomePageUri")])){var n;null===(n=t["".concat(r,"HomePageUri")])||void 0===n||n.addError(l)}}}),r||(r=Object.keys(X));for(var Q=0;Q0,u=i()(e,t,s?(o=t.customValidation,function(e,t){return p(e,t,o)}):void 0).errors;u.length>0&&(n[a]=u)}}),n}},96086:function(e){"use strict";var t=Object.assign.bind(Object);e.exports=t,e.exports.default=e.exports},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(24444)}])},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,a=u(e),o=a[0],s=a[1],c=new i((o+s)*3/4-s),l=0,f=s>0?o-4:o;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;o>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&a.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/_next/static/chunks/pages/admin-dashboard-337bead842b9d71c.js b/_next/static/chunks/pages/admin-dashboard-337bead842b9d71c.js deleted file mode 100644 index c81d6ff..0000000 --- a/_next/static/chunks/pages/admin-dashboard-337bead842b9d71c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[897],{83333:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r,i=n(71383);n(67294);var a=n(71893),s=n(31513),o=n(85893),l=a.ZP.div(r||(r=(0,i.Z)(["\n margin-top: 20px;\n max-height: calc(100vh - 250px);\n overflow: auto;\n"])));function c(e){var t=e.events;return(0,o.jsx)(l,{children:t&&0!==t.length?t.map(function(e){var t;return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Event Code: "}),e.eventCode]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Created Time: "}),(t=e.createdAt,new Date(t).toLocaleString())]}),e.idirUserDisplayName&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Created By: "}),e.idirUserDisplayName]})}),e.details&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:(0,o.jsx)("strong",{children:"Details"})}),"request-update-success"===e.eventCode?(0,o.jsxs)(o.Fragment,{children:[(0,s.Sx)(e.details.changes),(0,o.jsx)("strong",{children:"Comment: "}),(0,o.jsx)("p",{children:e.details.comment})]}):(0,o.jsx)("pre",{children:(0,o.jsx)("code",{children:JSON.stringify(e.details||{},void 0,2)})})]}),(0,o.jsx)("hr",{})]},e.id)}):(0,o.jsx)("div",{children:"No events found"})})}},19344:function(e,t,n){"use strict";var r,i,a,s=n(71383),o=n(71893),l=n(77740),c=n(63005),u=n(85893),d=o.ZP.table(r||(r=(0,s.Z)(["\n font-size: unset;\n & tr {\n display: flex;\n margin-bottom: 5px;\n & > td {\n border: none;\n padding: 0 5px 0 0;\n }\n }\n"]))),p=o.ZP.span(i||(i=(0,s.Z)(["\n font-weight: 600;\n"]))),v=o.ZP.ul(a||(a=(0,s.Z)(["\n list-style: none;\n margin: 0;\n & li {\n margin: 0;\n }\n"]))),h=function(e){var t=e.list,n=e.title,r=e.inline,i=void 0!==r&&r,a=e.testid;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:n}),((null==t?void 0:t.length)===1||i)&&(0,u.jsx)(p,{"data-testid":a,children:null==t?void 0:t.map(function(e,n){return(0,u.jsxs)("span",{children:[e,n!==t.length-1&&", "," "]},e)})})]}),!i&&((null==t?void 0:t.length)||0)>1&&(0,u.jsx)("tr",{children:(0,u.jsx)("td",{children:(0,u.jsx)(p,{children:(0,u.jsx)(v,{children:null==t?void 0:t.map(function(e){return(0,u.jsx)("li",{children:e},e)})})})})})]})};t.Z=function(e){var t,n,r,i,a,s,o,v,f=e.children,x=e.request,b=e.teams;if(!x)return null;var j=null!==(i=x.devIdps)&&void 0!==i?i:[],m="saml"!==x.protocol,g=j.map(function(e){return c.S[e]}),S="";x.usesTeam&&(S=(null===(v=(void 0===b?[]:b).find(function(e){return String(e.id)===String(x.teamId)}))||void 0===v?void 0:v.name)||x.team&&x.team.name);var w=(t=x.primaryEndUsers,n=x.primaryEndUsersOther,null==t?void 0:t.map(function(e){switch(e){case"livingInBC":return"People living in BC";case"businessInBC":return"People doing business/travel in BC";case"bcGovEmployees":return"BC Gov Employees";case"other":return"Other: ".concat(null!=n?n:"");default:return""}}));return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(d,{children:(0,u.jsxs)("tbody",{children:[S?(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Associated Team:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"associated-team",children:S})})]}):(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Are you accountable for this project?"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"you-accountable",children:void 0===(r=x.projectLead)?"":r?"Yes":"No"})})]}),(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Client Protocol:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"client-protocol",children:m?"OpenID Connect":"SAML"})})]}),m&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Client Type:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"client-type-team",children:x.publicAccess?"Public":"Confidential"})})]}),(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Usecase:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"use-case",children:l.F[x.authType||"browser-login"]})})]}),(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Project Name:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"project-name",children:x.projectName})})]}),w&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Primary End Users:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"project-name",children:w.join(", ")})})]}),x.additionalRoleAttribute&&(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:"Additional Role Attribute:"}),(0,u.jsx)("td",{children:(0,u.jsx)(p,{"data-testid":"add-role-attrib",children:x.additionalRoleAttribute})})]}),(0,u.jsx)(h,{list:g,title:"Identity Providers Required:",inline:!0,testid:"idp-required"}),(null===(a=x.environments)||void 0===a?void 0:a.includes("dev"))&&(0,u.jsx)(h,{list:x.devValidRedirectUris,title:"Dev Redirect URIs:",testid:"dev-uri"}),(null===(s=x.environments)||void 0===s?void 0:s.includes("test"))&&(0,u.jsx)(h,{list:x.testValidRedirectUris,title:"Test Redirect URIs:",testid:"test-uri"}),(null===(o=x.environments)||void 0===o?void 0:o.includes("prod"))&&(0,u.jsx)(h,{list:x.prodValidRedirectUris,title:"Prod Redirect URIs:",testid:"prod-uri"}),f]})})})}},63005:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var r={idir:"IDIR",azureidir:"IDIR - MFA",bceidbasic:"Basic BCeID",bceidbusiness:"Business BCeID",bceidboth:"Basic or Business BCeID",githubbcgov:"GitHub BC Gov",githubpublic:"GitHub",digitalcredential:"Digital Credential",bcservicescard:"BC Services Card"}},77740:function(e,t,n){"use strict";n.d(t,{F:function(){return r}});var r={"browser-login":"Browser Login","service-account":"Service Account",both:"Browser Login & Service Account"}},67569:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ey}});var r,i,a,s,o,l,c=n(16835),u=n(50029),d=n(71383),p=n(87794),v=n.n(p),h=n(67294),f=n(11163),x=n(20070),b=n.n(x),j=n(59417),m=n(53442),g=n(37226),S=n(76691),w=n(61165),C=n(63055),y=n(31513),E=n(71893),P=n(85330),A=n(99154),Z=n(19344),k=n(4826),U=n(23157),O=[{value:"draft",label:"Draft"},{value:"submitted",label:"Submitted"},{value:"planned",label:"Planned"},{value:"planFailed",label:"Plan Failed"},{value:"applied",label:"Applied"},{value:"applyFailed",label:"Apply Failed"}],R=n(85893),T=function(e){var t,n=e.request,r=e.onUpdate,i=(0,h.useState)(n.status),a=i[0],s=i[1],o="edit-metadata",l=(t=(0,u.Z)(v().mark(function e(){return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.Uw)({id:n.id,status:a});case 2:if(!r){e.next=5;break}return e.next=5,r();case 5:window.location.hash="#";case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,h.useEffect)(function(){s(n.status)},[n.id]);var c=(0,R.jsxs)("div",{"data-testid":"integration-status",children:[(0,R.jsx)("p",{style:{fontWeight:"bold"},children:"Integration Status"}),(0,R.jsx)(U.ZP,{className:"react-select-container",classNamePrefix:"select",options:O.filter(function(e){return["draft","submitted"].includes(e.value)}),onChange:function(e){return s(e.value)},isSearchable:!0})]});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k.default,{variant:"bcPrimary",size:"small",onClick:function(){return window.location.hash=o},children:"Edit Metadata"}),(0,R.jsx)(w.Z,{id:o,content:c,onConfirm:l,icon:j.UJf,title:"Edit Metadata",closable:!0})]})},I=E.ZP.div(r||(r=(0,d.Z)(["\n max-height: calc(100vh - 250px);\n overflow: auto;\n"])));function D(e){var t=e.currentUser,n=e.request,r=e.onUpdate;return n?(0,R.jsxs)(I,{children:[(0,R.jsx)("br",{}),(0,R.jsxs)(Z.Z,{request:n,children:[(0,R.jsx)("br",{}),t.isAdmin&&(0,R.jsx)(T,{request:n,onUpdate:r})]})]}):null}var F=n(59499),_=n(42894),q=n(70300),N=n(76944),B=n(83333);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t td {\n border: none;\n padding: 0 5px 0 0;\n }\n }\n"]))),v=o.ZP.span(i||(i=(0,s.Z)(["\n font-weight: 600;\n"]))),h=o.ZP.ul(a||(a=(0,s.Z)(["\n list-style: none;\n margin: 0;\n & li {\n margin: 0;\n }\n"]))),f=function(e){var t=e.list,n=e.title,r=e.inline,i=void 0!==r&&r,a=e.testid;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:n}),((null==t?void 0:t.length)===1||i)&&(0,d.jsx)(v,{"data-testid":a,children:null==t?void 0:t.map(function(e,n){return(0,d.jsxs)("span",{children:[e,n!==t.length-1&&", "," "]},e)})})]}),!i&&((null==t?void 0:t.length)||0)>1&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{children:(0,d.jsx)(v,{children:(0,d.jsx)(h,{children:null==t?void 0:t.map(function(e){return(0,d.jsx)("li",{children:e},e)})})})})})]})};t.Z=function(e){var t,n,r,i,a,s,o,h,x=e.children,b=e.request,j=e.teams,m=e.privacyZone;if(!b)return null;var g=null!==(i=b.devIdps)&&void 0!==i?i:[],w="saml"!==b.protocol,S=g.map(function(e){return l.S[e]}),y=(0,u.e$)(b),C="";b.usesTeam&&(C=(null===(h=(void 0===j?[]:j).find(function(e){return String(e.id)===String(b.teamId)}))||void 0===h?void 0:h.name)||b.team&&b.team.name);var E=(t=b.primaryEndUsers,n=b.primaryEndUsersOther,null==t?void 0:t.map(function(e){switch(e){case"livingInBC":return"People living in BC";case"businessInBC":return"People doing business/travel in BC";case"bcGovEmployees":return"BC Gov Employees";case"other":return"Other: ".concat(null!=n?n:"");default:return""}}));return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(p,{children:(0,d.jsxs)("tbody",{children:[C?(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Associated Team:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"associated-team",children:C})})]}):(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Are you accountable for this project?"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"you-accountable",children:void 0===(r=b.projectLead)?"":r?"Yes":"No"})})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Client Protocol:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"client-protocol",children:w?"OpenID Connect":"SAML"})})]}),w&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Client Type:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"client-type-team",children:b.publicAccess?"Public":"Confidential"})})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Usecase:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"use-case",children:c.F[b.authType||"browser-login"]})})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Project Name:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"project-name",children:b.projectName})})]}),E&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Primary End Users:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"project-name",children:E.join(", ")})})]}),b.additionalRoleAttribute&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Additional Role Attribute:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{"data-testid":"add-role-attrib",children:b.additionalRoleAttribute})})]}),(0,d.jsx)(f,{list:S,title:"Identity Providers Required:",inline:!0,testid:"idp-required"}),y&&(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:"Privacy Zone:"}),(0,d.jsx)("td",{children:(0,d.jsx)(v,{children:m})})]}),(null===(a=b.environments)||void 0===a?void 0:a.includes("dev"))&&(0,d.jsx)(f,{list:b.devValidRedirectUris,title:"Dev Redirect URIs:",testid:"dev-uri"}),(null===(s=b.environments)||void 0===s?void 0:s.includes("test"))&&(0,d.jsx)(f,{list:b.testValidRedirectUris,title:"Test Redirect URIs:",testid:"test-uri"}),(null===(o=b.environments)||void 0===o?void 0:o.includes("prod"))&&(0,d.jsx)(f,{list:b.prodValidRedirectUris,title:"Prod Redirect URIs:",testid:"prod-uri"}),x]})})})}},63005:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var r={idir:"IDIR",azureidir:"IDIR - MFA",bceidbasic:"Basic BCeID",bceidbusiness:"Business BCeID",bceidboth:"Basic or Business BCeID",githubbcgov:"GitHub BC Gov",githubpublic:"GitHub",digitalcredential:"Digital Credential",bcservicescard:"BC Services Card"}},77740:function(e,t,n){"use strict";n.d(t,{F:function(){return r}});var r={"browser-login":"Browser Login","service-account":"Service Account",both:"Browser Login & Service Account"}},67569:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eE}});var r,i,a,s,o,c,l=n(16835),u=n(50029),d=n(71383),p=n(87794),v=n.n(p),h=n(67294),f=n(11163),x=n(20070),b=n.n(x),j=n(59417),m=n(53442),g=n(37226),w=n(76691),S=n(61165),y=n(63055),C=n(31513),E=n(71893),P=n(85330),A=n(99154),Z=n(19344),k=n(4826),U=n(23157),O=[{value:"draft",label:"Draft"},{value:"submitted",label:"Submitted"},{value:"planned",label:"Planned"},{value:"planFailed",label:"Plan Failed"},{value:"applied",label:"Applied"},{value:"applyFailed",label:"Apply Failed"}],R=n(85893),T=function(e){var t,n=e.request,r=e.onUpdate,i=(0,h.useState)(n.status),a=i[0],s=i[1],o="edit-metadata",c=(t=(0,u.Z)(v().mark(function e(){return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.Uw)({id:n.id,status:a});case 2:if(!r){e.next=5;break}return e.next=5,r();case 5:window.location.hash="#";case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,h.useEffect)(function(){s(n.status)},[n.id]);var l=(0,R.jsxs)("div",{"data-testid":"integration-status",children:[(0,R.jsx)("p",{style:{fontWeight:"bold"},children:"Integration Status"}),(0,R.jsx)(U.ZP,{className:"react-select-container",classNamePrefix:"select",options:O.filter(function(e){return["draft","submitted"].includes(e.value)}),onChange:function(e){return s(e.value)},isSearchable:!0})]});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k.default,{variant:"bcPrimary",size:"small",onClick:function(){return window.location.hash=o},children:"Edit Metadata"}),(0,R.jsx)(S.Z,{id:o,content:l,onConfirm:c,icon:j.UJf,title:"Edit Metadata",closable:!0})]})},I=n(16239),D=E.ZP.div(r||(r=(0,d.Z)(["\n max-height: calc(100vh - 250px);\n overflow: auto;\n"])));function F(e){var t=e.currentUser,n=e.request,r=e.onUpdate,i=(0,h.useState)([]),a=i[0],s=i[1],o=(0,h.useState)(""),c=o[0],u=o[1];return((0,h.useEffect)(function(){(0,I.k)().then(function(e){var t=(0,l.Z)(e,1)[0];t&&s(t)})},[]),(0,h.useEffect)(function(){u((0,A.xN)(a,null==n?void 0:n.bcscPrivacyZone))},[null==n?void 0:n.id,a]),n)?(0,R.jsxs)(D,{children:[(0,R.jsx)("br",{}),(0,R.jsxs)(Z.Z,{request:n,privacyZone:c,children:[(0,R.jsx)("br",{}),t.isAdmin&&(0,R.jsx)(T,{request:n,onUpdate:r})]})]}):null}var _=n(59499),q=n(42894),N=n(70300),B=n(76944),K=n(83333);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;tsvg {\n overflow: initial;\n }\n ",close:"\n cursor: pointer !important;\n text-align: center;\n text-decoration: none;\n border-radius: 0.2222em;\n padding: 0.4em 0.5em;\n margin-right: 20px;\n "},size:{small:{container:"\n font-size: 0.8rem;\n "},medium:{container:"\n font-size: 1rem;\n "},large:{container:"\n font-size: 1.2rem;\n "}},variant:{success:{container:"\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #2d4821;\n\n & a {\n color: #2b542c;\n }\n ",content:"\n color: #2d4821;\n ",close:"\n color: #2d4821;\n border: 1px solid #2d4821;\n\n &:hover {\n background: #2d4821;\n color: #fff;\n }\n ",group:"\n color: #2d4821;\n "},info:{container:"\n background-color: #d9eaf7;\n border-color: #afd3ee;\n color: #313132;\n\n & a {\n color: #1a5a96;\n }\n ",content:"\n color: #313132;\n ",close:"\n color: #313132;\n border: 1px solid #313132;\n\n &:hover {\n background: #313132;\n color: #fff;\n }\n ",group:"\n color: #313132;\n "},warning:{container:"\n background-color: #f9f1c6;\n border-color: #faebcc;\n color: #6c4a00;\n\n & a {\n color: #66512c;\n }\n ",content:"\n color: #66512c;\n ",close:"\n color: #66512c;\n border: 1px solid #66512c;\n\n &:hover {\n background: #66512c;\n color: #fff;\n }\n ",group:"\n color: #66512c;\n "},danger:{container:"\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a12622;\n\n & a {\n color: #843534;\n }\n ",content:"\n color: #a12622;\n ",close:"\n color: #a12622;\n border: 1px solid #a12622;\n\n &:hover {\n background: #a12622;\n color: #fff;\n }\n ",group:"\n color: #a12622;\n "}},flex:{container:"\n display: flex;\n ",group:"\n margin: auto 0.5rem;\n "}},{defaultProps:{variant:"info",size:"medium",flex:!0},staticProps:[]},{group:{align:{left:"\n margin-right: auto;\n ",right:"\n margin-left: auto;\n "}}}),eM=function(e){switch(e){case"success":return ez.CheckCircle;case"info":return ez.InfoCircle;case"warning":return ez.ExclamationTriangle;default:return ez.ExclamationCircle}};function eK(e){return(0,eG.jsxs)(eL,eq(eq({},e),{},{children:[(0,eG.jsx)(eL.Group,{style:{marginTop:"1px"},children:(0,eG.jsx)(ez.FaSVG,{children:(0,eG.jsx)("path",{fill:"currentColor",d:eM(e.variant)})})}),(0,eG.jsx)(eL.Content,{children:e.content?e.content:e.children}),e.closable&&(0,eG.jsx)(eL.Group,{align:"right",children:(0,eG.jsx)(eL.Close,{children:"x"})})]}))}var eH=t(16835),eV=t(99603),e_=t(59417),eW=t(64735),eY=t(42894),eJ=t(21963),e$=(r=(0,eO.Z)(eR().mark(function e(n,t){var r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eJ.e.post("installation",{requestId:n,environment:t}).then(function(e){return e.data});case 3:return r=e.sent,e.abrupt("return",[r,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n){return r.apply(this,arguments)}),eQ=(a=(0,eO.Z)(eR().mark(function e(n,t){var r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eJ.e.put("installation",{requestId:n,environment:t}).then(function(e){return e.data});case 3:return r=e.sent,e.abrupt("return",[r,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n){return a.apply(this,arguments)}),eX=(i=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.idp,a=n.property,i=n.searchKey,s=n.integrationId,e.prev=1,e.next=4,eJ.e.post("keycloak/users",{environment:t,idp:r,property:a,searchKey:i,integrationId:s}).then(function(e){return e.data});case 4:return o=e.sent,e.abrupt("return",[o,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return i.apply(this,arguments)}),e0=(s=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,i=void 0===(a=n.search)?"":a,e.prev=1,e.next=4,eJ.e.post("keycloak/roles",{environment:t,integrationId:r,search:i}).then(function(e){return e.data});case 4:return s=e.sent,e.abrupt("return",[s,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return s.apply(this,arguments)}),e1=(o=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,i=n.compositeRoleNames,e.prev=1,e.next=4,eJ.e.post("keycloak/set-composite-roles",{environment:t,integrationId:r,roleName:a,compositeRoleNames:i}).then(function(e){return e.data});case 4:return s=e.sent,e.abrupt("return",[s,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return o.apply(this,arguments)}),e2=(c=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,e.prev=1,e.next=4,eJ.e.post("keycloak/get-composite-roles",{environment:t,integrationId:r,roleName:a}).then(function(e){return e.data});case 4:return i=e.sent,e.abrupt("return",[i,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return c.apply(this,arguments)}),e3=(l=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o,c,l;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.username,s=void 0===(i=n.first)?0:i,c=void 0===(o=n.max)?50:o,e.prev=1,e.next=4,eJ.e.post("keycloak/user-roles",{environment:t,integrationId:r,username:a,first:s,max:c}).then(function(e){return e.data});case 4:return l=e.sent,e.abrupt("return",[l,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return l.apply(this,arguments)}),e5=(u=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.username,i=n.roleName,s=n.mode,e.prev=1,e.next=4,eJ.e.put("keycloak/user-role",{environment:t,integrationId:r,username:a,roleName:i,mode:s}).then(function(e){return e.data});case 4:return o=e.sent,e.abrupt("return",[o,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return u.apply(this,arguments)}),e4=(d=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.username,i=n.roleNames,e.prev=1,e.next=4,eJ.e.put("keycloak/user-roles",{environment:t,integrationId:r,username:a,roleNames:i}).then(function(e){return e.data});case 4:return s=e.sent,e.abrupt("return",[s,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return d.apply(this,arguments)}),e7=(p=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o,c,l;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,s=void 0===(i=n.first)?0:i,c=void 0===(o=n.max)?50:o,e.prev=1,e.next=4,eJ.e.post("keycloak/role-users",{environment:t,integrationId:r,roleName:a,first:s,max:c}).then(function(e){return e.data});case 4:return l=e.sent,e.abrupt("return",[l,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return p.apply(this,arguments)}),e8=(h=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.integrationId,r=n.roles,e.prev=1,e.next=4,eJ.e.post("keycloak/bulk-roles",{integrationId:t,roles:r}).then(function(e){return e.data});case 4:return a=e.sent,e.abrupt("return",[a,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return h.apply(this,arguments)}),e6=(f=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,e.prev=1,e.next=4,eJ.e.post("keycloak/delete-role",{environment:t,integrationId:r,roleName:a}).then(function(e){return e.data});case 4:return i=e.sent,e.abrupt("return",[i,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return f.apply(this,arguments)}),e9=t(71057),ne=t(73923),nn=t(31513),nt=t(63055),nr=t(15812),na=t(44e3),ni=t(63005),ns=t(74150),no=t(90352),nc=eT.ZP.div(b||(b=(0,eN.Z)(["\n text-align: center;\n"]))),nl=eT.ZP.div(j||(j=(0,eN.Z)(["\n color: #000;\n font-size: ",";\n font-weight: bold;\n"])),nt.n5),nu=eT.ZP.span(y||(y=(0,eN.Z)(["\n color: #3e3e3e;\n font-size: 14px;\n font-weight: 700;\n"]))),nd=eT.ZP.div(w||(w=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),np=eT.ZP.div(Z||(Z=(0,eN.Z)(["\n font-size: 18px;\n font-weight: bold;\n color: #000;\n border-bottom: 1px solid gray;\n"]))),nh=(0,nr.hU)(function(e){var n,t,r,a=e.integration,i=e.alert,s=(0,eE.useState)(!1),o=s[0],c=s[1],l=(n=(0,eO.Z)(eR().mark(function e(n){var t,r,s,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,e$(a.id,n);case 3:if(t=e.sent,s=(r=(0,eH.Z)(t,2))[0],o=r[1],c(!1),!o){e.next=11;break}return i.show({variant:"danger",content:"Failed to download installation"}),e.abrupt("return",null);case 11:return e.abrupt("return",s);case 12:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),u=(t=(0,eO.Z)(eR().mark(function e(n){var t;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(n);case 2:(t=e.sent)&&(0,ne.TE)((0,ne.ON)(t));case 4:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),d=(r=(0,eO.Z)(eR().mark(function e(n){var t;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(n);case 2:(t=e.sent)&&(0,ne.Di)((0,ne.ON)(t),"".concat(a.projectName,"-installation-").concat(n,".json"));case 4:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)});return o?(0,eG.jsxs)(nc,{children:[(0,eG.jsx)(nd,{}),(0,eG.jsx)(eY.rj,{color:"#000",height:45,width:45,wrapperClass:"d-block",visible:!0})]}):(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nd,{}),(0,eG.jsx)(np,{children:"Installation JSONs"}),(0,eG.jsx)("br",{}),(0,eG.jsx)(eW.ZP,{cols:3,children:(0,nn.Dy)(a).map(function(e){if("service-account"!==a.authType&&0===e.idps.length)return null;var n=e.idps.length>0?"(".concat(e.idps.map(function(e){return ni.S[e]}).join(", "),")"):"";return(0,eG.jsxs)(eE.Fragment,{children:[(0,eG.jsx)(eW.ZP.Row,{collapse:"992",gutter:[],align:"center",children:(0,eG.jsx)(eW.ZP.Col,{span:1,style:{width:"100%",height:"30px"},children:(0,eG.jsxs)(nl,{children:[e.display," ",n]})})}),(0,eG.jsx)(eW.ZP.Row,{collapse:"992",gutter:[],align:"center",children:(0,eG.jsxs)(eW.ZP.Col,{span:3,children:[(0,eG.jsx)(e9.Z,{size:"medium",variant:"grey",onClick:function(){return u(e.name)},children:"Copy"}),"\xa0",(0,eG.jsx)(e9.Z,{size:"medium",variant:"grey",onClick:function(){return d(e.name)},children:"Download"}),"\xa0\xa0",(0,eG.jsx)(eV.G,{color:"green",icon:e_.f8k,title:"Ready"}),"\xa0",(0,eG.jsx)(nu,{children:"Ready"})]})}),(0,eG.jsx)("br",{})]},e.name)})}),(0,eG.jsxs)(na.$,{children:["For more information on how to use these details, or for the public endpoints associated to your client,"," ",(0,eG.jsx)(ns.default,{href:"".concat(no.UN,"/integrating-your-application/installation-json"),external:!0,children:"click to learn more on our wiki page"}),"."]})]})}),nf=t(4826),nx=t(61165),nv=eT.ZP.div(k||(k=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),nm=eT.ZP.span(P||(P=(0,eN.Z)(["\n color: #000;\n font-size: 1.1rem;\n font-weight: bold;\n"])));(0,eT.ZP)(eV.G)(S||(S=(0,eN.Z)(["\n margin-right: 20px;\n"])));var ng=eT.ZP.div(C||(C=(0,eN.Z)(["\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n"])));eT.ZP.hr(I||(I=(0,eN.Z)(["\n background-color: black;\n"])));var nb=(0,nr.hU)(function(e){var n,t=e.selectedRequest,r=e.alert,a=(0,eE.useState)(null),i=a[0],s=a[1],o=(0,nn.Dy)(t),c=function(e){s(e),window.location.hash="confirm-new-secret"},l=(n=(0,eO.Z)(eR().mark(function e(){var n,a,s,o,c,l;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eQ(t.id,(null==i?void 0:i.name)||null);case 2:n=e.sent,s=(a=(0,eH.Z)(n,2))[0],c=(o=a[1])?"danger":"success",l=o?"Failed to regenerate secret":"Client Secret Successfully Updated",r.show({variant:c,fadeOut:1e4,closable:!0,content:l}),window.location.hash="#",console.error(s,o);case 11:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),u=(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsxs)(ng,{children:[(0,eG.jsxs)("strong",{children:["You are about to change your client secret for your ",null==i?void 0:i.display," environment."]})," "]}),(0,eG.jsx)("br",{}),(0,eG.jsx)("p",{children:"Once you change your secret, your previous secret will no longer be valid for any applications using it."}),(0,eG.jsx)("p",{children:"This means you will need to update any applications using this client with the new JSON details before they are functional again."})]});return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nv,{}),o.map(function(e){return(0,eG.jsxs)(eE.Fragment,{children:[(0,eG.jsxs)(nm,{children:[e.display,": "]}),!t.publicAccess&&(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(nf.default,{type:"button",onClick:function(){return c(e)},children:"Change your client secret"})]}),(0,eG.jsx)("br",{}),(0,eG.jsx)("br",{})]},e.name)})]}),(0,eG.jsx)(nx.Z,{id:"confirm-new-secret",content:u,onConfirm:l,icon:e_.eHv,buttonStyle:"custom",title:"You are about to change your client secret",closable:!0})]})}),nj=t(20070),ny=t.n(nj),nw=t(30233),nZ=t(85330),nk=t(23157),nP=t(11915),nS=t(43590),nC=t.n(nS);function nI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function nD(e){for(var n=1;n * {\n padding-right: 0.5rem;\n }\n"]))),nR=eT.ZP.div(F||(F=(0,eN.Z)(["\n padding-top: 10px;\n padding-bottom: 10px;\n"]))),nE=eT.ZP.div(R||(R=(0,eN.Z)(["\n color: #ff0000;\n"]))),nT={name:"",envs:["dev"]},nB=(0,eE.forwardRef)(function(e,n){var t,r=e.integrationId,a=e.environments,i=void 0===a?["dev"]:a,s=(0,eE.useState)(!1),o=s[0],c=s[1],l=(0,eE.useState)({}),u=l[0],d=l[1],p=(0,eE.useState)({}),h=p[0],f=p[1],x=(0,eE.useState)([nT]),v=x[0],m=x[1];(0,eE.useImperativeHandle)(n,function(){var e;return{submit:(e=(0,eO.Z)(eR().mark(function e(){var n,t,a,i,s,l,p,h;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=v,o&&(n=[],nC()(u,function(e,t){n.push({name:t,envs:e})})),e.next=4,e8({integrationId:r,roles:n});case 4:if(t=e.sent,i=(a=(0,eH.Z)(t,2))[0],!a[1]){e.next=10;break}return e.abrupt("return",[!0,!1]);case 10:return s={},l={},p=!1,h=!1,nC()(i,function(e){e.failure.length>0&&nC()(e.failure,function(n){s[n]||(s[n]=[]),s[n].push(e.env),p=!0}),e.duplicate.length>0&&nC()(e.duplicate,function(n){l[n]||(l[n]=[]),l[n].push(e.env),h=!0})}),d(s),f(l),c(!0),e.abrupt("return",[p,h]);case 19:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),reset:function(){m([nT]),d({}),f({}),c(!1)}}});var g=function(e){m(v.filter(function(n,t){return t!==e}))},b=function(e,n){m(v.map(function(t,r){return r===e?{name:n,envs:t.envs}:t}))},j=(t=(0,eO.Z)(eR().mark(function e(n,t,r){return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:m(v.map(function(e,r){return r===n?{name:e.name,envs:t.map(function(e){return e.value})}:e}));case 2:case"end":return e.stop()}},e)})),function(e,n,r){return t.apply(this,arguments)}),y=null;if(o){var w=null,Z=null;Object.keys(h).length>0&&(w=(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:(0,eG.jsxs)(nF,{children:[(0,eG.jsx)(nR,{children:(0,eG.jsx)(eV.G,{icon:e_.sqG,color:"#17a2b8",title:"duplicated roles",size:"lg"})}),(0,eG.jsx)(nR,{children:"There are duplicated roles and we've skipped adding them."})]})})})),Object.keys(u).length>0&&(Z=(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:(0,eG.jsxs)(nF,{children:[(0,eG.jsx)(nR,{children:(0,eG.jsx)(eV.G,{icon:e_.eHv,color:"#dc3545",title:"failed roles",size:"lg"})}),(0,eG.jsxs)(nR,{children:["We were unable to save some of your changes.",(0,eG.jsx)("br",{}),(0,eG.jsx)("div",{className:"fw-bold",children:"Please try submitting again."})]})]})})})),y=(0,eG.jsxs)(eG.Fragment,{children:[w,Z]})}else y=(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:v.length<20?(0,eG.jsxs)(nN,{onClick:function(){m(v.concat(nT))},children:[(0,eG.jsx)(eV.G,{style:{color:"#006fc4"},icon:e_.KtF,title:"Add Role"}),(0,eG.jsx)("span",{children:"Add another role"})]}):(0,eG.jsx)(nE,{children:"You can only create 20 roles at a time. Please save before creating any new roles."})})});return(0,eG.jsx)("div",{children:(0,eG.jsxs)(nO,{children:[(0,eG.jsx)("thead",{children:(0,eG.jsxs)("tr",{children:[(0,eG.jsx)("th",{className:"role",children:"Role Name"}),(0,eG.jsx)("th",{className:"env",children:"Environments"}),(0,eG.jsx)("th",{})]})}),(0,eG.jsxs)("tbody",{children:[v.length>0?v.map(function(e,n){var t=function(n,t){return u[e.name]&&u[e.name].includes(t.children)?nD(nD({},n),{},{color:"#fff",backgroundColor:"#dc3545"}):h[e.name]&&h[e.name].includes(t.children)?nD(nD({},n),{},{color:"#fff",backgroundColor:"#17a2b8"}):n};return(0,eG.jsxs)("tr",{children:[(0,eG.jsx)("td",{className:"role",children:(0,eG.jsx)(nP.default,{size:"small","data-testid":"role-name-input-field",minLength:"2",maxLength:"100",value:e.name,disabled:o,onChange:function(e){return b(n,e.target.value)}})}),(0,eG.jsx)("td",{className:"env",children:(0,eG.jsx)(nk.ZP,{value:e.envs.map(function(e){return{value:e,label:e}}),options:i.map(function(e){return{value:e,label:e}}),isMulti:!0,isDisabled:o,placeholder:"Select...",noOptionsMessage:function(){return"You selected all environments"},onChange:function(e,t){return j(n,e,t)},styles:{multiValueLabel:t,multiValue:t}})}),(0,eG.jsx)("td",{children:!o&&v.length>1&&(0,eG.jsx)(nN,{onClick:function(){return g(n)},children:(0,eG.jsx)(eV.G,{style:{color:"#FF0303"},icon:e_.uMC,title:"Remove Role"})})})]})}):(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:"No roles added."})}),y]})]})})}),nA=t(20353),nz=t(27812),nG=t(93096),nU=t.n(nG),nq=t(29208),nL=t.n(nq),nM=t(34766),nK=t.n(nM),nH=t(76691),nV=t(53442),n_=t(75780),nW=t(80820),nY=t.n(nW),nJ=t(99503),n$=t.n(nJ),nQ=t(99245),nX=t.n(nQ),n0=t(96486),n1=eT.ZP.label(E||(E=(0,eN.Z)(["\n font-weight: bold;\n margin-bottom: 2px;\n"]))),n2=eT.ZP.div(T||(T=(0,eN.Z)(["\n display: flex;\n & > div:first-child {\n margin-right: 20px;\n }\n"]))),n3=eT.ZP.div(B||(B=(0,eN.Z)(["\n background-color: #f1f1f1;\n margin: 2px 0 2px 0;\n padding: 4px 6px;\n ","\n"])),function(e){return e.width?"width: ".concat(e.width,";"):"width: 300px;"}),n5=eT.ZP.div(A||(A=(0,eN.Z)(["\n font-size: 0.9rem;\n ","\n"])),function(e){return e.width?"width: ".concat(e.width,";"):"width: 300px;"}),n4=function(e){var n=e.children,t=e.width;return(0,eG.jsx)(n3,{width:t,children:(0,eG.jsx)(eW.ZP,{cols:6,children:(0,eG.jsxs)(eW.ZP.Row,{gutter:[],children:[(0,eG.jsx)(eW.ZP.Col,{span:5,children:n}),(0,eG.jsx)(eW.ZP.Col,{span:1,style:{textAlign:"right"},children:(0,eG.jsx)(eV.G,{icon:e_.byT,color:"#9F9F9F",size:"lg"})})]})})})},n7=function(e){var n=e.modalRef;return(0,eG.jsx)(nw.Z,{ref:n,id:"additiona-user-info",title:"Additional User Info",icon:null,cancelButtonText:"Close",cancelButtonVariant:"primary",showConfirmButton:!1,buttonAlign:"right",style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},children:function(e){if(!e)return(0,eG.jsx)(eG.Fragment,{});var n=n$()(e.attributes,nX());return n=(0,n0.mapKeys)(n,function(e,n){return ny()(n)}),(0,eG.jsxs)("div",{children:[(0,eG.jsx)(n1,{children:"GUID"}),(0,eG.jsx)(n4,{width:"400px",children:e.guid}),(0,eG.jsx)("br",{}),(0,eG.jsx)(n1,{children:"Attributes"}),(0,eG.jsxs)(n2,{children:[(0,eG.jsx)(n5,{width:"200px",children:"Key"}),(0,eG.jsx)(n5,{width:"700px",children:"Value"})]}),nY()(n,function(e,n){return(0,eG.jsxs)(n2,{children:[(0,eG.jsx)(n4,{width:"200px",children:n}),(0,eG.jsx)(n4,{width:"700px",children:e})]})})]})}})},n8=t(37226),n6=function(e){return"service-account-".concat(e)},n9=t(34798),te=t.n(n9);function tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function tt(e){for(var n=1;n0?d.map(function(){var e=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.username.startsWith("service-account-")){e.next=8;break}return t=n.username.split("-"),e.next=4,(0,n8.A_)(t[t.length-1]);case 4:r=e.sent,a=(0,eH.Z)(r,1)[0],ep([].concat((0,nz.Z)(ed),[{username:n.username,integration:a}]));case 8:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}()):ep([]),B(d.length===R),L(o.concat(d)),N(r+R),H(t),v(!1);case 23:case"end":return e.stop()}},e)})),function(e,n){return eC.apply(this,arguments)}),ew=(eI=(0,eO.Z)(eR().mark(function e(n){var t,r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!g){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.next=5,e2({environment:a,integrationId:i.id,roleName:n});case 5:if(t=e.sent,o=(r=(0,eH.Z)(t,2))[0],!(r[1]||!o)){e.next=12;break}return s.show({variant:"danger",fadeOut:5e3,closable:!0,content:"Failed to fetch composite roles."}),e.abrupt("return");case 12:W(o.map(function(e){return{label:e,value:e}})),b(!1);case 14:case"end":return e.stop()}},e)})),function(e){return eI.apply(this,arguments)}),eZ=(eD=(0,eO.Z)(eR().mark(function e(n){return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:c.current.open(n);case 1:case"end":return e.stop()}},e)})),function(e){return eD.apply(this,arguments)}),ek=null;if(0===O&&x)ek=(0,eG.jsx)(tv,{});else if(K){var eP,eS,eC,eI,eD,eN,eF=q.filter(function(e){return!e.username.startsWith("service-account-")}),eT=q.filter(function(e){return e.username.startsWith("service-account-")});ek="Users"===ec?(0,eG.jsx)(nV.Z,{variant:"mini",headers:[{accessor:"idp",Header:"IDP"},{accessor:"guid",Header:"GUID"},{accessor:"email",Header:"Email"},{accessor:"actions",Header:(0,eG.jsx)(tl,{}),disableSortBy:!0}],data:eF.length>0?eF.map(function(e){var n=e.username.split("@");if(n.length<2)return[];var t=(0,eH.Z)(n,2),r=t[0],a=t[1],i=tf[a];return{idp:ni.S[a],guid:r,email:e.email,actions:(0,eG.jsxs)(to,{children:[(0,eG.jsx)("span",{onClick:function(n){n.stopPropagation(),o.current.open({guid:e.username.split("@")[0],attributes:tt(tt({},nK()(i,function(n,t){return n[t.label]=nL()(e,t.value),n},{})),e.attributes)})},children:(0,eG.jsx)(eV.G,{style:{color:"#000"},icon:e_.Mdf,size:"lg",title:"User Detail"})}),"\xa0\xa0",(0,eG.jsx)("span",{onClick:function(){return l.current.open(e)},children:(0,eG.jsx)(eV.G,{style:{color:"#FF0303"},icon:e_.uMC,size:"lg",title:"Remove User"})})]})}}):[],loadMoreItem:function(){return ey(!1,K)},hasMoreItem:T,loader:(0,eG.jsx)(tv,{}),colfilters:[],activateRow:te(),rowSelectorKey:"guid",noDataFoundElement:(0,eG.jsx)("td",{colSpan:5,children:"No users found."})}):"Service Accounts"===ec?(0,eG.jsx)(nV.Z,{variant:"mini",headers:[{accessor:"projectName",Header:"Project Name"},{accessor:"actions",Header:(0,eG.jsx)(tu,{}),disableSortBy:!0}],data:eT.length>0?eT.map(function(e){var n,t;return{projectName:null===(n=ed.find(function(n){return n.username==e.username}))||void 0===n?void 0:null===(t=n.integration)||void 0===t?void 0:t.projectName,actions:(0,eG.jsx)("span",{onClick:function(){return u.current.open(e)},children:(0,eG.jsx)(ts,{children:(0,eG.jsx)(eV.G,{style:{color:"#FF0303"},icon:e_.uMC,size:"lg",title:"Remove Service Account"})})})}}):[],colfilters:[],activateRow:te(),rowSelectorKey:"projectName",noDataFoundElement:(0,eG.jsx)("td",{colSpan:5,children:"No service accounts found."})}):g?(0,eG.jsx)(tv,{}):(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsxs)(tr,{children:["Select the roles to be nested under the Parent role"," ",(0,eG.jsx)(n_.Z,{content:"Composite roles associate (nest) one or more additional roles within it."})]}),(0,eG.jsx)(nk.ZP,{value:_,options:eb.filter(function(e){return e.value!==K}),isMulti:!0,placeholder:"Select...",noOptionsMessage:function(){return"No roles"},onChange:(eN=(0,eO.Z)(eR().mark(function e(n){var t;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(t=em(n))||void 0===t?void 0:t.then(function(e){return e&&W(n)});case 2:case"end":return e.stop()}},e)})),function(e){return eN.apply(this,arguments)}),isDisabled:!ei}),(0,eG.jsx)(nZ.Ad,{saving:y,content:k,variant:ef?"error":"success"})]})}var eB=(0,eG.jsx)(nV.Z,{headers:[{accessor:"role",Header:"Role Name"},{accessor:"actions",Header:"",disableSortBy:!0}],noDataFoundElement:(0,eG.jsx)("td",{children:"No roles found."}),activateRow:function(e){var n=e.cells[0].value;if(n.endsWith(" (Composite role)")){var t=e.cells[0].value.length;H(n.substr(0,t-17))}else H(n)},rowSelectorKey:"role",data:z.map(function(e,n){return{role:!0==J[n]?"".concat(e," (Composite role)"):e,actions:(0,eG.jsx)(ti,{children:(0,eG.jsx)(nH.Kk,{disabled:!ei,icon:e_.$aW,role:"button","aria-label":"delete",onClick:function(n){ei&&(n.stopPropagation(),eZ(e))},title:"Delete",size:"lg",style:{marginRight:"1rem"}})})}}),colfilters:[]});return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsx)(eW.ZP.Col,{span:4,children:(0,eG.jsxs)("div",{style:{display:"flex",float:"left"},children:[(0,eG.jsx)(nZ.E1,{type:"text",maxLength:"1000",placeholder:"Search existing roles",value:C,onChange:function(e){I(e.target.value)},onKeyUp:function(e){"Enter"===e.key&&ej()}}),(0,eG.jsx)(nZ.zx,{type:"button",size:"small",variant:"bcPrimary",onClick:ej,children:"Search"})]})}),(0,eG.jsx)(eW.ZP.Col,{span:6,children:K&&(0,eG.jsx)(nZ.mQ,{onChange:function(e){el(e)},activeKey:ec,tabBarGutter:30,children:X.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:e},e)})})})]})}),(0,eG.jsx)(tc,{}),p?(0,eG.jsx)(tv,{}):(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsx)(eW.ZP.Col,{span:4,children:eB}),(0,eG.jsx)(eW.ZP.Col,{span:6,children:ek})]})}),(0,eG.jsx)(nw.Z,{ref:c,title:"Delete Role",icon:e_.eHv,onConfirm:(n=(0,eO.Z)(eR().mark(function e(n,t){var r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,e6({environment:a,integrationId:i.id,roleName:t});case 2:return r=e.sent,(o=(0,eH.Z)(r,2))[0],o[1]&&s.show({variant:"danger",content:"Failed to delete role ".concat(t,". Please try again.")}),e.next=9,eg();case 9:case"end":return e.stop()}},e)})),function(e,t){return n.apply(this,arguments)}),confirmButtonText:"Delete",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",children:(0,eG.jsx)("div",{children:"Are you sure you want to delete this role?"})}),(0,eG.jsx)(nw.Z,{id:"remove-user",ref:l,title:"Remove User from Role",icon:e_.eHv,onConfirm:(t=(0,eO.Z)(eR().mark(function e(n,t){var r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(K){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,e5({environment:a,integrationId:i.id,username:t.username,roleName:K,mode:"del"});case 4:r=e.sent,(o=(0,eH.Z)(r,2)[1])&&s.show({variant:"danger",content:o}),ey(!0,K);case 9:case"end":return e.stop()}},e)})),function(e,n){return t.apply(this,arguments)}),confirmButtonText:"Remove",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",children:(0,eG.jsx)("div",{children:"Are you sure you want to remove this user from this role?"})}),(0,eG.jsx)(nw.Z,{id:"remove-service-account",ref:u,title:"Remove Service Account from Role",icon:e_.eHv,onConfirm:(r=(0,eO.Z)(eR().mark(function e(n,t){var r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(K){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,e5({environment:a,integrationId:i.id,username:t.username,roleName:K,mode:"del"});case 4:r=e.sent,(o=(0,eH.Z)(r,2)[1])&&s.show({variant:"danger",content:o}),ey(!0,K);case 9:case"end":return e.stop()}},e)})),function(e,n){return r.apply(this,arguments)}),confirmButtonText:"Remove",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",children:(0,eG.jsx)("div",{children:"Are you sure you want to remove this service account from this role?"})}),(0,eG.jsx)(n7,{modalRef:o})]})}),tg=t(24444),tb=eT.ZP.div(K||(K=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),tj=function(e){var n,t=e.integration,r=(0,eE.useRef)(nw.V),a=(0,eE.useState)("dev"),i=a[0],s=a[1],o=(0,eE.useState)(!1),c=o[0],l=o[1],u=(0,eE.useState)(0),d=u[0],p=u[1],h=(0,eE.useContext)(tg.SurveyContext);(0,eE.useEffect)(function(){s("dev"),l((0,nA.Yr)(t))},[t.id]);var f=(null==t?void 0:t.environments)||[];return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tb,{}),(0,eG.jsx)(nZ.zx,{disabled:!c,size:"medium",variant:"primary",onClick:function(){r.current.open()},"data-testid":"create-role-button",children:"+ Create a New Role"}),(0,eG.jsx)(tb,{}),(0,eG.jsxs)(nZ.mQ,{onChange:function(e){s(e)},activeKey:i,tabBarGutter:30,destroyInactiveTabPane:!0,children:[(0,eG.jsx)("br",{}),f.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:ny()(e),children:(0,eG.jsx)(tm,{environment:e,integration:t},d)},e)})]}),(0,eG.jsx)(nw.Z,{ref:r,title:"Create New Role",icon:null,onConfirm:(n=(0,eO.Z)(eR().mark(function e(n){var t,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.current.submit();case 2:if(t=e.sent,i=(a=(0,eH.Z)(t,2))[0],s=a[1],!i){e.next=11;break}return r.current.updateConfig({confirmButtonText:"Try Again"}),e.abrupt("return",!1);case 11:if(!s){e.next=17;break}return r.current.updateConfig({showConfirmButton:!1,cancelButtonText:"Close",buttonAlign:"right"}),p(function(e){return e+1}),e.abrupt("return",!1);case 17:return e.next=19,n.current.reset();case 19:p(function(e){return e+1}),null==h||h.setShowSurvey(!0,"createRole");case 21:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),onCancel:function(e){e.current.reset()},confirmButtonText:"Save",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},children:(0,eG.jsx)(nB,{integrationId:t.id,environments:f})})]})},ty=(x=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.field,r=n.search,e.prev=1,e.next=4,eJ.e.post("bceid-webservice/idir/search",{field:t,search:r}).then(function(e){return e.data});case 4:return a=e.sent,e.abrupt("return",[a,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return x.apply(this,arguments)}),tw=(v=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.guid,r=n.userId,e.prev=1,e.next=4,eJ.e.post("bceid-webservice/idir/import",{guid:t,userId:r}).then(function(e){return e.data});case 4:return a=e.sent,e.abrupt("return",[a,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return v.apply(this,arguments)}),tZ=[{value:"idir",label:"IDIR"}],tk=[{value:"givenName",label:"First Name",allowed:["idir"]},{value:"surname",label:"Last Name",allowed:["idir"]},{value:"mail",label:"Email",allowed:["idir","bceidbasic","bceidbusiness"]},{value:"mailNickname",label:"Username",allowed:["idir","bceidbasic","bceidbusiness"]},{value:"guid",label:"IDP GUID",allowed:["bceidbasic","bceidbusiness"]}],tP=(0,eE.forwardRef)(function(e,n){e.key;var t,r,a=e.idp,i=e.property,s=e.search,o=e.infoModalRef,c=e.parentModalRef,l=(0,eE.useState)(!1),u=(l[0],l[1]),d=(0,eE.useState)(!1),p=d[0],h=d[1],f=(0,eE.useState)([]),x=f[0],v=f[1],m=(0,eE.useState)(""),g=m[0],b=m[1],j=(0,eE.useState)(i),y=j[0],w=j[1],Z=(0,eE.useState)(s),k=Z[0],P=Z[1],S=(0,eE.useState)(!1),C=S[0],I=S[1];(0,eE.useEffect)(function(){b(a)},[a]),(0,eE.useEffect)(function(){if(g){var e=tk.find(function(e){return e.value===y});if(null==e?void 0:e.allowed.includes(g))D(k,y);else{var n=tk.find(function(e){return e.allowed.includes(g)});w((null==n?void 0:n.value)||""),P("")}}},[g]);var D=(t=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s=arguments;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=s.length>1&&void 0!==s[1]?s[1]:y,!(n.length<2)){e.next=3;break}return e.abrupt("return");case 3:return h(!0),v([]),u(!0),e.next=8,ty({field:t,search:n});case 8:r=e.sent,i=(a=(0,eH.Z)(r,2))[0],a[1],i&&v(i),h(!1);case 14:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),O=(r=(0,eO.Z)(eR().mark(function e(n){var t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I(!1),e.next=3,tw({guid:n.guid,userId:n.userId});case 3:t=e.sent,(r=(0,eH.Z)(t,2))[0],r[1]?I(!0):c.current.close({idp:g,guid:n.guid});case 8:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)});return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nV.Z,{searchPlaceholder:"Enter search criteria",variant:"mini",headers:[{accessor:"firstName",Header:"First name"},{accessor:"lastName",Header:"Last Name"},{accessor:"email",Header:"Email"},{accessor:"idirUsername",Header:"IDIR username"},{accessor:"actions",Header:"",disableSortBy:!0}],rowSelectorKey:"guid",data:x.map(function(e){return{guid:e.guid,firstName:e.firstName,lastName:e.lastName,email:e.email,idirUsername:e.userId,actions:(0,eG.jsxs)(nH.c4,{children:[(0,eG.jsx)(nH.Kk,{icon:e_.Mdf,role:"button","aria-label":"view",onClick:function(){o.current.open({guid:e.guid,attributes:{username:e.userId,displayName:e.displayName,firstName:e.firstName,lastName:e.lastName,email:e.email,telephone:e.phone,company:e.company,department:e.department,title:e.jobTitle},_hash:c.current.getId()})},title:"View",size:"lg"}),(0,eG.jsx)(nH.Kk,{icon:e_.q7m,role:"button","aria-label":"import",onClick:function(){return O(e)},title:"Import",size:"lg"})]})}}),colfilters:[{value:g,multiselect:!1,onChange:b,options:tZ},{value:y,multiselect:!1,onChange:w,options:tk.filter(function(e){return e.allowed.includes(g)})}],showFilters:!0,loading:p,totalColSpan:20,searchColSpan:10,headerAlign:"bottom",headerGutter:[5,0],searchKey:k,searchLocation:"right",onSearch:D,onEnter:D,noDataFoundElement:(0,eG.jsx)("p",{children:"The user you searched for does not exist. Please try again, by entering the full search criteria."})}),C&&(0,eG.jsx)("p",{className:"text-danger",children:"Failed to import the user. Please try again."})]})});function tS(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function tC(e){for(var n=1;n * {\n padding-right: 0.5rem;\n }\n"]))),tF=eT.ZP.div(Y||(Y=(0,eN.Z)(["\n padding-top: 10px;\n padding-bottom: 10px;\n"]))),tR=eT.ZP.div(J||(J=(0,eN.Z)(["\n text-align: center;\n"]))),tE=function(){return(0,eG.jsxs)(tD,{children:[(0,eG.jsx)(tO,{}),(0,eG.jsx)(eY.rj,{color:"#000",height:45,width:45,wrapperClass:"d-block",visible:!0})]})},tT=[{value:"firstName",label:"First Name",search:!0,result:!0},{value:"lastName",label:"Last Name",search:!0,result:!0,style:{minWidth:"170px"}},{value:"email",label:"Email",search:!0,result:!0,style:{minWidth:"170px"}},{value:"guid",label:"IDP GUID",search:!0,result:!1}],tB=[{value:"firstName",label:"Display Name",search:!0,result:!0},{value:"lastName",label:"Username",search:!0,result:!0,style:{minWidth:"170px"}},{value:"email",label:"Email",search:!0,result:!0,style:{minWidth:"170px"}},{value:"guid",label:"IDP GUID",search:!0,result:!1}],tA=[{value:"firstName",label:"Name",search:!0,result:!0},{value:"lastName",label:"Login",search:!0,result:!0,style:{minWidth:"170px"}},{value:"email",label:"Email",search:!0,result:!0,style:{minWidth:"170px"}},{value:"guid",label:"IDP GUID",search:!0,result:!1}],tz={idir:tT,azureidir:tT,bceidbasic:tB,bceidbusiness:tB,bceidboth:tB,githubpublic:tA,githubbcgov:tA},tG=(0,nr.hU)(function(e){var n,t,r,a,i,s=e.selectedRequest,o=e.alert,c=(0,eE.useRef)(nw.V),l=(0,eE.useRef)(nw.V),u=(0,eE.useState)(!1),d=u[0],p=u[1],h=(0,eE.useState)(1),f=h[0],x=h[1],v=(0,eE.useState)(0),m=v[0],g=v[1],b=(0,eE.useState)(15),j=b[0],y=b[1],w=(0,eE.useState)(!1),Z=w[0],k=w[1],P=(0,eE.useState)(!1),S=P[0],C=P[1],I=(0,eE.useState)(!1),D=I[0],O=I[1],N=(0,eE.useState)(""),F=N[0],R=N[1],E=(0,eE.useState)([]),T=E[0],B=E[1],A=(0,eE.useState)([]),z=A[0],G=A[1],U=(0,eE.useState)([]),q=U[0],L=U[1],M=(0,eE.useState)([]),K=M[0],H=M[1],V=(0,eE.useState)("dev"),_=V[0],W=V[1],Y=(0,eE.useState)(s.devIdps[0]),J=Y[0],$=Y[1],Q=(0,eE.useState)(""),X=Q[0],ee=Q[1],en=(0,eE.useState)(""),et=en[0],er=en[1],ea=(0,eE.useState)(void 0),ei=ea[0],es=ea[1],eo=(0,eE.useState)(!1),ec=eo[0],el=eo[1],eu=(0,eE.useContext)(tg.SurveyContext),ed=(0,eE.useCallback)(nU()((n=(0,eO.Z)(eR().mark(function e(n){var t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(!0);case 2:return R("Assigning role..."),el(!1),e.next=6,e4({environment:_,integrationId:s.id,username:ei,roleNames:n});case 6:if(t=e.sent,r=(0,eH.Z)(t,2)[1],O(!1),r){e.next=16;break}return R("Last saved at ".concat(new Date().toLocaleString())),null==eu||eu.setShowSurvey(!0,"addUserToRole"),e.abrupt("return",!0);case 16:return el(!0),R("Failed to update roles."),e.abrupt("return",!1);case 19:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),2e3,{trailing:!0}),[null==s?void 0:s.id,_,ei,eu]),ep=(t=(0,eO.Z)(eR().mark(function e(){var n,t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,k(!0);case 4:return e.next=6,e0({environment:_,integrationId:s.id,first:0,max:1e3});case 6:n=e.sent,r=(t=(0,eH.Z)(n,2))[0],t[1]&&o.show({variant:"danger",content:"Failed to fetch roles."}),G(null===r?[]:r.map(function(e){return e.name})),H(null===r?[]:r.map(function(e){return e.composite})),k(!1);case 15:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),eh=function(){B([]),L([]),x(1),g(0),es(void 0),p(!1)},ef=function(){if(er(""),W("dev"),s.devIdps){var e=s.devIdps.length>0?s.devIdps[0]:"";$(e);var n=tz[e]||[];n.length>0&&ee(n[0].value)}},ex=(r=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(!0);case 2:return e.next=4,e3({environment:_,integrationId:s.id,username:n});case 4:if(t=e.sent,a=(r=(0,eH.Z)(t,2))[0],!r[1]){e.next=12;break}return o.show({variant:"danger",content:"Failed to fetch user roles."}),C(!1),e.abrupt("return");case 12:return e.next=14,L(a||[]);case 14:C(!1);case 15:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)});(0,eE.useEffect)(function(){eh(),ef(),G([])},[s.id]),(0,eE.useEffect)(function(){ev(et,void 0,f)},[f]),(0,eE.useEffect)(function(){ev(et,void 0,1)},[j]),(0,eE.useEffect)(function(){eh(),ep(),s.devIdps&&$(s.devIdps.length>0?s.devIdps[0]:"")},[_]),(0,eE.useEffect)(function(){eh();var e=tz[J]||[];!e.find(function(e){return e.search&&e.value===X})&&e.length>0&&ee(e[0].value)},[J]),(0,eE.useEffect)(function(){R(""),ei&&ex(ei)},[ei]);var ev=(a=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,c,l=arguments;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.length>1&&void 0!==l[1]?l[1]:X,r=l.length>2&&void 0!==l[2]?l[2]:f,!(n.length<2)){e.next=4;break}return e.abrupt("return");case 4:return k(!0),er(n),x(r),ee(t),B([]),L([]),es(void 0),e.next=13,eX({environment:_,idp:J,property:t,searchKey:n,integrationId:s.id||-1});case 13:if(a=e.sent,c=(i=(0,eH.Z)(a,2))[0],i[1]&&o.show({variant:"danger",content:"Failed to fetch users."}),c){var u;p(!0),B((u=r,c.rows.slice((u-1)*15,15*u))),g(c.count)}k(!1);case 20:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),em=function(e){return ev(e,void 0,1)},eg=(i=(0,eO.Z)(eR().mark(function e(n,t){var r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],"clear"===t.action||(r="remove-value"===t.action?q.filter(function(e){var n;return e!==(null===(n=t.removedValue)||void 0===n?void 0:n.value)}):"pop-value"===t.action?(0,nz.Z)(q.slice(0,-1)):[].concat((0,nz.Z)(q),[null===(a=t.option)||void 0===a?void 0:a.value])),!(r.length!==q.length)){e.next=7;break}return e.next=5,ed(r);case 5:e.sent&&L(r);case 7:case"end":return e.stop()}},e)})),function(e,n){return i.apply(this,arguments)}),eb=null;S?eb=(0,eG.jsx)(tE,{}):ei&&(eb=(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tI,{children:"2. Assign User to a Role"}),(0,eG.jsx)(nk.ZP,{value:q.map(function(e){return{value:e,label:e}}),options:z.map(function(e,n){return{value:e,label:!0==K[n]?"".concat(e," (Composite role)"):e}}),isMulti:!0,placeholder:"Select...",noOptionsMessage:function(){return"No roles"},onChange:eg,"data-testid":"user-role-select"}),(0,eG.jsx)(nZ.Ad,{saving:D,content:F,variant:ec?"error":"success"})]}));var ej="idir"===J,ey=tz[J]||[],ew=ey.length>0?ey.filter(function(e){return e.result}):[],eZ=null;d&&ej&&(eZ=(0,eG.jsxs)(eG.Fragment,{children:[T.length>0&&(0,eG.jsx)(nZ.XU,{italic:!0,children:"If you did not find the user you were looking for, you can try searching for the user in our IDIM Web Service Lookup tool. This tool uses a webservice to find IDIR users. so you will need to import the user that is found."}),(0,eG.jsx)(nf.default,{type:"button",size:"small","data-testid":"idim-search-button",onClick:function(){return l.current.open({key:new Date().getTime().toString(),idp:"idir",property:X,search:et})},children:"Search in IDIM Web Service Lookup"})]}));var ek=(null==s?void 0:s.environments)||[],eP=(null==s?void 0:s.devIdps)||[],eS="guid"===X||null!=J&&J.startsWith("bceid")?"Exact text match results will be displayed":"Partial text match results will be displayed",eC=function(e){var n=ey.find(function(n){return n.value===e});return null==n?void 0:n.label.toString()};return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tO,{}),(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsxs)(eW.ZP.Col,{span:6,children:[(0,eG.jsxs)(nZ.h4,{variant:"dark",size:"sm",children:["1. Search for a user based on the selection criteria below \xa0",(0,eG.jsx)(n_.Z,{title:"",content:"When searching BCeID GUID, please ensure your end users has logged in via your app (and indirectly our IDP) for this search to be successful.",hide:200})]}),(0,eG.jsx)("div",{"data-testid":"role-search-table",children:(0,eG.jsx)(nV.Z,{searchPlaceholder:"Enter search criteria",variant:"mini",rowSelectorKey:"username",headers:[{accessor:"firstName",Header:eC("firstName")||""},{accessor:"lastName",Header:eC("lastName")||""},{accessor:"email",Header:"Email"},{accessor:"actions",Header:"",disableSortBy:!0}],data:T.map(function(e){return{username:nL()(e,"username"),firstName:nL()(e,"firstName"),lastName:nL()(e,"lastName"),email:nL()(e,"email"),actions:(0,eG.jsx)(nH.c4,{children:(0,eG.jsx)(nH.Kk,{icon:e_.Mdf,role:"button","aria-label":"view",onClick:function(n){n.stopPropagation(),c.current.open({guid:e.username.split("@")[0],attributes:tC(tC({},nK()(ew,function(n,t){return n[t.label]=nL()(e,t.value),n},{})),e.attributes)})},title:"View",size:"lg"})})}}),colfilters:[{key:"user-role-filter-env",value:_,multiselect:!1,onChange:W,options:ek.map(function(e){return{value:e,label:ny()(e)}})},{key:"user-role-filter-idp",value:J,multiselect:!1,onChange:$,options:eP.filter(function(e){return"digitalcredential"!==e}).map(function(e){return{value:e,label:ni.S[e]}})},{key:"user-role-filter-prop",value:X,multiselect:!1,onChange:ee,options:ey.filter(function(e){return e.search})}],showFilters:!0,loading:Z,totalColSpan:20,searchColSpan:10,headerAlign:"bottom",headerGutter:[5,0],searchKey:et,searchLocation:"right",onSearch:em,onEnter:em,noDataFoundElement:d?(0,eG.jsxs)(tN,{children:[(0,eG.jsx)(tF,{children:(0,eG.jsx)(eV.G,{icon:e_.RLE,color:"#D44331",title:"Edit",size:"lg"})}),ej?(0,eG.jsx)(tF,{children:"The user you searched for does not exist. Please try again, by entering the full search criteria or try using our IDIM Web Service Lookup tool."}):(0,eG.jsx)(tF,{children:"The user you searched for does not exist. Please try again, by entering the full search criteria."})]}):(0,eG.jsx)(tR,{children:"You have not searched for any users yet."}),pagination:!0,pageLimits:[15],onPage:x,rowCount:m,limit:j,onLimit:function(e){y(e)},activateRow:function(e){es(e.original.username)},searchTooltip:eS})}),eZ]}),(0,eG.jsx)(eW.ZP.Col,{span:4,children:eb})]})}),(0,eG.jsx)(n7,{modalRef:c}),(0,eG.jsx)(nw.Z,{ref:l,id:"idim-webservice-lookup",title:"IDIM Web Service Lookup",icon:null,onClose:function(e,n,t){ev(t.guid,"guid",1)},cancelButtonText:"Close",cancelButtonVariant:"primary",showConfirmButton:!1,buttonAlign:"right",style:{minWidth:"800px",maxHeight:"calc(100vh - 200px)",overflowY:"auto"},children:function(e){return e?(0,eG.jsx)(tP,{idp:e.idp,property:e.property,search:e.search,infoModalRef:c,parentModalRef:l},e.key):(0,eG.jsx)(eG.Fragment,{})}})]})}),tU=t(62248),tq=t(42050),tL=eT.ZP.h3($||($=(0,eN.Z)(["\n color: #777777;\n font-size: ",";\n font-weight: bold;\n min-height: 30px;\n border-bottom: 1px solid #707070;\n margin-bottom: 5px;\n overflow: wrap;\n"])),nt.CA),tM=eT.ZP.p(Q||(Q=(0,eN.Z)(["\n font-size: ",";\n color: "," !important;\n"])),nt.KN,nt.we),tK=t(11752),tH=t.n(tK),tV=eT.ZP.ul(X||(X=(0,eN.Z)(["\n list-style-type: none;\n margin: 0;\n position: relative;\n\n & li {\n border-bottom: 1px solid #d4d4d4;\n & svg.svg-inline--fa {\n position: absolute;\n right: 0;\n }\n\n & div.icon {\n position: absolute;\n right: 0;\n bottom: 5px;\n }\n }\n"]))),t_=(tH()()||{}).publicRuntimeConfig,tW=(void 0===t_?{}:t_).app_env,tY=(0,eT.ZP)(tL)(ee||(ee=(0,eN.Z)(["\n border-bottom: none;\n margin-top: 10px;\n"]))),tJ=(0,eT.ZP)(tY)(en||(en=(0,eN.Z)(["\n font-size: 14px;\n"]))),t$=eT.ZP.a(et||(et=(0,eN.Z)(["\n color: ",";\n"])),nt.nc),tQ=(0,eT.ZP)(tq.Z)(er||(er=(0,eN.Z)(["\n margin-bottom: 10px;\n"]))),tX=function(e){switch(e){case"submitted":return 0;case"pr":return 33;case"planned":return 66;default:return 100}},t0=function(e){switch(e){case"submitted":return"Process request submitted...";case"pr":return"Pull request created...";case"planned":return"Terraform plan succeeded...";case"prFailed":case"planFailed":case"applyFailed":return"An error has occurred";default:return""}},t1=function(e){switch(e){case"prFailed":case"planFailed":case"applyFailed":return!0;default:return!1}},t2=function(e){switch(e){case"submitted":default:return 0;case"pr":return 1;case"prFailed":return 2;case"planned":return 3;case"planFailed":return 4;case"applied":return 5;case"applyFailed":return 6}};function t3(e){var n=e.integration,t=n.status,r=n.updatedAt,a=t1(t),i=new Date(r||"").toLocaleString();return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tQ,{now:tX(t),animated:!0,variant:a?"danger":void 0}),(0,eG.jsxs)(tM,{children:["Last updated at ",i]})]})}(0,nr.hU)(function(e){var n=e.integration,t=e.title,r=e.alert,a=n.id,i=n.status,s=n.updatedAt,o=n.prNumber,c=(0,eE.useState)(!1),l=c[0],u=c[1],d=t1(i),p=t0(i),h=new Date(s||"");(0,eE.useEffect)(function(){u(12e5 *:nth-child(1) {\n margin-right: 5px;\n }\n"]))),rr="15px",ra=eT.ZP.div(es||(es=(0,eN.Z)(["\n height: ",";\n width: ",";\n border-radius: ",";\n margin: ",";\n margin-left: 0;\n border: 2px solid #b3b3b3;\n"])),rr,rr,rr,"0"),ri=eT.ZP.li(eo||(eo=(0,eN.Z)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0;\n\n & p {\n max-width: 90%;\n margin: 5px 0;\n }\n"]))),rs=function(e){var n=e.integration;return(0,eG.jsxs)(rt,{children:[(0,eG.jsx)("div",{children:(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#2E8540"})}),(0,eG.jsxs)("div",{children:[(0,eG.jsx)("span",{children:"Your integration has been approved. Please wait approx. 10 min to get access to your installation information access again."}),(0,eG.jsx)(rn,{children:"Progress Update"}),(0,eG.jsx)(t3,{integration:n})]})]})},ro=function(){return(0,eG.jsxs)(rt,{children:[(0,eG.jsx)("div",{children:(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#2E8540"})}),(0,eG.jsx)("div",{children:(0,eG.jsx)("span",{children:"Your integration is approved and available."})})]})};function rc(e){return e.integration,(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to IDIM",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsxs)("p",{children:["Please reach out to IDIM if you do not hear back within the next 2-3 business days (",(0,eG.jsx)(ns.default,{href:"mailto:IDIM.Consulting@gov.bc.ca",children:"IDIM.Consulting@gov.bc.ca"}),")"]}),(0,eG.jsx)(eV.G,{icon:e_.FU$,color:"#b3b3b3"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})})}var rl=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasBceid,i=t.awaitingBceidProd,s=t.bceidProdApplying,o=t.bceidApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(rc,{integration:n})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to BCeID Prod"}),(0,eG.jsx)("br",{}),c]})};function ru(e){return e.integration,(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to GCIO",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})})}var rd=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasGithub,i=t.awaitingGithubProd,s=t.githubProdApplying,o=t.githubApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(ru,{integration:n})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to GitHub Prod"}),(0,eG.jsx)("br",{}),c]})},rp=t(19287),rh=eT.ZP.label(ec||(ec=(0,eN.Z)(["\n font-weight: bold;\n margin-bottom: 2px;\n"])));eT.ZP.div(el||(el=(0,eN.Z)(["\n background-color: #f1f1f1;\n margin: 2px 0 2px 0;\n padding: 4px 6px;\n ","\n"])),function(e){return e.width?"width: ".concat(e.width,";"):"width: 300px;"});var rf=eT.ZP.div(eu||(eu=(0,eN.Z)(["\n text-align: center;\n"]))),rx=eT.ZP.div(ed||(ed=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),rv=function(){return(0,eG.jsxs)(rf,{children:[(0,eG.jsx)(rx,{}),(0,eG.jsx)(eY.rj,{color:"#000",height:45,width:45,wrapperClass:"d-block",visible:!0})]})},rm=(0,nr.hU)(function(e){var n,t,r,a,i=e.selectedRequest,s=e.alert,o=(0,eE.useState)(!1),c=(o[0],o[1]),l=(0,eE.useState)(!1),u=l[0],d=l[1],p=(0,eE.useState)(!1),h=p[0],f=p[1],x=(0,eE.useState)(""),v=x[0],m=x[1],g=(0,eE.useState)([]),b=g[0],j=g[1],y=(0,eE.useState)([]),w=y[0],Z=y[1],k=(0,eE.useState)(void 0),P=k[0];k[1];var S=(0,eE.useState)("dev"),C=S[0],I=S[1],D=(0,eE.useState)(!1),O=D[0],N=D[1],F=(null==i?void 0:i.environments)||[],R=(0,eE.useCallback)(nU()((n=(0,eO.Z)(eR().mark(function e(n){var t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),m("Assigning role..."),N(!1),e.next=5,e4({environment:C,integrationId:i.id,username:n6(i.clientId),roleNames:n});case 5:if(t=e.sent,r=(0,eH.Z)(t,2)[1],f(!1),!r){e.next=15;break}return N(!0),m("Failed to update roles."),e.abrupt("return",!1);case 15:return m("Last saved at ".concat(new Date().toLocaleString())),e.abrupt("return",!0);case 17:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),2e3,{trailing:!0}),[null==i?void 0:i.id,C,P]),E=(t=(0,eO.Z)(eR().mark(function e(n,t){var r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],"clear"===t.action||(r="remove-value"===t.action?w.filter(function(e){var n;return e!==(null===(n=t.removedValue)||void 0===n?void 0:n.value)}):"pop-value"===t.action?(0,nz.Z)(w.slice(0,-1)):[].concat((0,nz.Z)(w),[null===(a=t.option)||void 0===a?void 0:a.value])),!(w.length!==r.length)){e.next=7;break}return e.next=5,R(r);case 5:e.sent&&Z(r);case 7:case"end":return e.stop()}},e)})),function(e,n){return t.apply(this,arguments)}),T=(r=(0,eO.Z)(eR().mark(function e(){var n,t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,c(!0);case 4:return e.next=6,e0({environment:C,integrationId:i.id,first:0,max:1e3});case 6:n=e.sent,r=(t=(0,eH.Z)(n,2))[0],t[1]&&s.show({variant:"danger",content:"Failed to fetch roles."}),j(null===r?[]:r.map(function(e){return e.name})),c(!1);case 14:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),B=(a=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(!0);case 2:return e.next=4,e3({environment:C,integrationId:i.id,username:n});case 4:if(t=e.sent,a=(r=(0,eH.Z)(t,2))[0],!r[1]){e.next=12;break}return s.show({variant:"danger",content:"Failed to fetch roles."}),d(!1),e.abrupt("return");case 12:return e.next=14,Z(a||[]);case 14:d(!1);case 15:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)});return(0,eE.useEffect)(function(){T(),m(""),B(n6(i.clientId))},[C]),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(rp.Z,{children:(0,eG.jsx)(nZ.bZ,{variant:"info",closable:!1,"data-testid":"assign-svc-acct-role-risk-alert",children:(0,eG.jsxs)("span",{className:"normal",children:["There may be a security risk if you rely on client roles of a service account,"," ",(0,eG.jsx)(ns.default,{external:!0,href:(0,no.eO)("Creating-a-Role#service-account-role-management"),children:"click to visit our wiki page"})]})})}),(0,eG.jsxs)(nZ.mQ,{onChange:function(e){I(e)},activeKey:C,tabBarGutter:30,destroyInactiveTabPane:!0,children:[(0,eG.jsx)("br",{}),F.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:ny()(e),children:(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsx)(eW.ZP.Col,{span:5,children:(0,eG.jsx)(nV.Z,{headers:[{accessor:"projectName",Header:"Service Account"}],data:[{projectName:i.projectName}],colfilters:[],activateRow:te(),rowSelectorKey:"projectName"})}),(0,eG.jsx)(eW.ZP.Col,{span:5,children:u?(0,eG.jsx)(rv,{}):(0,eG.jsxs)("div",{children:[(0,eG.jsx)(rh,{children:"Assign Service Account to a Role"}),(0,eG.jsx)("div",{"data-testid":"assign-svc-acct-to-role-select",children:(0,eG.jsx)(nk.ZP,{value:w.map(function(e){return{value:e,label:e}}),options:b.map(function(e){return{value:e,label:e}}),isMulti:!0,placeholder:"Select...",noOptionsMessage:function(){return"No roles"},onChange:E})}),(0,eG.jsx)(nZ.Ad,{saving:h,content:v,variant:O?"error":"success"})]})})]})})},e)})]})]})});function rg(){return(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to DIT",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsxs)("p",{children:["Please reach out to DIT if you do not hear back within the next 2-3 business days (",(0,eG.jsx)(ns.default,{href:"mailto:ditp.support@gov.bc.ca",children:"ditp.support@gov.bc.ca"}),")."]}),(0,eG.jsx)(eV.G,{icon:e_.FU$,color:"#b3b3b3"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})}var rb=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasDigitalCredential,i=t.awaitingDigitalCredentialProd,s=t.digitalCredentialProdApplying,o=t.digitalCredentialApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(rg,{})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to Digital Credential Prod"}),(0,eG.jsx)("br",{}),c]})};function rj(e){return e.integration,(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to IDIM",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsxs)("p",{children:["Please reach out to IDIM if you do not hear back within the next 2-3 business days (",(0,eG.jsx)(ns.default,{href:"mailto:IDIM.Consulting@gov.bc.ca",children:"IDIM.Consulting@gov.bc.ca"}),")"]}),(0,eG.jsx)(eV.G,{icon:e_.FU$,color:"#b3b3b3"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})})}var ry=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasBcServicesCard,i=t.awaitingBcServicesCardProd,s=t.bcServicesCardProdApplying,o=t.bcServicesCardApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(rj,{integration:n})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to BC Services Card Prod"}),(0,eG.jsx)("br",{}),c]})},rw=t(29009),rZ=t(41087),rk=t(14195),rP=t(3023),rS=t(75358),rC=t(26050),rI=t(33558),rD=t(18242),rO=t(84642),rN=(m=(0,eO.Z)(eR().mark(function e(n,t,r,a){var i;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eJ.e.get("requests/".concat(n,"/metrics?env=").concat(t,"&fromDate=").concat(r,"&toDate=").concat(a)).then(function(e){return null==e?void 0:e.data});case 3:return i=e.sent,e.abrupt("return",[i,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n,t,r){return m.apply(this,arguments)}),rF=(g=(0,eO.Z)(eR().mark(function e(n,t,r,a,i,s){var o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,eJ.e)({url:"requests/".concat(n,"/logs?env=").concat(t,"&start=").concat(r,"&end=").concat(a),method:"GET",responseType:"blob",onDownloadProgress:i,signal:null==s?void 0:s.signal}).then(function(e){return null==e?void 0:e.data});case 3:return o=e.sent,e.abrupt("return",[o,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n,t,r,a,i){return g.apply(this,arguments)}),rR=t(9198),rE=t.n(rR);t(24394);var rT=t(31879);function rB(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function rA(e){return(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsx)(rE(),function(e){for(var n=1;n * {\n margin-left: 15px;\n }\n"])));eT.ZP.label(eh||(eh=(0,eN.Z)(["\n margin-bottom: 2px;\n"])));var rq=eT.ZP.div(ef||(ef=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"])));eT.ZP.span(ex||(ex=(0,eN.Z)(["\n color: #000;\n font-size: 1.1rem;\n font-weight: bold;\n"]))),(0,eT.ZP)(eV.G)(ev||(ev=(0,eN.Z)(["\n margin-right: 20px;\n"]))),eT.ZP.div(em||(em=(0,eN.Z)(["\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n"]))),eT.ZP.hr(eg||(eg=(0,eN.Z)(["\n background-color: black;\n"])));var rL=function(e){return"".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate())},rM="December 01, 2023",rK=(0,nr.hU)(function(e){var n,t=e.integration,r=e.alert,a=(0,eE.useState)("dev"),i=a[0],s=a[1],o=(null==t?void 0:t.environments)||[],c=(0,eE.useState)([]),l=c[0],u=c[1],d=(0,eE.useState)(!1);d[0],d[1];var p=(0,eE.useState)((0,nn.F3)(14)),h=p[0],f=p[1],x=(0,eE.useState)(new Date),v=x[0],m=x[1],g=function(e){f(e)},b=function(e){m(e)},j=(0,eE.useCallback)(nU()((n=(0,eO.Z)(eR().mark(function e(n,a,i){var s,o,c;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rN(null==t?void 0:t.id,i,n,a);case 2:s=e.sent,c=(o=(0,eH.Z)(s,2))[0],o[1]?r.show({variant:"danger",content:"Failed to fetch metrics"}):u(c);case 7:case"end":return e.stop()}},e)})),function(e,t,r){return n.apply(this,arguments)})),[null==t?void 0:t.clientId,i,h,v]);return(0,eE.useEffect)(function(){j(rL(h),rL(v),i)},[null==t?void 0:t.clientId,i,h,v]),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(rq,{}),(0,eG.jsx)("div",{children:(0,eG.jsxs)(rU,{children:[(0,eG.jsx)(rA,{placeholderText:"Start Date",selected:new Date(h),onChange:function(e){return g(e)},minDate:new Date(rM),maxDate:v,label:"Start Date"}),(0,eG.jsx)(rA,{placeholderText:"End Date",selected:new Date(v),onChange:function(e){return b(e)},minDate:h,label:"End Date"})]})}),(0,eG.jsxs)(nZ.mQ,{onChange:function(e){s(e)},activeKey:i,tabBarGutter:30,destroyInactiveTabPane:!0,children:[(0,eG.jsx)("br",{}),o.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:ny()(e),children:(0,eG.jsx)("div",{style:{width:"100%",height:300},children:(null==l?void 0:l.length)>0?(0,eG.jsx)(rw.h,{children:(0,eG.jsxs)(rZ.v,{data:l,margin:{top:20,right:20,bottom:30,left:20},children:[(0,eG.jsx)(rk.q,{strokeDasharray:"3 3"}),(0,eG.jsx)(rP.K,{dataKey:"event",tick:{fontSize:10},label:{value:"Events",position:"insideBottomRight"}}),(0,eG.jsx)(rS.B,{dataKey:"count",label:{value:"Count",angle:-90,position:"insideLeft"}}),(0,eG.jsx)(rC.u,{}),(0,eG.jsx)(rI.D,{}),(0,eG.jsx)(rD.$,{dataKey:"count",fill:"#0d6efd",barSize:30,label:{fill:"#0d6efd",fontSize:20,position:"top"},background:{fill:"#eee"}})]})}):(0,eG.jsx)("div",{style:{textAlign:"center"},children:(0,eG.jsx)(rO.x,{children:"No data available yet!"})})})},e)})]}),(0,eG.jsxs)(na.$,{children:["This tab was released ",rM,". Please refer to"," ",(0,eG.jsx)(rG.rU,{href:"https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.4/html/server_administration_guide/auditing_and_events#event_types",external:!0,children:"here"})," ","for event type details."]})]})}),rH=eT.ZP.div(eb||(eb=(0,eN.Z)(["\n display: flex;\n flex-direction: row;\n column-gap: 1.5em;\n justify-content: center;\n min-width: 20em;\n margin: 0;\n padding: 0;\n"]))),rV=(0,eT.ZP)(nf.default)(ej||(ej=(0,eN.Z)(["\n width: 150px;\n text-align: center;\n"]))),r_=eT.ZP.form(ey||(ey=(0,eN.Z)(["\n display: flex;\n flex-direction: column;\n row-gap: 1.5em;\n\n .header {\n margin-top: 1em;\n display: flex;\n align-items: center;\n p {\n font-weight: bold;\n padding-right: 0.4em;\n margin: 0;\n font-size: 18px;\n }\n }\n\n .bold {\n font-weight: bold;\n }\n\n .env-controls {\n margin: 0;\n legend {\n font-size: unset;\n font-weight: bold;\n }\n\n input {\n margin-right: 0.2em;\n }\n\n label {\n margin-right: 1em;\n }\n }\n\n .date-picker-container {\n height: 100%;\n display: flex;\n align-items: center;\n column-gap: 1em;\n }\n\n select {\n margin-left: 0.5em;\n width: 200px;\n }\n\n .button-container {\n display: flex;\n flex-diretion: row;\n align-items: center;\n\n p {\n margin: 0;\n margin-left: 1em;\n }\n }\n\n .error-text {\n font-size: 14px;\n color: red;\n margin: 0;\n height: 1em;\n }\n"]))),rW=function(e,n){var t=new Blob([JSON.stringify(n)],{type:"text/json"}),r=document.createElement("a");r.download=e,r.href=window.URL.createObjectURL(t),r.dataset.downloadurl=["text/json",r.download,r.href].join(":");var a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});r.dispatchEvent(a),r.remove()},rY={dev:"Development",test:"Test",prod:"Production"},rJ=new Date("February 13, 2024"),r$=(0,nr.hU)(function(e){var n,t=e.integration,r=e.alert,a=(0,eE.useState)("dev"),i=a[0],s=a[1],o=(null==t?void 0:t.environments)||[],c=(0,eE.useState)(!1),l=c[0],u=c[1],d=(0,eE.useState)((0,nn.F3)(1)),p=d[0],h=d[1],f=(0,eE.useState)(new Date),x=f[0],v=f[1],m=(0,eE.useState)(""),g=m[0],b=m[1],j=(0,eE.useState)(0),y=j[0],w=j[1],Z=(0,eE.useState)(new Date),k=Z[0],P=Z[1],S=(0,eE.useState)(),C=S[0],I=S[1];(0,eE.useEffect)(function(){p&&(Date.now()-p.getTime()>1728e5?P(new Date(p.getTime()+1728e5)):P(new Date),x&&(x.getTime()1728e5)&&v(null))},[p]),(0,eE.useEffect)(function(){x&&p&&x.getTime()0&&w(e[0])}else(null==e?void 0:e.length)>0&&w(e[0])},k=(t=(0,eO.Z)(eR().mark(function e(){var n,t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,(0,n8.XJ)();case 3:n=e.sent,r=(t=(0,eH.Z)(n,2))[0],f(!!t[1]),Z(r||[]),d(!1);case 10:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,eE.useEffect)(function(){k(),o.replace("/my-dashboard/integrations")},[]),(0,eE.useEffect)(function(){return(0,nn.rn)(v||[])&&(clearInterval(r),r=setInterval((0,eO.Z)(eR().mark(function e(){var n,t,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n8.XJ)();case 2:n=e.sent,a=(t=(0,eH.Z)(n,2))[0],t[1]?clearInterval(r):Z(a||[]);case 7:case"end":return e.stop()}},e)})),5e3)),function(){r&&clearInterval(r)}},[v,b]);var P=h?(0,eG.jsx)(ap.q1,{}):v&&0!==v.length?(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nZ.h4,{size:"lg",children:"INTEGRATIONS"}),(0,eG.jsx)(nV.Z,{headers:[{accessor:"id",Header:"Request ID"},{accessor:"projectName",Header:"Project Name"},{accessor:"status",Header:"Status"},{accessor:"authType",Header:"Usecase"},{accessor:"serviceType",Header:"Service Type"},{accessor:"actions",Header:(0,eG.jsx)(ax,{}),disableSortBy:!0}],data:null==v?void 0:v.map(function(e){return{id:av(e.id),projectName:e.projectName,status:(0,tU.n)(e.status||"draft"),authType:ad.F[e.authType||"browser-login"],serviceType:"Gold",actions:(0,eG.jsx)(ah,{children:(0,eG.jsx)(nH.ZP,{request:e,onDelete:function(n,t){t?s.show({variant:"danger",content:"Failed to delete integration ".concat(e.projectName,".")}):k()},defaultActiveColor:"#fff",delIconStyle:{marginLeft:"7px"}})})}}),activateRow:function(e){var n=e.cells[0].value;v.forEach(function(e){e.id==n&&w(e)})},activeSelector:b&&av(b),rowSelectorKey:"id",colfilters:[]})]}):(0,eG.jsx)(ap.Vs,{message:"No Requests Submitted"});return u?(0,eG.jsx)(t4.Z,{}):(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(am,{handleNewIntegrationClick:y,integrations:v}),(0,eG.jsx)("br",{}),(0,eG.jsx)("br",{}),P]})}),ab=t(6178),aj=eT.ZP.div(eD||(eD=(0,eN.Z)(["\n display: flex;\n flex-direction: column;\n flex-basis: 100%;\n flex: 1;\n"]))),ay=function(e){e.session;var n,t=(0,au.useRouter)(),r=(0,eE.useState)(null),a=r[0],i=r[1],s=(0,eE.useState)(1),o=s[0],c=s[1],l=(0,eE.useState)(!1),u=(l[0],l[1]),d="integration-failed-modal",p=(n=(0,eO.Z)(eR().mark(function e(){return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.location.hash=d);case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),h=(0,eE.useState)(""),f=h[0],x=h[1];return(0,eE.useEffect)(function(){var e;x(t.query.requestId),(null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.integrationFailedMessageModal)==="true"&&(u(!0),p())},[t.query.showModal]),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(ab.Z,{tab:"integrations",leftPanel:function(){return(0,eG.jsx)(ag,{setIntegration:i,setIntegrationCount:c})},rightPanel:function(){return a&&(0,eG.jsx)(al,{integration:a})},showResizable:o>0}),(0,eG.jsx)(nx.Z,{title:"".concat(f," - Integration request failed"),icon:e_.eHv,id:d,content:(0,eG.jsxs)("div",{children:[(0,eG.jsx)("div",{children:(0,eG.jsx)("p",{children:"The integration request could not be completed. Please contact the Pathfinder SSO Team."})}),(0,eG.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",width:"100%"},children:[(0,eG.jsx)(aj,{children:(0,eG.jsx)("div",{children:(0,eG.jsxs)("a",{href:"https://chat.developer.gov.bc.ca/channel/sso",target:"_blank",title:"Rocket Chat",style:{color:"#0d6efd"},children:[(0,eG.jsx)(eV.G,{size:"1x",icon:e_.Z6I,color:"#0d6efd"})," Rocketchat"]})})}),(0,eG.jsx)(aj,{children:(0,eG.jsx)("div",{children:(0,eG.jsxs)("a",{href:"mailto:bcgov.sso@gov.bc.ca",title:"Pathfinder SSO",style:{color:"#0d6efd"},children:[(0,eG.jsx)(eV.G,{size:"1x",icon:e_.FU$,color:"#0d6efd"})," Email"]})})})]})]}),showCancel:!1,showConfirm:!1,closable:!0})]})}},76944:function(e,n,t){"use strict";t.d(n,{v:function(){return c}});var r,a=t(50029),i=t(87794),s=t.n(i),o=t(21963),c=(r=(0,a.Z)(s().mark(function e(n){var t;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.e.post("events",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[t,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return r.apply(this,arguments)})},37226:function(e,n,t){"use strict";t.d(n,{A_:function(){return P},H0:function(){return C},Jl:function(){return F},OS:function(){return D},Uw:function(){return R},WN:function(){return N},XJ:function(){return S},ct:function(){return I},hG:function(){return k},zD:function(){return O}});var r,a,i,s,o,c,l,u,d,p,h=t(50029),f=t(87794),x=t.n(f),v=t(21963),m=t(75316),g=t.n(m),b=t(25751),j=t.n(b),y=t(76427),w=t.n(y),Z=t(31513),k=(r=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("requests",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return r.apply(this,arguments)}),P=(a=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("request",{requestId:j()(n)?parseInt(n):n}).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return a.apply(this,arguments)}),S=(i=(0,h.Z)(x().mark(function e(){var n,t,r=arguments;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={params:{include:r.length>0&&void 0!==r[0]?r[0]:"active"}},e.prev=2,e.next=5,v.e.get("requests",n).then(function(e){return e.data});case 5:return t=e.sent,t=g()(t,["createdAt"],["desc"]),e.abrupt("return",[t.map(Z.UB),null]);case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("return",(0,v.z)(e.t0));case 13:case"end":return e.stop()}},e,null,[[2,10]])})),function(){return i.apply(this,arguments)}),C=(s=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.get("team-integrations/".concat(n)).then(function(e){return e.data});case 3:return t=e.sent,t=g()(t,["createdAt"],["desc"]),e.abrupt("return",[t.map(Z.UB),null]);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 11:case"end":return e.stop()}},e,null,[[0,8]])})),function(e){return s.apply(this,arguments)}),I=(o=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.get("requests/".concat(n,"/resubmit")).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return o.apply(this,arguments)}),D=(c=(0,h.Z)(x().mark(function e(n,t){var r;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("requests/".concat(n,"/restore"),{email:t}).then(function(e){return e.data});case 3:return r=e.sent,e.abrupt("return",[(0,Z.UB)(r),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n){return c.apply(this,arguments)}),O=(l=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("requests-all",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[{count:t.count,rows:t.rows.map(Z.UB)},null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return l.apply(this,arguments)}),N=(u=(0,h.Z)(x().mark(function e(n){var t,r,a,i,s,o=arguments;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>1&&void 0!==o[1]&&o[1],e.prev=1,i="requests",t&&(i="".concat(i,"?submit=true")),(n=w()(n,["user","lastChanges"])).devLoginTitle=n.devLoginTitle||"",n.testLoginTitle=n.testLoginTitle||"",n.prodLoginTitle=n.prodLoginTitle||"",n.additionalRoleAttribute=n.additionalRoleAttribute||"",n.clientId=n.clientId||"",n.primaryEndUsers=null!==(r=n.primaryEndUsers)&&void 0!==r?r:[],n.primaryEndUsersOther=null!==(a=n.primaryEndUsersOther)&&void 0!==a?a:"",e.next=14,v.e.put(i,n).then(function(e){return e.data});case 14:return s=e.sent,e.abrupt("return",[(0,Z.UB)(s),null]);case 18:return e.prev=18,e.t0=e.catch(1),e.abrupt("return",(0,v.z)(e.t0));case 21:case"end":return e.stop()}},e,null,[[1,18]])})),function(e){return u.apply(this,arguments)}),F=(d=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.delete("requests",{params:{id:n}}).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[t,null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return d.apply(this,arguments)}),R=(p=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.put("request-metadata",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return p.apply(this,arguments)})},73923:function(e,n,t){"use strict";t.d(n,{Di:function(){return i},ON:function(){return r},TE:function(){return a}});var r=function(e){return JSON.stringify(e,void 0,2)},a=function(e){var n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.focus(),n.select();try{return document.execCommand("copy"),document.body.removeChild(n),!0}catch(e){return document.body.removeChild(n),!1}},i=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",r=window.URL.createObjectURL(new Blob([e],{type:t})),a=document.createElement("a");a.href=r,a.setAttribute("download",n),document.body.appendChild(a),a.click(),document.body.removeChild(a)}},80382:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-dashboard/integrations",function(){return t(6961)}])}},function(e){e.O(0,[662,925,937,759,254,954,774,888,179],function(){return e(e.s=80382)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/my-dashboard/integrations-5f2326827a5662a4.js b/_next/static/chunks/pages/my-dashboard/integrations-5f2326827a5662a4.js deleted file mode 100644 index 812ee9a..0000000 --- a/_next/static/chunks/pages/my-dashboard/integrations-5f2326827a5662a4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[950],{83333:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r,a=t(71383);t(67294);var i=t(71893),s=t(31513),o=t(85893),c=i.ZP.div(r||(r=(0,a.Z)(["\n margin-top: 20px;\n max-height: calc(100vh - 250px);\n overflow: auto;\n"])));function l(e){var n=e.events;return(0,o.jsx)(c,{children:n&&0!==n.length?n.map(function(e){var n;return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Event Code: "}),e.eventCode]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Created Time: "}),(n=e.createdAt,new Date(n).toLocaleString())]}),e.idirUserDisplayName&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Created By: "}),e.idirUserDisplayName]})}),e.details&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:(0,o.jsx)("strong",{children:"Details"})}),"request-update-success"===e.eventCode?(0,o.jsxs)(o.Fragment,{children:[(0,s.Sx)(e.details.changes),(0,o.jsx)("strong",{children:"Comment: "}),(0,o.jsx)("p",{children:e.details.comment})]}):(0,o.jsx)("pre",{children:(0,o.jsx)("code",{children:JSON.stringify(e.details||{},void 0,2)})})]}),(0,o.jsx)("hr",{})]},e.id)}):(0,o.jsx)("div",{children:"No events found"})})}},63005:function(e,n,t){"use strict";t.d(n,{S:function(){return r}});var r={idir:"IDIR",azureidir:"IDIR - MFA",bceidbasic:"Basic BCeID",bceidbusiness:"Business BCeID",bceidboth:"Basic or Business BCeID",githubbcgov:"GitHub BC Gov",githubpublic:"GitHub",digitalcredential:"Digital Credential",bcservicescard:"BC Services Card"}},71057:function(e,n,t){"use strict";var r=t(83024),a=t(63055),i={shared:{button:"\n border-radius: 0.222em;\n border-width: 0;\n padding: 0.6em 1.1em;\n text-align: center;\n text-decoration: none;\n font-weight: 700;\n letter-spacing: 1px;\n display: inline-block;\n cursor: pointer;\n box-shadow: 0px 0px 0px 2px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;\n "},size:{xsmall:{button:"\n font-size: 0.7rem;\n "},small:{button:"\n font-size: 0.8rem;\n "},medium:{button:"\n font-size: ".concat(a.n5,";\n ")},large:{button:"\n font-size: ".concat(a.zA,";\n ")}},variant:{primary:{button:"\n background-color: #D5EDFF;\n box-shadow: 0px 0px 0px 2px #D5EDFF inset !important;\n color: #3E3E3E;\n\n &:hover {\n text-decoration: underline;\n background-color: #FFF7D5;\n box-shadow: 0px 0px 0px 2px #FFF7D5 inset !important;\n opacity: 0.80;\n }\n\n &:active {\n opacity: 1;\n }\n "},grey:{button:"\n background-color: #B2B2B2;\n box-shadow: 0px 0px 0px 1px #707070 inset !important;\n color: #F8F8F8;\n min-width: 110px;\n\n &:hover {\n background-color: ".concat(a.TU,";\n box-shadow: 0px 0px 0px 1px #707070 inset !important;\n }\n ")}}},s=(0,r.applyTheme)(i,{defaultProps:{variant:"primary",size:"medium"},breakProps:[],staticProps:["fullHeight","fullWidth"]});n.Z=s},77740:function(e,n,t){"use strict";t.d(n,{F:function(){return r}});var r={"browser-login":"Browser Login","service-account":"Service Account",both:"Browser Login & Service Account"}},6178:function(e,n,t){"use strict";var r,a=t(71383);t(67294);var i=t(11163),s=t(46312),o=t(71893),c=t(85330),l=t(59912),u=t(49910),d=t(85893),p=o.ZP.div(r||(r=(0,a.Z)(["\n height: 100%;\n overflow: auto;\n"])));n.Z=function(e){var n=e.tab,t=e.leftPanel,r=e.rightPanel,a=e.showResizable;e.children;var o=(0,i.useRouter)(),h=(0,d.jsxs)(c.mQ,{onChange:function(e){o.replace("/my-dashboard/".concat(e))},activeKey:n,tabBarGutter:30,children:[(0,d.jsx)(c.OK,{tab:"My Projects"},"integrations"),(0,d.jsx)(c.OK,{tab:"My Teams"},"teams")]});return(0,d.jsxs)(l.Z,{rules:u.F,children:[h,void 0===a||a?(0,d.jsx)(s.e,{style:{paddingTop:"2px",borderBottom:"3px solid black"},defaultSize:{width:"100%",height:.4*window.innerHeight},enable:{bottom:!0},handleStyles:{bottom:{bottom:0}},children:(0,d.jsx)(p,{children:t&&t()})}):t&&t(),(0,d.jsx)("br",{}),r&&r()]})}},6961:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ay}});var r,a,i,s,o,c,l,u,d,p,h,f,x,v,m,g,b,j,y,w,Z,k,P,S,C,I,D,O,N,F,R,E,T,B,A,z,G,U,q,L,M,K,H,V,_,W,Y,J,$,Q,X,ee,en,et,er,ea,ei,es,eo,ec,el,eu,ed,ep,eh,ef,ex,ev,em,eg,eb,ej,ey,ew,eZ,ek,eP,eS,eC,eI,eD,eO=t(50029),eN=t(71383),eF=t(87794),eR=t.n(eF),eE=t(67294),eT=t(71893),eB=t(59499),eA=t(16530),ez=t(69829),eG=t(85893);function eU(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function eq(e){for(var n=1;nsvg {\n overflow: initial;\n }\n ",close:"\n cursor: pointer !important;\n text-align: center;\n text-decoration: none;\n border-radius: 0.2222em;\n padding: 0.4em 0.5em;\n margin-right: 20px;\n "},size:{small:{container:"\n font-size: 0.8rem;\n "},medium:{container:"\n font-size: 1rem;\n "},large:{container:"\n font-size: 1.2rem;\n "}},variant:{success:{container:"\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #2d4821;\n\n & a {\n color: #2b542c;\n }\n ",content:"\n color: #2d4821;\n ",close:"\n color: #2d4821;\n border: 1px solid #2d4821;\n\n &:hover {\n background: #2d4821;\n color: #fff;\n }\n ",group:"\n color: #2d4821;\n "},info:{container:"\n background-color: #d9eaf7;\n border-color: #afd3ee;\n color: #313132;\n\n & a {\n color: #1a5a96;\n }\n ",content:"\n color: #313132;\n ",close:"\n color: #313132;\n border: 1px solid #313132;\n\n &:hover {\n background: #313132;\n color: #fff;\n }\n ",group:"\n color: #313132;\n "},warning:{container:"\n background-color: #f9f1c6;\n border-color: #faebcc;\n color: #6c4a00;\n\n & a {\n color: #66512c;\n }\n ",content:"\n color: #66512c;\n ",close:"\n color: #66512c;\n border: 1px solid #66512c;\n\n &:hover {\n background: #66512c;\n color: #fff;\n }\n ",group:"\n color: #66512c;\n "},danger:{container:"\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a12622;\n\n & a {\n color: #843534;\n }\n ",content:"\n color: #a12622;\n ",close:"\n color: #a12622;\n border: 1px solid #a12622;\n\n &:hover {\n background: #a12622;\n color: #fff;\n }\n ",group:"\n color: #a12622;\n "}},flex:{container:"\n display: flex;\n ",group:"\n margin: auto 0.5rem;\n "}},{defaultProps:{variant:"info",size:"medium",flex:!0},staticProps:[]},{group:{align:{left:"\n margin-right: auto;\n ",right:"\n margin-left: auto;\n "}}}),eM=function(e){switch(e){case"success":return ez.CheckCircle;case"info":return ez.InfoCircle;case"warning":return ez.ExclamationTriangle;default:return ez.ExclamationCircle}};function eK(e){return(0,eG.jsxs)(eL,eq(eq({},e),{},{children:[(0,eG.jsx)(eL.Group,{style:{marginTop:"1px"},children:(0,eG.jsx)(ez.FaSVG,{children:(0,eG.jsx)("path",{fill:"currentColor",d:eM(e.variant)})})}),(0,eG.jsx)(eL.Content,{children:e.content?e.content:e.children}),e.closable&&(0,eG.jsx)(eL.Group,{align:"right",children:(0,eG.jsx)(eL.Close,{children:"x"})})]}))}var eH=t(16835),eV=t(99603),e_=t(59417),eW=t(64735),eY=t(42894),eJ=t(21963),e$=(r=(0,eO.Z)(eR().mark(function e(n,t){var r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eJ.e.post("installation",{requestId:n,environment:t}).then(function(e){return e.data});case 3:return r=e.sent,e.abrupt("return",[r,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n){return r.apply(this,arguments)}),eQ=(a=(0,eO.Z)(eR().mark(function e(n,t){var r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eJ.e.put("installation",{requestId:n,environment:t}).then(function(e){return e.data});case 3:return r=e.sent,e.abrupt("return",[r,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n){return a.apply(this,arguments)}),eX=(i=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.idp,a=n.property,i=n.searchKey,s=n.integrationId,e.prev=1,e.next=4,eJ.e.post("keycloak/users",{environment:t,idp:r,property:a,searchKey:i,integrationId:s}).then(function(e){return e.data});case 4:return o=e.sent,e.abrupt("return",[o,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return i.apply(this,arguments)}),e0=(s=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,i=void 0===(a=n.search)?"":a,e.prev=1,e.next=4,eJ.e.post("keycloak/roles",{environment:t,integrationId:r,search:i}).then(function(e){return e.data});case 4:return s=e.sent,e.abrupt("return",[s,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return s.apply(this,arguments)}),e1=(o=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,i=n.compositeRoleNames,e.prev=1,e.next=4,eJ.e.post("keycloak/set-composite-roles",{environment:t,integrationId:r,roleName:a,compositeRoleNames:i}).then(function(e){return e.data});case 4:return s=e.sent,e.abrupt("return",[s,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return o.apply(this,arguments)}),e2=(c=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,e.prev=1,e.next=4,eJ.e.post("keycloak/get-composite-roles",{environment:t,integrationId:r,roleName:a}).then(function(e){return e.data});case 4:return i=e.sent,e.abrupt("return",[i,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return c.apply(this,arguments)}),e3=(l=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o,c,l;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.username,s=void 0===(i=n.first)?0:i,c=void 0===(o=n.max)?50:o,e.prev=1,e.next=4,eJ.e.post("keycloak/user-roles",{environment:t,integrationId:r,username:a,first:s,max:c}).then(function(e){return e.data});case 4:return l=e.sent,e.abrupt("return",[l,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return l.apply(this,arguments)}),e5=(u=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.username,i=n.roleName,s=n.mode,e.prev=1,e.next=4,eJ.e.put("keycloak/user-role",{environment:t,integrationId:r,username:a,roleName:i,mode:s}).then(function(e){return e.data});case 4:return o=e.sent,e.abrupt("return",[o,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return u.apply(this,arguments)}),e4=(d=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.username,i=n.roleNames,e.prev=1,e.next=4,eJ.e.put("keycloak/user-roles",{environment:t,integrationId:r,username:a,roleNames:i}).then(function(e){return e.data});case 4:return s=e.sent,e.abrupt("return",[s,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return d.apply(this,arguments)}),e7=(p=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s,o,c,l;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,s=void 0===(i=n.first)?0:i,c=void 0===(o=n.max)?50:o,e.prev=1,e.next=4,eJ.e.post("keycloak/role-users",{environment:t,integrationId:r,roleName:a,first:s,max:c}).then(function(e){return e.data});case 4:return l=e.sent,e.abrupt("return",[l,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return p.apply(this,arguments)}),e8=(h=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.integrationId,r=n.roles,e.prev=1,e.next=4,eJ.e.post("keycloak/bulk-roles",{integrationId:t,roles:r}).then(function(e){return e.data});case 4:return a=e.sent,e.abrupt("return",[a,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return h.apply(this,arguments)}),e6=(f=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.environment,r=n.integrationId,a=n.roleName,e.prev=1,e.next=4,eJ.e.post("keycloak/delete-role",{environment:t,integrationId:r,roleName:a}).then(function(e){return e.data});case 4:return i=e.sent,e.abrupt("return",[i,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return f.apply(this,arguments)}),e9=t(71057),ne=t(73923),nn=t(31513),nt=t(63055),nr=t(15812),na=t(44e3),ni=t(63005),ns=t(74150),no=t(90352),nc=eT.ZP.div(b||(b=(0,eN.Z)(["\n text-align: center;\n"]))),nl=eT.ZP.div(j||(j=(0,eN.Z)(["\n color: #000;\n font-size: ",";\n font-weight: bold;\n"])),nt.n5),nu=eT.ZP.span(y||(y=(0,eN.Z)(["\n color: #3e3e3e;\n font-size: 14px;\n font-weight: 700;\n"]))),nd=eT.ZP.div(w||(w=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),np=eT.ZP.div(Z||(Z=(0,eN.Z)(["\n font-size: 18px;\n font-weight: bold;\n color: #000;\n border-bottom: 1px solid gray;\n"]))),nh=(0,nr.hU)(function(e){var n,t,r,a=e.integration,i=e.alert,s=(0,eE.useState)(!1),o=s[0],c=s[1],l=(n=(0,eO.Z)(eR().mark(function e(n){var t,r,s,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,e$(a.id,n);case 3:if(t=e.sent,s=(r=(0,eH.Z)(t,2))[0],o=r[1],c(!1),!o){e.next=11;break}return i.show({variant:"danger",content:"Failed to download installation"}),e.abrupt("return",null);case 11:return e.abrupt("return",s);case 12:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),u=(t=(0,eO.Z)(eR().mark(function e(n){var t;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(n);case 2:(t=e.sent)&&(0,ne.TE)((0,ne.ON)(t));case 4:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),d=(r=(0,eO.Z)(eR().mark(function e(n){var t;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(n);case 2:(t=e.sent)&&(0,ne.Di)((0,ne.ON)(t),"".concat(a.projectName,"-installation-").concat(n,".json"));case 4:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)});return o?(0,eG.jsxs)(nc,{children:[(0,eG.jsx)(nd,{}),(0,eG.jsx)(eY.rj,{color:"#000",height:45,width:45,wrapperClass:"d-block",visible:!0})]}):(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nd,{}),(0,eG.jsx)(np,{children:"Installation JSONs"}),(0,eG.jsx)("br",{}),(0,eG.jsx)(eW.ZP,{cols:3,children:(0,nn.Dy)(a).map(function(e){if("service-account"!==a.authType&&0===e.idps.length)return null;var n=e.idps.length>0?"(".concat(e.idps.map(function(e){return ni.S[e]}).join(", "),")"):"";return(0,eG.jsxs)(eE.Fragment,{children:[(0,eG.jsx)(eW.ZP.Row,{collapse:"992",gutter:[],align:"center",children:(0,eG.jsx)(eW.ZP.Col,{span:1,style:{width:"100%",height:"30px"},children:(0,eG.jsxs)(nl,{children:[e.display," ",n]})})}),(0,eG.jsx)(eW.ZP.Row,{collapse:"992",gutter:[],align:"center",children:(0,eG.jsxs)(eW.ZP.Col,{span:3,children:[(0,eG.jsx)(e9.Z,{size:"medium",variant:"grey",onClick:function(){return u(e.name)},children:"Copy"}),"\xa0",(0,eG.jsx)(e9.Z,{size:"medium",variant:"grey",onClick:function(){return d(e.name)},children:"Download"}),"\xa0\xa0",(0,eG.jsx)(eV.G,{color:"green",icon:e_.f8k,title:"Ready"}),"\xa0",(0,eG.jsx)(nu,{children:"Ready"})]})}),(0,eG.jsx)("br",{})]},e.name)})}),(0,eG.jsxs)(na.$,{children:["For more information on how to use these details, or for the public endpoints associated to your client,"," ",(0,eG.jsx)(ns.default,{href:"".concat(no.UN,"/integrating-your-application/installation-json"),external:!0,children:"click to learn more on our wiki page"}),"."]})]})}),nf=t(4826),nx=t(61165),nv=eT.ZP.div(k||(k=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),nm=eT.ZP.span(P||(P=(0,eN.Z)(["\n color: #000;\n font-size: 1.1rem;\n font-weight: bold;\n"])));(0,eT.ZP)(eV.G)(S||(S=(0,eN.Z)(["\n margin-right: 20px;\n"])));var ng=eT.ZP.div(C||(C=(0,eN.Z)(["\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n"])));eT.ZP.hr(I||(I=(0,eN.Z)(["\n background-color: black;\n"])));var nb=(0,nr.hU)(function(e){var n,t=e.selectedRequest,r=e.alert,a=(0,eE.useState)(null),i=a[0],s=a[1],o=(0,nn.Dy)(t),c=function(e){s(e),window.location.hash="confirm-new-secret"},l=(n=(0,eO.Z)(eR().mark(function e(){var n,a,s,o,c,l;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eQ(t.id,(null==i?void 0:i.name)||null);case 2:n=e.sent,s=(a=(0,eH.Z)(n,2))[0],c=(o=a[1])?"danger":"success",l=o?"Failed to regenerate secret":"Client Secret Successfully Updated",r.show({variant:c,fadeOut:1e4,closable:!0,content:l}),window.location.hash="#",console.error(s,o);case 11:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),u=(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsxs)(ng,{children:[(0,eG.jsxs)("strong",{children:["You are about to change your client secret for your ",null==i?void 0:i.display," environment."]})," "]}),(0,eG.jsx)("br",{}),(0,eG.jsx)("p",{children:"Once you change your secret, your previous secret will no longer be valid for any applications using it."}),(0,eG.jsx)("p",{children:"This means you will need to update any applications using this client with the new JSON details before they are functional again."})]});return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nv,{}),o.map(function(e){return(0,eG.jsxs)(eE.Fragment,{children:[(0,eG.jsxs)(nm,{children:[e.display,": "]}),!t.publicAccess&&(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(nf.default,{type:"button",onClick:function(){return c(e)},children:"Change your client secret"})]}),(0,eG.jsx)("br",{}),(0,eG.jsx)("br",{})]},e.name)})]}),(0,eG.jsx)(nx.Z,{id:"confirm-new-secret",content:u,onConfirm:l,icon:e_.eHv,buttonStyle:"custom",title:"You are about to change your client secret",closable:!0})]})}),nj=t(20070),ny=t.n(nj),nw=t(30233),nZ=t(85330),nk=t(23157),nP=t(11915),nS=t(43590),nC=t.n(nS);function nI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function nD(e){for(var n=1;n * {\n padding-right: 0.5rem;\n }\n"]))),nR=eT.ZP.div(F||(F=(0,eN.Z)(["\n padding-top: 10px;\n padding-bottom: 10px;\n"]))),nE=eT.ZP.div(R||(R=(0,eN.Z)(["\n color: #ff0000;\n"]))),nT={name:"",envs:["dev"]},nB=(0,eE.forwardRef)(function(e,n){var t,r=e.integrationId,a=e.environments,i=void 0===a?["dev"]:a,s=(0,eE.useState)(!1),o=s[0],c=s[1],l=(0,eE.useState)({}),u=l[0],d=l[1],p=(0,eE.useState)({}),h=p[0],f=p[1],x=(0,eE.useState)([nT]),v=x[0],m=x[1];(0,eE.useImperativeHandle)(n,function(){var e;return{submit:(e=(0,eO.Z)(eR().mark(function e(){var n,t,a,i,s,l,p,h;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=v,o&&(n=[],nC()(u,function(e,t){n.push({name:t,envs:e})})),e.next=4,e8({integrationId:r,roles:n});case 4:if(t=e.sent,i=(a=(0,eH.Z)(t,2))[0],!a[1]){e.next=10;break}return e.abrupt("return",[!0,!1]);case 10:return s={},l={},p=!1,h=!1,nC()(i,function(e){e.failure.length>0&&nC()(e.failure,function(n){s[n]||(s[n]=[]),s[n].push(e.env),p=!0}),e.duplicate.length>0&&nC()(e.duplicate,function(n){l[n]||(l[n]=[]),l[n].push(e.env),h=!0})}),d(s),f(l),c(!0),e.abrupt("return",[p,h]);case 19:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),reset:function(){m([nT]),d({}),f({}),c(!1)}}});var g=function(e){m(v.filter(function(n,t){return t!==e}))},b=function(e,n){m(v.map(function(t,r){return r===e?{name:n,envs:t.envs}:t}))},j=(t=(0,eO.Z)(eR().mark(function e(n,t,r){return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:m(v.map(function(e,r){return r===n?{name:e.name,envs:t.map(function(e){return e.value})}:e}));case 2:case"end":return e.stop()}},e)})),function(e,n,r){return t.apply(this,arguments)}),y=null;if(o){var w=null,Z=null;Object.keys(h).length>0&&(w=(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:(0,eG.jsxs)(nF,{children:[(0,eG.jsx)(nR,{children:(0,eG.jsx)(eV.G,{icon:e_.sqG,color:"#17a2b8",title:"duplicated roles",size:"lg"})}),(0,eG.jsx)(nR,{children:"There are duplicated roles and we've skipped adding them."})]})})})),Object.keys(u).length>0&&(Z=(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:(0,eG.jsxs)(nF,{children:[(0,eG.jsx)(nR,{children:(0,eG.jsx)(eV.G,{icon:e_.eHv,color:"#dc3545",title:"failed roles",size:"lg"})}),(0,eG.jsxs)(nR,{children:["We were unable to save some of your changes.",(0,eG.jsx)("br",{}),(0,eG.jsx)("div",{className:"fw-bold",children:"Please try submitting again."})]})]})})})),y=(0,eG.jsxs)(eG.Fragment,{children:[w,Z]})}else y=(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:v.length<20?(0,eG.jsxs)(nN,{onClick:function(){m(v.concat(nT))},children:[(0,eG.jsx)(eV.G,{style:{color:"#006fc4"},icon:e_.KtF,title:"Add Role"}),(0,eG.jsx)("span",{children:"Add another role"})]}):(0,eG.jsx)(nE,{children:"You can only create 20 roles at a time. Please save before creating any new roles."})})});return(0,eG.jsx)("div",{children:(0,eG.jsxs)(nO,{children:[(0,eG.jsx)("thead",{children:(0,eG.jsxs)("tr",{children:[(0,eG.jsx)("th",{className:"role",children:"Role Name"}),(0,eG.jsx)("th",{className:"env",children:"Environments"}),(0,eG.jsx)("th",{})]})}),(0,eG.jsxs)("tbody",{children:[v.length>0?v.map(function(e,n){var t=function(n,t){return u[e.name]&&u[e.name].includes(t.children)?nD(nD({},n),{},{color:"#fff",backgroundColor:"#dc3545"}):h[e.name]&&h[e.name].includes(t.children)?nD(nD({},n),{},{color:"#fff",backgroundColor:"#17a2b8"}):n};return(0,eG.jsxs)("tr",{children:[(0,eG.jsx)("td",{className:"role",children:(0,eG.jsx)(nP.default,{size:"small","data-testid":"role-name-input-field",minLength:"2",maxLength:"100",value:e.name,disabled:o,onChange:function(e){return b(n,e.target.value)}})}),(0,eG.jsx)("td",{className:"env",children:(0,eG.jsx)(nk.ZP,{value:e.envs.map(function(e){return{value:e,label:e}}),options:i.map(function(e){return{value:e,label:e}}),isMulti:!0,isDisabled:o,placeholder:"Select...",noOptionsMessage:function(){return"You selected all environments"},onChange:function(e,t){return j(n,e,t)},styles:{multiValueLabel:t,multiValue:t}})}),(0,eG.jsx)("td",{children:!o&&v.length>1&&(0,eG.jsx)(nN,{onClick:function(){return g(n)},children:(0,eG.jsx)(eV.G,{style:{color:"#FF0303"},icon:e_.uMC,title:"Remove Role"})})})]})}):(0,eG.jsx)("tr",{children:(0,eG.jsx)("td",{colSpan:3,children:"No roles added."})}),y]})]})})}),nA=t(20353),nz=t(27812),nG=t(93096),nU=t.n(nG),nq=t(29208),nL=t.n(nq),nM=t(34766),nK=t.n(nM),nH=t(76691),nV=t(53442),n_=t(75780),nW=t(80820),nY=t.n(nW),nJ=t(99503),n$=t.n(nJ),nQ=t(99245),nX=t.n(nQ),n0=t(96486),n1=eT.ZP.label(E||(E=(0,eN.Z)(["\n font-weight: bold;\n margin-bottom: 2px;\n"]))),n2=eT.ZP.div(T||(T=(0,eN.Z)(["\n display: flex;\n & > div:first-child {\n margin-right: 20px;\n }\n"]))),n3=eT.ZP.div(B||(B=(0,eN.Z)(["\n background-color: #f1f1f1;\n margin: 2px 0 2px 0;\n padding: 4px 6px;\n ","\n"])),function(e){return e.width?"width: ".concat(e.width,";"):"width: 300px;"}),n5=eT.ZP.div(A||(A=(0,eN.Z)(["\n font-size: 0.9rem;\n ","\n"])),function(e){return e.width?"width: ".concat(e.width,";"):"width: 300px;"}),n4=function(e){var n=e.children,t=e.width;return(0,eG.jsx)(n3,{width:t,children:(0,eG.jsx)(eW.ZP,{cols:6,children:(0,eG.jsxs)(eW.ZP.Row,{gutter:[],children:[(0,eG.jsx)(eW.ZP.Col,{span:5,children:n}),(0,eG.jsx)(eW.ZP.Col,{span:1,style:{textAlign:"right"},children:(0,eG.jsx)(eV.G,{icon:e_.byT,color:"#9F9F9F",size:"lg"})})]})})})},n7=function(e){var n=e.modalRef;return(0,eG.jsx)(nw.Z,{ref:n,id:"additiona-user-info",title:"Additional User Info",icon:null,cancelButtonText:"Close",cancelButtonVariant:"primary",showConfirmButton:!1,buttonAlign:"right",style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},children:function(e){if(!e)return(0,eG.jsx)(eG.Fragment,{});var n=n$()(e.attributes,nX());return n=(0,n0.mapKeys)(n,function(e,n){return ny()(n)}),(0,eG.jsxs)("div",{children:[(0,eG.jsx)(n1,{children:"GUID"}),(0,eG.jsx)(n4,{width:"400px",children:e.guid}),(0,eG.jsx)("br",{}),(0,eG.jsx)(n1,{children:"Attributes"}),(0,eG.jsxs)(n2,{children:[(0,eG.jsx)(n5,{width:"200px",children:"Key"}),(0,eG.jsx)(n5,{width:"700px",children:"Value"})]}),nY()(n,function(e,n){return(0,eG.jsxs)(n2,{children:[(0,eG.jsx)(n4,{width:"200px",children:n}),(0,eG.jsx)(n4,{width:"700px",children:e})]})})]})}})},n8=t(37226),n6=function(e){return"service-account-".concat(e)},n9=t(34798),te=t.n(n9);function tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function tt(e){for(var n=1;n0?d.map(function(){var e=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.username.startsWith("service-account-")){e.next=8;break}return t=n.username.split("-"),e.next=4,(0,n8.A_)(t[t.length-1]);case 4:r=e.sent,a=(0,eH.Z)(r,1)[0],ep([].concat((0,nz.Z)(ed),[{username:n.username,integration:a}]));case 8:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}()):ep([]),B(d.length===R),L(o.concat(d)),N(r+R),H(t),v(!1);case 23:case"end":return e.stop()}},e)})),function(e,n){return eC.apply(this,arguments)}),ew=(eI=(0,eO.Z)(eR().mark(function e(n){var t,r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!g){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.next=5,e2({environment:a,integrationId:i.id,roleName:n});case 5:if(t=e.sent,o=(r=(0,eH.Z)(t,2))[0],!(r[1]||!o)){e.next=12;break}return s.show({variant:"danger",fadeOut:5e3,closable:!0,content:"Failed to fetch composite roles."}),e.abrupt("return");case 12:W(o.map(function(e){return{label:e,value:e}})),b(!1);case 14:case"end":return e.stop()}},e)})),function(e){return eI.apply(this,arguments)}),eZ=(eD=(0,eO.Z)(eR().mark(function e(n){return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:c.current.open(n);case 1:case"end":return e.stop()}},e)})),function(e){return eD.apply(this,arguments)}),ek=null;if(0===O&&x)ek=(0,eG.jsx)(tv,{});else if(K){var eP,eS,eC,eI,eD,eN,eF=q.filter(function(e){return!e.username.startsWith("service-account-")}),eT=q.filter(function(e){return e.username.startsWith("service-account-")});ek="Users"===ec?(0,eG.jsx)(nV.Z,{variant:"mini",headers:[{accessor:"idp",Header:"IDP"},{accessor:"guid",Header:"GUID"},{accessor:"email",Header:"Email"},{accessor:"actions",Header:(0,eG.jsx)(tl,{}),disableSortBy:!0}],data:eF.length>0?eF.map(function(e){var n=e.username.split("@");if(n.length<2)return[];var t=(0,eH.Z)(n,2),r=t[0],a=t[1],i=tf[a];return{idp:ni.S[a],guid:r,email:e.email,actions:(0,eG.jsxs)(to,{children:[(0,eG.jsx)("span",{onClick:function(n){n.stopPropagation(),o.current.open({guid:e.username.split("@")[0],attributes:tt(tt({},nK()(i,function(n,t){return n[t.label]=nL()(e,t.value),n},{})),e.attributes)})},children:(0,eG.jsx)(eV.G,{style:{color:"#000"},icon:e_.Mdf,size:"lg",title:"User Detail"})}),"\xa0\xa0",(0,eG.jsx)("span",{onClick:function(){return l.current.open(e)},children:(0,eG.jsx)(eV.G,{style:{color:"#FF0303"},icon:e_.uMC,size:"lg",title:"Remove User"})})]})}}):[],loadMoreItem:function(){return ey(!1,K)},hasMoreItem:T,loader:(0,eG.jsx)(tv,{}),colfilters:[],activateRow:te(),rowSelectorKey:"guid",noDataFoundElement:(0,eG.jsx)("td",{colSpan:5,children:"No users found."})}):"Service Accounts"===ec?(0,eG.jsx)(nV.Z,{variant:"mini",headers:[{accessor:"projectName",Header:"Project Name"},{accessor:"actions",Header:(0,eG.jsx)(tu,{}),disableSortBy:!0}],data:eT.length>0?eT.map(function(e){var n,t;return{projectName:null===(n=ed.find(function(n){return n.username==e.username}))||void 0===n?void 0:null===(t=n.integration)||void 0===t?void 0:t.projectName,actions:(0,eG.jsx)("span",{onClick:function(){return u.current.open(e)},children:(0,eG.jsx)(ts,{children:(0,eG.jsx)(eV.G,{style:{color:"#FF0303"},icon:e_.uMC,size:"lg",title:"Remove Service Account"})})})}}):[],colfilters:[],activateRow:te(),rowSelectorKey:"projectName",noDataFoundElement:(0,eG.jsx)("td",{colSpan:5,children:"No service accounts found."})}):g?(0,eG.jsx)(tv,{}):(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsxs)(tr,{children:["Select the roles to be nested under the Parent role"," ",(0,eG.jsx)(n_.Z,{content:"Composite roles associate (nest) one or more additional roles within it."})]}),(0,eG.jsx)(nk.ZP,{value:_,options:eb.filter(function(e){return e.value!==K}),isMulti:!0,placeholder:"Select...",noOptionsMessage:function(){return"No roles"},onChange:(eN=(0,eO.Z)(eR().mark(function e(n){var t;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(t=em(n))||void 0===t?void 0:t.then(function(e){return e&&W(n)});case 2:case"end":return e.stop()}},e)})),function(e){return eN.apply(this,arguments)}),isDisabled:!ei}),(0,eG.jsx)(nZ.Ad,{saving:y,content:k,variant:ef?"error":"success"})]})}var eB=(0,eG.jsx)(nV.Z,{headers:[{accessor:"role",Header:"Role Name"},{accessor:"actions",Header:"",disableSortBy:!0}],noDataFoundElement:(0,eG.jsx)("td",{children:"No roles found."}),activateRow:function(e){var n=e.cells[0].value;if(n.endsWith(" (Composite role)")){var t=e.cells[0].value.length;H(n.substr(0,t-17))}else H(n)},rowSelectorKey:"role",data:z.map(function(e,n){return{role:!0==J[n]?"".concat(e," (Composite role)"):e,actions:(0,eG.jsx)(ti,{children:(0,eG.jsx)(nH.Kk,{disabled:!ei,icon:e_.$aW,role:"button","aria-label":"delete",onClick:function(n){ei&&(n.stopPropagation(),eZ(e))},title:"Delete",size:"lg",style:{marginRight:"1rem"}})})}}),colfilters:[]});return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsx)(eW.ZP.Col,{span:4,children:(0,eG.jsxs)("div",{style:{display:"flex",float:"left"},children:[(0,eG.jsx)(nZ.E1,{type:"text",maxLength:"1000",placeholder:"Search existing roles",value:C,onChange:function(e){I(e.target.value)},onKeyUp:function(e){"Enter"===e.key&&ej()}}),(0,eG.jsx)(nZ.zx,{type:"button",size:"small",variant:"bcPrimary",onClick:ej,children:"Search"})]})}),(0,eG.jsx)(eW.ZP.Col,{span:6,children:K&&(0,eG.jsx)(nZ.mQ,{onChange:function(e){el(e)},activeKey:ec,tabBarGutter:30,children:X.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:e},e)})})})]})}),(0,eG.jsx)(tc,{}),p?(0,eG.jsx)(tv,{}):(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsx)(eW.ZP.Col,{span:4,children:eB}),(0,eG.jsx)(eW.ZP.Col,{span:6,children:ek})]})}),(0,eG.jsx)(nw.Z,{ref:c,title:"Delete Role",icon:e_.eHv,onConfirm:(n=(0,eO.Z)(eR().mark(function e(n,t){var r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,e6({environment:a,integrationId:i.id,roleName:t});case 2:return r=e.sent,(o=(0,eH.Z)(r,2))[0],o[1]&&s.show({variant:"danger",content:"Failed to delete role ".concat(t,". Please try again.")}),e.next=9,eg();case 9:case"end":return e.stop()}},e)})),function(e,t){return n.apply(this,arguments)}),confirmButtonText:"Delete",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",children:(0,eG.jsx)("div",{children:"Are you sure you want to delete this role?"})}),(0,eG.jsx)(nw.Z,{id:"remove-user",ref:l,title:"Remove User from Role",icon:e_.eHv,onConfirm:(t=(0,eO.Z)(eR().mark(function e(n,t){var r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(K){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,e5({environment:a,integrationId:i.id,username:t.username,roleName:K,mode:"del"});case 4:r=e.sent,(o=(0,eH.Z)(r,2)[1])&&s.show({variant:"danger",content:o}),ey(!0,K);case 9:case"end":return e.stop()}},e)})),function(e,n){return t.apply(this,arguments)}),confirmButtonText:"Remove",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",children:(0,eG.jsx)("div",{children:"Are you sure you want to remove this user from this role?"})}),(0,eG.jsx)(nw.Z,{id:"remove-service-account",ref:u,title:"Remove Service Account from Role",icon:e_.eHv,onConfirm:(r=(0,eO.Z)(eR().mark(function e(n,t){var r,o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(K){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,e5({environment:a,integrationId:i.id,username:t.username,roleName:K,mode:"del"});case 4:r=e.sent,(o=(0,eH.Z)(r,2)[1])&&s.show({variant:"danger",content:o}),ey(!0,K);case 9:case"end":return e.stop()}},e)})),function(e,n){return r.apply(this,arguments)}),confirmButtonText:"Remove",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",children:(0,eG.jsx)("div",{children:"Are you sure you want to remove this service account from this role?"})}),(0,eG.jsx)(n7,{modalRef:o})]})}),tg=t(24444),tb=eT.ZP.div(K||(K=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),tj=function(e){var n,t=e.integration,r=(0,eE.useRef)(nw.V),a=(0,eE.useState)("dev"),i=a[0],s=a[1],o=(0,eE.useState)(!1),c=o[0],l=o[1],u=(0,eE.useState)(0),d=u[0],p=u[1],h=(0,eE.useContext)(tg.SurveyContext);(0,eE.useEffect)(function(){s("dev"),l((0,nA.Yr)(t))},[t.id]);var f=(null==t?void 0:t.environments)||[];return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tb,{}),(0,eG.jsx)(nZ.zx,{disabled:!c,size:"medium",variant:"primary",onClick:function(){r.current.open()},"data-testid":"create-role-button",children:"+ Create a New Role"}),(0,eG.jsx)(tb,{}),(0,eG.jsxs)(nZ.mQ,{onChange:function(e){s(e)},activeKey:i,tabBarGutter:30,destroyInactiveTabPane:!0,children:[(0,eG.jsx)("br",{}),f.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:ny()(e),children:(0,eG.jsx)(tm,{environment:e,integration:t},d)},e)})]}),(0,eG.jsx)(nw.Z,{ref:r,title:"Create New Role",icon:null,onConfirm:(n=(0,eO.Z)(eR().mark(function e(n){var t,a,i,s;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.current.submit();case 2:if(t=e.sent,i=(a=(0,eH.Z)(t,2))[0],s=a[1],!i){e.next=11;break}return r.current.updateConfig({confirmButtonText:"Try Again"}),e.abrupt("return",!1);case 11:if(!s){e.next=17;break}return r.current.updateConfig({showConfirmButton:!1,cancelButtonText:"Close",buttonAlign:"right"}),p(function(e){return e+1}),e.abrupt("return",!1);case 17:return e.next=19,n.current.reset();case 19:p(function(e){return e+1}),null==h||h.setShowSurvey(!0,"createRole");case 21:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),onCancel:function(e){e.current.reset()},confirmButtonText:"Save",confirmButtonVariant:"primary",cancelButtonVariant:"secondary",style:{maxHeight:"calc(100vh - 200px)",overflowY:"auto"},children:(0,eG.jsx)(nB,{integrationId:t.id,environments:f})})]})},ty=(x=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.field,r=n.search,e.prev=1,e.next=4,eJ.e.post("bceid-webservice/idir/search",{field:t,search:r}).then(function(e){return e.data});case 4:return a=e.sent,e.abrupt("return",[a,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return x.apply(this,arguments)}),tw=(v=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.guid,r=n.userId,e.prev=1,e.next=4,eJ.e.post("bceid-webservice/idir/import",{guid:t,userId:r}).then(function(e){return e.data});case 4:return a=e.sent,e.abrupt("return",[a,null]);case 8:return e.prev=8,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return v.apply(this,arguments)}),tZ=[{value:"idir",label:"IDIR"}],tk=[{value:"firstName",label:"First Name",allowed:["idir"]},{value:"lastName",label:"Last Name",allowed:["idir"]},{value:"email",label:"Email",allowed:["idir","bceidbasic","bceidbusiness"]},{value:"userId",label:"Username",allowed:["idir","bceidbasic","bceidbusiness"]},{value:"guid",label:"IDP GUID",allowed:["bceidbasic","bceidbusiness"]}],tP=(0,eE.forwardRef)(function(e,n){e.key;var t,r,a=e.idp,i=e.property,s=e.search,o=e.infoModalRef,c=e.parentModalRef,l=(0,eE.useState)(!1),u=(l[0],l[1]),d=(0,eE.useState)(!1),p=d[0],h=d[1],f=(0,eE.useState)([]),x=f[0],v=f[1],m=(0,eE.useState)(""),g=m[0],b=m[1],j=(0,eE.useState)(i),y=j[0],w=j[1],Z=(0,eE.useState)(s),k=Z[0],P=Z[1],S=(0,eE.useState)(!1),C=S[0],I=S[1];(0,eE.useEffect)(function(){b(a)},[a]),(0,eE.useEffect)(function(){if(g){var e=tk.find(function(e){return e.value===y});if(null==e?void 0:e.allowed.includes(g))D(k,y);else{var n=tk.find(function(e){return e.allowed.includes(g)});w((null==n?void 0:n.value)||""),P("")}}},[g]);var D=(t=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,s=arguments;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=s.length>1&&void 0!==s[1]?s[1]:y,!(n.length<2)){e.next=3;break}return e.abrupt("return");case 3:return h(!0),v([]),u(!0),e.next=8,ty({field:t,search:n});case 8:r=e.sent,i=(a=(0,eH.Z)(r,2))[0],a[1],i&&v(i),h(!1);case 14:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),O=(r=(0,eO.Z)(eR().mark(function e(n){var t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I(!1),e.next=3,tw({guid:n.guid,userId:n.userId});case 3:t=e.sent,(r=(0,eH.Z)(t,2))[0],r[1]?I(!0):c.current.close({idp:g,guid:n.guid});case 8:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)});return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nV.Z,{searchPlaceholder:"Enter search criteria",variant:"mini",headers:[{accessor:"firstName",Header:"First name"},{accessor:"lastName",Header:"Last Name"},{accessor:"email",Header:"Email"},{accessor:"idirUsername",Header:"IDIR username"},{accessor:"actions",Header:"",disableSortBy:!0}],rowSelectorKey:"guid",data:x.map(function(e){return{guid:e.guid,firstName:e.individualIdentity.name.firstname,lastName:e.individualIdentity.name.surname,email:e.contact.email,idirUsername:e.userId,actions:(0,eG.jsxs)(nH.c4,{children:[(0,eG.jsx)(nH.Kk,{icon:e_.Mdf,role:"button","aria-label":"view",onClick:function(){o.current.open({guid:e.guid,attributes:{username:e.userId,displayName:e.displayName,firstName:e.individualIdentity.name.firstname,middleName:e.individualIdentity.name.middleName,lastName:e.individualIdentity.name.surname,initials:e.individualIdentity.name.initials,email:e.contact.email,telephone:e.contact.telephone,company:e.internalIdentity.company,department:e.internalIdentity.department,title:e.internalIdentity.title},_hash:c.current.getId()})},title:"View",size:"lg"}),(0,eG.jsx)(nH.Kk,{icon:e_.q7m,role:"button","aria-label":"import",onClick:function(){return O(e)},title:"Import",size:"lg"})]})}}),colfilters:[{value:g,multiselect:!1,onChange:b,options:tZ},{value:y,multiselect:!1,onChange:w,options:tk.filter(function(e){return e.allowed.includes(g)})}],showFilters:!0,loading:p,totalColSpan:20,searchColSpan:10,headerAlign:"bottom",headerGutter:[5,0],searchKey:k,searchLocation:"right",onSearch:D,onEnter:D,noDataFoundElement:(0,eG.jsx)("p",{children:"The user you searched for does not exist. Please try again, by entering the full search criteria."})}),C&&(0,eG.jsx)("p",{className:"text-danger",children:"Failed to import the user. Please try again."})]})});function tS(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function tC(e){for(var n=1;n * {\n padding-right: 0.5rem;\n }\n"]))),tF=eT.ZP.div(Y||(Y=(0,eN.Z)(["\n padding-top: 10px;\n padding-bottom: 10px;\n"]))),tR=eT.ZP.div(J||(J=(0,eN.Z)(["\n text-align: center;\n"]))),tE=function(){return(0,eG.jsxs)(tD,{children:[(0,eG.jsx)(tO,{}),(0,eG.jsx)(eY.rj,{color:"#000",height:45,width:45,wrapperClass:"d-block",visible:!0})]})},tT=[{value:"firstName",label:"First Name",search:!0,result:!0},{value:"lastName",label:"Last Name",search:!0,result:!0,style:{minWidth:"170px"}},{value:"email",label:"Email",search:!0,result:!0,style:{minWidth:"170px"}},{value:"guid",label:"IDP GUID",search:!0,result:!1}],tB=[{value:"firstName",label:"Display Name",search:!0,result:!0},{value:"lastName",label:"Username",search:!0,result:!0,style:{minWidth:"170px"}},{value:"email",label:"Email",search:!0,result:!0,style:{minWidth:"170px"}},{value:"guid",label:"IDP GUID",search:!0,result:!1}],tA=[{value:"firstName",label:"Name",search:!0,result:!0},{value:"lastName",label:"Login",search:!0,result:!0,style:{minWidth:"170px"}},{value:"email",label:"Email",search:!0,result:!0,style:{minWidth:"170px"}},{value:"guid",label:"IDP GUID",search:!0,result:!1}],tz={idir:tT,azureidir:tT,bceidbasic:tB,bceidbusiness:tB,bceidboth:tB,githubpublic:tA,githubbcgov:tA},tG=(0,nr.hU)(function(e){var n,t,r,a,i,s=e.selectedRequest,o=e.alert,c=(0,eE.useRef)(nw.V),l=(0,eE.useRef)(nw.V),u=(0,eE.useState)(!1),d=u[0],p=u[1],h=(0,eE.useState)(1),f=h[0],x=h[1],v=(0,eE.useState)(0),m=v[0],g=v[1],b=(0,eE.useState)(15),j=b[0],y=b[1],w=(0,eE.useState)(!1),Z=w[0],k=w[1],P=(0,eE.useState)(!1),S=P[0],C=P[1],I=(0,eE.useState)(!1),D=I[0],O=I[1],N=(0,eE.useState)(""),F=N[0],R=N[1],E=(0,eE.useState)([]),T=E[0],B=E[1],A=(0,eE.useState)([]),z=A[0],G=A[1],U=(0,eE.useState)([]),q=U[0],L=U[1],M=(0,eE.useState)([]),K=M[0],H=M[1],V=(0,eE.useState)("dev"),_=V[0],W=V[1],Y=(0,eE.useState)(s.devIdps[0]),J=Y[0],$=Y[1],Q=(0,eE.useState)(""),X=Q[0],ee=Q[1],en=(0,eE.useState)(""),et=en[0],er=en[1],ea=(0,eE.useState)(void 0),ei=ea[0],es=ea[1],eo=(0,eE.useState)(!1),ec=eo[0],el=eo[1],eu=(0,eE.useContext)(tg.SurveyContext),ed=(0,eE.useCallback)(nU()((n=(0,eO.Z)(eR().mark(function e(n){var t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(!0);case 2:return R("Assigning role..."),el(!1),e.next=6,e4({environment:_,integrationId:s.id,username:ei,roleNames:n});case 6:if(t=e.sent,r=(0,eH.Z)(t,2)[1],O(!1),r){e.next=16;break}return R("Last saved at ".concat(new Date().toLocaleString())),null==eu||eu.setShowSurvey(!0,"addUserToRole"),e.abrupt("return",!0);case 16:return el(!0),R("Failed to update roles."),e.abrupt("return",!1);case 19:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),2e3,{trailing:!0}),[null==s?void 0:s.id,_,ei,eu]),ep=(t=(0,eO.Z)(eR().mark(function e(){var n,t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,k(!0);case 4:return e.next=6,e0({environment:_,integrationId:s.id,first:0,max:1e3});case 6:n=e.sent,r=(t=(0,eH.Z)(n,2))[0],t[1]&&o.show({variant:"danger",content:"Failed to fetch roles."}),G(null===r?[]:r.map(function(e){return e.name})),H(null===r?[]:r.map(function(e){return e.composite})),k(!1);case 15:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),eh=function(){B([]),L([]),x(1),g(0),es(void 0),p(!1)},ef=function(){if(er(""),W("dev"),s.devIdps){var e=s.devIdps.length>0?s.devIdps[0]:"";$(e);var n=tz[e]||[];n.length>0&&ee(n[0].value)}},ex=(r=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(!0);case 2:return e.next=4,e3({environment:_,integrationId:s.id,username:n});case 4:if(t=e.sent,a=(r=(0,eH.Z)(t,2))[0],!r[1]){e.next=12;break}return o.show({variant:"danger",content:"Failed to fetch user roles."}),C(!1),e.abrupt("return");case 12:return e.next=14,L(a||[]);case 14:C(!1);case 15:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)});(0,eE.useEffect)(function(){eh(),ef(),G([])},[s.id]),(0,eE.useEffect)(function(){ev(et,void 0,f)},[f]),(0,eE.useEffect)(function(){ev(et,void 0,1)},[j]),(0,eE.useEffect)(function(){eh(),ep(),s.devIdps&&$(s.devIdps.length>0?s.devIdps[0]:"")},[_]),(0,eE.useEffect)(function(){eh();var e=tz[J]||[];!e.find(function(e){return e.search&&e.value===X})&&e.length>0&&ee(e[0].value)},[J]),(0,eE.useEffect)(function(){R(""),ei&&ex(ei)},[ei]);var ev=(a=(0,eO.Z)(eR().mark(function e(n){var t,r,a,i,c,l=arguments;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.length>1&&void 0!==l[1]?l[1]:X,r=l.length>2&&void 0!==l[2]?l[2]:f,!(n.length<2)){e.next=4;break}return e.abrupt("return");case 4:return k(!0),er(n),x(r),ee(t),B([]),L([]),es(void 0),e.next=13,eX({environment:_,idp:J,property:t,searchKey:n,integrationId:s.id||-1});case 13:if(a=e.sent,c=(i=(0,eH.Z)(a,2))[0],i[1]&&o.show({variant:"danger",content:"Failed to fetch users."}),c){var u;p(!0),B((u=r,c.rows.slice((u-1)*15,15*u))),g(c.count)}k(!1);case 20:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),em=function(e){return ev(e,void 0,1)},eg=(i=(0,eO.Z)(eR().mark(function e(n,t){var r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],"clear"===t.action||(r="remove-value"===t.action?q.filter(function(e){var n;return e!==(null===(n=t.removedValue)||void 0===n?void 0:n.value)}):"pop-value"===t.action?(0,nz.Z)(q.slice(0,-1)):[].concat((0,nz.Z)(q),[null===(a=t.option)||void 0===a?void 0:a.value])),!(r.length!==q.length)){e.next=7;break}return e.next=5,ed(r);case 5:e.sent&&L(r);case 7:case"end":return e.stop()}},e)})),function(e,n){return i.apply(this,arguments)}),eb=null;S?eb=(0,eG.jsx)(tE,{}):ei&&(eb=(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tI,{children:"2. Assign User to a Role"}),(0,eG.jsx)(nk.ZP,{value:q.map(function(e){return{value:e,label:e}}),options:z.map(function(e,n){return{value:e,label:!0==K[n]?"".concat(e," (Composite role)"):e}}),isMulti:!0,placeholder:"Select...",noOptionsMessage:function(){return"No roles"},onChange:eg,"data-testid":"user-role-select"}),(0,eG.jsx)(nZ.Ad,{saving:D,content:F,variant:ec?"error":"success"})]}));var ej="idir"===J,ey=tz[J]||[],ew=ey.length>0?ey.filter(function(e){return e.result}):[],eZ=null;d&&ej&&(eZ=(0,eG.jsxs)(eG.Fragment,{children:[T.length>0&&(0,eG.jsx)(nZ.XU,{italic:!0,children:"If you did not find the user you were looking for, you can try searching for the user in our IDIM Web Service Lookup tool. This tool uses a webservice to find IDIR users. so you will need to import the user that is found."}),(0,eG.jsx)(nf.default,{type:"button",size:"small","data-testid":"idim-search-button",onClick:function(){return l.current.open({key:new Date().getTime().toString(),idp:"idir",property:X,search:et})},children:"Search in IDIM Web Service Lookup"})]}));var ek=(null==s?void 0:s.environments)||[],eP=(null==s?void 0:s.devIdps)||[],eS="guid"===X||J.startsWith("bceid")?"Exact text match results will be displayed":"Partial text match results will be displayed",eC=function(e){var n=ey.find(function(n){return n.value===e});return null==n?void 0:n.label.toString()};return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tO,{}),(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsxs)(eW.ZP.Col,{span:6,children:[(0,eG.jsxs)(nZ.h4,{variant:"dark",size:"sm",children:["1. Search for a user based on the selection criteria below \xa0",(0,eG.jsx)(n_.Z,{title:"",content:"When searching BCeID GUID, please ensure your end users has logged in via your app (and indirectly our IDP) for this search to be successful.",hide:200})]}),(0,eG.jsx)(nV.Z,{searchPlaceholder:"Enter search criteria",variant:"mini",rowSelectorKey:"username",headers:[{accessor:"firstName",Header:eC("firstName")||""},{accessor:"lastName",Header:eC("lastName")||""},{accessor:"email",Header:"Email"},{accessor:"actions",Header:"",disableSortBy:!0}],data:T.map(function(e){return{username:nL()(e,"username"),firstName:nL()(e,"firstName"),lastName:nL()(e,"lastName"),email:nL()(e,"email"),actions:(0,eG.jsx)(nH.c4,{children:(0,eG.jsx)(nH.Kk,{icon:e_.Mdf,role:"button","aria-label":"view",onClick:function(n){n.stopPropagation(),c.current.open({guid:e.username.split("@")[0],attributes:tC(tC({},nK()(ew,function(n,t){return n[t.label]=nL()(e,t.value),n},{})),e.attributes)})},title:"View",size:"lg"})})}}),colfilters:[{key:"user-role-filter-env",value:_,multiselect:!1,onChange:W,options:ek.map(function(e){return{value:e,label:ny()(e)}})},{key:"user-role-filter-idp",value:J,multiselect:!1,onChange:$,options:eP.filter(function(e){return"digitalcredential"!==e}).map(function(e){return{value:e,label:ni.S[e]}})},{key:"user-role-filter-prop",value:X,multiselect:!1,onChange:ee,options:ey.filter(function(e){return e.search})}],showFilters:!0,loading:Z,totalColSpan:20,searchColSpan:10,headerAlign:"bottom",headerGutter:[5,0],searchKey:et,searchLocation:"right",onSearch:em,onEnter:em,noDataFoundElement:d?(0,eG.jsxs)(tN,{children:[(0,eG.jsx)(tF,{children:(0,eG.jsx)(eV.G,{icon:e_.RLE,color:"#D44331",title:"Edit",size:"lg"})}),ej?(0,eG.jsx)(tF,{children:"The user you searched for does not exist. Please try again, by entering the full search criteria or try using our IDIM Web Service Lookup tool."}):(0,eG.jsx)(tF,{children:"The user you searched for does not exist. Please try again, by entering the full search criteria."})]}):(0,eG.jsx)(tR,{children:"You have not searched for any users yet."}),pagination:!0,pageLimits:[15],onPage:x,rowCount:m,limit:j,onLimit:function(e){y(e)},activateRow:function(e){es(e.original.username)},searchTooltip:eS}),eZ]}),(0,eG.jsx)(eW.ZP.Col,{span:4,children:eb})]})}),(0,eG.jsx)(n7,{modalRef:c}),(0,eG.jsx)(nw.Z,{ref:l,id:"idim-webservice-lookup",title:"IDIM Web Service Lookup",icon:null,onClose:function(e,n,t){ev(t.guid,"guid",1)},cancelButtonText:"Close",cancelButtonVariant:"primary",showConfirmButton:!1,buttonAlign:"right",style:{minWidth:"800px",maxHeight:"calc(100vh - 200px)",overflowY:"auto"},children:function(e){return e?(0,eG.jsx)(tP,{idp:e.idp,property:e.property,search:e.search,infoModalRef:c,parentModalRef:l},e.key):(0,eG.jsx)(eG.Fragment,{})}})]})}),tU=t(62248),tq=t(42050),tL=eT.ZP.h3($||($=(0,eN.Z)(["\n color: #777777;\n font-size: ",";\n font-weight: bold;\n min-height: 30px;\n border-bottom: 1px solid #707070;\n margin-bottom: 5px;\n overflow: wrap;\n"])),nt.CA),tM=eT.ZP.p(Q||(Q=(0,eN.Z)(["\n font-size: ",";\n color: "," !important;\n"])),nt.KN,nt.we),tK=t(11752),tH=t.n(tK),tV=eT.ZP.ul(X||(X=(0,eN.Z)(["\n list-style-type: none;\n margin: 0;\n position: relative;\n\n & li {\n border-bottom: 1px solid #d4d4d4;\n & svg.svg-inline--fa {\n position: absolute;\n right: 0;\n }\n\n & div.icon {\n position: absolute;\n right: 0;\n bottom: 5px;\n }\n }\n"]))),t_=(tH()()||{}).publicRuntimeConfig,tW=(void 0===t_?{}:t_).app_env,tY=(0,eT.ZP)(tL)(ee||(ee=(0,eN.Z)(["\n border-bottom: none;\n margin-top: 10px;\n"]))),tJ=(0,eT.ZP)(tY)(en||(en=(0,eN.Z)(["\n font-size: 14px;\n"]))),t$=eT.ZP.a(et||(et=(0,eN.Z)(["\n color: ",";\n"])),nt.nc),tQ=(0,eT.ZP)(tq.Z)(er||(er=(0,eN.Z)(["\n margin-bottom: 10px;\n"]))),tX=function(e){switch(e){case"submitted":return 0;case"pr":return 33;case"planned":return 66;default:return 100}},t0=function(e){switch(e){case"submitted":return"Process request submitted...";case"pr":return"Pull request created...";case"planned":return"Terraform plan succeeded...";case"prFailed":case"planFailed":case"applyFailed":return"An error has occurred";default:return""}},t1=function(e){switch(e){case"prFailed":case"planFailed":case"applyFailed":return!0;default:return!1}},t2=function(e){switch(e){case"submitted":default:return 0;case"pr":return 1;case"prFailed":return 2;case"planned":return 3;case"planFailed":return 4;case"applied":return 5;case"applyFailed":return 6}};function t3(e){var n=e.integration,t=n.status,r=n.updatedAt,a=t1(t),i=new Date(r||"").toLocaleString();return(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(tQ,{now:tX(t),animated:!0,variant:a?"danger":void 0}),(0,eG.jsxs)(tM,{children:["Last updated at ",i]})]})}(0,nr.hU)(function(e){var n=e.integration,t=e.title,r=e.alert,a=n.id,i=n.status,s=n.updatedAt,o=n.prNumber,c=(0,eE.useState)(!1),l=c[0],u=c[1],d=t1(i),p=t0(i),h=new Date(s||"");(0,eE.useEffect)(function(){u(12e5 *:nth-child(1) {\n margin-right: 5px;\n }\n"]))),rr="15px",ra=eT.ZP.div(es||(es=(0,eN.Z)(["\n height: ",";\n width: ",";\n border-radius: ",";\n margin: ",";\n margin-left: 0;\n border: 2px solid #b3b3b3;\n"])),rr,rr,rr,"0"),ri=eT.ZP.li(eo||(eo=(0,eN.Z)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0;\n\n & p {\n max-width: 90%;\n margin: 5px 0;\n }\n"]))),rs=function(e){var n=e.integration;return(0,eG.jsxs)(rt,{children:[(0,eG.jsx)("div",{children:(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#2E8540"})}),(0,eG.jsxs)("div",{children:[(0,eG.jsx)("span",{children:"Your integration has been approved. Please wait approx. 10 min to get access to your installation information access again."}),(0,eG.jsx)(rn,{children:"Progress Update"}),(0,eG.jsx)(t3,{integration:n})]})]})},ro=function(){return(0,eG.jsxs)(rt,{children:[(0,eG.jsx)("div",{children:(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#2E8540"})}),(0,eG.jsx)("div",{children:(0,eG.jsx)("span",{children:"Your integration is approved and available."})})]})};function rc(e){return e.integration,(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to IDIM",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsxs)("p",{children:["Please reach out to IDIM if you do not hear back within the next 2-3 business days (",(0,eG.jsx)(ns.default,{href:"mailto:IDIM.Consulting@gov.bc.ca",children:"IDIM.Consulting@gov.bc.ca"}),")"]}),(0,eG.jsx)(eV.G,{icon:e_.FU$,color:"#b3b3b3"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})})}var rl=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasBceid,i=t.awaitingBceidProd,s=t.bceidProdApplying,o=t.bceidApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(rc,{integration:n})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to BCeID Prod"}),(0,eG.jsx)("br",{}),c]})};function ru(e){return e.integration,(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to GCIO",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})})}var rd=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasGithub,i=t.awaitingGithubProd,s=t.githubProdApplying,o=t.githubApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(ru,{integration:n})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to GitHub Prod"}),(0,eG.jsx)("br",{}),c]})},rp=t(19287),rh=eT.ZP.label(ec||(ec=(0,eN.Z)(["\n font-weight: bold;\n margin-bottom: 2px;\n"])));eT.ZP.div(el||(el=(0,eN.Z)(["\n background-color: #f1f1f1;\n margin: 2px 0 2px 0;\n padding: 4px 6px;\n ","\n"])),function(e){return e.width?"width: ".concat(e.width,";"):"width: 300px;"});var rf=eT.ZP.div(eu||(eu=(0,eN.Z)(["\n text-align: center;\n"]))),rx=eT.ZP.div(ed||(ed=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"]))),rv=function(){return(0,eG.jsxs)(rf,{children:[(0,eG.jsx)(rx,{}),(0,eG.jsx)(eY.rj,{color:"#000",height:45,width:45,wrapperClass:"d-block",visible:!0})]})},rm=(0,nr.hU)(function(e){var n,t,r,a,i=e.selectedRequest,s=e.alert,o=(0,eE.useState)(!1),c=(o[0],o[1]),l=(0,eE.useState)(!1),u=l[0],d=l[1],p=(0,eE.useState)(!1),h=p[0],f=p[1],x=(0,eE.useState)(""),v=x[0],m=x[1],g=(0,eE.useState)([]),b=g[0],j=g[1],y=(0,eE.useState)([]),w=y[0],Z=y[1],k=(0,eE.useState)(void 0),P=k[0];k[1];var S=(0,eE.useState)("dev"),C=S[0],I=S[1],D=(0,eE.useState)(!1),O=D[0],N=D[1],F=(null==i?void 0:i.environments)||[],R=(0,eE.useCallback)(nU()((n=(0,eO.Z)(eR().mark(function e(n){var t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),m("Assigning role..."),N(!1),e.next=5,e4({environment:C,integrationId:i.id,username:n6(i.clientId),roleNames:n});case 5:if(t=e.sent,r=(0,eH.Z)(t,2)[1],f(!1),!r){e.next=15;break}return N(!0),m("Failed to update roles."),e.abrupt("return",!1);case 15:return m("Last saved at ".concat(new Date().toLocaleString())),e.abrupt("return",!0);case 17:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),2e3,{trailing:!0}),[null==i?void 0:i.id,C,P]),E=(t=(0,eO.Z)(eR().mark(function e(n,t){var r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],"clear"===t.action||(r="remove-value"===t.action?w.filter(function(e){var n;return e!==(null===(n=t.removedValue)||void 0===n?void 0:n.value)}):"pop-value"===t.action?(0,nz.Z)(w.slice(0,-1)):[].concat((0,nz.Z)(w),[null===(a=t.option)||void 0===a?void 0:a.value])),!(w.length!==r.length)){e.next=7;break}return e.next=5,R(r);case 5:e.sent&&Z(r);case 7:case"end":return e.stop()}},e)})),function(e,n){return t.apply(this,arguments)}),T=(r=(0,eO.Z)(eR().mark(function e(){var n,t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,c(!0);case 4:return e.next=6,e0({environment:C,integrationId:i.id,first:0,max:1e3});case 6:n=e.sent,r=(t=(0,eH.Z)(n,2))[0],t[1]&&s.show({variant:"danger",content:"Failed to fetch roles."}),j(null===r?[]:r.map(function(e){return e.name})),c(!1);case 14:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),B=(a=(0,eO.Z)(eR().mark(function e(n){var t,r,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(!0);case 2:return e.next=4,e3({environment:C,integrationId:i.id,username:n});case 4:if(t=e.sent,a=(r=(0,eH.Z)(t,2))[0],!r[1]){e.next=12;break}return s.show({variant:"danger",content:"Failed to fetch roles."}),d(!1),e.abrupt("return");case 12:return e.next=14,Z(a||[]);case 14:d(!1);case 15:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)});return(0,eE.useEffect)(function(){T(),m(""),B(n6(i.clientId))},[C]),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(rp.Z,{children:(0,eG.jsx)(nZ.bZ,{variant:"info",closable:!1,"data-testid":"assign-svc-acct-role-risk-alert",children:(0,eG.jsxs)("span",{className:"normal",children:["There may be a security risk if you rely on client roles of a service account,"," ",(0,eG.jsx)(ns.default,{external:!0,href:(0,no.eO)("Creating-a-Role#service-account-role-management"),children:"click to visit our wiki page"})]})})}),(0,eG.jsxs)(nZ.mQ,{onChange:function(e){I(e)},activeKey:C,tabBarGutter:30,destroyInactiveTabPane:!0,children:[(0,eG.jsx)("br",{}),F.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:ny()(e),children:(0,eG.jsx)(eW.ZP,{cols:10,children:(0,eG.jsxs)(eW.ZP.Row,{collapse:"1100",gutter:[15,2],children:[(0,eG.jsx)(eW.ZP.Col,{span:5,children:(0,eG.jsx)(nV.Z,{headers:[{accessor:"projectName",Header:"Service Account"}],data:[{projectName:i.projectName}],colfilters:[],activateRow:te(),rowSelectorKey:"projectName"})}),(0,eG.jsx)(eW.ZP.Col,{span:5,children:u?(0,eG.jsx)(rv,{}):(0,eG.jsxs)("div",{children:[(0,eG.jsx)(rh,{children:"Assign Service Account to a Role"}),(0,eG.jsx)("div",{"data-testid":"assign-svc-acct-to-role-select",children:(0,eG.jsx)(nk.ZP,{value:w.map(function(e){return{value:e,label:e}}),options:b.map(function(e){return{value:e,label:e}}),isMulti:!0,placeholder:"Select...",noOptionsMessage:function(){return"No roles"},onChange:E})}),(0,eG.jsx)(nZ.Ad,{saving:h,content:v,variant:O?"error":"success"})]})})]})})},e)})]})]})});function rg(){return(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to DIT",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsxs)("p",{children:["Please reach out to DIT if you do not hear back within the next 2-3 business days (",(0,eG.jsx)(ns.default,{href:"mailto:ditp.support@gov.bc.ca",children:"ditp.support@gov.bc.ca"}),")."]}),(0,eG.jsx)(eV.G,{icon:e_.FU$,color:"#b3b3b3"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})}var rb=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasDigitalCredential,i=t.awaitingDigitalCredentialProd,s=t.digitalCredentialProdApplying,o=t.digitalCredentialApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(rg,{})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to Digital Credential Prod"}),(0,eG.jsx)("br",{}),c]})};function rj(e){return e.integration,(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsxs)(tV,{children:[(0,eG.jsxs)(ri,{children:["Requirements email sent to IDIM",(0,eG.jsx)(eV.G,{icon:e_.f8k,color:"#00C45B"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsxs)("p",{children:["Please reach out to IDIM if you do not hear back within the next 2-3 business days (",(0,eG.jsx)(ns.default,{href:"mailto:IDIM.Consulting@gov.bc.ca",children:"IDIM.Consulting@gov.bc.ca"}),")"]}),(0,eG.jsx)(eV.G,{icon:e_.FU$,color:"#b3b3b3"})]}),(0,eG.jsxs)(ri,{children:[(0,eG.jsx)("p",{children:"Access to prod"}),(0,eG.jsx)(ra,{})]})]})})}var ry=function(e){var n=e.integration,t=e.approvalContext,r=t.hasProd,a=t.hasBcServicesCard,i=t.awaitingBcServicesCardProd,s=t.bcServicesCardProdApplying,o=t.bcServicesCardApproved;if(!r||!a)return null;var c=null;return s?c=(0,eG.jsx)(rs,{integration:n}):o?c=(0,eG.jsx)(ro,{}):i&&(c=(0,eG.jsx)(rj,{integration:n})),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(rn,{children:"Access to BC Services Card Prod"}),(0,eG.jsx)("br",{}),c]})},rw=t(29009),rZ=t(41087),rk=t(14195),rP=t(3023),rS=t(75358),rC=t(26050),rI=t(33558),rD=t(18242),rO=t(84642),rN=(m=(0,eO.Z)(eR().mark(function e(n,t,r,a){var i;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eJ.e.get("requests/".concat(n,"/metrics?env=").concat(t,"&fromDate=").concat(r,"&toDate=").concat(a)).then(function(e){return null==e?void 0:e.data});case 3:return i=e.sent,e.abrupt("return",[i,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n,t,r){return m.apply(this,arguments)}),rF=(g=(0,eO.Z)(eR().mark(function e(n,t,r,a,i,s){var o;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,eJ.e)({url:"requests/".concat(n,"/logs?env=").concat(t,"&start=").concat(r,"&end=").concat(a),method:"GET",responseType:"blob",onDownloadProgress:i,signal:null==s?void 0:s.signal}).then(function(e){return null==e?void 0:e.data});case 3:return o=e.sent,e.abrupt("return",[o,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n,t,r,a,i){return g.apply(this,arguments)}),rR=t(9198),rE=t.n(rR);t(24394);var rT=t(31879);function rB(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function rA(e){return(0,eG.jsx)(eG.Fragment,{children:(0,eG.jsx)(rE(),function(e){for(var n=1;n * {\n margin-left: 15px;\n }\n"])));eT.ZP.label(eh||(eh=(0,eN.Z)(["\n margin-bottom: 2px;\n"])));var rq=eT.ZP.div(ef||(ef=(0,eN.Z)(["\n height: var(--field-top-spacing);\n"])));eT.ZP.span(ex||(ex=(0,eN.Z)(["\n color: #000;\n font-size: 1.1rem;\n font-weight: bold;\n"]))),(0,eT.ZP)(eV.G)(ev||(ev=(0,eN.Z)(["\n margin-right: 20px;\n"]))),eT.ZP.div(em||(em=(0,eN.Z)(["\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n"]))),eT.ZP.hr(eg||(eg=(0,eN.Z)(["\n background-color: black;\n"])));var rL=function(e){return"".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate())},rM="December 01, 2023",rK=(0,nr.hU)(function(e){var n,t=e.integration,r=e.alert,a=(0,eE.useState)("dev"),i=a[0],s=a[1],o=(null==t?void 0:t.environments)||[],c=(0,eE.useState)([]),l=c[0],u=c[1],d=(0,eE.useState)(!1);d[0],d[1];var p=(0,eE.useState)((0,nn.F3)(14)),h=p[0],f=p[1],x=(0,eE.useState)(new Date),v=x[0],m=x[1],g=function(e){f(e)},b=function(e){m(e)},j=(0,eE.useCallback)(nU()((n=(0,eO.Z)(eR().mark(function e(n,a,i){var s,o,c;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rN(null==t?void 0:t.id,i,n,a);case 2:s=e.sent,c=(o=(0,eH.Z)(s,2))[0],o[1]?r.show({variant:"danger",content:"Failed to fetch metrics"}):u(c);case 7:case"end":return e.stop()}},e)})),function(e,t,r){return n.apply(this,arguments)})),[null==t?void 0:t.clientId,i,h,v]);return(0,eE.useEffect)(function(){j(rL(h),rL(v),i)},[null==t?void 0:t.clientId,i,h,v]),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(rq,{}),(0,eG.jsx)("div",{children:(0,eG.jsxs)(rU,{children:[(0,eG.jsx)(rA,{placeholderText:"Start Date",selected:new Date(h),onChange:function(e){return g(e)},minDate:new Date(rM),maxDate:v,label:"Start Date"}),(0,eG.jsx)(rA,{placeholderText:"End Date",selected:new Date(v),onChange:function(e){return b(e)},minDate:h,label:"End Date"})]})}),(0,eG.jsxs)(nZ.mQ,{onChange:function(e){s(e)},activeKey:i,tabBarGutter:30,destroyInactiveTabPane:!0,children:[(0,eG.jsx)("br",{}),o.map(function(e){return(0,eG.jsx)(nZ.OK,{tab:ny()(e),children:(0,eG.jsx)("div",{style:{width:"100%",height:300},children:(null==l?void 0:l.length)>0?(0,eG.jsx)(rw.h,{children:(0,eG.jsxs)(rZ.v,{data:l,margin:{top:20,right:20,bottom:30,left:20},children:[(0,eG.jsx)(rk.q,{strokeDasharray:"3 3"}),(0,eG.jsx)(rP.K,{dataKey:"event",tick:{fontSize:10},label:{value:"Events",position:"insideBottomRight"}}),(0,eG.jsx)(rS.B,{dataKey:"count",label:{value:"Count",angle:-90,position:"insideLeft"}}),(0,eG.jsx)(rC.u,{}),(0,eG.jsx)(rI.D,{}),(0,eG.jsx)(rD.$,{dataKey:"count",fill:"#0d6efd",barSize:30,label:{fill:"#0d6efd",fontSize:20,position:"top"},background:{fill:"#eee"}})]})}):(0,eG.jsx)("div",{style:{textAlign:"center"},children:(0,eG.jsx)(rO.x,{children:"No data available yet!"})})})},e)})]}),(0,eG.jsxs)(na.$,{children:["This tab was released ",rM,". Please refer to"," ",(0,eG.jsx)(rG.rU,{href:"https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.4/html/server_administration_guide/auditing_and_events#event_types",external:!0,children:"here"})," ","for event type details."]})]})}),rH=eT.ZP.div(eb||(eb=(0,eN.Z)(["\n display: flex;\n flex-direction: row;\n column-gap: 1.5em;\n justify-content: center;\n min-width: 20em;\n margin: 0;\n padding: 0;\n"]))),rV=(0,eT.ZP)(nf.default)(ej||(ej=(0,eN.Z)(["\n width: 150px;\n text-align: center;\n"]))),r_=eT.ZP.form(ey||(ey=(0,eN.Z)(["\n display: flex;\n flex-direction: column;\n row-gap: 1.5em;\n\n .header {\n margin-top: 1em;\n display: flex;\n align-items: center;\n p {\n font-weight: bold;\n padding-right: 0.4em;\n margin: 0;\n font-size: 18px;\n }\n }\n\n .bold {\n font-weight: bold;\n }\n\n .env-controls {\n margin: 0;\n legend {\n font-size: unset;\n font-weight: bold;\n }\n\n input {\n margin-right: 0.2em;\n }\n\n label {\n margin-right: 1em;\n }\n }\n\n .date-picker-container {\n height: 100%;\n display: flex;\n align-items: center;\n column-gap: 1em;\n }\n\n select {\n margin-left: 0.5em;\n width: 200px;\n }\n\n .button-container {\n display: flex;\n flex-diretion: row;\n align-items: center;\n\n p {\n margin: 0;\n margin-left: 1em;\n }\n }\n\n .error-text {\n font-size: 14px;\n color: red;\n margin: 0;\n height: 1em;\n }\n"]))),rW=function(e,n){var t=new Blob([JSON.stringify(n)],{type:"text/json"}),r=document.createElement("a");r.download=e,r.href=window.URL.createObjectURL(t),r.dataset.downloadurl=["text/json",r.download,r.href].join(":");var a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});r.dispatchEvent(a),r.remove()},rY={dev:"Development",test:"Test",prod:"Production"},rJ=new Date("February 13, 2024"),r$=(0,nr.hU)(function(e){var n,t=e.integration,r=e.alert,a=(0,eE.useState)("dev"),i=a[0],s=a[1],o=(null==t?void 0:t.environments)||[],c=(0,eE.useState)(!1),l=c[0],u=c[1],d=(0,eE.useState)((0,nn.F3)(1)),p=d[0],h=d[1],f=(0,eE.useState)(new Date),x=f[0],v=f[1],m=(0,eE.useState)(""),g=m[0],b=m[1],j=(0,eE.useState)(0),y=j[0],w=j[1],Z=(0,eE.useState)(new Date),k=Z[0],P=Z[1],S=(0,eE.useState)(),C=S[0],I=S[1];(0,eE.useEffect)(function(){p&&(Date.now()-p.getTime()>1728e5?P(new Date(p.getTime()+1728e5)):P(new Date),x&&(x.getTime()1728e5)&&v(null))},[p]),(0,eE.useEffect)(function(){x&&p&&x.getTime()0&&w(e[0])}else(null==e?void 0:e.length)>0&&w(e[0])},k=(t=(0,eO.Z)(eR().mark(function e(){var n,t,r;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,(0,n8.XJ)();case 3:n=e.sent,r=(t=(0,eH.Z)(n,2))[0],f(!!t[1]),Z(r||[]),d(!1);case 10:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,eE.useEffect)(function(){k(),o.replace("/my-dashboard/integrations")},[]),(0,eE.useEffect)(function(){return(0,nn.rn)(v||[])&&(clearInterval(r),r=setInterval((0,eO.Z)(eR().mark(function e(){var n,t,a;return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n8.XJ)();case 2:n=e.sent,a=(t=(0,eH.Z)(n,2))[0],t[1]?clearInterval(r):Z(a||[]);case 7:case"end":return e.stop()}},e)})),5e3)),function(){r&&clearInterval(r)}},[v,b]);var P=h?(0,eG.jsx)(ap.q1,{}):v&&0!==v.length?(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(nZ.h4,{size:"lg",children:"INTEGRATIONS"}),(0,eG.jsx)(nV.Z,{headers:[{accessor:"id",Header:"Request ID"},{accessor:"projectName",Header:"Project Name"},{accessor:"status",Header:"Status"},{accessor:"authType",Header:"Usecase"},{accessor:"serviceType",Header:"Service Type"},{accessor:"actions",Header:(0,eG.jsx)(ax,{}),disableSortBy:!0}],data:null==v?void 0:v.map(function(e){return{id:av(e.id),projectName:e.projectName,status:(0,tU.n)(e.status||"draft"),authType:ad.F[e.authType||"browser-login"],serviceType:"Gold",actions:(0,eG.jsx)(ah,{children:(0,eG.jsx)(nH.ZP,{request:e,onDelete:function(n,t){t?s.show({variant:"danger",content:"Failed to delete integration ".concat(e.projectName,".")}):k()},defaultActiveColor:"#fff",delIconStyle:{marginLeft:"7px"}})})}}),activateRow:function(e){var n=e.cells[0].value;v.forEach(function(e){e.id==n&&w(e)})},activeSelector:b&&av(b),rowSelectorKey:"id",colfilters:[]})]}):(0,eG.jsx)(ap.Vs,{message:"No Requests Submitted"});return u?(0,eG.jsx)(t4.Z,{}):(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)("br",{}),(0,eG.jsx)(am,{handleNewIntegrationClick:y,integrations:v}),(0,eG.jsx)("br",{}),(0,eG.jsx)("br",{}),P]})}),ab=t(6178),aj=eT.ZP.div(eD||(eD=(0,eN.Z)(["\n display: flex;\n flex-direction: column;\n flex-basis: 100%;\n flex: 1;\n"]))),ay=function(e){e.session;var n,t=(0,au.useRouter)(),r=(0,eE.useState)(null),a=r[0],i=r[1],s=(0,eE.useState)(1),o=s[0],c=s[1],l=(0,eE.useState)(!1),u=(l[0],l[1]),d="integration-failed-modal",p=(n=(0,eO.Z)(eR().mark(function e(){return eR().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.location.hash=d);case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),h=(0,eE.useState)(""),f=h[0],x=h[1];return(0,eE.useEffect)(function(){var e;x(t.query.requestId),(null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.integrationFailedMessageModal)==="true"&&(u(!0),p())},[t.query.showModal]),(0,eG.jsxs)(eG.Fragment,{children:[(0,eG.jsx)(ab.Z,{tab:"integrations",leftPanel:function(){return(0,eG.jsx)(ag,{setIntegration:i,setIntegrationCount:c})},rightPanel:function(){return a&&(0,eG.jsx)(al,{integration:a})},showResizable:o>0}),(0,eG.jsx)(nx.Z,{title:"".concat(f," - Integration request failed"),icon:e_.eHv,id:d,content:(0,eG.jsxs)("div",{children:[(0,eG.jsx)("div",{children:(0,eG.jsx)("p",{children:"The integration request could not be completed. Please contact the Pathfinder SSO Team."})}),(0,eG.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",width:"100%"},children:[(0,eG.jsx)(aj,{children:(0,eG.jsx)("div",{children:(0,eG.jsxs)("a",{href:"https://chat.developer.gov.bc.ca/channel/sso",target:"_blank",title:"Rocket Chat",style:{color:"#0d6efd"},children:[(0,eG.jsx)(eV.G,{size:"1x",icon:e_.Z6I,color:"#0d6efd"})," Rocketchat"]})})}),(0,eG.jsx)(aj,{children:(0,eG.jsx)("div",{children:(0,eG.jsxs)("a",{href:"mailto:bcgov.sso@gov.bc.ca",title:"Pathfinder SSO",style:{color:"#0d6efd"},children:[(0,eG.jsx)(eV.G,{size:"1x",icon:e_.FU$,color:"#0d6efd"})," Email"]})})})]})]}),showCancel:!1,showConfirm:!1,closable:!0})]})}},76944:function(e,n,t){"use strict";t.d(n,{v:function(){return c}});var r,a=t(50029),i=t(87794),s=t.n(i),o=t(21963),c=(r=(0,a.Z)(s().mark(function e(n){var t;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.e.post("events",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[t,null]);case 7:return e.prev=7,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[null,e.t0]);case 11:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return r.apply(this,arguments)})},37226:function(e,n,t){"use strict";t.d(n,{A_:function(){return P},H0:function(){return C},Jl:function(){return F},OS:function(){return D},Uw:function(){return R},WN:function(){return N},XJ:function(){return S},ct:function(){return I},hG:function(){return k},zD:function(){return O}});var r,a,i,s,o,c,l,u,d,p,h=t(50029),f=t(87794),x=t.n(f),v=t(21963),m=t(75316),g=t.n(m),b=t(25751),j=t.n(b),y=t(76427),w=t.n(y),Z=t(31513),k=(r=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("requests",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return r.apply(this,arguments)}),P=(a=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("request",{requestId:j()(n)?parseInt(n):n}).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return a.apply(this,arguments)}),S=(i=(0,h.Z)(x().mark(function e(){var n,t,r=arguments;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={params:{include:r.length>0&&void 0!==r[0]?r[0]:"active"}},e.prev=2,e.next=5,v.e.get("requests",n).then(function(e){return e.data});case 5:return t=e.sent,t=g()(t,["createdAt"],["desc"]),e.abrupt("return",[t.map(Z.UB),null]);case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("return",(0,v.z)(e.t0));case 13:case"end":return e.stop()}},e,null,[[2,10]])})),function(){return i.apply(this,arguments)}),C=(s=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.get("team-integrations/".concat(n)).then(function(e){return e.data});case 3:return t=e.sent,t=g()(t,["createdAt"],["desc"]),e.abrupt("return",[t.map(Z.UB),null]);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 11:case"end":return e.stop()}},e,null,[[0,8]])})),function(e){return s.apply(this,arguments)}),I=(o=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.get("requests/".concat(n,"/resubmit")).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return o.apply(this,arguments)}),D=(c=(0,h.Z)(x().mark(function e(n,t){var r;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("requests/".concat(n,"/restore"),{email:t}).then(function(e){return e.data});case 3:return r=e.sent,e.abrupt("return",[(0,Z.UB)(r),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e,n){return c.apply(this,arguments)}),O=(l=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.post("requests-all",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[{count:t.count,rows:t.rows.map(Z.UB)},null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return l.apply(this,arguments)}),N=(u=(0,h.Z)(x().mark(function e(n){var t,r,a,i,s,o=arguments;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>1&&void 0!==o[1]&&o[1],e.prev=1,i="requests",t&&(i="".concat(i,"?submit=true")),(n=w()(n,["user","lastChanges"])).devLoginTitle=n.devLoginTitle||"",n.testLoginTitle=n.testLoginTitle||"",n.prodLoginTitle=n.prodLoginTitle||"",n.additionalRoleAttribute=n.additionalRoleAttribute||"",n.clientId=n.clientId||"",n.primaryEndUsers=null!==(r=n.primaryEndUsers)&&void 0!==r?r:[],n.primaryEndUsersOther=null!==(a=n.primaryEndUsersOther)&&void 0!==a?a:"",e.next=14,v.e.put(i,n).then(function(e){return e.data});case 14:return s=e.sent,e.abrupt("return",[(0,Z.UB)(s),null]);case 18:return e.prev=18,e.t0=e.catch(1),e.abrupt("return",(0,v.z)(e.t0));case 21:case"end":return e.stop()}},e,null,[[1,18]])})),function(e){return u.apply(this,arguments)}),F=(d=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.delete("requests",{params:{id:n}}).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[t,null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return d.apply(this,arguments)}),R=(p=(0,h.Z)(x().mark(function e(n){var t;return x().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.e.put("request-metadata",n).then(function(e){return e.data});case 3:return t=e.sent,e.abrupt("return",[(0,Z.UB)(t),null]);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,v.z)(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(e){return p.apply(this,arguments)})},73923:function(e,n,t){"use strict";t.d(n,{Di:function(){return i},ON:function(){return r},TE:function(){return a}});var r=function(e){return JSON.stringify(e,void 0,2)},a=function(e){var n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.focus(),n.select();try{return document.execCommand("copy"),document.body.removeChild(n),!0}catch(e){return document.body.removeChild(n),!1}},i=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",r=window.URL.createObjectURL(new Blob([e],{type:t})),a=document.createElement("a");a.href=r,a.setAttribute("download",n),document.body.appendChild(a),a.click(),document.body.removeChild(a)}},80382:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-dashboard/integrations",function(){return t(6961)}])}},function(e){e.O(0,[662,925,937,759,254,954,774,888,179],function(){return e(e.s=80382)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/request-c8c37a22c9454711.js b/_next/static/chunks/pages/request-e238936e4ce45aca.js similarity index 88% rename from _next/static/chunks/pages/request-c8c37a22c9454711.js rename to _next/static/chunks/pages/request-e238936e4ce45aca.js index a2574b6..dd659f2 100644 --- a/_next/static/chunks/pages/request-c8c37a22c9454711.js +++ b/_next/static/chunks/pages/request-e238936e4ce45aca.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[800],{7529:function(e,r,t){"use strict";t.r(r);var n=t(59499),c=t(60499),o=t(59912),u=t(85893);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function s(e){for(var r=1;r

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/admin-reports.html b/admin-reports.html index da4b502..3757e5e 100644 --- a/admin-reports.html +++ b/admin-reports.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/application-error.html b/application-error.html index 180f80c..2f94332 100644 --- a/application-error.html +++ b/application-error.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/faq.html b/faq.html index ee4128f..5ace5b7 100644 --- a/faq.html +++ b/faq.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/index.html b/index.html index d12851d..f9bca8c 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/my-dashboard.html b/my-dashboard.html index 8621f6a..b8cc5eb 100644 --- a/my-dashboard.html +++ b/my-dashboard.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/my-dashboard/integrations.html b/my-dashboard/integrations.html index 2466601..a6fe598 100644 --- a/my-dashboard/integrations.html +++ b/my-dashboard/integrations.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/my-dashboard/s2g.html b/my-dashboard/s2g.html index a259a22..f61f1cb 100644 --- a/my-dashboard/s2g.html +++ b/my-dashboard/s2g.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/my-dashboard/teams.html b/my-dashboard/teams.html index 59a198c..3aa3d05 100644 --- a/my-dashboard/teams.html +++ b/my-dashboard/teams.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/request.html b/request.html index c73a308..0138bed 100644 --- a/request.html +++ b/request.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/request/[rid].html b/request/[rid].html index cacb81e..0025afe 100644 --- a/request/[rid].html +++ b/request/[rid].html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/terms-conditions.html b/terms-conditions.html index 0299666..f1fc8e5 100644 --- a/terms-conditions.html +++ b/terms-conditions.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file diff --git a/verify-user.html b/verify-user.html index fb0ac41..e7f4038 100644 --- a/verify-user.html +++ b/verify-user.html @@ -1,4 +1,4 @@ -

Loading information...

\ No newline at end of file +

Loading information...

\ No newline at end of file