@opengov/form-renderer 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.js +1758 -1754
- package/dist/lib.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/lib.umd.cjs
CHANGED
|
@@ -71,7 +71,7 @@ vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
|
|
|
71
71
|
Or, to disable this warning, add the \`allowVulnerableTags\` option
|
|
72
72
|
and ensure you are accounting for this risk.
|
|
73
73
|
|
|
74
|
-
`)});const A=g.nonTextTags||["script","style","textarea","option"];let C,F;g.allowedAttributes&&(C={},F={},h(g.allowedAttributes,function(q,k){C[k]=[];const W=[];q.forEach(function(me){typeof me=="string"&&me.indexOf("*")>=0?W.push(r(me).replace(/\\\*/g,".*")):C[k].push(me)}),W.length&&(F[k]=new RegExp("^("+W.join("|")+")$"))}));const x={},T={},_={};h(g.allowedClasses,function(q,k){if(C&&(f(C,k)||(C[k]=[]),C[k].push("class")),x[k]=q,Array.isArray(q)){const W=[];x[k]=[],_[k]=[],q.forEach(function(me){typeof me=="string"&&me.indexOf("*")>=0?W.push(r(me).replace(/\\\*/g,".*")):me instanceof RegExp?_[k].push(me):x[k].push(me)}),W.length&&(T[k]=new RegExp("^("+W.join("|")+")$"))}});const P={};let B;h(g.transformTags,function(q,k){let W;typeof q=="function"?W=q:typeof q=="string"&&(W=m.simpleTransform(q)),k==="*"?B=W:P[k]=W});let N,I,J,re,ie,L,Z=!1;Y();const ce=new e.Parser({onopentag:function(q,k){if(g.enforceHtmlBoundary&&q==="html"&&Y(),ie){L++;return}const W=new y(q,k);I.push(W);let me=!1;const et=!!W.text;let ut;if(f(P,q)&&(ut=P[q](q,k),W.attribs=k=ut.attribs,ut.text!==void 0&&(W.innerText=ut.text),q!==ut.tagName&&(W.name=q=ut.tagName,re[N]=ut.tagName)),B&&(ut=B(q,k),W.attribs=k=ut.attribs,q!==ut.tagName&&(W.name=q=ut.tagName,re[N]=ut.tagName)),(!E(q)||g.disallowedTagsMode==="recursiveEscape"&&!p(J)||g.nestingLimit!=null&&N>=g.nestingLimit)&&(me=!0,J[N]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&A.indexOf(q)!==-1&&(ie=!0,L=1),J[N]=!0),N++,me){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){if(W.innerText&&!et){const ke=se(W.innerText);g.textFilter?v+=g.textFilter(ke,q):v+=se(W.innerText),Z=!0}return}D=v,v=""}v+="<"+q,q==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(W.innerText=""),(!C||f(C,q)||C["*"])&&h(k,function(ke,Se){if(!l.test(Se)){delete W.attribs[Se];return}if(ke===""&&!g.allowedEmptyAttributes.includes(Se)&&(g.nonBooleanAttributes.includes(Se)||g.nonBooleanAttributes.includes("*"))){delete W.attribs[Se];return}let yr=!1;if(!C||f(C,q)&&C[q].indexOf(Se)!==-1||C["*"]&&C["*"].indexOf(Se)!==-1||f(F,q)&&F[q].test(Se)||F["*"]&&F["*"].test(Se))yr=!0;else if(C&&C[q]){for(const Fe of C[q])if(t(Fe)&&Fe.name&&Fe.name===Se){yr=!0;let _e="";if(Fe.multiple===!0){const qt=ke.split(" ");for(const S of qt)Fe.values.indexOf(S)!==-1&&(_e===""?_e=S:_e+=" "+S)}else Fe.values.indexOf(ke)>=0&&(_e=ke);ke=_e}}if(yr){if(g.allowedSchemesAppliedToAttributes.indexOf(Se)!==-1&&de(q,ke)){delete W.attribs[Se];return}if(q==="script"&&Se==="src"){let Fe=!0;try{const _e=he(ke);if(g.allowedScriptHostnames||g.allowedScriptDomains){const qt=(g.allowedScriptHostnames||[]).find(function(M){return M===_e.url.hostname}),S=(g.allowedScriptDomains||[]).find(function(M){return _e.url.hostname===M||_e.url.hostname.endsWith(`.${M}`)});Fe=qt||S}}catch{Fe=!1}if(!Fe){delete W.attribs[Se];return}}if(q==="iframe"&&Se==="src"){let Fe=!0;try{const _e=he(ke);if(_e.isRelativeUrl)Fe=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const qt=(g.allowedIframeHostnames||[]).find(function(M){return M===_e.url.hostname}),S=(g.allowedIframeDomains||[]).find(function(M){return _e.url.hostname===M||_e.url.hostname.endsWith(`.${M}`)});Fe=qt||S}}catch{Fe=!1}if(!Fe){delete W.attribs[Se];return}}if(Se==="srcset")try{let Fe=u(ke);if(Fe.forEach(function(_e){de("srcset",_e.url)&&(_e.evil=!0)}),Fe=c(Fe,function(_e){return!_e.evil}),Fe.length)ke=o(c(Fe,function(_e){return!_e.evil})),W.attribs[Se]=ke;else{delete W.attribs[Se];return}}catch{delete W.attribs[Se];return}if(Se==="class"){const Fe=x[q],_e=x["*"],qt=T[q],S=_[q],M=_["*"],R=T["*"],z=[qt,R].concat(S,M).filter(function(H){return H});if(Fe&&_e?ke=ve(ke,n(Fe,_e),z):ke=ve(ke,Fe||_e,z),!ke.length){delete W.attribs[Se];return}}if(Se==="style"){if(g.parseStyleAttributes)try{const Fe=i(q+" {"+ke+"}",{map:!1}),_e=oe(Fe,g.allowedStyles);if(ke=be(_e),ke.length===0){delete W.attribs[Se];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+q+" {"+ke+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete W.attribs[Se];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}v+=" "+Se,ke&&ke.length?v+='="'+se(ke,!0)+'"':g.allowedEmptyAttributes.includes(Se)&&(v+='=""')}else delete W.attribs[Se]}),g.selfClosing.indexOf(q)!==-1?v+=" />":(v+=">",W.innerText&&!et&&!g.textFilter&&(v+=se(W.innerText),Z=!0)),me&&(v=D+se(v),D="")},ontext:function(q){if(ie)return;const k=I[I.length-1];let W;if(k&&(W=k.tag,q=k.innerText!==void 0?k.innerText:q),g.disallowedTagsMode==="completelyDiscard"&&!E(W))q="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(W==="script"||W==="style"))v+=q;else{const me=se(q,!1);g.textFilter&&!Z?v+=g.textFilter(me,W):Z||(v+=me)}if(I.length){const me=I[I.length-1];me.text+=q}},onclosetag:function(q,k){if(ie)if(L--,!L)ie=!1;else return;const W=I.pop();if(!W)return;if(W.tag!==q){I.push(W);return}ie=g.enforceHtmlBoundary?q==="html":!1,N--;const me=J[N];if(me){if(delete J[N],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){W.updateParentNodeText();return}D=v,v=""}if(re[N]&&(q=re[N],delete re[N]),g.exclusiveFilter&&g.exclusiveFilter(W)){v=v.substr(0,W.tagPosition);return}if(W.updateParentNodeMediaChildren(),W.updateParentNodeText(),g.selfClosing.indexOf(q)!==-1||k&&!E(q)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){me&&(v=D,D="");return}v+="</"+q+">",me&&(v=D+se(v),D=""),Z=!1}},g.parser);return ce.write(b),ce.end(),v;function Y(){v="",N=0,I=[],J={},re={},ie=!1,L=0}function se(q,k){return typeof q!="string"&&(q=q+""),g.parser.decodeEntities&&(q=q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),k&&(q=q.replace(/"/g,"""))),q=q.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),k&&(q=q.replace(/"/g,""")),q}function de(q,k){for(k=k.replace(/[\x00-\x20]+/g,"");;){const et=k.indexOf("<!--");if(et===-1)break;const ut=k.indexOf("-->",et+4);if(ut===-1)break;k=k.substring(0,et)+k.substring(ut+3)}const W=k.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!W)return k.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const me=W[1].toLowerCase();return f(g.allowedSchemesByTag,q)?g.allowedSchemesByTag[q].indexOf(me)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(me)===-1}function he(q){if(q=q.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),q.startsWith("relative:"))throw new Error("relative: exploit attempt");let k="relative://relative-site";for(let et=0;et<100;et++)k+=`/${et}`;const W=new URL(q,k);return{isRelativeUrl:W&&W.hostname==="relative-site"&&W.protocol==="relative:",url:W}}function oe(q,k){if(!k)return q;const W=q.nodes[0];let me;return k[W.selector]&&k["*"]?me=n(k[W.selector],k["*"]):me=k[W.selector]||k["*"],me&&(q.nodes[0].nodes=W.nodes.reduce(ye(me),[])),q}function be(q){return q.nodes[0].nodes.reduce(function(k,W){return k.push(`${W.prop}:${W.value}${W.important?" !important":""}`),k},[]).join(";")}function ye(q){return function(k,W){return f(q,W.prop)&&q[W.prop].some(function(et){return et.test(W.value)})&&k.push(W),k}}function ve(q,k,W){return k?(q=q.split(/\s+/),q.filter(function(me){return k.indexOf(me)!==-1||W.some(function(et){return et.test(me)})}).join(" ")):q}}const d={decodeEntities:!0};return m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},m.simpleTransform=function(b,g,w){return w=w===void 0?!0:w,g=g||{},function(v,D){let y;if(w)for(y in g)D[y]=g[y];else D=g;return{tagName:b,attribs:D}}},_a}var w1=v1();const Nc=Ni(w1);function Oa({label:e,error:r,childId:t,dataTestId:n,sx:u,children:i}){const a=tt.useId(),s=t??a;return K.jsxs(ze.FormControl,{fullWidth:!0,sx:u,error:!!r,"data-testid":n,children:[K.jsx(ze.FormLabel,{id:`${s}-label`,htmlFor:s,sx:{pointerEvents:"none"},children:e}),K.jsx(ze.Box,{sx:{display:"flex",alignItems:"center",minHeight:sn.capitalMuiTheme.spacing(4)},children:i}),r&&K.jsx(fn,{error:r,id:`${s}-error`})]})}function D1({html:e,...r}){return K.jsx(ze.Typography,{...r,dangerouslySetInnerHTML:{__html:Nc(e,{disallowedTagsMode:"recursiveEscape",allowedTags:Nc.defaults.allowedTags.concat(["img","br","p"])})}})}function Jr({label:e,text:r,asHTML:t=!1,sx:n={},error:u,startAdornment:i,endAdornment:a}){const s=tt.useId();return K.jsx(Oa,{label:e,sx:n,dataTestId:"non-editable-field",error:u,childId:s,children:K.jsxs(ze.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[K.jsxs(ze.Box,{sx:{display:"flex",alignItems:"center"},children:[i,K.jsx(ze.Typography,{tabIndex:0,id:s,"aria-readonly":"true","aria-labelledby":`${s}-label`,"aria-describedby":`${s}-error`,"aria-invalid":!!u,"data-testid":"non-editable-value",children:t&&r?K.jsx(D1,{html:r}):K.jsx("span",{children:r})})]}),a]})})}const Mc=(e,r)=>({[{[Ln.DAY]:"days",[Ln.WEEK]:"weeks",[Ln.MONTH]:"months",[Ln.YEAR]:"years"}[r]]:e}),Pc=(e,r)=>{var u,i,a,s,h;const t=Wr(new Date),n=Wr(e);if((u=r.disableDaysOfWeek)!=null&&u.length){const f=r.disableDaysOfWeek.map(({value:p})=>p),c=ki(n,"EEEE").toUpperCase();if(f.includes(c))return!0}if(((i=r.disablePastDates)==null?void 0:i.number)!==void 0&&((a=r.disablePastDates)!=null&&a.unit)){const f=Mc(r.disablePastDates.number,r.disablePastDates.unit),c=Gh(t,f);if(gu(n,c))return!0}if(((s=r.disableFutureDates)==null?void 0:s.number)!==void 0&&((h=r.disableFutureDates)!=null&&h.unit)){const f=Mc(r.disableFutureDates.number,r.disableFutureDates.unit),c=Tl(t,f);if(mu(n,c))return!0}return!1};function Bc({name:e,rules:r={},sx:t={},constraints:n={},dateFormat:u="MM/dd/yyyy",...i}){const{field:a,fieldState:{error:s}}=vr.useController({name:e,rules:{...r,validate:f=>f&&n&&Pc(f,n)?"Selected date is not allowed.":!0}}),h=a.value?ki(a.value,u):"";return i.readonly?K.jsx(Jr,{label:i.label,text:h,sx:t,error:s==null?void 0:s.message}):K.jsx(Hr.DatePicker,{...a,...i,format:u,sx:{...t,m:0},slotProps:{textField:{onBlur:a.onBlur,helperText:!!s&&K.jsx(fn,{error:s.message}),error:!!s,fullWidth:!0}},shouldDisableDate:f=>n?Pc(f,n):!1})}function Ic({name:e,label:r,sx:t={},disabled:n,rules:u={},readonly:i,...a}){const{field:s,fieldState:{error:h}}=vr.useController({name:e,rules:u}),f=s.value?"Yes":"No";return i?K.jsx(Jr,{label:r,text:f,sx:t,error:h==null?void 0:h.message,startAdornment:K.jsx(ze.Checkbox,{disabled:!0,checked:s.value})}):K.jsxs(Oa,{label:r,sx:t,error:h==null?void 0:h.message,childId:e,children:[K.jsx(ze.Checkbox,{id:e,checked:s.value,disabled:n,...s,...a,inputProps:{"aria-describedby":`${e}-error`,"aria-invalid":!!h},color:h?"error":"primary","data-testid":"form-field-checkbox"}),!n&&K.jsx(ze.Typography,{children:f})]})}function Rc({name:e,label:r,rules:t={},sx:n={},readonly:u,maxLength:i,filter:a,...s}){const{field:h,fieldState:{error:f}}=vr.useController({name:e,rules:t}),c=p=>{let o=p.target.value;a&&(o=a(o)),h.onChange(o)};return u?K.jsx(Jr,{label:r,text:h.value,sx:n,error:f==null?void 0:f.message}):K.jsx(ze.TextField,{"data-test-id":"form-field-input",...h,label:r,fullWidth:!0,...s,error:!!f,helperText:!!f&&K.jsx(fn,{error:f.message}),onChange:c,sx:{...n,m:0},slotProps:{input:{inputProps:{maxLength:i}}}})}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},jn.apply(null,arguments)}var kc={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null};function E1(e,r){if(Mu(e,r))return e[r];throw typeof e[r]=="function"&&A1(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function x1(e,r,t){if(Mu(e,r))return e[r]=t,t;throw new Error('No access to property "'+r+'"')}function Mu(e,r){return!C1(e)&&!Array.isArray(e)?!1:zn(T1,r)?!0:!(r in Object.prototype||r in Function.prototype)}function A1(e,r){return e==null||typeof e[r]!="function"||zn(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:zn(S1,r)?!0:!(r in Object.prototype||r in Function.prototype)}function C1(e){return typeof e=="object"&&e&&e.constructor===Object}var T1={length:!0,name:!0},S1={toString:!0,valueOf:!0,toLocaleString:!0};class F1{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(r=>this.has(r)).values()}get(r){return E1(this.wrappedObject,r)}set(r,t){return x1(this.wrappedObject,r,t),this}has(r){return Mu(this.wrappedObject,r)&&r in this.wrappedObject}entries(){return _1(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){Mu(this.wrappedObject,r)&&delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}}function _1(e,r){return{next:()=>{var t=e.next();return t.done?t:{value:r(t.value),done:!1}}}}function Ke(e){return typeof e=="number"}function wt(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function O1(e){return typeof e=="bigint"}function Lc(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function qc(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function $c(e){return e&&e.constructor.prototype.isUnit===!0||!1}function lr(e){return typeof e=="string"}var yt=Array.isArray;function Wt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Pu(e){return Array.isArray(e)||Wt(e)}function N1(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function M1(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function P1(e){return e&&e.constructor.prototype.isRange===!0||!1}function Na(e){return e&&e.constructor.prototype.isIndex===!0||!1}function B1(e){return typeof e=="boolean"}function I1(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function R1(e){return e&&e.constructor.prototype.isHelp===!0||!1}function k1(e){return typeof e=="function"}function L1(e){return e instanceof Date}function q1(e){return e instanceof RegExp}function Ma(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Lc(e)&&!qc(e))}function $1(e){return e?e instanceof Map||e instanceof F1||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}function j1(e){return e===null}function z1(e){return e===void 0}function H1(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function U1(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function V1(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function W1(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function Y1(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function G1(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function X1(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Q1(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Z1(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function J1(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function K1(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function ep(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function tp(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function rp(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function np(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function up(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function ip(e){return e&&e.constructor.prototype.isChain===!0||!1}function Kr(e){var r=typeof e;return r==="object"?e===null?"null":wt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":r}function Dt(e){var r=typeof e;if(r==="number"||r==="bigint"||r==="string"||r==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(t){return Dt(t)});if(e instanceof Date)return new Date(e.valueOf());if(wt(e))return e;if(Ma(e))return ap(e,Dt);if(r==="function")return e;throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function ap(e,r){var t={};for(var n in e)zn(e,n)&&(t[n]=r(e[n]));return t}function sp(e,r){for(var t in r)zn(r,t)&&(e[t]=r[t]);return e}function Br(e,r){var t,n,u;if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(n=0,u=e.length;n<u;n++)if(!Br(e[n],r[n]))return!1;return!0}else{if(typeof e=="function")return e===r;if(e instanceof Object){if(Array.isArray(r)||!(r instanceof Object))return!1;for(t in e)if(!(t in r)||!Br(e[t],r[t]))return!1;for(t in r)if(!(t in e))return!1;return!0}else return e===r}}function zn(e,r){return e&&Object.hasOwnProperty.call(e,r)}function op(e,r){for(var t={},n=0;n<r.length;n++){var u=r[n],i=e[u];i!==void 0&&(t[u]=i)}return t}var cp=["Matrix","Array"],fp=["number","BigNumber","Fraction"],Hn=function(r){if(r)throw new Error(`The global config is readonly.
|
|
74
|
+
`)});const A=g.nonTextTags||["script","style","textarea","option"];let C,F;g.allowedAttributes&&(C={},F={},h(g.allowedAttributes,function(q,k){C[k]=[];const W=[];q.forEach(function(me){typeof me=="string"&&me.indexOf("*")>=0?W.push(r(me).replace(/\\\*/g,".*")):C[k].push(me)}),W.length&&(F[k]=new RegExp("^("+W.join("|")+")$"))}));const x={},T={},_={};h(g.allowedClasses,function(q,k){if(C&&(f(C,k)||(C[k]=[]),C[k].push("class")),x[k]=q,Array.isArray(q)){const W=[];x[k]=[],_[k]=[],q.forEach(function(me){typeof me=="string"&&me.indexOf("*")>=0?W.push(r(me).replace(/\\\*/g,".*")):me instanceof RegExp?_[k].push(me):x[k].push(me)}),W.length&&(T[k]=new RegExp("^("+W.join("|")+")$"))}});const P={};let B;h(g.transformTags,function(q,k){let W;typeof q=="function"?W=q:typeof q=="string"&&(W=m.simpleTransform(q)),k==="*"?B=W:P[k]=W});let N,I,J,re,ie,L,Z=!1;Y();const ce=new e.Parser({onopentag:function(q,k){if(g.enforceHtmlBoundary&&q==="html"&&Y(),ie){L++;return}const W=new y(q,k);I.push(W);let me=!1;const et=!!W.text;let ut;if(f(P,q)&&(ut=P[q](q,k),W.attribs=k=ut.attribs,ut.text!==void 0&&(W.innerText=ut.text),q!==ut.tagName&&(W.name=q=ut.tagName,re[N]=ut.tagName)),B&&(ut=B(q,k),W.attribs=k=ut.attribs,q!==ut.tagName&&(W.name=q=ut.tagName,re[N]=ut.tagName)),(!E(q)||g.disallowedTagsMode==="recursiveEscape"&&!p(J)||g.nestingLimit!=null&&N>=g.nestingLimit)&&(me=!0,J[N]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&A.indexOf(q)!==-1&&(ie=!0,L=1),J[N]=!0),N++,me){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){if(W.innerText&&!et){const ke=se(W.innerText);g.textFilter?v+=g.textFilter(ke,q):v+=se(W.innerText),Z=!0}return}D=v,v=""}v+="<"+q,q==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(W.innerText=""),(!C||f(C,q)||C["*"])&&h(k,function(ke,Se){if(!l.test(Se)){delete W.attribs[Se];return}if(ke===""&&!g.allowedEmptyAttributes.includes(Se)&&(g.nonBooleanAttributes.includes(Se)||g.nonBooleanAttributes.includes("*"))){delete W.attribs[Se];return}let yr=!1;if(!C||f(C,q)&&C[q].indexOf(Se)!==-1||C["*"]&&C["*"].indexOf(Se)!==-1||f(F,q)&&F[q].test(Se)||F["*"]&&F["*"].test(Se))yr=!0;else if(C&&C[q]){for(const Fe of C[q])if(t(Fe)&&Fe.name&&Fe.name===Se){yr=!0;let _e="";if(Fe.multiple===!0){const qt=ke.split(" ");for(const S of qt)Fe.values.indexOf(S)!==-1&&(_e===""?_e=S:_e+=" "+S)}else Fe.values.indexOf(ke)>=0&&(_e=ke);ke=_e}}if(yr){if(g.allowedSchemesAppliedToAttributes.indexOf(Se)!==-1&&de(q,ke)){delete W.attribs[Se];return}if(q==="script"&&Se==="src"){let Fe=!0;try{const _e=he(ke);if(g.allowedScriptHostnames||g.allowedScriptDomains){const qt=(g.allowedScriptHostnames||[]).find(function(M){return M===_e.url.hostname}),S=(g.allowedScriptDomains||[]).find(function(M){return _e.url.hostname===M||_e.url.hostname.endsWith(`.${M}`)});Fe=qt||S}}catch{Fe=!1}if(!Fe){delete W.attribs[Se];return}}if(q==="iframe"&&Se==="src"){let Fe=!0;try{const _e=he(ke);if(_e.isRelativeUrl)Fe=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const qt=(g.allowedIframeHostnames||[]).find(function(M){return M===_e.url.hostname}),S=(g.allowedIframeDomains||[]).find(function(M){return _e.url.hostname===M||_e.url.hostname.endsWith(`.${M}`)});Fe=qt||S}}catch{Fe=!1}if(!Fe){delete W.attribs[Se];return}}if(Se==="srcset")try{let Fe=u(ke);if(Fe.forEach(function(_e){de("srcset",_e.url)&&(_e.evil=!0)}),Fe=c(Fe,function(_e){return!_e.evil}),Fe.length)ke=o(c(Fe,function(_e){return!_e.evil})),W.attribs[Se]=ke;else{delete W.attribs[Se];return}}catch{delete W.attribs[Se];return}if(Se==="class"){const Fe=x[q],_e=x["*"],qt=T[q],S=_[q],M=_["*"],R=T["*"],z=[qt,R].concat(S,M).filter(function(H){return H});if(Fe&&_e?ke=ve(ke,n(Fe,_e),z):ke=ve(ke,Fe||_e,z),!ke.length){delete W.attribs[Se];return}}if(Se==="style"){if(g.parseStyleAttributes)try{const Fe=i(q+" {"+ke+"}",{map:!1}),_e=oe(Fe,g.allowedStyles);if(ke=be(_e),ke.length===0){delete W.attribs[Se];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+q+" {"+ke+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete W.attribs[Se];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}v+=" "+Se,ke&&ke.length?v+='="'+se(ke,!0)+'"':g.allowedEmptyAttributes.includes(Se)&&(v+='=""')}else delete W.attribs[Se]}),g.selfClosing.indexOf(q)!==-1?v+=" />":(v+=">",W.innerText&&!et&&!g.textFilter&&(v+=se(W.innerText),Z=!0)),me&&(v=D+se(v),D="")},ontext:function(q){if(ie)return;const k=I[I.length-1];let W;if(k&&(W=k.tag,q=k.innerText!==void 0?k.innerText:q),g.disallowedTagsMode==="completelyDiscard"&&!E(W))q="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(W==="script"||W==="style"))v+=q;else{const me=se(q,!1);g.textFilter&&!Z?v+=g.textFilter(me,W):Z||(v+=me)}if(I.length){const me=I[I.length-1];me.text+=q}},onclosetag:function(q,k){if(ie)if(L--,!L)ie=!1;else return;const W=I.pop();if(!W)return;if(W.tag!==q){I.push(W);return}ie=g.enforceHtmlBoundary?q==="html":!1,N--;const me=J[N];if(me){if(delete J[N],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){W.updateParentNodeText();return}D=v,v=""}if(re[N]&&(q=re[N],delete re[N]),g.exclusiveFilter&&g.exclusiveFilter(W)){v=v.substr(0,W.tagPosition);return}if(W.updateParentNodeMediaChildren(),W.updateParentNodeText(),g.selfClosing.indexOf(q)!==-1||k&&!E(q)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){me&&(v=D,D="");return}v+="</"+q+">",me&&(v=D+se(v),D=""),Z=!1}},g.parser);return ce.write(b),ce.end(),v;function Y(){v="",N=0,I=[],J={},re={},ie=!1,L=0}function se(q,k){return typeof q!="string"&&(q=q+""),g.parser.decodeEntities&&(q=q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),k&&(q=q.replace(/"/g,"""))),q=q.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),k&&(q=q.replace(/"/g,""")),q}function de(q,k){for(k=k.replace(/[\x00-\x20]+/g,"");;){const et=k.indexOf("<!--");if(et===-1)break;const ut=k.indexOf("-->",et+4);if(ut===-1)break;k=k.substring(0,et)+k.substring(ut+3)}const W=k.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!W)return k.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const me=W[1].toLowerCase();return f(g.allowedSchemesByTag,q)?g.allowedSchemesByTag[q].indexOf(me)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(me)===-1}function he(q){if(q=q.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),q.startsWith("relative:"))throw new Error("relative: exploit attempt");let k="relative://relative-site";for(let et=0;et<100;et++)k+=`/${et}`;const W=new URL(q,k);return{isRelativeUrl:W&&W.hostname==="relative-site"&&W.protocol==="relative:",url:W}}function oe(q,k){if(!k)return q;const W=q.nodes[0];let me;return k[W.selector]&&k["*"]?me=n(k[W.selector],k["*"]):me=k[W.selector]||k["*"],me&&(q.nodes[0].nodes=W.nodes.reduce(ye(me),[])),q}function be(q){return q.nodes[0].nodes.reduce(function(k,W){return k.push(`${W.prop}:${W.value}${W.important?" !important":""}`),k},[]).join(";")}function ye(q){return function(k,W){return f(q,W.prop)&&q[W.prop].some(function(et){return et.test(W.value)})&&k.push(W),k}}function ve(q,k,W){return k?(q=q.split(/\s+/),q.filter(function(me){return k.indexOf(me)!==-1||W.some(function(et){return et.test(me)})}).join(" ")):q}}const d={decodeEntities:!0};return m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},m.simpleTransform=function(b,g,w){return w=w===void 0?!0:w,g=g||{},function(v,D){let y;if(w)for(y in g)D[y]=g[y];else D=g;return{tagName:b,attribs:D}}},_a}var w1=v1();const Nc=Ni(w1);function Oa({label:e,error:r,childId:t,dataTestId:n,sx:u,children:i}){const a=tt.useId(),s=t??a;return K.jsxs(ze.FormControl,{fullWidth:!0,sx:u,error:!!r,"data-testid":n,children:[K.jsx(ze.FormLabel,{id:`${s}-label`,htmlFor:s,sx:{pointerEvents:"none"},children:e}),K.jsx(ze.Box,{sx:{display:"flex",alignItems:"center",minHeight:sn.capitalMuiTheme.spacing(4)},children:i}),r&&K.jsx(fn,{error:r,id:`${s}-error`})]})}function D1({html:e,...r}){return K.jsx(ze.Typography,{...r,dangerouslySetInnerHTML:{__html:Nc(e,{disallowedTagsMode:"recursiveEscape",allowedTags:Nc.defaults.allowedTags.concat(["img","br","p"])})}})}function Jr({label:e,text:r,asHTML:t=!1,sx:n={},error:u,startAdornment:i,endAdornment:a}){const s=tt.useId();return K.jsx(Oa,{label:e,sx:n,dataTestId:"non-editable-field",error:u,childId:s,children:K.jsxs(ze.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[K.jsxs(ze.Box,{sx:{display:"flex",alignItems:"center"},children:[i,K.jsx(ze.Typography,{tabIndex:0,id:s,"aria-readonly":"true","aria-labelledby":`${s}-label`,"aria-describedby":`${s}-error`,"aria-invalid":!!u,"data-testid":"non-editable-value",children:t&&r?K.jsx(D1,{html:r}):K.jsx("span",{children:r})})]}),a]})})}const Mc=(e,r)=>({[{[Ln.DAY]:"days",[Ln.WEEK]:"weeks",[Ln.MONTH]:"months",[Ln.YEAR]:"years"}[r]]:e}),Pc=(e,r)=>{var u,i,a,s,h;const t=Wr(new Date),n=Wr(e);if((u=r.disableDaysOfWeek)!=null&&u.length){const f=r.disableDaysOfWeek.map(({value:p})=>p),c=ki(n,"EEEE").toUpperCase();if(f.includes(c))return!0}if(((i=r.disablePastDates)==null?void 0:i.number)!==void 0&&((a=r.disablePastDates)!=null&&a.unit)){const f=Mc(r.disablePastDates.number,r.disablePastDates.unit),c=Gh(t,f);if(gu(n,c))return!0}if(((s=r.disableFutureDates)==null?void 0:s.number)!==void 0&&((h=r.disableFutureDates)!=null&&h.unit)){const f=Mc(r.disableFutureDates.number,r.disableFutureDates.unit),c=Tl(t,f);if(mu(n,c))return!0}return!1};function Bc({name:e,rules:r={},sx:t={},constraints:n={},dateFormat:u="MM/dd/yyyy",...i}){const{field:a,fieldState:{error:s}}=vr.useController({name:e,rules:{...r,validate:h=>Number.isNaN(h==null?void 0:h.getTime())?"Please enter a valid date.":h&&n&&Pc(h,n)?"Selected date is not allowed.":!0}});if(i.readonly){const h=a.value&&!Number.isNaN(a.value.getTime())?ki(a.value,u):"";return K.jsx(Jr,{label:i.label,text:h,sx:t,error:s==null?void 0:s.message})}return K.jsx(Hr.DatePicker,{...a,...i,format:u,sx:{...t,m:0},slotProps:{textField:{onBlur:a.onBlur,helperText:!!s&&K.jsx(fn,{error:s.message}),error:!!s,fullWidth:!0}},shouldDisableDate:h=>n?Pc(h,n):!1})}function Ic({name:e,label:r,sx:t={},disabled:n,rules:u={},readonly:i,...a}){const{field:s,fieldState:{error:h}}=vr.useController({name:e,rules:u}),f=s.value?"Yes":"No";return i?K.jsx(Jr,{label:r,text:f,sx:t,error:h==null?void 0:h.message,startAdornment:K.jsx(ze.Checkbox,{disabled:!0,checked:s.value})}):K.jsxs(Oa,{label:r,sx:t,error:h==null?void 0:h.message,childId:e,children:[K.jsx(ze.Checkbox,{id:e,checked:s.value,disabled:n,...s,...a,inputProps:{"aria-describedby":`${e}-error`,"aria-invalid":!!h},color:h?"error":"primary","data-testid":"form-field-checkbox"}),!n&&K.jsx(ze.Typography,{children:f})]})}function Rc({name:e,label:r,rules:t={},sx:n={},readonly:u,maxLength:i,filter:a,...s}){const{field:h,fieldState:{error:f}}=vr.useController({name:e,rules:t}),c=p=>{let o=p.target.value;a&&(o=a(o)),h.onChange(o)};return u?K.jsx(Jr,{label:r,text:h.value,sx:n,error:f==null?void 0:f.message}):K.jsx(ze.TextField,{"data-test-id":"form-field-input",...h,label:r,fullWidth:!0,...s,error:!!f,helperText:!!f&&K.jsx(fn,{error:f.message}),onChange:c,sx:{...n,m:0},slotProps:{input:{inputProps:{maxLength:i}}}})}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},jn.apply(null,arguments)}var kc={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null};function E1(e,r){if(Mu(e,r))return e[r];throw typeof e[r]=="function"&&A1(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function x1(e,r,t){if(Mu(e,r))return e[r]=t,t;throw new Error('No access to property "'+r+'"')}function Mu(e,r){return!C1(e)&&!Array.isArray(e)?!1:zn(T1,r)?!0:!(r in Object.prototype||r in Function.prototype)}function A1(e,r){return e==null||typeof e[r]!="function"||zn(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:zn(S1,r)?!0:!(r in Object.prototype||r in Function.prototype)}function C1(e){return typeof e=="object"&&e&&e.constructor===Object}var T1={length:!0,name:!0},S1={toString:!0,valueOf:!0,toLocaleString:!0};class F1{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(r=>this.has(r)).values()}get(r){return E1(this.wrappedObject,r)}set(r,t){return x1(this.wrappedObject,r,t),this}has(r){return Mu(this.wrappedObject,r)&&r in this.wrappedObject}entries(){return _1(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){Mu(this.wrappedObject,r)&&delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}}function _1(e,r){return{next:()=>{var t=e.next();return t.done?t:{value:r(t.value),done:!1}}}}function Ke(e){return typeof e=="number"}function wt(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function O1(e){return typeof e=="bigint"}function Lc(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function qc(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function $c(e){return e&&e.constructor.prototype.isUnit===!0||!1}function lr(e){return typeof e=="string"}var yt=Array.isArray;function Wt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Pu(e){return Array.isArray(e)||Wt(e)}function N1(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function M1(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function P1(e){return e&&e.constructor.prototype.isRange===!0||!1}function Na(e){return e&&e.constructor.prototype.isIndex===!0||!1}function B1(e){return typeof e=="boolean"}function I1(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function R1(e){return e&&e.constructor.prototype.isHelp===!0||!1}function k1(e){return typeof e=="function"}function L1(e){return e instanceof Date}function q1(e){return e instanceof RegExp}function Ma(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Lc(e)&&!qc(e))}function $1(e){return e?e instanceof Map||e instanceof F1||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}function j1(e){return e===null}function z1(e){return e===void 0}function H1(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function U1(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function V1(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function W1(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function Y1(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function G1(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function X1(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Q1(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Z1(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function J1(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function K1(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function ep(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function tp(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function rp(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function np(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function up(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function ip(e){return e&&e.constructor.prototype.isChain===!0||!1}function Kr(e){var r=typeof e;return r==="object"?e===null?"null":wt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":r}function Dt(e){var r=typeof e;if(r==="number"||r==="bigint"||r==="string"||r==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(t){return Dt(t)});if(e instanceof Date)return new Date(e.valueOf());if(wt(e))return e;if(Ma(e))return ap(e,Dt);if(r==="function")return e;throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function ap(e,r){var t={};for(var n in e)zn(e,n)&&(t[n]=r(e[n]));return t}function sp(e,r){for(var t in r)zn(r,t)&&(e[t]=r[t]);return e}function Br(e,r){var t,n,u;if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(n=0,u=e.length;n<u;n++)if(!Br(e[n],r[n]))return!1;return!0}else{if(typeof e=="function")return e===r;if(e instanceof Object){if(Array.isArray(r)||!(r instanceof Object))return!1;for(t in e)if(!(t in r)||!Br(e[t],r[t]))return!1;for(t in r)if(!(t in e))return!1;return!0}else return e===r}}function zn(e,r){return e&&Object.hasOwnProperty.call(e,r)}function op(e,r){for(var t={},n=0;n<r.length;n++){var u=r[n],i=e[u];i!==void 0&&(t[u]=i)}return t}var cp=["Matrix","Array"],fp=["number","BigNumber","Fraction"],Hn=function(r){if(r)throw new Error(`The global config is readonly.
|
|
75
75
|
Please create a mathjs instance if you want to change the default configuration.
|
|
76
76
|
Example:
|
|
77
77
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengov/form-renderer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "OpenGov Smart Forms form renderer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@mdi/js": "^7.4.47",
|
|
27
27
|
"@mdi/react": "^1.6.1",
|
|
28
28
|
"@mui/icons-material": "^6.1.1",
|
|
29
|
-
"@opengov/form-utils": "0.1.
|
|
29
|
+
"@opengov/form-utils": "0.1.1",
|
|
30
30
|
"date-fns": "^4.1.0",
|
|
31
31
|
"mathjs": "^14.3.1",
|
|
32
32
|
"sanitize-html": "^2.14.0"
|