kdpa-components 1.36.1 → 1.36.2
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/index.js
CHANGED
|
@@ -557,7 +557,7 @@ html body {
|
|
|
557
557
|
* See the License for the specific language governing permissions and
|
|
558
558
|
* limitations under the License.
|
|
559
559
|
*/(function(e,t){var n;function r(i,a){var s=[],c=0;function f(m){return s.push(m),a}function p(){return s[c++]}return{tokenize:function(m){return m.replace(i,f)},detokenize:function(m){return m.replace(new RegExp("("+a+")","g"),p)}}}function o(){var i="`TMP`",a="`NOFLIP_SINGLE`",s="`NOFLIP_CLASS`",c="`COMMENT`",f="[^\\u0020-\\u007e]",p="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",m="(?:[0-9]*\\.[0-9]+|[0-9]+)",b="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",y="direction\\s*:\\s*",w="[!#$%&*-~]",S=`['"]?\\s*`,k="(^|[^a-zA-Z])",O="[^\\}]*?",E="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",N="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",R="(?:"+p+"|\\\\[^\\r\\n\\f0-9a-f])",_="(?:[_a-z]|"+f+"|"+R+")",F="(?:[_a-z0-9-]|"+f+"|"+R+")",V="-?"+_+F+"*",K=m+"(?:\\s*"+b+"|"+V+")?",U="((?:-?"+K+")|(?:inherit|auto))",J="((?:margin|padding|border-width)\\s*:\\s*)",X="((?:-color|border-style)\\s*:\\s*)",ne="(#?"+F+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",ie="(?:"+w+"|"+f+"|"+R+")*?",te="(?![a-zA-Z])",re="(?!("+F+`|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|"[^"]*"|`+c+")*?{)",de="(?!"+ie+S+"\\))",le="(?="+ie+S+"\\))",ce="(\\s*(?:!important\\s*)?[;}])",ve=/`TMP`/g,fe=new RegExp(N,"gi"),Te=new RegExp("("+E+re+"[^;}]+;?)","gi"),Re=new RegExp("("+E+O+"})","gi"),je=new RegExp("("+y+")ltr","gi"),ke=new RegExp("("+y+")rtl","gi"),me=new RegExp(k+"(left)"+te+de+re,"gi"),Pe=new RegExp(k+"(right)"+te+de+re,"gi"),Me=new RegExp(k+"(left)"+le,"gi"),_e=new RegExp(k+"(right)"+le,"gi"),Be=new RegExp(k+"(ltr)"+le,"gi"),Le=new RegExp(k+"(rtl)"+le,"gi"),Ne=new RegExp(k+"([ns]?)e-resize","gi"),Ee=new RegExp(k+"([ns]?)w-resize","gi"),He=new RegExp(J+U+"(\\s+)"+U+"(\\s+)"+U+"(\\s+)"+U+ce,"gi"),Ie=new RegExp(X+ne+"(\\s+)"+ne+"(\\s+)"+ne+"(\\s+)"+ne+ce,"gi"),Qe=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+K+")","gi"),et=new RegExp("(background-position-x\\s*:\\s*)(-?"+m+"%)","gi"),ot=new RegExp("(border-radius\\s*:\\s*)"+U+"(?:(?:\\s+"+U+")(?:\\s+"+U+")?(?:\\s+"+U+")?)?(?:(?:(?:\\s*\\/\\s*)"+U+")(?:\\s+"+U+")?(?:\\s+"+U+")?(?:\\s+"+U+")?)?"+ce,"gi"),ze=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+U,"gi"),$e=new RegExp("(text-shadow\\s*:\\s*)"+U+"(\\s*)"+ne,"gi"),Ce=new RegExp("(text-shadow\\s*:\\s*)"+ne+"(\\s*)"+U,"gi"),Oe=new RegExp("(text-shadow\\s*:\\s*)"+U,"gi"),Ue=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+U+"(\\s*\\))","gi"),ht=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+U+"((?:\\s*,\\s*"+U+"){0,2}\\s*\\))","gi");function Ze(vt,Lt,Et){var Mt,lt;return Et.slice(-1)==="%"&&(Mt=Et.indexOf("."),Mt!==-1?(lt=Et.length-Mt-2,Et=100-parseFloat(Et),Et=Et.toFixed(lt)+"%"):Et=100-parseFloat(Et)+"%"),Lt+Et}function pt(vt){switch(vt.length){case 4:vt=[vt[1],vt[0],vt[3],vt[2]];break;case 3:vt=[vt[1],vt[0],vt[1],vt[2]];break;case 2:vt=[vt[1],vt[0]];break;case 1:vt=[vt[0]];break}return vt.join(" ")}function ut(vt,Lt){var Et,Mt=[].slice.call(arguments),lt=Mt.slice(2,6).filter(function(zt){return zt}),mt=Mt.slice(6,10).filter(function(zt){return zt}),$t=Mt[10]||"";return mt.length?Et=pt(lt)+" / "+pt(mt):Et=pt(lt),Lt+Et+$t}function Ct(vt){return parseFloat(vt)===0?vt:vt[0]==="-"?vt.slice(1):"-"+vt}function Je(vt,Lt,Et){return Lt+Ct(Et)}function qe(vt,Lt,Et,Mt,lt){return Lt+Et+Ct(Mt)+lt}function it(vt,Lt,Et,Mt,lt){return Lt+Et+Mt+Ct(lt)}return{transform:function(vt,Lt){var Et=new r(Te,a),Mt=new r(Re,s),lt=new r(fe,c);return vt=lt.tokenize(Mt.tokenize(Et.tokenize(vt.replace("`","%60")))),Lt.transformDirInUrl&&(vt=vt.replace(Be,"$1"+i).replace(Le,"$1ltr").replace(ve,"rtl")),Lt.transformEdgeInUrl&&(vt=vt.replace(Me,"$1"+i).replace(_e,"$1left").replace(ve,"right")),vt=vt.replace(je,"$1"+i).replace(ke,"$1ltr").replace(ve,"rtl").replace(me,"$1"+i).replace(Pe,"$1left").replace(ve,"right").replace(Ne,"$1$2"+i).replace(Ee,"$1$2e-resize").replace(ve,"w-resize").replace(ot,ut).replace(ze,Je).replace($e,it).replace(Ce,it).replace(Oe,Je).replace(Ue,qe).replace(ht,qe).replace(He,"$1$2$3$8$5$6$7$4$9").replace(Ie,"$1$2$3$8$5$6$7$4$9").replace(Qe,Ze).replace(et,Ze),vt=Et.detokenize(Mt.detokenize(lt.detokenize(vt))),vt}}}n=new o,e.exports?t.transform=function(i,a,s){var c;return typeof a=="object"?c=a:(c={},typeof a=="boolean"&&(c.transformDirInUrl=a),typeof s=="boolean"&&(c.transformEdgeInUrl=s)),n.transform(i,c)}:typeof window<"u"&&(window.cssjanus=n)})(D2,D2.exports);var Nke=D2.exports,Rke=fo(Nke);function e6(e,t,n){switch(e.type){case vke:case E2:case k2:return e.return=e.return||e.value;case zg:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(o){o.type===k2&&(o.children=o.value)})}var r=Qz(Array.prototype.concat(e.children),e6);return Gl(r)?e.return=e.value+"{"+r+"}":""}function t6(e,t,n,r){if(e.type===Yz||e.type===bke||e.type===zg&&(!e.parent||e.parent.type===gke||e.parent.type===zg)){var o=Rke.transform(e6(e));e.children=o?Ake(o)[0].children:[],e.return=""}}Object.defineProperty(t6,"name",{value:"stylisRTLPlugin"});function Ike(e){const t=Zr(()=>KS({key:"kdpa",stylisPlugins:[_ke,t6],container:e?.container}),[]);return W(LA,{value:t,children:e.children})}const Lke=At.forwardRef((e,t)=>W(LR,{direction:"up",ref:t,...e}));function $ke({children:e,...t}){return W(Zf,{TransitionComponent:Lke,fullScreen:!0,...t,children:e})}function Fke(e){return hr({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]})(e)}function zke(e){return hr({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]})(e)}function Bke({children:e,label:t="",maxLength:n=23,expandable:r=!1,defaultOpen:o=!0,...i}){const a=Math.min(n,t.length)*7,[s,c]=_n(o??!0),f=()=>{c(p=>!p)};return W(Wk,{sx:{...i.style,...i.sx,width:"100%"},children:xt(Wk,{xs:12,container:!0,sx:{border:"1px solid #ebe9f1 !important",position:"relative",marginLeft:"0.1rem",marginRight:"0.1rem",borderRadius:"0.357rem !important",borderTopWidth:"0px !important",padding:"1rem 0.1rem","::before":{content:'""',background:"#ebe9f1",position:"absolute",top:0,right:"2px",width:`calc(${a===0?"100%":`90% - ${a}px`})`,height:"0.7px"},"::after":{content:'""',background:"#ebe9f1",position:"absolute",top:0,right:"2px",width:"20px",height:"0.7px"}},children:[W("span",{style:{position:"absolute",top:"-10px",right:"10px",fontSize:"80%",padding:"0 13px",width:`calc(100px + ${a}px)`},children:W(Bl,{title:t,children:W("span",{children:t.length>n?xt(no,{children:[t.substring(0,n)," ..."]}):t})})}),r&&W("div",{style:{position:"absolute",top:"-8px",left:"20px",fontSize:"80%",padding:"0 16px",width:"20px",color:"var(--bs-primary,#7367AA)"},children:s?W(Fke,{size:18,onClick:f}):W(zke,{size:18,onClick:f})}),W(E4,{in:r?s:!0,style:{width:"100%"},children:W(At.Fragment,{children:e})})]})})}function Vke(e){return hr({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"}},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"}},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"}}]})(e)}function n6(e){return hr({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}},{tag:"polyline",attr:{points:"17 8 12 3 7 8"}},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"}}]})(e)}function jke({onUpload:e,label:t,multiple:n=!1,...r}){const o=i=>{const a=i.target.files;a&&e(a)};return xt("label",{className:"kdpa-file-uploader",htmlFor:"kdpaFileUploader",children:[t&&W("span",{className:"kdpa-file-uploader__label",children:t}),W(mg,{component:"label",htmlFor:"kdpaFileUploader",sx:{padding:"7px 7px",minWidth:"36px"},children:W(n6,{size:20})}),W("input",{id:"kdpaFileUploader",type:"file",...r,hidden:!0,multiple:!0,onChange:o})]})}function Hke({style:e,sx:t,children:n,onSubmit:r,loading:o=!1,defaultValues:i,errorHandlingMode:a="onChange"},s){const c=H9({mode:a,defaultValues:i});return sA(s,()=>({formState:c})),W(uA,{...c,children:xt("form",{className:"kdpa-form-container",onSubmit:c.handleSubmit(r),style:{...t,...e},children:[n,o&&W("div",{className:"kdpa-form-container__loading",children:W(us,{})})]})})}var Wke=rr(Hke);function Yke({name:e="",rules:t={},Component:n,...r}){const{control:o}=Zp(),{field:i,fieldState:{error:a}}=Jp({control:o,name:e,rules:t,shouldUnregister:!0,defaultValue:r?.defaultValue});function s(...c){//! this will change in the future
|
|
560
|
-
r.autoComplete?i.onChange(c[1]):i.onChange(...c),r?.onChange?.(...c)}return xt("div",{children:[W(n,{...i,...r,onChange:s}),a&&a.message&&W("span",{style:{color:"red"},children:a.message})]})}function Uke({children:e,handleClose:t,open:n,...r}){return W(Zf,{open:n,onClose:t,...r,children:e})}function Kke(e){return hr({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"File_On"},child:[{tag:"path",attr:{d:"M19.485,7.35l-4.97-4.86a1.466,1.466,0,0,0-1.05-.43h-6.9a2.5,2.5,0,0,0-2.5,2.5V19.44a2.507,2.507,0,0,0,2.5,2.5h10.87a2.507,2.507,0,0,0,2.5-2.5V8.42A1.49,1.49,0,0,0,19.485,7.35Zm-1.27.15h-2.34a1.5,1.5,0,0,1-1.5-1.5V3.75Zm.72,11.94a1.5,1.5,0,0,1-1.5,1.5H6.565a1.5,1.5,0,0,1-1.5-1.5V4.56a1.5,1.5,0,0,1,1.5-1.5h6.81V6a2.5,2.5,0,0,0,2.5,2.5h3.06Z"}}]}]})(e)}function Xke(e){return xt(Ni,{sx:{position:"relative",display:"inline-flex"},children:[W(us,{variant:"determinate",...e}),W(Ni,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:W(ni,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e.value)}%`})})]})}function _2({progress:e}){return W("div",{className:"kdpa-uploading-file",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:W("div",{className:"parent",style:{position:"relative",borderRadius:"8px"},children:xt("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:[W(Kke,{style:{position:"absolute",height:"100%",width:"100%",opacity:.2}}),W(Xke,{variant:e===0?"indeterminate":"determinate",value:e})]})})})}function N2({sessionId:e,fileName:t,onDelete:n,smallUrl:r,mediumUrl:o,largeUrl:i}){return xt("div",{className:"kdpa-uploaded-file",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[xt("div",{className:"parent",style:{position:"relative",borderRadius:"8px"},children:[W(RT,{small:r,medium:o??r,large:i,hideZoom:!0,className:"modal-image rounded"}),W("div",{style:{position:"absolute",top:"100"},className:"child",children:W(Vke,{style:{color:"white",cursor:"pointer"},size:20,onClick:()=>{n(e)}})})]}),t&&W("span",{style:{fontSize:"12px"},children:t?.split("\\")?.slice(-1)?.[0]})]})}function Gke({name:e="",rules:t={},Component:n,...r}){const{control:o,setValue:i}=Zp(),{field:a,fieldState:{error:s}}=Jp({control:o,name:e,rules:t,shouldUnregister:!0,defaultValue:r?.defaultValue});wn(()=>{r?.defaultValue&&i(e,r?.defaultValue)},[r?.defaultValue]);function c(...f){a.onChange(...f),r?.onChange?.(...f)}return xt(no,{children:[W(n,{...a,...r,error:s,onChange:c}),s&&s.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:s.message})]})}function r6({style:e,sx:t,children:n,onSubmit:r,loading:o=!1,submitLoading:i=!1,formState:a}){return W(uA,{...a,children:xt("form",{className:"kdpa-form-container",onSubmit:a.handleSubmit(r),style:{...t,...e},children:[o?W(us,{}):n,i&&W("div",{className:"kdpa-form-container__loading",children:W(us,{})})]})})}function o6({name:e="",rules:t={},options:n,multiple:r=!1,defaultValue:o,valueField:i,labelField:a,loading:s=!1,getOptionValue:c,getOptionImage:f,basePathImages:p,imageSize:m="md",...b}){const{control:y,setValue:w,getValues:S}=Zp(),k=Zr(()=>{if(!o)return r?[]:null;if(r)if(i&&a){const R=o[i],_=o[a];return!_||!R?[]:R?.map((V,K)=>{const U={[a]:_[K],[i]:V};return i==="EnumTitle"&&(U.id=V),U})}else return[];else return o},[]),{field:O,fieldState:{error:E}}=Jp({control:y,name:e,rules:t,shouldUnregister:!0,defaultValue:k});wn(()=>{o&&w(e,k)},[k]);function N(...R){O.onChange(R[1]),b?.onChange?.(R[1])}return xt(no,{children:[W(pg,{...O,...b,getOptionKey:c,defaultValue:k,multiple:r,options:n,renderOption:f?(R,_)=>{const F=f(_);return cn("div",{...R,key:c?.(_),style:{padding:"10px",cursor:"pointer",display:"flex",flexDirection:"row",gap:"8px"}},W("img",{src:(p?.basePathStream??"")+F,style:{maxWidth:m==="lg"?"100px":m==="md"?"75px":"50px"}}),b.getOptionLabel?.(_))}:void 0,onChange:N,renderInput:R=>cn(rh,{...R,size:"small",key:b?.key,placeholder:b?.placeholder,variant:b?.variant,label:b.label,error:!!E,required:!!b?.required,helperText:E?void 0:b?.helperText,InputProps:{...R.InputProps,...b?.InputProps,endAdornment:xt(no,{children:[s?W(us,{color:"inherit",size:20}):null,R.InputProps.endAdornment]})}})}),E&&E.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:E.message})]})}function qke({onScrollEnd:e,onSearch:t,limitCharacterSearch:n=3,delaySearch:r=700,...o}){let i,a;function s(m,b,y){clearTimeout(i),clearTimeout(a),b.length===0&&(a=setTimeout(()=>{t&&t(b)},350)),b.length>=n&&(i=setTimeout(()=>{t&&t(b)},r))}const c=Wt(null),f=Wt(0),p=m=>{const b=m.target;f.current!==b.scrollTop&&(f.current=b.scrollTop,b.scrollTop+b.clientHeight===b.scrollHeight&&!o?.loading&&e&&e())};return wn(()=>{c.current&&(c.current.scrollTop=f.current)},[o?.options]),W(o6,{...o,onInputChange:s,ListboxComponent:m=>W("ul",{onScroll:p,ref:b=>{c.current=b},...m,style:{maxHeight:"200px"},children:m.children})})}function Zke({name:e="",rules:t={},options:n,multiple:r=!1,defaultValueKey:o="",defaultValue:i="",...a}){const{control:s}=Zp(),c=Zr(()=>r&&Array.isArray(i)?n?.filter(b=>i.includes(b[o])):n?.find(b=>b[o]===i),[n,i]),{field:f,fieldState:{error:p}}=Jp({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:c});function m(...b){f.onChange(b[1]),a?.onChange?.(b[1])}return xt(no,{children:[W($7,{...f,...a,error:!!p,multiple:r,options:n,onChange:m}),p&&p.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:p.message})]})}const Jke=()=>{const e=({data:r,getOptionLabel:o=c=>c.label,getOptionIcon:i=c=>c.icon,getOptionValue:a=c=>c.value,getOptionParent:s=c=>c.parent})=>{const c=[];return r?.forEach(f=>{a(f)&&c.push({value:a(f),label:xt(no,{children:[i(f),o(f)]}),parent:s(f)})}),c},t=(r=[],o)=>{const i=[];for(const a of r){const s=a;if(!o&&!s?.parent||s?.parent===o){const c=t(r,s.value);c.length>0&&(s.children=c),i.push(s)}}return i},n=(r,o)=>{const i=[];if(!o)return[];const a=r.find(s=>s.value===o);return a&&(i.push(a.value),i.push(...n(r,a.parent))),i};return{renderTreeToSpecificFieldName:e,buildTree:t,findAllExpanded:n}};function Qke({data:e,defaultValue:t=[],onExpand:n,multiSelect:r=!0,getOptionValue:o,getOptionIcon:i,getOptionLabel:a,getOptionParent:s,noDataText:c="no data",...f}){const p=Wr(),{buildTree:m,renderTreeToSpecificFieldName:b,findAllExpanded:y}=Jke(),w=b({data:e,getOptionLabel:a,getOptionIcon:i,getOptionValue:o,getOptionParent:s}),S=m(w),[k,O]=_n([]),[E,N]=_n([S?.[0]?.value]);wn(()=>{if(t)if(typeof t=="string")N(y(w,t)),O([t]);else{const F=[];t.forEach(V=>{F.push(...y(w,V))}),N(F),O([...t])}},[]),wn(()=>{f?.onChange&&(r?f.onChange(k):f.onChange(k[0]))},[k]);function R(F,V){if(r)O(F);else if(V.isLeaf){const K=!!k.find(U=>U===V.value);O(K?[]:[V.value])}}function _(F,V){n&&n(F,V),N(F)}return W("div",{className:"KdTreeField",children:S?.length>0?W(D5,{...f,icons:{leaf:W("span",{}),parentOpen:W("span",{}),parentClose:W("span",{}),check:W(J4,{size:24,color:p?.palette?.primary?.main}),expandOpen:W(G4,{size:24}),uncheck:W(Z4,{size:24}),expandClose:W(q4,{size:24}),halfCheck:W(Q4,{color:p?.palette?.primary?.main,size:24})},nodes:S,onCheck:R,checked:k,expanded:E,onExpand:_,showNodeIcon:!0}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})}function eEe({name:e="",rules:t={},options:n,getOptionValue:r=s=>s.value,defaultValue:o,split:i,...a}){const{control:s,setValue:c}=Zp(),f=Zr(()=>o||null,[o]);wn(()=>{c(e,f)},[f]);const{field:p,fieldState:{error:m}}=Jp({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:f});function b(...y){i&&i?.length>0?(p.onChange(y[1]?.join(i)),a?.onChange?.(y[1]?.join(i))):(p.onChange(y[1]),a?.onChange?.(y[1]))}return xt(no,{children:[W(pg,{...p,...a,value:i&&i?.length>0?p?.value?.split(i):p?.value,error:!!m,multiple:!0,freeSolo:!0,options:n?.map(y=>r(y))??[],onChange:b}),m&&m.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:m.message})]})}var i6={exports:{}};/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */(function(e,t){(function(n,r){e.exports=r()})(Ho,function(){const{entries:n,setPrototypeOf:r,isFrozen:o,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:s,seal:c,create:f}=Object,{apply:p,construct:m}=typeof Reflect<"u"&&Reflect;s||(s=function(Ce){return Ce}),c||(c=function(Ce){return Ce}),p||(p=function(Ce,Oe,Ue){return Ce.apply(Oe,Ue)}),m||(m=function(Ce,Oe){return new Ce(...Oe)});const b=K(Array.prototype.forEach),y=K(Array.prototype.pop),w=K(Array.prototype.push),S=K(String.prototype.toLowerCase),k=K(String.prototype.toString),O=K(String.prototype.match),E=K(String.prototype.replace),N=K(String.prototype.indexOf),R=K(String.prototype.trim),_=K(Object.prototype.hasOwnProperty),F=K(RegExp.prototype.test),V=U(TypeError);function K($e){return function(Ce){for(var Oe=arguments.length,Ue=new Array(Oe>1?Oe-1:0),ht=1;ht<Oe;ht++)Ue[ht-1]=arguments[ht];return p($e,Ce,Ue)}}function U($e){return function(){for(var Ce=arguments.length,Oe=new Array(Ce),Ue=0;Ue<Ce;Ue++)Oe[Ue]=arguments[Ue];return m($e,Oe)}}function J($e,Ce){let Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S;r&&r($e,null);let Ue=Ce.length;for(;Ue--;){let ht=Ce[Ue];if(typeof ht=="string"){const Ze=Oe(ht);Ze!==ht&&(o(Ce)||(Ce[Ue]=Ze),ht=Ze)}$e[ht]=!0}return $e}function X($e){for(let Ce=0;Ce<$e.length;Ce++)_($e,Ce)||($e[Ce]=null);return $e}function ne($e){const Ce=f(null);for(const[Oe,Ue]of n($e))_($e,Oe)&&(Array.isArray(Ue)?Ce[Oe]=X(Ue):Ue&&typeof Ue=="object"&&Ue.constructor===Object?Ce[Oe]=ne(Ue):Ce[Oe]=Ue);return Ce}function ie($e,Ce){for(;$e!==null;){const Ue=a($e,Ce);if(Ue){if(Ue.get)return K(Ue.get);if(typeof Ue.value=="function")return K(Ue.value)}$e=i($e)}function Oe(){return null}return Oe}const te=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),re=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),de=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),le=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ce=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ve=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fe=s(["#text"]),Te=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Re=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),je=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),me=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Pe=c(/<%[\w\W]*|[\w\W]*%>/gm),Me=c(/\${[\w\W]*}/gm),_e=c(/^data-[\-\w.\u00B7-\uFFFF]/),Be=c(/^aria-[\-\w]+$/),Le=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ne=c(/^(?:\w+script|data):/i),Ee=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),He=c(/^html$/i);var Ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:me,ERB_EXPR:Pe,TMPLIT_EXPR:Me,DATA_ATTR:_e,ARIA_ATTR:Be,IS_ALLOWED_URI:Le,IS_SCRIPT_OR_DATA:Ne,ATTR_WHITESPACE:Ee,DOCTYPE_NAME:He});const Qe=function(){return typeof window>"u"?null:window},et=function(Ce,Oe){if(typeof Ce!="object"||typeof Ce.createPolicy!="function")return null;let Ue=null;const ht="data-tt-policy-suffix";Oe&&Oe.hasAttribute(ht)&&(Ue=Oe.getAttribute(ht));const Ze="dompurify"+(Ue?"#"+Ue:"");try{return Ce.createPolicy(Ze,{createHTML(pt){return pt},createScriptURL(pt){return pt}})}catch{return console.warn("TrustedTypes policy "+Ze+" could not be created."),null}};function ot(){let $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qe();const Ce=On=>ot(On);if(Ce.version="3.0.9",Ce.removed=[],!$e||!$e.document||$e.document.nodeType!==9)return Ce.isSupported=!1,Ce;let{document:Oe}=$e;const Ue=Oe,ht=Ue.currentScript,{DocumentFragment:Ze,HTMLTemplateElement:pt,Node:ut,Element:Ct,NodeFilter:Je,NamedNodeMap:qe=$e.NamedNodeMap||$e.MozNamedAttrMap,HTMLFormElement:it,DOMParser:vt,trustedTypes:Lt}=$e,Et=Ct.prototype,Mt=ie(Et,"cloneNode"),lt=ie(Et,"nextSibling"),mt=ie(Et,"childNodes"),$t=ie(Et,"parentNode");if(typeof pt=="function"){const On=Oe.createElement("template");On.content&&On.content.ownerDocument&&(Oe=On.content.ownerDocument)}let zt,an="";const{implementation:sn,createNodeIterator:Cn,createDocumentFragment:An,getElementsByTagName:Dn}=Oe,{importNode:Ke}=Ue;let we={};Ce.isSupported=typeof n=="function"&&typeof $t=="function"&&sn&&sn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:dt,ERB_EXPR:Ye,TMPLIT_EXPR:Ot,DATA_ATTR:Vt,ARIA_ATTR:Dt,IS_SCRIPT_OR_DATA:We,ATTR_WHITESPACE:De}=Ie;let{IS_ALLOWED_URI:Ge}=Ie,st=null;const Tt=J({},[...te,...re,...de,...ce,...fe]);let kt=null;const gn=J({},[...Te,...Re,...je,...ke]);let nn=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ln=null,Zt=null,ft=!0,Ae=!0,rt=!1,St=!0,Ft=!1,Nt=!1,ae=!1,l=!1,u=!1,h=!1,g=!1,v=!0,x=!1;const C="user-content-";let T=!0,D=!1,I={},L=null;const $=J({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Y=null;const q=J({},["audio","video","img","source","image","track"]);let Q=null;const oe=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ye="http://www.w3.org/2000/svg",P="http://www.w3.org/1999/xhtml";let z=P,Z=!1,ue=null;const be=J({},[he,ye,P],k);let xe=null;const Fe=["application/xhtml+xml","text/html"],Ve="text/html";let at=null,yt=null;const gt=Oe.createElement("form"),Ht=function(ct){return ct instanceof RegExp||ct instanceof Function},Jt=function(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yt&&yt===ct)){if((!ct||typeof ct!="object")&&(ct={}),ct=ne(ct),xe=Fe.indexOf(ct.PARSER_MEDIA_TYPE)===-1?Ve:ct.PARSER_MEDIA_TYPE,at=xe==="application/xhtml+xml"?k:S,st=_(ct,"ALLOWED_TAGS")?J({},ct.ALLOWED_TAGS,at):Tt,kt=_(ct,"ALLOWED_ATTR")?J({},ct.ALLOWED_ATTR,at):gn,ue=_(ct,"ALLOWED_NAMESPACES")?J({},ct.ALLOWED_NAMESPACES,k):be,Q=_(ct,"ADD_URI_SAFE_ATTR")?J(ne(oe),ct.ADD_URI_SAFE_ATTR,at):oe,Y=_(ct,"ADD_DATA_URI_TAGS")?J(ne(q),ct.ADD_DATA_URI_TAGS,at):q,L=_(ct,"FORBID_CONTENTS")?J({},ct.FORBID_CONTENTS,at):$,ln=_(ct,"FORBID_TAGS")?J({},ct.FORBID_TAGS,at):{},Zt=_(ct,"FORBID_ATTR")?J({},ct.FORBID_ATTR,at):{},I=_(ct,"USE_PROFILES")?ct.USE_PROFILES:!1,ft=ct.ALLOW_ARIA_ATTR!==!1,Ae=ct.ALLOW_DATA_ATTR!==!1,rt=ct.ALLOW_UNKNOWN_PROTOCOLS||!1,St=ct.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=ct.SAFE_FOR_TEMPLATES||!1,Nt=ct.WHOLE_DOCUMENT||!1,u=ct.RETURN_DOM||!1,h=ct.RETURN_DOM_FRAGMENT||!1,g=ct.RETURN_TRUSTED_TYPE||!1,l=ct.FORCE_BODY||!1,v=ct.SANITIZE_DOM!==!1,x=ct.SANITIZE_NAMED_PROPS||!1,T=ct.KEEP_CONTENT!==!1,D=ct.IN_PLACE||!1,Ge=ct.ALLOWED_URI_REGEXP||Le,z=ct.NAMESPACE||P,nn=ct.CUSTOM_ELEMENT_HANDLING||{},ct.CUSTOM_ELEMENT_HANDLING&&Ht(ct.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nn.tagNameCheck=ct.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ct.CUSTOM_ELEMENT_HANDLING&&Ht(ct.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nn.attributeNameCheck=ct.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ct.CUSTOM_ELEMENT_HANDLING&&typeof ct.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nn.allowCustomizedBuiltInElements=ct.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Ae=!1),h&&(u=!0),I&&(st=J({},fe),kt=[],I.html===!0&&(J(st,te),J(kt,Te)),I.svg===!0&&(J(st,re),J(kt,Re),J(kt,ke)),I.svgFilters===!0&&(J(st,de),J(kt,Re),J(kt,ke)),I.mathMl===!0&&(J(st,ce),J(kt,je),J(kt,ke))),ct.ADD_TAGS&&(st===Tt&&(st=ne(st)),J(st,ct.ADD_TAGS,at)),ct.ADD_ATTR&&(kt===gn&&(kt=ne(kt)),J(kt,ct.ADD_ATTR,at)),ct.ADD_URI_SAFE_ATTR&&J(Q,ct.ADD_URI_SAFE_ATTR,at),ct.FORBID_CONTENTS&&(L===$&&(L=ne(L)),J(L,ct.FORBID_CONTENTS,at)),T&&(st["#text"]=!0),Nt&&J(st,["html","head","body"]),st.table&&(J(st,["tbody"]),delete ln.tbody),ct.TRUSTED_TYPES_POLICY){if(typeof ct.TRUSTED_TYPES_POLICY.createHTML!="function")throw V('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ct.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw V('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');zt=ct.TRUSTED_TYPES_POLICY,an=zt.createHTML("")}else zt===void 0&&(zt=et(Lt,ht)),zt!==null&&typeof an=="string"&&(an=zt.createHTML(""));s&&s(ct),yt=ct}},rn=J({},["mi","mo","mn","ms","mtext"]),Tn=J({},["foreignobject","desc","title","annotation-xml"]),$n=J({},["title","style","font","a","script"]),Rn=J({},[...re,...de,...le]),Wn=J({},[...ce,...ve]),Gn=function(ct){let Xt=$t(ct);(!Xt||!Xt.tagName)&&(Xt={namespaceURI:z,tagName:"template"});const Pn=S(ct.tagName),Or=S(Xt.tagName);return ue[ct.namespaceURI]?ct.namespaceURI===ye?Xt.namespaceURI===P?Pn==="svg":Xt.namespaceURI===he?Pn==="svg"&&(Or==="annotation-xml"||rn[Or]):!!Rn[Pn]:ct.namespaceURI===he?Xt.namespaceURI===P?Pn==="math":Xt.namespaceURI===ye?Pn==="math"&&Tn[Or]:!!Wn[Pn]:ct.namespaceURI===P?Xt.namespaceURI===ye&&!Tn[Or]||Xt.namespaceURI===he&&!rn[Or]?!1:!Wn[Pn]&&($n[Pn]||!Rn[Pn]):!!(xe==="application/xhtml+xml"&&ue[ct.namespaceURI]):!1},pr=function(ct){w(Ce.removed,{element:ct});try{ct.parentNode.removeChild(ct)}catch{ct.remove()}},zr=function(ct,Xt){try{w(Ce.removed,{attribute:Xt.getAttributeNode(ct),from:Xt})}catch{w(Ce.removed,{attribute:null,from:Xt})}if(Xt.removeAttribute(ct),ct==="is"&&!kt[ct])if(u||h)try{pr(Xt)}catch{}else try{Xt.setAttribute(ct,"")}catch{}},Co=function(ct){let Xt=null,Pn=null;if(l)ct="<remove></remove>"+ct;else{const go=O(ct,/^[\r\n\t ]+/);Pn=go&&go[0]}xe==="application/xhtml+xml"&&z===P&&(ct='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ct+"</body></html>");const Or=zt?zt.createHTML(ct):ct;if(z===P)try{Xt=new vt().parseFromString(Or,xe)}catch{}if(!Xt||!Xt.documentElement){Xt=sn.createDocument(z,"template",null);try{Xt.documentElement.innerHTML=Z?an:Or}catch{}}const to=Xt.body||Xt.documentElement;return ct&&Pn&&to.insertBefore(Oe.createTextNode(Pn),to.childNodes[0]||null),z===P?Dn.call(Xt,Nt?"html":"body")[0]:Nt?Xt.documentElement:to},Bo=function(ct){return Cn.call(ct.ownerDocument||ct,ct,Je.SHOW_ELEMENT|Je.SHOW_COMMENT|Je.SHOW_TEXT,null)},Hr=function(ct){return ct instanceof it&&(typeof ct.nodeName!="string"||typeof ct.textContent!="string"||typeof ct.removeChild!="function"||!(ct.attributes instanceof qe)||typeof ct.removeAttribute!="function"||typeof ct.setAttribute!="function"||typeof ct.namespaceURI!="string"||typeof ct.insertBefore!="function"||typeof ct.hasChildNodes!="function")},Ur=function(ct){return typeof ut=="function"&&ct instanceof ut},fn=function(ct,Xt,Pn){we[ct]&&b(we[ct],Or=>{Or.call(Ce,Xt,Pn,yt)})},Fn=function(ct){let Xt=null;if(fn("beforeSanitizeElements",ct,null),Hr(ct))return pr(ct),!0;const Pn=at(ct.nodeName);if(fn("uponSanitizeElement",ct,{tagName:Pn,allowedTags:st}),ct.hasChildNodes()&&!Ur(ct.firstElementChild)&&F(/<[/\w]/g,ct.innerHTML)&&F(/<[/\w]/g,ct.textContent))return pr(ct),!0;if(!st[Pn]||ln[Pn]){if(!ln[Pn]&&Gr(Pn)&&(nn.tagNameCheck instanceof RegExp&&F(nn.tagNameCheck,Pn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Pn)))return!1;if(T&&!L[Pn]){const Or=$t(ct)||ct.parentNode,to=mt(ct)||ct.childNodes;if(to&&Or){const go=to.length;for(let Vo=go-1;Vo>=0;--Vo)Or.insertBefore(Mt(to[Vo],!0),lt(ct))}}return pr(ct),!0}return ct instanceof Ct&&!Gn(ct)||(Pn==="noscript"||Pn==="noembed"||Pn==="noframes")&&F(/<\/no(script|embed|frames)/i,ct.innerHTML)?(pr(ct),!0):(Ft&&ct.nodeType===3&&(Xt=ct.textContent,b([dt,Ye,Ot],Or=>{Xt=E(Xt,Or," ")}),ct.textContent!==Xt&&(w(Ce.removed,{element:ct.cloneNode()}),ct.textContent=Xt)),fn("afterSanitizeElements",ct,null),!1)},Br=function(ct,Xt,Pn){if(v&&(Xt==="id"||Xt==="name")&&(Pn in Oe||Pn in gt))return!1;if(!(Ae&&!Zt[Xt]&&F(Vt,Xt))){if(!(ft&&F(Dt,Xt))){if(!kt[Xt]||Zt[Xt]){if(!(Gr(ct)&&(nn.tagNameCheck instanceof RegExp&&F(nn.tagNameCheck,ct)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(ct))&&(nn.attributeNameCheck instanceof RegExp&&F(nn.attributeNameCheck,Xt)||nn.attributeNameCheck instanceof Function&&nn.attributeNameCheck(Xt))||Xt==="is"&&nn.allowCustomizedBuiltInElements&&(nn.tagNameCheck instanceof RegExp&&F(nn.tagNameCheck,Pn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Pn))))return!1}else if(!Q[Xt]){if(!F(Ge,E(Pn,De,""))){if(!((Xt==="src"||Xt==="xlink:href"||Xt==="href")&&ct!=="script"&&N(Pn,"data:")===0&&Y[ct])){if(!(rt&&!F(We,E(Pn,De,"")))){if(Pn)return!1}}}}}}return!0},Gr=function(ct){return ct!=="annotation-xml"&&ct.indexOf("-")>0},Vr=function(ct){fn("beforeSanitizeAttributes",ct,null);const{attributes:Xt}=ct;if(!Xt)return;const Pn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};let Or=Xt.length;for(;Or--;){const to=Xt[Or],{name:go,namespaceURI:Vo,value:sa}=to,is=at(go);let Go=go==="value"?sa:R(sa);if(Pn.attrName=is,Pn.attrValue=Go,Pn.keepAttr=!0,Pn.forceKeepAttr=void 0,fn("uponSanitizeAttribute",ct,Pn),Go=Pn.attrValue,Pn.forceKeepAttr||(zr(go,ct),!Pn.keepAttr))continue;if(!St&&F(/\/>/i,Go)){zr(go,ct);continue}Ft&&b([dt,Ye,Ot],of=>{Go=E(Go,of," ")});const rf=at(ct.nodeName);if(Br(rf,is,Go)){if(x&&(is==="id"||is==="name")&&(zr(go,ct),Go=C+Go),zt&&typeof Lt=="object"&&typeof Lt.getAttributeType=="function"&&!Vo)switch(Lt.getAttributeType(rf,is)){case"TrustedHTML":{Go=zt.createHTML(Go);break}case"TrustedScriptURL":{Go=zt.createScriptURL(Go);break}}try{Vo?ct.setAttributeNS(Vo,go,Go):ct.setAttribute(go,Go),y(Ce.removed)}catch{}}}fn("afterSanitizeAttributes",ct,null)},Ls=function On(ct){let Xt=null;const Pn=Bo(ct);for(fn("beforeSanitizeShadowDOM",ct,null);Xt=Pn.nextNode();)fn("uponSanitizeShadowNode",Xt,null),!Fn(Xt)&&(Xt.content instanceof Ze&&On(Xt.content),Vr(Xt));fn("afterSanitizeShadowDOM",ct,null)};return Ce.sanitize=function(On){let ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xt=null,Pn=null,Or=null,to=null;if(Z=!On,Z&&(On="<!-->"),typeof On!="string"&&!Ur(On))if(typeof On.toString=="function"){if(On=On.toString(),typeof On!="string")throw V("dirty is not a string, aborting")}else throw V("toString is not a function");if(!Ce.isSupported)return On;if(ae||Jt(ct),Ce.removed=[],typeof On=="string"&&(D=!1),D){if(On.nodeName){const sa=at(On.nodeName);if(!st[sa]||ln[sa])throw V("root node is forbidden and cannot be sanitized in-place")}}else if(On instanceof ut)Xt=Co("<!---->"),Pn=Xt.ownerDocument.importNode(On,!0),Pn.nodeType===1&&Pn.nodeName==="BODY"||Pn.nodeName==="HTML"?Xt=Pn:Xt.appendChild(Pn);else{if(!u&&!Ft&&!Nt&&On.indexOf("<")===-1)return zt&&g?zt.createHTML(On):On;if(Xt=Co(On),!Xt)return u?null:g?an:""}Xt&&l&&pr(Xt.firstChild);const go=Bo(D?On:Xt);for(;Or=go.nextNode();)Fn(Or)||(Or.content instanceof Ze&&Ls(Or.content),Vr(Or));if(D)return On;if(u){if(h)for(to=An.call(Xt.ownerDocument);Xt.firstChild;)to.appendChild(Xt.firstChild);else to=Xt;return(kt.shadowroot||kt.shadowrootmode)&&(to=Ke.call(Ue,to,!0)),to}let Vo=Nt?Xt.outerHTML:Xt.innerHTML;return Nt&&st["!doctype"]&&Xt.ownerDocument&&Xt.ownerDocument.doctype&&Xt.ownerDocument.doctype.name&&F(He,Xt.ownerDocument.doctype.name)&&(Vo="<!DOCTYPE "+Xt.ownerDocument.doctype.name+`>
|
|
560
|
+
r.autoComplete?i.onChange(c[1]):i.onChange(...c),r?.onChange?.(...c)}return xt("div",{children:[W(n,{...i,...r,onChange:s}),a&&a.message&&W("span",{style:{color:"red"},children:a.message})]})}function Uke({children:e,handleClose:t,open:n,...r}){return W(Zf,{open:n,onClose:t,...r,children:e})}function Kke(e){return hr({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"File_On"},child:[{tag:"path",attr:{d:"M19.485,7.35l-4.97-4.86a1.466,1.466,0,0,0-1.05-.43h-6.9a2.5,2.5,0,0,0-2.5,2.5V19.44a2.507,2.507,0,0,0,2.5,2.5h10.87a2.507,2.507,0,0,0,2.5-2.5V8.42A1.49,1.49,0,0,0,19.485,7.35Zm-1.27.15h-2.34a1.5,1.5,0,0,1-1.5-1.5V3.75Zm.72,11.94a1.5,1.5,0,0,1-1.5,1.5H6.565a1.5,1.5,0,0,1-1.5-1.5V4.56a1.5,1.5,0,0,1,1.5-1.5h6.81V6a2.5,2.5,0,0,0,2.5,2.5h3.06Z"}}]}]})(e)}function Xke(e){return xt(Ni,{sx:{position:"relative",display:"inline-flex"},children:[W(us,{variant:"determinate",...e}),W(Ni,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:W(ni,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e.value)}%`})})]})}function _2({progress:e}){return W("div",{className:"kdpa-uploading-file",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:W("div",{className:"parent",style:{position:"relative",borderRadius:"8px"},children:xt("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:[W(Kke,{style:{position:"absolute",height:"100%",width:"100%",opacity:.2}}),W(Xke,{variant:e===0?"indeterminate":"determinate",value:e})]})})})}function N2({sessionId:e,fileName:t,onDelete:n,smallUrl:r,mediumUrl:o,largeUrl:i,modal:a=!0}){return xt("div",{className:"kdpa-uploaded-file",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[xt("div",{className:"parent",style:{position:"relative",borderRadius:"8px"},children:[a?W(RT,{small:r,medium:o??r,large:i,hideZoom:!0,className:"modal-image"}):W("img",{src:r,className:"modal-image"}),W("div",{style:{position:"absolute",top:"100"},className:"child",children:W(Vke,{style:{color:"white",cursor:"pointer"},size:20,onClick:()=>{n(e)}})})]}),t&&W("span",{style:{fontSize:"12px"},children:t?.split("\\")?.slice(-1)?.[0]})]})}function Gke({name:e="",rules:t={},Component:n,...r}){const{control:o,setValue:i}=Zp(),{field:a,fieldState:{error:s}}=Jp({control:o,name:e,rules:t,shouldUnregister:!0,defaultValue:r?.defaultValue});wn(()=>{r?.defaultValue&&i(e,r?.defaultValue)},[r?.defaultValue]);function c(...f){a.onChange(...f),r?.onChange?.(...f)}return xt(no,{children:[W(n,{...a,...r,error:s,onChange:c}),s&&s.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:s.message})]})}function r6({style:e,sx:t,children:n,onSubmit:r,loading:o=!1,submitLoading:i=!1,formState:a}){return W(uA,{...a,children:xt("form",{className:"kdpa-form-container",onSubmit:a.handleSubmit(r),style:{...t,...e},children:[o?W(us,{}):n,i&&W("div",{className:"kdpa-form-container__loading",children:W(us,{})})]})})}function o6({name:e="",rules:t={},options:n,multiple:r=!1,defaultValue:o,valueField:i,labelField:a,loading:s=!1,getOptionValue:c,getOptionImage:f,basePathImages:p,imageSize:m="md",...b}){const{control:y,setValue:w,getValues:S}=Zp(),k=Zr(()=>{if(!o)return r?[]:null;if(r)if(i&&a){const R=o[i],_=o[a];return!_||!R?[]:R?.map((V,K)=>{const U={[a]:_[K],[i]:V};return i==="EnumTitle"&&(U.id=V),U})}else return[];else return o},[]),{field:O,fieldState:{error:E}}=Jp({control:y,name:e,rules:t,shouldUnregister:!0,defaultValue:k});wn(()=>{o&&w(e,k)},[k]);function N(...R){O.onChange(R[1]),b?.onChange?.(R[1])}return xt(no,{children:[W(pg,{...O,...b,getOptionKey:c,defaultValue:k,multiple:r,options:n,renderOption:f?(R,_)=>{const F=f(_);return cn("div",{...R,key:c?.(_),style:{padding:"10px",cursor:"pointer",display:"flex",flexDirection:"row",gap:"8px"}},W("img",{src:(p?.basePathStream??"")+F,style:{maxWidth:m==="lg"?"100px":m==="md"?"75px":"50px"}}),b.getOptionLabel?.(_))}:void 0,onChange:N,renderInput:R=>cn(rh,{...R,size:"small",key:b?.key,placeholder:b?.placeholder,variant:b?.variant,label:b.label,error:!!E,required:!!b?.required,helperText:E?void 0:b?.helperText,InputProps:{...R.InputProps,...b?.InputProps,endAdornment:xt(no,{children:[s?W(us,{color:"inherit",size:20}):null,R.InputProps.endAdornment]})}})}),E&&E.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:E.message})]})}function qke({onScrollEnd:e,onSearch:t,limitCharacterSearch:n=3,delaySearch:r=700,...o}){let i,a;function s(m,b,y){clearTimeout(i),clearTimeout(a),b.length===0&&(a=setTimeout(()=>{t&&t(b)},350)),b.length>=n&&(i=setTimeout(()=>{t&&t(b)},r))}const c=Wt(null),f=Wt(0),p=m=>{const b=m.target;f.current!==b.scrollTop&&(f.current=b.scrollTop,b.scrollTop+b.clientHeight===b.scrollHeight&&!o?.loading&&e&&e())};return wn(()=>{c.current&&(c.current.scrollTop=f.current)},[o?.options]),W(o6,{...o,onInputChange:s,ListboxComponent:m=>W("ul",{onScroll:p,ref:b=>{c.current=b},...m,style:{maxHeight:"200px"},children:m.children})})}function Zke({name:e="",rules:t={},options:n,multiple:r=!1,defaultValueKey:o="",defaultValue:i="",...a}){const{control:s}=Zp(),c=Zr(()=>r&&Array.isArray(i)?n?.filter(b=>i.includes(b[o])):n?.find(b=>b[o]===i),[n,i]),{field:f,fieldState:{error:p}}=Jp({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:c});function m(...b){f.onChange(b[1]),a?.onChange?.(b[1])}return xt(no,{children:[W($7,{...f,...a,error:!!p,multiple:r,options:n,onChange:m}),p&&p.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:p.message})]})}const Jke=()=>{const e=({data:r,getOptionLabel:o=c=>c.label,getOptionIcon:i=c=>c.icon,getOptionValue:a=c=>c.value,getOptionParent:s=c=>c.parent})=>{const c=[];return r?.forEach(f=>{a(f)&&c.push({value:a(f),label:xt(no,{children:[i(f),o(f)]}),parent:s(f)})}),c},t=(r=[],o)=>{const i=[];for(const a of r){const s=a;if(!o&&!s?.parent||s?.parent===o){const c=t(r,s.value);c.length>0&&(s.children=c),i.push(s)}}return i},n=(r,o)=>{const i=[];if(!o)return[];const a=r.find(s=>s.value===o);return a&&(i.push(a.value),i.push(...n(r,a.parent))),i};return{renderTreeToSpecificFieldName:e,buildTree:t,findAllExpanded:n}};function Qke({data:e,defaultValue:t=[],onExpand:n,multiSelect:r=!0,getOptionValue:o,getOptionIcon:i,getOptionLabel:a,getOptionParent:s,noDataText:c="no data",...f}){const p=Wr(),{buildTree:m,renderTreeToSpecificFieldName:b,findAllExpanded:y}=Jke(),w=b({data:e,getOptionLabel:a,getOptionIcon:i,getOptionValue:o,getOptionParent:s}),S=m(w),[k,O]=_n([]),[E,N]=_n([S?.[0]?.value]);wn(()=>{if(t)if(typeof t=="string")N(y(w,t)),O([t]);else{const F=[];t.forEach(V=>{F.push(...y(w,V))}),N(F),O([...t])}},[]),wn(()=>{f?.onChange&&(r?f.onChange(k):f.onChange(k[0]))},[k]);function R(F,V){if(r)O(F);else if(V.isLeaf){const K=!!k.find(U=>U===V.value);O(K?[]:[V.value])}}function _(F,V){n&&n(F,V),N(F)}return W("div",{className:"KdTreeField",children:S?.length>0?W(D5,{...f,icons:{leaf:W("span",{}),parentOpen:W("span",{}),parentClose:W("span",{}),check:W(J4,{size:24,color:p?.palette?.primary?.main}),expandOpen:W(G4,{size:24}),uncheck:W(Z4,{size:24}),expandClose:W(q4,{size:24}),halfCheck:W(Q4,{color:p?.palette?.primary?.main,size:24})},nodes:S,onCheck:R,checked:k,expanded:E,onExpand:_,showNodeIcon:!0}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})}function eEe({name:e="",rules:t={},options:n,getOptionValue:r=s=>s.value,defaultValue:o,split:i,...a}){const{control:s,setValue:c}=Zp(),f=Zr(()=>o||null,[o]);wn(()=>{c(e,f)},[f]);const{field:p,fieldState:{error:m}}=Jp({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:f});function b(...y){i&&i?.length>0?(p.onChange(y[1]?.join(i)),a?.onChange?.(y[1]?.join(i))):(p.onChange(y[1]),a?.onChange?.(y[1]))}return xt(no,{children:[W(pg,{...p,...a,value:i&&i?.length>0?p?.value?.split(i):p?.value,error:!!m,multiple:!0,freeSolo:!0,options:n?.map(y=>r(y))??[],onChange:b}),m&&m.message&&W(Ha,{variant:"caption",sx:{color:"red"},children:m.message})]})}var i6={exports:{}};/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */(function(e,t){(function(n,r){e.exports=r()})(Ho,function(){const{entries:n,setPrototypeOf:r,isFrozen:o,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:s,seal:c,create:f}=Object,{apply:p,construct:m}=typeof Reflect<"u"&&Reflect;s||(s=function(Ce){return Ce}),c||(c=function(Ce){return Ce}),p||(p=function(Ce,Oe,Ue){return Ce.apply(Oe,Ue)}),m||(m=function(Ce,Oe){return new Ce(...Oe)});const b=K(Array.prototype.forEach),y=K(Array.prototype.pop),w=K(Array.prototype.push),S=K(String.prototype.toLowerCase),k=K(String.prototype.toString),O=K(String.prototype.match),E=K(String.prototype.replace),N=K(String.prototype.indexOf),R=K(String.prototype.trim),_=K(Object.prototype.hasOwnProperty),F=K(RegExp.prototype.test),V=U(TypeError);function K($e){return function(Ce){for(var Oe=arguments.length,Ue=new Array(Oe>1?Oe-1:0),ht=1;ht<Oe;ht++)Ue[ht-1]=arguments[ht];return p($e,Ce,Ue)}}function U($e){return function(){for(var Ce=arguments.length,Oe=new Array(Ce),Ue=0;Ue<Ce;Ue++)Oe[Ue]=arguments[Ue];return m($e,Oe)}}function J($e,Ce){let Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S;r&&r($e,null);let Ue=Ce.length;for(;Ue--;){let ht=Ce[Ue];if(typeof ht=="string"){const Ze=Oe(ht);Ze!==ht&&(o(Ce)||(Ce[Ue]=Ze),ht=Ze)}$e[ht]=!0}return $e}function X($e){for(let Ce=0;Ce<$e.length;Ce++)_($e,Ce)||($e[Ce]=null);return $e}function ne($e){const Ce=f(null);for(const[Oe,Ue]of n($e))_($e,Oe)&&(Array.isArray(Ue)?Ce[Oe]=X(Ue):Ue&&typeof Ue=="object"&&Ue.constructor===Object?Ce[Oe]=ne(Ue):Ce[Oe]=Ue);return Ce}function ie($e,Ce){for(;$e!==null;){const Ue=a($e,Ce);if(Ue){if(Ue.get)return K(Ue.get);if(typeof Ue.value=="function")return K(Ue.value)}$e=i($e)}function Oe(){return null}return Oe}const te=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),re=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),de=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),le=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ce=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ve=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fe=s(["#text"]),Te=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Re=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),je=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),me=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Pe=c(/<%[\w\W]*|[\w\W]*%>/gm),Me=c(/\${[\w\W]*}/gm),_e=c(/^data-[\-\w.\u00B7-\uFFFF]/),Be=c(/^aria-[\-\w]+$/),Le=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ne=c(/^(?:\w+script|data):/i),Ee=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),He=c(/^html$/i);var Ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:me,ERB_EXPR:Pe,TMPLIT_EXPR:Me,DATA_ATTR:_e,ARIA_ATTR:Be,IS_ALLOWED_URI:Le,IS_SCRIPT_OR_DATA:Ne,ATTR_WHITESPACE:Ee,DOCTYPE_NAME:He});const Qe=function(){return typeof window>"u"?null:window},et=function(Ce,Oe){if(typeof Ce!="object"||typeof Ce.createPolicy!="function")return null;let Ue=null;const ht="data-tt-policy-suffix";Oe&&Oe.hasAttribute(ht)&&(Ue=Oe.getAttribute(ht));const Ze="dompurify"+(Ue?"#"+Ue:"");try{return Ce.createPolicy(Ze,{createHTML(pt){return pt},createScriptURL(pt){return pt}})}catch{return console.warn("TrustedTypes policy "+Ze+" could not be created."),null}};function ot(){let $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qe();const Ce=On=>ot(On);if(Ce.version="3.0.9",Ce.removed=[],!$e||!$e.document||$e.document.nodeType!==9)return Ce.isSupported=!1,Ce;let{document:Oe}=$e;const Ue=Oe,ht=Ue.currentScript,{DocumentFragment:Ze,HTMLTemplateElement:pt,Node:ut,Element:Ct,NodeFilter:Je,NamedNodeMap:qe=$e.NamedNodeMap||$e.MozNamedAttrMap,HTMLFormElement:it,DOMParser:vt,trustedTypes:Lt}=$e,Et=Ct.prototype,Mt=ie(Et,"cloneNode"),lt=ie(Et,"nextSibling"),mt=ie(Et,"childNodes"),$t=ie(Et,"parentNode");if(typeof pt=="function"){const On=Oe.createElement("template");On.content&&On.content.ownerDocument&&(Oe=On.content.ownerDocument)}let zt,an="";const{implementation:sn,createNodeIterator:Cn,createDocumentFragment:An,getElementsByTagName:Dn}=Oe,{importNode:Ke}=Ue;let we={};Ce.isSupported=typeof n=="function"&&typeof $t=="function"&&sn&&sn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:dt,ERB_EXPR:Ye,TMPLIT_EXPR:Ot,DATA_ATTR:Vt,ARIA_ATTR:Dt,IS_SCRIPT_OR_DATA:We,ATTR_WHITESPACE:De}=Ie;let{IS_ALLOWED_URI:Ge}=Ie,st=null;const Tt=J({},[...te,...re,...de,...ce,...fe]);let kt=null;const gn=J({},[...Te,...Re,...je,...ke]);let nn=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ln=null,Zt=null,ft=!0,Ae=!0,rt=!1,St=!0,Ft=!1,Nt=!1,ae=!1,l=!1,u=!1,h=!1,g=!1,v=!0,x=!1;const C="user-content-";let T=!0,D=!1,I={},L=null;const $=J({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Y=null;const q=J({},["audio","video","img","source","image","track"]);let Q=null;const oe=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ye="http://www.w3.org/2000/svg",P="http://www.w3.org/1999/xhtml";let z=P,Z=!1,ue=null;const be=J({},[he,ye,P],k);let xe=null;const Fe=["application/xhtml+xml","text/html"],Ve="text/html";let at=null,yt=null;const gt=Oe.createElement("form"),Ht=function(ct){return ct instanceof RegExp||ct instanceof Function},Jt=function(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yt&&yt===ct)){if((!ct||typeof ct!="object")&&(ct={}),ct=ne(ct),xe=Fe.indexOf(ct.PARSER_MEDIA_TYPE)===-1?Ve:ct.PARSER_MEDIA_TYPE,at=xe==="application/xhtml+xml"?k:S,st=_(ct,"ALLOWED_TAGS")?J({},ct.ALLOWED_TAGS,at):Tt,kt=_(ct,"ALLOWED_ATTR")?J({},ct.ALLOWED_ATTR,at):gn,ue=_(ct,"ALLOWED_NAMESPACES")?J({},ct.ALLOWED_NAMESPACES,k):be,Q=_(ct,"ADD_URI_SAFE_ATTR")?J(ne(oe),ct.ADD_URI_SAFE_ATTR,at):oe,Y=_(ct,"ADD_DATA_URI_TAGS")?J(ne(q),ct.ADD_DATA_URI_TAGS,at):q,L=_(ct,"FORBID_CONTENTS")?J({},ct.FORBID_CONTENTS,at):$,ln=_(ct,"FORBID_TAGS")?J({},ct.FORBID_TAGS,at):{},Zt=_(ct,"FORBID_ATTR")?J({},ct.FORBID_ATTR,at):{},I=_(ct,"USE_PROFILES")?ct.USE_PROFILES:!1,ft=ct.ALLOW_ARIA_ATTR!==!1,Ae=ct.ALLOW_DATA_ATTR!==!1,rt=ct.ALLOW_UNKNOWN_PROTOCOLS||!1,St=ct.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=ct.SAFE_FOR_TEMPLATES||!1,Nt=ct.WHOLE_DOCUMENT||!1,u=ct.RETURN_DOM||!1,h=ct.RETURN_DOM_FRAGMENT||!1,g=ct.RETURN_TRUSTED_TYPE||!1,l=ct.FORCE_BODY||!1,v=ct.SANITIZE_DOM!==!1,x=ct.SANITIZE_NAMED_PROPS||!1,T=ct.KEEP_CONTENT!==!1,D=ct.IN_PLACE||!1,Ge=ct.ALLOWED_URI_REGEXP||Le,z=ct.NAMESPACE||P,nn=ct.CUSTOM_ELEMENT_HANDLING||{},ct.CUSTOM_ELEMENT_HANDLING&&Ht(ct.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nn.tagNameCheck=ct.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ct.CUSTOM_ELEMENT_HANDLING&&Ht(ct.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nn.attributeNameCheck=ct.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ct.CUSTOM_ELEMENT_HANDLING&&typeof ct.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nn.allowCustomizedBuiltInElements=ct.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Ae=!1),h&&(u=!0),I&&(st=J({},fe),kt=[],I.html===!0&&(J(st,te),J(kt,Te)),I.svg===!0&&(J(st,re),J(kt,Re),J(kt,ke)),I.svgFilters===!0&&(J(st,de),J(kt,Re),J(kt,ke)),I.mathMl===!0&&(J(st,ce),J(kt,je),J(kt,ke))),ct.ADD_TAGS&&(st===Tt&&(st=ne(st)),J(st,ct.ADD_TAGS,at)),ct.ADD_ATTR&&(kt===gn&&(kt=ne(kt)),J(kt,ct.ADD_ATTR,at)),ct.ADD_URI_SAFE_ATTR&&J(Q,ct.ADD_URI_SAFE_ATTR,at),ct.FORBID_CONTENTS&&(L===$&&(L=ne(L)),J(L,ct.FORBID_CONTENTS,at)),T&&(st["#text"]=!0),Nt&&J(st,["html","head","body"]),st.table&&(J(st,["tbody"]),delete ln.tbody),ct.TRUSTED_TYPES_POLICY){if(typeof ct.TRUSTED_TYPES_POLICY.createHTML!="function")throw V('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ct.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw V('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');zt=ct.TRUSTED_TYPES_POLICY,an=zt.createHTML("")}else zt===void 0&&(zt=et(Lt,ht)),zt!==null&&typeof an=="string"&&(an=zt.createHTML(""));s&&s(ct),yt=ct}},rn=J({},["mi","mo","mn","ms","mtext"]),Tn=J({},["foreignobject","desc","title","annotation-xml"]),$n=J({},["title","style","font","a","script"]),Rn=J({},[...re,...de,...le]),Wn=J({},[...ce,...ve]),Gn=function(ct){let Xt=$t(ct);(!Xt||!Xt.tagName)&&(Xt={namespaceURI:z,tagName:"template"});const Pn=S(ct.tagName),Or=S(Xt.tagName);return ue[ct.namespaceURI]?ct.namespaceURI===ye?Xt.namespaceURI===P?Pn==="svg":Xt.namespaceURI===he?Pn==="svg"&&(Or==="annotation-xml"||rn[Or]):!!Rn[Pn]:ct.namespaceURI===he?Xt.namespaceURI===P?Pn==="math":Xt.namespaceURI===ye?Pn==="math"&&Tn[Or]:!!Wn[Pn]:ct.namespaceURI===P?Xt.namespaceURI===ye&&!Tn[Or]||Xt.namespaceURI===he&&!rn[Or]?!1:!Wn[Pn]&&($n[Pn]||!Rn[Pn]):!!(xe==="application/xhtml+xml"&&ue[ct.namespaceURI]):!1},pr=function(ct){w(Ce.removed,{element:ct});try{ct.parentNode.removeChild(ct)}catch{ct.remove()}},zr=function(ct,Xt){try{w(Ce.removed,{attribute:Xt.getAttributeNode(ct),from:Xt})}catch{w(Ce.removed,{attribute:null,from:Xt})}if(Xt.removeAttribute(ct),ct==="is"&&!kt[ct])if(u||h)try{pr(Xt)}catch{}else try{Xt.setAttribute(ct,"")}catch{}},Co=function(ct){let Xt=null,Pn=null;if(l)ct="<remove></remove>"+ct;else{const go=O(ct,/^[\r\n\t ]+/);Pn=go&&go[0]}xe==="application/xhtml+xml"&&z===P&&(ct='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ct+"</body></html>");const Or=zt?zt.createHTML(ct):ct;if(z===P)try{Xt=new vt().parseFromString(Or,xe)}catch{}if(!Xt||!Xt.documentElement){Xt=sn.createDocument(z,"template",null);try{Xt.documentElement.innerHTML=Z?an:Or}catch{}}const to=Xt.body||Xt.documentElement;return ct&&Pn&&to.insertBefore(Oe.createTextNode(Pn),to.childNodes[0]||null),z===P?Dn.call(Xt,Nt?"html":"body")[0]:Nt?Xt.documentElement:to},Bo=function(ct){return Cn.call(ct.ownerDocument||ct,ct,Je.SHOW_ELEMENT|Je.SHOW_COMMENT|Je.SHOW_TEXT,null)},Hr=function(ct){return ct instanceof it&&(typeof ct.nodeName!="string"||typeof ct.textContent!="string"||typeof ct.removeChild!="function"||!(ct.attributes instanceof qe)||typeof ct.removeAttribute!="function"||typeof ct.setAttribute!="function"||typeof ct.namespaceURI!="string"||typeof ct.insertBefore!="function"||typeof ct.hasChildNodes!="function")},Ur=function(ct){return typeof ut=="function"&&ct instanceof ut},fn=function(ct,Xt,Pn){we[ct]&&b(we[ct],Or=>{Or.call(Ce,Xt,Pn,yt)})},Fn=function(ct){let Xt=null;if(fn("beforeSanitizeElements",ct,null),Hr(ct))return pr(ct),!0;const Pn=at(ct.nodeName);if(fn("uponSanitizeElement",ct,{tagName:Pn,allowedTags:st}),ct.hasChildNodes()&&!Ur(ct.firstElementChild)&&F(/<[/\w]/g,ct.innerHTML)&&F(/<[/\w]/g,ct.textContent))return pr(ct),!0;if(!st[Pn]||ln[Pn]){if(!ln[Pn]&&Gr(Pn)&&(nn.tagNameCheck instanceof RegExp&&F(nn.tagNameCheck,Pn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Pn)))return!1;if(T&&!L[Pn]){const Or=$t(ct)||ct.parentNode,to=mt(ct)||ct.childNodes;if(to&&Or){const go=to.length;for(let Vo=go-1;Vo>=0;--Vo)Or.insertBefore(Mt(to[Vo],!0),lt(ct))}}return pr(ct),!0}return ct instanceof Ct&&!Gn(ct)||(Pn==="noscript"||Pn==="noembed"||Pn==="noframes")&&F(/<\/no(script|embed|frames)/i,ct.innerHTML)?(pr(ct),!0):(Ft&&ct.nodeType===3&&(Xt=ct.textContent,b([dt,Ye,Ot],Or=>{Xt=E(Xt,Or," ")}),ct.textContent!==Xt&&(w(Ce.removed,{element:ct.cloneNode()}),ct.textContent=Xt)),fn("afterSanitizeElements",ct,null),!1)},Br=function(ct,Xt,Pn){if(v&&(Xt==="id"||Xt==="name")&&(Pn in Oe||Pn in gt))return!1;if(!(Ae&&!Zt[Xt]&&F(Vt,Xt))){if(!(ft&&F(Dt,Xt))){if(!kt[Xt]||Zt[Xt]){if(!(Gr(ct)&&(nn.tagNameCheck instanceof RegExp&&F(nn.tagNameCheck,ct)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(ct))&&(nn.attributeNameCheck instanceof RegExp&&F(nn.attributeNameCheck,Xt)||nn.attributeNameCheck instanceof Function&&nn.attributeNameCheck(Xt))||Xt==="is"&&nn.allowCustomizedBuiltInElements&&(nn.tagNameCheck instanceof RegExp&&F(nn.tagNameCheck,Pn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Pn))))return!1}else if(!Q[Xt]){if(!F(Ge,E(Pn,De,""))){if(!((Xt==="src"||Xt==="xlink:href"||Xt==="href")&&ct!=="script"&&N(Pn,"data:")===0&&Y[ct])){if(!(rt&&!F(We,E(Pn,De,"")))){if(Pn)return!1}}}}}}return!0},Gr=function(ct){return ct!=="annotation-xml"&&ct.indexOf("-")>0},Vr=function(ct){fn("beforeSanitizeAttributes",ct,null);const{attributes:Xt}=ct;if(!Xt)return;const Pn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};let Or=Xt.length;for(;Or--;){const to=Xt[Or],{name:go,namespaceURI:Vo,value:sa}=to,is=at(go);let Go=go==="value"?sa:R(sa);if(Pn.attrName=is,Pn.attrValue=Go,Pn.keepAttr=!0,Pn.forceKeepAttr=void 0,fn("uponSanitizeAttribute",ct,Pn),Go=Pn.attrValue,Pn.forceKeepAttr||(zr(go,ct),!Pn.keepAttr))continue;if(!St&&F(/\/>/i,Go)){zr(go,ct);continue}Ft&&b([dt,Ye,Ot],of=>{Go=E(Go,of," ")});const rf=at(ct.nodeName);if(Br(rf,is,Go)){if(x&&(is==="id"||is==="name")&&(zr(go,ct),Go=C+Go),zt&&typeof Lt=="object"&&typeof Lt.getAttributeType=="function"&&!Vo)switch(Lt.getAttributeType(rf,is)){case"TrustedHTML":{Go=zt.createHTML(Go);break}case"TrustedScriptURL":{Go=zt.createScriptURL(Go);break}}try{Vo?ct.setAttributeNS(Vo,go,Go):ct.setAttribute(go,Go),y(Ce.removed)}catch{}}}fn("afterSanitizeAttributes",ct,null)},Ls=function On(ct){let Xt=null;const Pn=Bo(ct);for(fn("beforeSanitizeShadowDOM",ct,null);Xt=Pn.nextNode();)fn("uponSanitizeShadowNode",Xt,null),!Fn(Xt)&&(Xt.content instanceof Ze&&On(Xt.content),Vr(Xt));fn("afterSanitizeShadowDOM",ct,null)};return Ce.sanitize=function(On){let ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xt=null,Pn=null,Or=null,to=null;if(Z=!On,Z&&(On="<!-->"),typeof On!="string"&&!Ur(On))if(typeof On.toString=="function"){if(On=On.toString(),typeof On!="string")throw V("dirty is not a string, aborting")}else throw V("toString is not a function");if(!Ce.isSupported)return On;if(ae||Jt(ct),Ce.removed=[],typeof On=="string"&&(D=!1),D){if(On.nodeName){const sa=at(On.nodeName);if(!st[sa]||ln[sa])throw V("root node is forbidden and cannot be sanitized in-place")}}else if(On instanceof ut)Xt=Co("<!---->"),Pn=Xt.ownerDocument.importNode(On,!0),Pn.nodeType===1&&Pn.nodeName==="BODY"||Pn.nodeName==="HTML"?Xt=Pn:Xt.appendChild(Pn);else{if(!u&&!Ft&&!Nt&&On.indexOf("<")===-1)return zt&&g?zt.createHTML(On):On;if(Xt=Co(On),!Xt)return u?null:g?an:""}Xt&&l&&pr(Xt.firstChild);const go=Bo(D?On:Xt);for(;Or=go.nextNode();)Fn(Or)||(Or.content instanceof Ze&&Ls(Or.content),Vr(Or));if(D)return On;if(u){if(h)for(to=An.call(Xt.ownerDocument);Xt.firstChild;)to.appendChild(Xt.firstChild);else to=Xt;return(kt.shadowroot||kt.shadowrootmode)&&(to=Ke.call(Ue,to,!0)),to}let Vo=Nt?Xt.outerHTML:Xt.innerHTML;return Nt&&st["!doctype"]&&Xt.ownerDocument&&Xt.ownerDocument.doctype&&Xt.ownerDocument.doctype.name&&F(He,Xt.ownerDocument.doctype.name)&&(Vo="<!DOCTYPE "+Xt.ownerDocument.doctype.name+`>
|
|
561
561
|
`+Vo),Ft&&b([dt,Ye,Ot],sa=>{Vo=E(Vo,sa," ")}),zt&&g?zt.createHTML(Vo):Vo},Ce.setConfig=function(){let On=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jt(On),ae=!0},Ce.clearConfig=function(){yt=null,ae=!1},Ce.isValidAttribute=function(On,ct,Xt){yt||Jt({});const Pn=at(On),Or=at(ct);return Br(Pn,Or,Xt)},Ce.addHook=function(On,ct){typeof ct=="function"&&(we[On]=we[On]||[],w(we[On],ct))},Ce.removeHook=function(On){if(we[On])return y(we[On])},Ce.removeHooks=function(On){we[On]&&(we[On]=[])},Ce.removeAllHooks=function(){we={}},Ce}var ze=ot();return ze})})(i6);var tEe=i6.exports,nEe=fo(tEe);const rEe=(e,t)=>{if(!e)return e;switch(t.type){case"string":return oEe(e,t);case"number":return aEe(e,t);case"date":return sEe(e,t);case"time":return lEe(e,t);case"boolean":return cEe(e);case"html":return uEe(e,t);default:return e}},oEe=(e,t)=>t.maxLength&&typeof t.maxLength!="number"?e:iEe(String(e),t.maxLength),iEe=(e,t)=>t&&e.length>t?W(no,{children:e.substring(0,t)+" ..."}):W(no,{children:e}),aEe=(e,t)=>{switch(t.typeNumber){case"int":return parseInt(String(e));case"float":return parseFloat(String(e));case"cost":{if(Number.isNaN(parseFloat(String(e))))return e;const n=String(e),[r,o]=n.split("."),i=r.replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?`${i}.${o}`:i}default:return parseFloat(e)}},sEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Date value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Date value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"YYYY/MM/DD",en:"YYYY-MM-DD",ar:"YYYY/MM/DD"},a=t.format||(i[o]??"YYYY/MM/DD");let s;try{s=$E(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Date value is not a valid date (jalali moment)"),e}return s},lEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Time value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Time value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"HH:mm:ss",en:"hh:mm:ss a",ar:"hh:mm:ss a"},a=t.formatTime||(i[o]??"HH:mm:ss");let s;try{s=$E(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Time value is not a valid date (jalali moment)"),e}return s},cEe=e=>e?"true":"false",uEe=(e,t)=>{if(typeof e!="string")return e;const n=nEe.sanitize(e,{USE_PROFILES:{html:!0}});return W("div",{dangerouslySetInnerHTML:{__html:t.ignoreTags?n:e}})},dEe=({type:e="string",...t})=>{const n={type:e,maxLength:t.maxLength,typeNumber:t.typeNumber,format:t.format,formatTime:t.formatTime,loc:t.loc,ignoreTags:t.ignoreTags??!0};return W(Ha,{...t,children:rEe(t.children,n)})};function fEe(e,t){if(t){let n=[];return e.image&&(e.image==="ALL"?n=n.concat(t.image):n=n.concat(e?.image?.filter(r=>t?.image?.includes(r)))),e.video&&(e.video==="ALL"?n=n.concat(t.video):n=n.concat(e?.video?.filter(r=>t?.video?.includes(r)))),e.text&&(e.text==="ALL"?n=n.concat(t.text):n=n.concat(e?.text?.filter(r=>t?.text?.includes(r)))),e.compress&&(e.compress==="ALL"?n=n.concat(t.compress):n=n.concat(e?.compress?.filter(r=>t?.compress?.includes(r)))),n.map(r=>`.${r}`).join(",")}else return"*"}const Ka={image:["jpg","jpeg","gif","png","svg","ico"],font:["ttf","eot","woff","woff2"],text:["doc","pdf","xls","ppt","txt","htm","docx","bmp","xlsx","pptx","tif","xml","epub","bpmn","cmmn","csv"],video:["mp4","wmv","mpg","divx","div","tix","qt","mov","avi","mpa","mpe","m1v","bmp"],compress:["zip","rar","tar","gz","tar.gz","tar.xz"]};function a6(e,t){return{thumbnail_URL:t?.[0]==="$"?`${e}${fl.upload}${wd.thumbnailTempPath}${t}`:`${e}${fl.upload}${wd.thumbnailstreamPath}${t}`,larg_URL:t?.[0]==="$"?`${e}${fl.upload}${wd.tempPath}${t}`:`${e}${fl.upload}${wd.streamPath}${t}`}}async function s6(e,t,n){if(!t||t.length===0)return[];try{const r={method:"GET",headers:{sessionId:n??""},credentials:"include"};return(await(await fetch(`${e}${fl.upload}${t?.[0]?.[0]==="$"?wd.restTempUrlFileProperty:wd.restStreamUrlFileProperty}${t.join(",")}`,r)).json())?.data}catch(r){return console.error("Error:",r),[]}}const fl={upload:"/upload/rest"},wd={streamPath:"/api/v1/fileupload/download/stream/",thumbnailstreamPath:"/api/v1/fileupload/thumbnail/stream/",tempPath:"/api/v1/fileupload/download/temp/",thumbnailTempPath:"/api/v1/fileupload/thumbnail/temp/",restStreamUrlFileProperty:"/api/v1/fileupload/property/stream/",restTempUrlFileProperty:"/api/v1/fileupload/property/temp/",exportPath:"/api/v1/export/download/"},Zx={pathFileUpload:"/api/v1/FileUpload/",pathForUploadCunk:"/api/v1/FileUpload/upload/session/",pathForGetFile:"/api/v1/FileUpload/upload/"},hEe="/auth/api/v1/bpmsCaptcha/image?rnd=";function pEe({label:e,defaultValue:t,placeholder:n,multiple:r=!1,accept:o,fileCountLimit:i,fileSizeLimit:a,onError:s,pathProp:c,inputStyle:f,style:p,required:m,...b}){const{files:y,removeFile:w,uploadingFiles:S,handleFileChange:k,fileExtension:O,APIURL:E}=UP({multiple:r,APIURL:c?.APIURL,sessionId:c?.sessionId,onError:s,fileSizeLimit:a,fileCountLimit:i}),[N,R]=_n([]);wn(()=>{(async()=>{if(t){const V=Array.isArray(t)?[...t]:[t],K=await s6(E,V,c?.sessionId);R(V.map(U=>({fileName:(K??[]).find(J=>J.guid===U)?.fileName,session:U})))}else R([])})()},[t]),wn(()=>{y&&(r?R(F=>[...F,...y.filter(V=>!N.find(K=>K.session===V.session)).map(V=>({fileName:V.fileName,session:V.session}))??[]]):y.length>0&&R([{fileName:y[0]?.fileName,session:y[0]?.session}]))},[y]),wn(()=>{b.onChange&&(r?b.onChange((N??[]).map(F=>F.session)):N.length>0?b.onChange(N[N.length-1]?.session):b.onChange())},[N]);const _=F=>{R(V=>V.filter(K=>K.session!==F)),y?.find(V=>V.session===F)&&w&&w(F)};return xt("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"10px",alignItems:"center",width:"100%",...p},children:[xt(Ha,{children:[e," ",m&&"*"]}),W("label",{htmlFor:`icon-button-file-${b.name}`,children:xt(mg,{component:"span",style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"5px",...f},children:[W(n6,{}),n]})}),W("input",{style:{display:"none"},accept:O&&o?fEe(o,O):"*",id:`icon-button-file-${b.name}`,type:"file",multiple:r,onChange:F=>{k(F,o)}}),W("input",{type:"hidden",...b,value:N?.map(F=>F.session)}),N&&N.map(F=>{const V=a6(E,F.session);return W(N2,{sessionId:F?.session,smallUrl:V.thumbnail_URL,mediumUrl:V.thumbnail_URL,largeUrl:V.larg_URL,fileName:F?.fileName,onDelete:_})}),S&&(r||N.length===0)&&S.map(F=>W(_2,{progress:F.progress}))]})}function mEe(e,t){if(t){const n={};return e.image&&(e.image==="ALL"?n["image/*"]=t.image.map(r=>`.${r}`):e.image.forEach(r=>{t?.image?.includes(r)&&(n["image/"+r]=["."+r])})),e.video&&(e.video==="ALL"?n["video/*"]=t.video.map(r=>`.${r}`):e.video.forEach(r=>{t?.video?.includes(r)&&(n["video/"+r]=["."+r])})),e.text&&(e.text==="ALL"?n["text/*"]=t.text.map(r=>`.${r}`):e.text.forEach(r=>{t?.text?.includes(r)&&(n["text/"+r]=["."+r])})),e.compress&&(e.compress==="ALL"?n["text/*"]=[...n["text/*"]??[],...t.compress.map(r=>`.${r}`)??[]]:e.compress.forEach(r=>{t?.compress?.includes(r)&&(n["text/"+r]=["."+r])})),n}else return"*"}const gEe=({label:e="\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0631\u0627 \u062F\u0631 \u0627\u06CC\u0646 \u062C\u0639\u0628\u0647 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u0631\u0648\u06CC \u062C\u0639\u0628\u0647 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",defaultValue:t,multiple:n=!1,accept:r,fileCountLimit:o,fileSizeLimit:i,onError:a,required:s,pathProp:c,...f})=>{const{files:p,removeFile:m,uploadingFiles:b,handleFileChange:y,fileExtension:w,APIURL:S}=UP({multiple:n,APIURL:c?.APIURL,sessionId:c?.sessionId,onError:a,fileSizeLimit:i,fileCountLimit:o}),[k,O]=_n([]);wn(()=>{(async()=>{if(t){const X=Array.isArray(t)?[...t]:[t],ne=await s6(S,X,c?.sessionId);O(X.map(ie=>({fileName:(ne??[]).find(te=>te.guid===ie)?.fileName,session:ie})))}else O([])})()},[t]),wn(()=>{p&&(n?O(J=>[...J,...p.filter(X=>!k.find(ne=>ne.session===X.session)).map(X=>({fileName:X.fileName,session:X.session}))??[]]):p.length>0&&O([{fileName:p[0]?.fileName,session:p[0]?.session}]))},[p]),wn(()=>{f.onChange&&(n?f.onChange((k??[]).map(J=>J.session)):k.length>0?f.onChange(k[k.length-1].session):f.onChange())},[k]);const E=Zn(J=>{y({target:{files:J}},r)},[]),N=J=>{O(X=>X.filter(ne=>ne.session!==J)),p?.find(X=>X.session===J)&&m&&m(J)},{getRootProps:R,getInputProps:_,isDragAccept:F,isDragReject:V,open:K,inputRef:U}=hT({onDropAccepted:E,accept:r?mEe(r,w??null):void 0,maxFiles:9999,noClick:!0,multiple:n});return wn(()=>{if(!U.current)return;const J=async X=>{const ne=X.clipboardData?.files;ne&&ne.length>0&&U.current&&(U.current.files=ne,U.current.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",J),()=>{document.removeEventListener("paste",J)}},[U]),W(Ni,{children:xt(Ni,{component:"section",sx:{mb:1,border:2,borderStyle:"dashed",borderRadius:3,borderColor:J=>J.palette.primary.main,transition:"all 0.3s ease-in-ease-out",...F&&{borderColor:J=>J.palette.success.main},...F&&{bgcolor:J=>J.palette.success.light},...V&&{borderColor:J=>J.palette.warning.main},...V&&{bgcolor:J=>J.palette.warning.light},...f.sx},...R(),children:[W("input",{..._()}),xt(Ni,{sx:{p:2,display:"flex",flexDirection:"column",justifyContent:"center"},children:[xt(Ha,{sx:{display:"flex",justifyContent:"center"},children:[e," ",s&&"*"]}),W(Ni,{sx:{display:"flex",justifyContent:"center"},children:W(za,{sx:{color:J=>J.palette.primary.main,...F&&{color:J=>J.palette.success.main},...V&&{color:J=>J.palette.warning.main}},onClick:K,children:W(e5,{size:45})})}),W(oT,{in:k?.length!==0||b?.length!==0,children:xt("div",{style:{display:"flex",flexDirection:"row",gap:"10px",flexWrap:"wrap"},children:[k&&k.map(J=>{const X=a6(S,J.session);return W(N2,{sessionId:J.session,smallUrl:X.thumbnail_URL,mediumUrl:X.thumbnail_URL,largeUrl:X.larg_URL,fileName:J.fileName,onDelete:N})}),b&&(n||k.length===0)&&b.map(J=>W(_2,{progress:J.progress}))]})})]})]})})};function vEe(e,t,n,r){const o=Array.from(new Set(e.map(s=>s[t])));return o.length===1&&o[0]===void 0?{series:[],uniqueCategoryArray:[]}:{series:Array.from(new Set(e.map(s=>s[n]))).map(s=>({name:s,data:o.map(c=>{const f=e.find(p=>p[n]===s&&p[t]===c);return f&&!Number.isNaN(parseInt(f[r]))?parseInt(f[r]):0})})),uniqueCategoryArray:o}}var l6={},R2={exports:{}};/*!
|
|
562
562
|
* ApexCharts v3.46.0
|
|
563
563
|
* (c) 2018-2024 ApexCharts
|
|
@@ -5,7 +5,8 @@ export interface KdpaUploadedFileProps {
|
|
|
5
5
|
onDelete: (session: string) => void;
|
|
6
6
|
smallUrl: string;
|
|
7
7
|
mediumUrl?: string;
|
|
8
|
-
largeUrl
|
|
8
|
+
largeUrl?: string;
|
|
9
|
+
modal?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export default function KdpaUploadedFile({ sessionId, fileName, onDelete, smallUrl, mediumUrl, largeUrl, }: KdpaUploadedFileProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default function KdpaUploadedFile({ sessionId, fileName, onDelete, smallUrl, mediumUrl, largeUrl, modal, }: KdpaUploadedFileProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
//# sourceMappingURL=KdpaUploadedFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KdpaUploadedFile.d.ts","sourceRoot":"","sources":["../../../../src/components/UploadedFile/KdpaUploadedFile.tsx"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"KdpaUploadedFile.d.ts","sourceRoot":"","sources":["../../../../src/components/UploadedFile/KdpaUploadedFile.tsx"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,KAAY,GACb,EAAE,qBAAqB,2CAoDvB"}
|