@inntechcorp/it-design 3.1.20 → 3.1.22
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/enums/enum.d.ts +2 -1
- package/dist/form/validation/Validator.d.ts +1 -0
- package/dist/global.css +0 -5
- package/dist/index.cjs.js +153 -155
- package/dist/index.d.ts +5 -1
- package/dist/index.esm.js +163 -165
- package/dist/locales/en/itd.json +2 -1
- package/dist/locales/itd.json +2 -1
- package/dist/locales/tr/itd.json +2 -1
- package/dist/types/FormProps.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("i18next"),t=require("react-i18next"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-dom"),i=require("react-transition-group"),a=require("react-router-dom"),s=require("axios"),l=require("styled-components"),d=require("dayjs"),c=require("dayjs/plugin/customParseFormat"),u=require("dayjs/plugin/localizedFormat"),p=require("react-nanny"),f=require("sonner");function h(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var g,m,b,x,v,y,w,A,k,S=h(n),_={success:"Başarılı",error:"Hata",table:{noData:"Veri Yok"},placeholders:{username:"Kullanıcı adı",email:"E-Posta",password:"Şifre",confirmPassword:"Şifre tekrar",typeYourNoteHere:"Notunuzu buraya yazınız",selectGender:"Cinsiyet Seçin",selectCurrency:"Para Birimi Seçin",selectLanguage:"Dil Seçin",selectCountry:"Ülke Seçin",birthday:"Doğum Tarihi",multipleSelection:"Seçili ({{- count}})"},options:{all:"Hepsi",male:"Erkek",female:"Kadın",languages:{turkish:"Türkçe",english:"İngilizce"},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"}},buttons:{submit:"Gönder",reset:"Temizle"},errors:{required:"Bu alan zorunludur!",minLength:"En az {{- length}} karakter olmalıdır",maxLength:"Çok uzun. Maks uzunluk {{- length}} karakter olmalıdır.",exactLength:"This field must be {{- length}} characters long.",passwordRule:"Şifreniz en az 8 harf olmalı, bir rakam, bir büyük ve bir küçük harf, bir özel karakter içermeli ve boşluk kullanılmamalıdır.",invalidEmailAddress:"Geçersiz e-posta adresi",passwordsDontMatch:"Girdiğiniz şifreler birbirleriyle uyuşmuyor!",usernameRule:"Sadece İngilizce harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine izin verilmez.",wrongTCIdentity:"TC Kimlik Numarası Yanlış",fieldMustBeTheSame:"Bu alan şunlarla aynı olmalıdır: {{- fields}}",siteUsernameRule:"Sadece İngilizce küçük harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine ve büyük harflere izin verilmez.",adminUsernameRule:"Sadece ingilizce harflerden ve rakamlardan oluşmalıdır. Semboller (-_. vs) ve boşluk karakteri kullanılamaz.",invalidURL:"Geçersiz URL",fieldMustBeDifferent:"Bu alan şunlarla aynı olmamalıdır: {{- fields}}",forbiddenWords:"Bu alan içerisinde bu kelimeyi kullanamazsınız."},uploader:{header:"Bir resmi sürükleyip bırakın",hint:"ya da bir dosya seçmek için tıklayın.",fileUploading:"Dosya yükleniyor...",info:"Toplam: {{- total}} - {{- estimated}} sn kaldı.",delete:"Sil",preview:"Önizleme",error:"Hata",fileFormatError:"Yalnızca {{fileFormat}} dosyası yükleyebilirsiniz.",fileSizeError:"Dosya boyutu {{fileSize}}'den küçük olmalıdır.",fileUploadSuccess:"Dosya başarıyla yüklendi.",fileUploadFailed:"Dosya yüklenemedi!",removeFileSuccess:"Dosya başarıyla silindi!",browserDoesntSupportDND:"Tarayıcı taşı&bırak özelliğini desteklemiyor!",calculating:"Hesaplanıyor...",removeFile:"Dosya Silme",areYouSureToDeleteThisFile:"Bu dosyayı silmek istediğinize emin misiniz?",yes:"Evet",no:"Hayır",cropImage:"Görseli Kırp",crop:"Kırp",cancel:"İptal",width:"genişlik",height:"yükseklik",imageTooSmall:"Görsel Çok Küçük",imageTooSmallMessage:"Minimum gerekli boyut {{required}}. Görseliniz {{actual}}."},results:{authentication:{title:"Üye Girişi Gerekiyor",subtitle:"Bu bölüme ulaşmanız için üye girişi yapmanız gerekiyor. Aşağıdaki tuşa tıklayarak lütfen üye girişi yapınız.",button:"GİRİŞ YAP"}},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"},countries:{af:"Afganistan",al:"Arnavutluk",dz:"Cezayir",ad:"Andorra",ao:"Angola",ag:"Antigua ve Barbuda",ar:"Arjantin",am:"Ermenistan",au:"Avustralya",at:"Avusturya",az:"Azerbaycan",bs:"Bahamalar",bh:"Bahreyn",bd:"Bangladeş",bb:"Barbados",by:"Beyaz Rusya",be:"Belçika",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivya",ba:"Bosna-Hersek",bw:"Botsvana",br:"Brezilya",bn:"Brunei",bg:"Bulgaristan",bf:"Burkina Faso",bi:"Burundi",cv:"Yeşil Burun Adaları",kh:"Kamboçya",cm:"Kamerun",ca:"Kanada",cf:"Orta Afrika Cumhuriyeti",td:"Çad",cl:"Şili",cn:"Çin Halk Cumhuriyeti",co:"Kolombiya",km:"Komorlar",cg:"Kongo Cumhuriyeti",cd:"Demokratik Kongo",cr:"Kosta Rika",ci:"Fildişi Sahili",hr:"Hırvatistan",cu:"Küba",cw:"Curaçao",cy:"Güney Kıbrıs",cz:"Çek Cumhuriyeti",dk:"Danimarka",dj:"Cibuti",dm:"Dominika",do:"Dominik Cumhuriyeti",ec:"Ekvador",eg:"Mısır",sv:"El Salvador",gq:"Ekvator Ginesi",er:"Eritre",ee:"Estonya",sz:"Esvati̇ni̇",et:"Etiyopya",fj:"Fiji",fi:"Finlandiya",fr:"Fransa",ga:"Gabon",gm:"Gambia",ge:"Gürcistan",de:"Almanya",gh:"Gana",gr:"Yunanistan",gd:"Grenada",gt:"Guatemala",gn:"Gine",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Macaristan",is:"İzlanda",in:"Hindistan",id:"Endonezya",ir:"İran",iq:"Irak",ie:"Ireland",il:"İrlanda",it:"İtalya",jm:"Jamaika",jp:"Japonya",jo:"Ürdün",kz:"Kazakistan",ke:"Kenya",ki:"Kiribati",kp:"Kuzey Kore",kr:"Güney Kore",kw:"Kuveyt",kg:"Kırgızistan",la:"Laos",lv:"Letonya",lb:"Lübnan",ls:"Lesotho",lr:"Liberya",ly:"Libya",li:"Lihtenştayn",lt:"Litvanya",lu:"Lüksemburg",mg:"Madagaskar",mw:"Malavi",my:"Malezya",mv:"Maldivler",ml:"Mali",mt:"Malta",mh:"Marshall Adaları",mr:"Moritanya",mu:"Mauritius",mx:"Meksika",fm:"Mikronezya",md:"Moldova",mc:"Monako",mn:"Moğolistan",me:"Karadağ",ma:"Fas",mz:"Mozambik",mm:"Myanmar",na:"Namibya",nr:"Nauru",np:"Nepal",nl:"Hollanda",nz:"Yeni Zelanda",ni:"Nikaragua",ne:"Nijer",ng:"Nijerya",mk:"Makedonya",no:"Norveç",om:"Umman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua Yeni Gine",py:"Paraguay",pe:"Peru",ph:"Filipinler",pl:"Polonya",pt:"Portekiz",qa:"Katar",ro:"Romanya",ru:"Rusya",rw:"Ruanda",kn:"Saint Kitts ve Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Suudi Arabistan",sn:"Senegal",rs:"Sırbistan",sc:"Seyşeller",sl:"Sierra Leone",sg:"Singapur",sk:"Slovakya",si:"Slovenya",sb:"Solomon Adaları",so:"Somali",za:"Güney Afrika",ss:"Güney Sudan",es:"İspanya",lk:"Sri Lanka",sd:"Sudan",sr:"Surinam",se:"İsveç",ch:"İsviçre",sy:"Suriye",tj:"Tacikistan",tw:"Tayvan",tz:"Tanzanya",th:"Tayland",tl:"Doğu Timor",tg:"Togo",to:"Tonga",tt:"Trinidad ve Tobago",tn:"Tunus",tr:"Türkiye",tm:"Türkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukrayna",ae:"Birleşik Arap Emirlikleri",gb:"Birleşik Krallık",us:"Amerika Birleşik Devletleri",uy:"Uruguay",uz:"Özbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Vietnam",ye:"Yemen",zm:"Zambiya",zw:"Zimbabve"},calendar:{weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"},tabs:{more:"Diğer"}},E={success:"Success",error:"Error",table:{noData:"No Data"},placeholders:{username:"Username",email:"E-Mail",password:"Password",confirmPassword:"Confirm password",typeYourNoteHere:"Type your note here",selectGender:"Select Gender",selectCurrency:"Select Currency",selectLanguage:"Select Language",selectCountry:"Select Country",birthday:"Birthday",multipleSelection:"Selected ({{- count}})"},options:{all:"All",male:"Male",female:"Female",languages:{turkish:"Turkish",english:"English"},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"}},buttons:{submit:"Submit",reset:"Reset"},errors:{required:"This field is required!",minLength:"Should contain at least {{- length}} characters",maxLength:"Is too long. Max size is {{- length}}",passwordRule:"Your password must be at least 8 characters long, contain at least one digit, one uppercase letter, one lowercase letter, one special character, and must not contain spaces.",invalidEmailAddress:"Invalid email address",passwordsDontMatch:"The two passwords that you entered do not match!",usernameRule:"Only English letters, digits and symbols (-_.). No space is allowed",wrongTCIdentity:"Wrong TC Identity Number",fieldMustBeTheSame:"This field must be the same as: {{- fields}}",siteUsernameRule:"Only English lowercase letters, digits and symbols (-_.). No space is allowed, no uppercase letters are allowed",adminUsernameRule:"Only English letters and digits. No symbols (-_. vs) and no space is allowed",invalidURL:"Invalid URL",fieldMustBeDifferent:"This field must be different from: {{- fields}}",forbiddenWords:"You cannot use this word in this field."},uploader:{header:"Drag and drop an file",hint:"or Browse to choose a file",fileUploading:"File uploading...",info:"Total: {{- total}} - {{- estimated}} s remaining.",delete:"Delete",preview:"Preview",error:"Error",fileFormatError:"You can only upload {{fileFormat}} file",fileSizeError:"File must smaller than {{fileSize}}",fileUploadSuccess:"File successfully uploaded.",fileUploadFailed:"File upload failed!",removeFileSuccess:"File successfully delete!",browserDoesntSupportDND:"Browser doesn't support drag and drop!",calculating:"Calculating...",removeFile:"Remove File",areYouSureToDeleteThisFile:"Are you sure to delete this file?",yes:"Yes",no:"No",cropImage:"Crop Image",crop:"Crop",cancel:"Cancel",width:"width",height:"height",imageTooSmall:"Image Too Small",imageTooSmallMessage:"Minimum required size is {{required}}. Your image is {{actual}}."},results:{authentication:{title:"You Need To Sign In",subtitle:"You need to login to access this page. Please login by clicking the button below.",button:"LOGIN"}},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"},countries:{af:"Afghanistan",al:"Albania",dz:"Algeria",ad:"Andorra",ao:"Angola",ag:"Antigua and Barbuda",ar:"Argentina",am:"Armenia",au:"Australia",at:"Austria",az:"Azerbaijan",bs:"Bahamas",bh:"Bahrain",bd:"Bangladesh",bb:"Barbados",by:"Belarus",be:"Belgium",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivia",ba:"Bosnia and Herzegovina",bw:"Botswana",br:"Brazil",bn:"Brunei Darussalam",bg:"Bulgaria",bf:"Burkina Faso",bi:"Burundi",cv:"Cabo Verde",kh:"Cambodia",cm:"Cameroon",ca:"Canada",cf:"Central African Republic",td:"Chad",cl:"Chile",cn:"China",co:"Colombia",km:"Comoros",cg:"Congo",cd:"Congo, Democratic",cr:"Costa Rica",ci:"Côte d'Ivoire",hr:"Croatia",cu:"Cuba",cw:"Curacao",cy:"Cyprus",cz:"Czechia",dk:"Denmark",dj:"Djibouti",dm:"Dominica",do:"Dominican Republic",ec:"Ecuador",eg:"Egypt",sv:"El Salvador",gq:"Equatorial Guinea",er:"Eritrea",ee:"Estonia",sz:"Eswatini",et:"Ethiopia",fj:"Fiji",fi:"Finland",fr:"France",ga:"Gabon",gm:"Gambia",ge:"Georgia",de:"Germany",gh:"Ghana",gr:"Greece",gd:"Grenada",gt:"Guatemala",gn:"Guinea",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Hungary",is:"Iceland",in:"India",id:"Indonesia",ir:"Iran",iq:"Iraq",ie:"Ireland",il:"Israel",it:"Italy",jm:"Jamaica",jp:"Japan",jo:"Jordan",kz:"Kazakhstan",ke:"Kenya",ki:"Kiribati",kp:"North Korea",kr:"South Korea",kw:"Kuwait",kg:"Kyrgyzstan",la:"Lao People's",lv:"Latvia",lb:"Lebanon",ls:"Lesotho",lr:"Liberia",ly:"Libya",li:"Liechtenstein",lt:"Lithuania",lu:"Luxembourg",mg:"Madagascar",mw:"Malawi",my:"Malaysia",mv:"Maldives",ml:"Mali",mt:"Malta",mh:"Marshall Islands",mr:"Mauritania",mu:"Mauritius",mx:"Mexico",fm:"Micronesia",md:"Moldova, Republic of",mc:"Monaco",mn:"Mongolia",me:"Montenegro",ma:"Morocco",mz:"Mozambique",mm:"Myanmar",na:"Namibia",nr:"Nauru",np:"Nepal",nl:"Netherlands",nz:"New Zealand",ni:"Nicaragua",ne:"Niger",ng:"Nigeria",mk:"North Macedonia",no:"Norway",om:"Oman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua New Guinea",py:"Paraguay",pe:"Peru",ph:"Philippines",pl:"Poland",pt:"Portugal",qa:"Qatar",ro:"Romania",ru:"Russian Federation",rw:"Rwanda",kn:"Saint Kitts and Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Saudi Arabia",sn:"Senegal",rs:"Serbia",sc:"Seychelles",sl:"Sierra Leone",sg:"Singapore",sk:"Slovakia",si:"Slovenia",sb:"Solomon Islands",so:"Somalia",za:"South Africa",ss:"South Sudan",es:"Spain",lk:"Sri Lanka",sd:"Sudan",sr:"Suriname",se:"Sweden",ch:"Switzerland",sy:"Syrian Arab Republic",tj:"Tajikistan",tw:"Taiwan",tz:"Tanzania",th:"Thailand",tl:"Timor-Leste",tg:"Togo",to:"Tonga",tt:"Trinidad and Tobago",tn:"Tunisia",tr:"Turkey",tm:"Turkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukraine",ae:"United Arab Emirates",gb:"United Kingdom",us:"United States of America",uy:"Uruguay",uz:"Uzbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Viet Nam",ye:"Yemen",zm:"Zambia",zw:"Zimbabwe"},calendar:{weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"},tabs:{more:"More"}},C={weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"},j={weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"};exports.ModalState=void 0,(g=exports.ModalState||(exports.ModalState={})).NOT_SHOW="modal-not-show",g.BEGIN="modal-begin",g.ENTERING="modal-entering",g.ENTERED="modal-entered",g.EXITING="modal-exiting",g.EXITED="modal-exited",g.REMOVED="modal-removed",g.OK_CLICK="modal-ok-button-click",g.CANCEL_CLICK="modal-cancel-button-click",g.CLOSE_CLICK="modal-close-button-click",g.OUTSIDE_CLICK="modal-outside-click",g.ESC_CLICK="modal-esc-click",g.ALL_REMOVED="modal-all-removed",exports.FileTypes=void 0,(m=exports.FileTypes||(exports.FileTypes={})).SVG="image/svg+xml",m.PNG="image/png",m.JPG="image/jpeg",m.GIF="image/gif",m.WEBP="image/webp",m.PDF="application/pdf",m.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",m.OTF="font/otf",exports.FileExtensions=void 0,(b=exports.FileExtensions||(exports.FileExtensions={})).SVG=".svg",b.PNG=".png",b.JPG=".jpg",b.GIF=".gif",b.WEBP=".webp",b.PDF=".pdf",b.XLSX=".xlsx",b.OTF=".otf",function(e){e.REQUIRED="required",e.TYPE="type"}(x||(x={})),exports.FormValidationTypes=void 0,(v=exports.FormValidationTypes||(exports.FormValidationTypes={})).MIN_LENGTH="minLength",v.MAX_LENGTH="maxLength",v.EXACT_LENGTH="exactLength",v.SAME="same",v.NOT_SAME="notSame",v.TC_IDENTITY="TCIdentity",v.PASSWORD="password",v.EMAIL="email",v.USERNAME="username",v.SITE_USERNAME="siteUsername",v.ADMIN_USERNAME="adminUsername",v.URL="url",v.FORBIDDEN_WORDS="forbiddenWords",exports.ConnectionStatus=void 0,(y=exports.ConnectionStatus||(exports.ConnectionStatus={})).ONLINE="online",y.OFFLINE="offline",exports.ComponentSizes=void 0,(w=exports.ComponentSizes||(exports.ComponentSizes={})).X_SMALL="x-small",w.SMALL="small",w.MEDIUM="medium",w.DEFAULT="default",w.LARGE="large",w.X_LARGE="x-large",exports.ComponentSizesSlug=void 0,(A=exports.ComponentSizesSlug||(exports.ComponentSizesSlug={})).X_SMALL="xs",A.SMALL="sm",A.MEDIUM="md",A.DEFAULT="df",A.LARGE="lg",A.X_LARGE="xlg",exports.ComponentPositions=void 0,(k=exports.ComponentPositions||(exports.ComponentPositions={})).LEFT="left",k.RIGHT="right";const $=["background: #27C13A","color: #2b2b2b","line-height: 20px","border-radius: 20px"].join(";"),z=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),L=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),F=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),N=["background: #27C13A","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),M=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),D=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),T=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),O=["background: #2B2B2B","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),R=["background-image: url('//i.giphy.com/XKCdA6ERnXp6M.webp')","background-size: 280px 200px","background-repeat: no-repeat","color: #000000","padding: 0px 75px 0 0","line-height: 200px"].join(";");let I={single:(e,t="info")=>{if("fatal-error"!==t){var r="";"info"===t&&(r=$),"warning"===t&&(r=L),"debug"===t&&(r=z),"error"===t&&(r=F),console.log("%c "+e+" ",r)}else console.log("%c "+e,R)},double:(e,t,r="info")=>{if("fatal-error"!==r){var n="";"info"===r&&(n=N),"warning"===r&&(n=D),"debug"===r&&(n=M),"error"===r&&(n=T),console.log("%c "+e+": %c "+t+" ",n,O)}else console.log("%c "+e+": %c "+t+" ",n,R)},table:e=>{console.table(e)}};const P=(e,t)=>{n.useEffect(()=>{const r=r=>{if(!r.target)return;if(0!==r.button)return r.stopPropagation(),void r.preventDefault();if(!e)return;if(!e.current)return;(e=>{const t=e.target.getBoundingClientRect();return e.clientX>t.right-20})(r)||e.current.contains(r.target)||t(r)};return document.addEventListener("pointerdown",r),()=>{document.removeEventListener("pointerdown",r)}},[e,t])},B=e=>{n.useEffect(()=>{const t=t=>{27===t.keyCode&&e(t)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},V=()=>{const[e,t]=a.useSearchParams();return{set:(r="",n)=>{if(""===n||null===n||Array.isArray(n)&&0===n.length)e.delete(r);else if(Array.isArray(n)){const t=n.map(e=>encodeURIComponent(e.toString())).join(",");e.set(r,t)}else"boolean"==typeof n?e.set(r,n?"true":"false"):e.set(r,encodeURIComponent(n.toString()));t(e)},get:function(t="search",r,n){const o=e.get(t);if(null!==o){const e=decodeURIComponent(o);if(e.includes("&")){const o=((e,t)=>{const r={};return e.split("&").forEach((e,n)=>{if(e.includes("=")){const[t,n]=e.split("=");t&&void 0!==n&&(r[t]=n)}else 0===n&&e&&(r[t]=e)}),r})(e,t);if(!o[t])return r;{const e=o[t];if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if("string"==typeof r)return e;if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&r}}}if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if(Array.isArray(r))try{return e.includes(",")?e.split(","):[e]}catch(e){return console.warn("Invalid array format, returning default value."),r}if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&(console.warn("Invalid boolean format, returning default value."),r)}if("string"==typeof r)return e}return r},remove:(r="")=>{e.delete(r),t(e)},isEmpty:()=>0===Array.from(e.values()).length}},H=()=>{const[e,t]=a.useSearchParams(),r=a.useNavigate();return{set:(n=[{type:"",value:""}])=>{n.forEach(t=>{""===t.value||void 0===t.value||null===t.value?e.delete(t.type):Array.isArray(t.value)?0===t.value.length?e.delete(t.type):e.set(t.type,decodeURIComponent(t.value.join()).toString()):e.set(t.type,t.value)}),t(e),r({search:a.createSearchParams(e).toString()},{replace:!0})}}},U=()=>{const e=n.useRef(null);return{fetch:async({action:t="",requestMethod:r="",addOrigin:n=!0,params:o={},queries:i={},headers:a={},cancelable:l=!0,onFetched:d,onError:c,onCanceled:u,onProgress:p})=>{let f="",h={};Object.keys(i).forEach(e=>{f+="&"+e+"="+i[e]}),h["Content-Type"]="put"===r?"multipart/form-data":"application/json",n&&(h["Access-Control-Allow-Headers"]="Origin, X-Requested-With, Content-Type, Accept"),h={...h,...a};let g=s.post;"post"===r.toLocaleLowerCase()?g=s.post:"get"===r.toLocaleLowerCase()?g=s.get:"put"===r.toLocaleLowerCase()?g=s.put:"patch"===r.toLocaleLowerCase()&&(g=s.patch),await g(t+f,o,{headers:a,cancelToken:!!l&&(e.current=s.CancelToken.source(),e.current.token),onUploadProgress:e=>{p&&p(e)}}).then(e=>{d&&d(e)}).catch(e=>{console.log("error",e),console.log("error.message",e.message),s.isCancel(e.message)?u&&u(e.message):c&&c(e.message,0)})},cancel:()=>{e.current&&e.current.cancel("manually canceled!")}}},G=()=>{if(!("undefined"!=typeof window))return"landscape";const e=window.screen&&window.screen.orientation;if(e&&"string"==typeof e.type)return e.type.startsWith("portrait")?"portrait":"landscape";if("function"==typeof window.matchMedia)try{return window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}catch(e){}return window.innerHeight>=window.innerWidth?"portrait":"landscape"},W=l.keyframes`
|
|
1
|
+
"use strict";var e=require("i18next"),t=require("react-i18next"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-dom"),i=require("react-transition-group"),a=require("react-router-dom"),s=require("axios"),l=require("styled-components"),d=require("dayjs"),c=require("dayjs/plugin/customParseFormat"),u=require("dayjs/plugin/localizedFormat"),p=require("react-nanny"),f=require("sonner");function h(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var g,m,b,x,v,y,w,A,k,S=h(n),_={success:"Başarılı",error:"Hata",table:{noData:"Veri Yok"},placeholders:{username:"Kullanıcı adı",email:"E-Posta",password:"Şifre",confirmPassword:"Şifre tekrar",typeYourNoteHere:"Notunuzu buraya yazınız",selectGender:"Cinsiyet Seçin",selectCurrency:"Para Birimi Seçin",selectLanguage:"Dil Seçin",selectCountry:"Ülke Seçin",birthday:"Doğum Tarihi",multipleSelection:"Seçili ({{- count}})"},options:{all:"Hepsi",male:"Erkek",female:"Kadın",languages:{turkish:"Türkçe",english:"İngilizce"},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"}},buttons:{submit:"Gönder",reset:"Temizle"},errors:{required:"Bu alan zorunludur!",minLength:"En az {{- length}} karakter olmalıdır",maxLength:"Çok uzun. Maks uzunluk {{- length}} karakter olmalıdır.",exactLength:"This field must be {{- length}} characters long.",passwordRule:"Şifreniz en az 8 harf olmalı, bir rakam, bir büyük ve bir küçük harf, bir özel karakter içermeli ve boşluk kullanılmamalıdır.",invalidEmailAddress:"Geçersiz e-posta adresi",passwordsDontMatch:"Girdiğiniz şifreler birbirleriyle uyuşmuyor!",usernameRule:"Sadece İngilizce harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine izin verilmez.",wrongTCIdentity:"TC Kimlik Numarası Yanlış",fieldMustBeTheSame:"Bu alan şunlarla aynı olmalıdır: {{- fields}}",siteUsernameRule:"Sadece İngilizce küçük harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine ve büyük harflere izin verilmez.",adminUsernameRule:"Sadece ingilizce harflerden ve rakamlardan oluşmalıdır. Semboller (-_. vs) ve boşluk karakteri kullanılamaz.",invalidURL:"Geçersiz URL",fieldMustBeDifferent:"Bu alan şunlarla aynı olmamalıdır: {{- fields}}",forbiddenWords:"Bu alan içerisinde bu kelimeyi kullanamazsınız.",multipleOf:"Değer {{- value}}'in katı olmalıdır."},uploader:{header:"Bir resmi sürükleyip bırakın",hint:"ya da bir dosya seçmek için tıklayın.",fileUploading:"Dosya yükleniyor...",info:"Toplam: {{- total}} - {{- estimated}} sn kaldı.",delete:"Sil",preview:"Önizleme",error:"Hata",fileFormatError:"Yalnızca {{fileFormat}} dosyası yükleyebilirsiniz.",fileSizeError:"Dosya boyutu {{fileSize}}'den küçük olmalıdır.",fileUploadSuccess:"Dosya başarıyla yüklendi.",fileUploadFailed:"Dosya yüklenemedi!",removeFileSuccess:"Dosya başarıyla silindi!",browserDoesntSupportDND:"Tarayıcı taşı&bırak özelliğini desteklemiyor!",calculating:"Hesaplanıyor...",removeFile:"Dosya Silme",areYouSureToDeleteThisFile:"Bu dosyayı silmek istediğinize emin misiniz?",yes:"Evet",no:"Hayır",cropImage:"Görseli Kırp",crop:"Kırp",cancel:"İptal",width:"genişlik",height:"yükseklik",imageTooSmall:"Görsel Çok Küçük",imageTooSmallMessage:"Minimum gerekli boyut {{required}}. Görseliniz {{actual}}."},results:{authentication:{title:"Üye Girişi Gerekiyor",subtitle:"Bu bölüme ulaşmanız için üye girişi yapmanız gerekiyor. Aşağıdaki tuşa tıklayarak lütfen üye girişi yapınız.",button:"GİRİŞ YAP"}},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"},countries:{af:"Afganistan",al:"Arnavutluk",dz:"Cezayir",ad:"Andorra",ao:"Angola",ag:"Antigua ve Barbuda",ar:"Arjantin",am:"Ermenistan",au:"Avustralya",at:"Avusturya",az:"Azerbaycan",bs:"Bahamalar",bh:"Bahreyn",bd:"Bangladeş",bb:"Barbados",by:"Beyaz Rusya",be:"Belçika",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivya",ba:"Bosna-Hersek",bw:"Botsvana",br:"Brezilya",bn:"Brunei",bg:"Bulgaristan",bf:"Burkina Faso",bi:"Burundi",cv:"Yeşil Burun Adaları",kh:"Kamboçya",cm:"Kamerun",ca:"Kanada",cf:"Orta Afrika Cumhuriyeti",td:"Çad",cl:"Şili",cn:"Çin Halk Cumhuriyeti",co:"Kolombiya",km:"Komorlar",cg:"Kongo Cumhuriyeti",cd:"Demokratik Kongo",cr:"Kosta Rika",ci:"Fildişi Sahili",hr:"Hırvatistan",cu:"Küba",cw:"Curaçao",cy:"Güney Kıbrıs",cz:"Çek Cumhuriyeti",dk:"Danimarka",dj:"Cibuti",dm:"Dominika",do:"Dominik Cumhuriyeti",ec:"Ekvador",eg:"Mısır",sv:"El Salvador",gq:"Ekvator Ginesi",er:"Eritre",ee:"Estonya",sz:"Esvati̇ni̇",et:"Etiyopya",fj:"Fiji",fi:"Finlandiya",fr:"Fransa",ga:"Gabon",gm:"Gambia",ge:"Gürcistan",de:"Almanya",gh:"Gana",gr:"Yunanistan",gd:"Grenada",gt:"Guatemala",gn:"Gine",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Macaristan",is:"İzlanda",in:"Hindistan",id:"Endonezya",ir:"İran",iq:"Irak",ie:"Ireland",il:"İrlanda",it:"İtalya",jm:"Jamaika",jp:"Japonya",jo:"Ürdün",kz:"Kazakistan",ke:"Kenya",ki:"Kiribati",kp:"Kuzey Kore",kr:"Güney Kore",kw:"Kuveyt",kg:"Kırgızistan",la:"Laos",lv:"Letonya",lb:"Lübnan",ls:"Lesotho",lr:"Liberya",ly:"Libya",li:"Lihtenştayn",lt:"Litvanya",lu:"Lüksemburg",mg:"Madagaskar",mw:"Malavi",my:"Malezya",mv:"Maldivler",ml:"Mali",mt:"Malta",mh:"Marshall Adaları",mr:"Moritanya",mu:"Mauritius",mx:"Meksika",fm:"Mikronezya",md:"Moldova",mc:"Monako",mn:"Moğolistan",me:"Karadağ",ma:"Fas",mz:"Mozambik",mm:"Myanmar",na:"Namibya",nr:"Nauru",np:"Nepal",nl:"Hollanda",nz:"Yeni Zelanda",ni:"Nikaragua",ne:"Nijer",ng:"Nijerya",mk:"Makedonya",no:"Norveç",om:"Umman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua Yeni Gine",py:"Paraguay",pe:"Peru",ph:"Filipinler",pl:"Polonya",pt:"Portekiz",qa:"Katar",ro:"Romanya",ru:"Rusya",rw:"Ruanda",kn:"Saint Kitts ve Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Suudi Arabistan",sn:"Senegal",rs:"Sırbistan",sc:"Seyşeller",sl:"Sierra Leone",sg:"Singapur",sk:"Slovakya",si:"Slovenya",sb:"Solomon Adaları",so:"Somali",za:"Güney Afrika",ss:"Güney Sudan",es:"İspanya",lk:"Sri Lanka",sd:"Sudan",sr:"Surinam",se:"İsveç",ch:"İsviçre",sy:"Suriye",tj:"Tacikistan",tw:"Tayvan",tz:"Tanzanya",th:"Tayland",tl:"Doğu Timor",tg:"Togo",to:"Tonga",tt:"Trinidad ve Tobago",tn:"Tunus",tr:"Türkiye",tm:"Türkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukrayna",ae:"Birleşik Arap Emirlikleri",gb:"Birleşik Krallık",us:"Amerika Birleşik Devletleri",uy:"Uruguay",uz:"Özbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Vietnam",ye:"Yemen",zm:"Zambiya",zw:"Zimbabve"},calendar:{weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"},tabs:{more:"Diğer"}},E={success:"Success",error:"Error",table:{noData:"No Data"},placeholders:{username:"Username",email:"E-Mail",password:"Password",confirmPassword:"Confirm password",typeYourNoteHere:"Type your note here",selectGender:"Select Gender",selectCurrency:"Select Currency",selectLanguage:"Select Language",selectCountry:"Select Country",birthday:"Birthday",multipleSelection:"Selected ({{- count}})"},options:{all:"All",male:"Male",female:"Female",languages:{turkish:"Turkish",english:"English"},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"}},buttons:{submit:"Submit",reset:"Reset"},errors:{required:"This field is required!",minLength:"Should contain at least {{- length}} characters",maxLength:"Is too long. Max size is {{- length}}",passwordRule:"Your password must be at least 8 characters long, contain at least one digit, one uppercase letter, one lowercase letter, one special character, and must not contain spaces.",invalidEmailAddress:"Invalid email address",passwordsDontMatch:"The two passwords that you entered do not match!",usernameRule:"Only English letters, digits and symbols (-_.). No space is allowed",wrongTCIdentity:"Wrong TC Identity Number",fieldMustBeTheSame:"This field must be the same as: {{- fields}}",siteUsernameRule:"Only English lowercase letters, digits and symbols (-_.). No space is allowed, no uppercase letters are allowed",adminUsernameRule:"Only English letters and digits. No symbols (-_. vs) and no space is allowed",invalidURL:"Invalid URL",fieldMustBeDifferent:"This field must be different from: {{- fields}}",forbiddenWords:"You cannot use this word in this field.",multipleOf:"The value must be a multiple of {{- value}}"},uploader:{header:"Drag and drop an file",hint:"or Browse to choose a file",fileUploading:"File uploading...",info:"Total: {{- total}} - {{- estimated}} s remaining.",delete:"Delete",preview:"Preview",error:"Error",fileFormatError:"You can only upload {{fileFormat}} file",fileSizeError:"File must smaller than {{fileSize}}",fileUploadSuccess:"File successfully uploaded.",fileUploadFailed:"File upload failed!",removeFileSuccess:"File successfully delete!",browserDoesntSupportDND:"Browser doesn't support drag and drop!",calculating:"Calculating...",removeFile:"Remove File",areYouSureToDeleteThisFile:"Are you sure to delete this file?",yes:"Yes",no:"No",cropImage:"Crop Image",crop:"Crop",cancel:"Cancel",width:"width",height:"height",imageTooSmall:"Image Too Small",imageTooSmallMessage:"Minimum required size is {{required}}. Your image is {{actual}}."},results:{authentication:{title:"You Need To Sign In",subtitle:"You need to login to access this page. Please login by clicking the button below.",button:"LOGIN"}},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"},countries:{af:"Afghanistan",al:"Albania",dz:"Algeria",ad:"Andorra",ao:"Angola",ag:"Antigua and Barbuda",ar:"Argentina",am:"Armenia",au:"Australia",at:"Austria",az:"Azerbaijan",bs:"Bahamas",bh:"Bahrain",bd:"Bangladesh",bb:"Barbados",by:"Belarus",be:"Belgium",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivia",ba:"Bosnia and Herzegovina",bw:"Botswana",br:"Brazil",bn:"Brunei Darussalam",bg:"Bulgaria",bf:"Burkina Faso",bi:"Burundi",cv:"Cabo Verde",kh:"Cambodia",cm:"Cameroon",ca:"Canada",cf:"Central African Republic",td:"Chad",cl:"Chile",cn:"China",co:"Colombia",km:"Comoros",cg:"Congo",cd:"Congo, Democratic",cr:"Costa Rica",ci:"Côte d'Ivoire",hr:"Croatia",cu:"Cuba",cw:"Curacao",cy:"Cyprus",cz:"Czechia",dk:"Denmark",dj:"Djibouti",dm:"Dominica",do:"Dominican Republic",ec:"Ecuador",eg:"Egypt",sv:"El Salvador",gq:"Equatorial Guinea",er:"Eritrea",ee:"Estonia",sz:"Eswatini",et:"Ethiopia",fj:"Fiji",fi:"Finland",fr:"France",ga:"Gabon",gm:"Gambia",ge:"Georgia",de:"Germany",gh:"Ghana",gr:"Greece",gd:"Grenada",gt:"Guatemala",gn:"Guinea",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Hungary",is:"Iceland",in:"India",id:"Indonesia",ir:"Iran",iq:"Iraq",ie:"Ireland",il:"Israel",it:"Italy",jm:"Jamaica",jp:"Japan",jo:"Jordan",kz:"Kazakhstan",ke:"Kenya",ki:"Kiribati",kp:"North Korea",kr:"South Korea",kw:"Kuwait",kg:"Kyrgyzstan",la:"Lao People's",lv:"Latvia",lb:"Lebanon",ls:"Lesotho",lr:"Liberia",ly:"Libya",li:"Liechtenstein",lt:"Lithuania",lu:"Luxembourg",mg:"Madagascar",mw:"Malawi",my:"Malaysia",mv:"Maldives",ml:"Mali",mt:"Malta",mh:"Marshall Islands",mr:"Mauritania",mu:"Mauritius",mx:"Mexico",fm:"Micronesia",md:"Moldova, Republic of",mc:"Monaco",mn:"Mongolia",me:"Montenegro",ma:"Morocco",mz:"Mozambique",mm:"Myanmar",na:"Namibia",nr:"Nauru",np:"Nepal",nl:"Netherlands",nz:"New Zealand",ni:"Nicaragua",ne:"Niger",ng:"Nigeria",mk:"North Macedonia",no:"Norway",om:"Oman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua New Guinea",py:"Paraguay",pe:"Peru",ph:"Philippines",pl:"Poland",pt:"Portugal",qa:"Qatar",ro:"Romania",ru:"Russian Federation",rw:"Rwanda",kn:"Saint Kitts and Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Saudi Arabia",sn:"Senegal",rs:"Serbia",sc:"Seychelles",sl:"Sierra Leone",sg:"Singapore",sk:"Slovakia",si:"Slovenia",sb:"Solomon Islands",so:"Somalia",za:"South Africa",ss:"South Sudan",es:"Spain",lk:"Sri Lanka",sd:"Sudan",sr:"Suriname",se:"Sweden",ch:"Switzerland",sy:"Syrian Arab Republic",tj:"Tajikistan",tw:"Taiwan",tz:"Tanzania",th:"Thailand",tl:"Timor-Leste",tg:"Togo",to:"Tonga",tt:"Trinidad and Tobago",tn:"Tunisia",tr:"Turkey",tm:"Turkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukraine",ae:"United Arab Emirates",gb:"United Kingdom",us:"United States of America",uy:"Uruguay",uz:"Uzbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Viet Nam",ye:"Yemen",zm:"Zambia",zw:"Zimbabwe"},calendar:{weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"},tabs:{more:"More"}},C={weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"},j={weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"};exports.ModalState=void 0,(g=exports.ModalState||(exports.ModalState={})).NOT_SHOW="modal-not-show",g.BEGIN="modal-begin",g.ENTERING="modal-entering",g.ENTERED="modal-entered",g.EXITING="modal-exiting",g.EXITED="modal-exited",g.REMOVED="modal-removed",g.OK_CLICK="modal-ok-button-click",g.CANCEL_CLICK="modal-cancel-button-click",g.CLOSE_CLICK="modal-close-button-click",g.OUTSIDE_CLICK="modal-outside-click",g.ESC_CLICK="modal-esc-click",g.ALL_REMOVED="modal-all-removed",exports.FileTypes=void 0,(m=exports.FileTypes||(exports.FileTypes={})).SVG="image/svg+xml",m.PNG="image/png",m.JPG="image/jpeg",m.GIF="image/gif",m.WEBP="image/webp",m.PDF="application/pdf",m.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",m.OTF="font/otf",exports.FileExtensions=void 0,(b=exports.FileExtensions||(exports.FileExtensions={})).SVG=".svg",b.PNG=".png",b.JPG=".jpg",b.GIF=".gif",b.WEBP=".webp",b.PDF=".pdf",b.XLSX=".xlsx",b.OTF=".otf",function(e){e.REQUIRED="required",e.TYPE="type"}(x||(x={})),exports.FormValidationTypes=void 0,(v=exports.FormValidationTypes||(exports.FormValidationTypes={})).MIN_LENGTH="minLength",v.MAX_LENGTH="maxLength",v.EXACT_LENGTH="exactLength",v.SAME="same",v.NOT_SAME="notSame",v.TC_IDENTITY="TCIdentity",v.PASSWORD="password",v.EMAIL="email",v.USERNAME="username",v.SITE_USERNAME="siteUsername",v.ADMIN_USERNAME="adminUsername",v.URL="url",v.FORBIDDEN_WORDS="forbiddenWords",v.MULTIPLE_OF="multipleOf",exports.ConnectionStatus=void 0,(y=exports.ConnectionStatus||(exports.ConnectionStatus={})).ONLINE="online",y.OFFLINE="offline",exports.ComponentSizes=void 0,(w=exports.ComponentSizes||(exports.ComponentSizes={})).X_SMALL="x-small",w.SMALL="small",w.MEDIUM="medium",w.DEFAULT="default",w.LARGE="large",w.X_LARGE="x-large",exports.ComponentSizesSlug=void 0,(A=exports.ComponentSizesSlug||(exports.ComponentSizesSlug={})).X_SMALL="xs",A.SMALL="sm",A.MEDIUM="md",A.DEFAULT="df",A.LARGE="lg",A.X_LARGE="xlg",exports.ComponentPositions=void 0,(k=exports.ComponentPositions||(exports.ComponentPositions={})).LEFT="left",k.RIGHT="right";const $=["background: #27C13A","color: #2b2b2b","line-height: 20px","border-radius: 20px"].join(";"),z=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),L=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),F=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),N=["background: #27C13A","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),M=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),D=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),T=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),O=["background: #2B2B2B","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),R=["background-image: url('//i.giphy.com/XKCdA6ERnXp6M.webp')","background-size: 280px 200px","background-repeat: no-repeat","color: #000000","padding: 0px 75px 0 0","line-height: 200px"].join(";");let I={single:(e,t="info")=>{if("fatal-error"!==t){var r="";"info"===t&&(r=$),"warning"===t&&(r=L),"debug"===t&&(r=z),"error"===t&&(r=F),console.log("%c "+e+" ",r)}else console.log("%c "+e,R)},double:(e,t,r="info")=>{if("fatal-error"!==r){var n="";"info"===r&&(n=N),"warning"===r&&(n=D),"debug"===r&&(n=M),"error"===r&&(n=T),console.log("%c "+e+": %c "+t+" ",n,O)}else console.log("%c "+e+": %c "+t+" ",n,R)},table:e=>{console.table(e)}};const P=(e,t)=>{n.useEffect(()=>{const r=r=>{if(!r.target)return;if(0!==r.button)return r.stopPropagation(),void r.preventDefault();if(!e)return;if(!e.current)return;(e=>{const t=e.target.getBoundingClientRect();return e.clientX>t.right-20})(r)||e.current.contains(r.target)||t(r)};return document.addEventListener("pointerdown",r),()=>{document.removeEventListener("pointerdown",r)}},[e,t])},B=e=>{n.useEffect(()=>{const t=t=>{27===t.keyCode&&e(t)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},V=()=>{const[e,t]=a.useSearchParams();return{set:(r="",n)=>{if(""===n||null===n||Array.isArray(n)&&0===n.length)e.delete(r);else if(Array.isArray(n)){const t=n.map(e=>encodeURIComponent(e.toString())).join(",");e.set(r,t)}else"boolean"==typeof n?e.set(r,n?"true":"false"):e.set(r,encodeURIComponent(n.toString()));t(e)},get:function(t="search",r,n){const o=e.get(t);if(null!==o){const e=decodeURIComponent(o);if(e.includes("&")){const o=((e,t)=>{const r={};return e.split("&").forEach((e,n)=>{if(e.includes("=")){const[t,n]=e.split("=");t&&void 0!==n&&(r[t]=n)}else 0===n&&e&&(r[t]=e)}),r})(e,t);if(!o[t])return r;{const e=o[t];if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if("string"==typeof r)return e;if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&r}}}if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if(Array.isArray(r))try{return e.includes(",")?e.split(","):[e]}catch(e){return console.warn("Invalid array format, returning default value."),r}if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&(console.warn("Invalid boolean format, returning default value."),r)}if("string"==typeof r)return e}return r},remove:(r="")=>{e.delete(r),t(e)},isEmpty:()=>0===Array.from(e.values()).length}},H=()=>{const[e,t]=a.useSearchParams(),r=a.useNavigate();return{set:(n=[{type:"",value:""}])=>{n.forEach(t=>{""===t.value||void 0===t.value||null===t.value?e.delete(t.type):Array.isArray(t.value)?0===t.value.length?e.delete(t.type):e.set(t.type,decodeURIComponent(t.value.join()).toString()):e.set(t.type,t.value)}),t(e),r({search:a.createSearchParams(e).toString()},{replace:!0})}}},U=()=>{const e=n.useRef(null);return{fetch:async({action:t="",requestMethod:r="",addOrigin:n=!0,params:o={},queries:i={},headers:a={},cancelable:l=!0,onFetched:d,onError:c,onCanceled:u,onProgress:p})=>{let f="",h={};Object.keys(i).forEach(e=>{f+="&"+e+"="+i[e]}),h["Content-Type"]="put"===r?"multipart/form-data":"application/json",n&&(h["Access-Control-Allow-Headers"]="Origin, X-Requested-With, Content-Type, Accept"),h={...h,...a};let g=s.post;"post"===r.toLocaleLowerCase()?g=s.post:"get"===r.toLocaleLowerCase()?g=s.get:"put"===r.toLocaleLowerCase()?g=s.put:"patch"===r.toLocaleLowerCase()&&(g=s.patch),await g(t+f,o,{headers:a,cancelToken:!!l&&(e.current=s.CancelToken.source(),e.current.token),onUploadProgress:e=>{p&&p(e)}}).then(e=>{d&&d(e)}).catch(e=>{console.log("error",e),console.log("error.message",e.message),s.isCancel(e.message)?u&&u(e.message):c&&c(e.message,0)})},cancel:()=>{e.current&&e.current.cancel("manually canceled!")}}},G=()=>{if(!("undefined"!=typeof window))return"landscape";const e=window.screen&&window.screen.orientation;if(e&&"string"==typeof e.type)return e.type.startsWith("portrait")?"portrait":"landscape";if("function"==typeof window.matchMedia)try{return window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}catch(e){}return window.innerHeight>=window.innerWidth?"portrait":"landscape"},W=l.keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -2382,7 +2382,7 @@
|
|
|
2382
2382
|
margin-top: 10px;
|
|
2383
2383
|
gap: 5px;
|
|
2384
2384
|
|
|
2385
|
-
`;const Gd=new RegExp(/^[a-zA-Z0-9.!#$%&'+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),Wd=new RegExp(/^[a-zA-Z0-9_.-]+$/),Yd=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+={};:<>|./?,"'\[\]\\`~\-])[a-zA-Z\d$begin:math:display$$end:math:display$\\`~!@#$%^&*()_+={};:<>|.\/?,"'-]{8,60}$/),qd=new RegExp(/^[a-z0-9._-]+$/),Xd=new RegExp(/^[a-zA-Z0-9]+$/),Kd=new RegExp(/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/);const Jd=e=>Yd.test(e),Zd=e=>Gd.test(e),Qd=e=>Wd.test(e),ec=(e,t)=>e.length>=t,tc=(e,t)=>e.length<=t,rc=(e,t)=>e===t,nc=(e,t)=>e!==t,oc=(e,t)=>e.length===t,ic=e=>qd.test(e),ac=e=>Xd.test(e),sc=e=>Kd.test(e),lc=(e,t)=>{if(!Array.isArray(t)||0===t.length)return!0;const r=String(e).trim().toLowerCase();return!t.some(e=>r===String(e).trim().toLowerCase())},dc=e=>function(e){var t,r=0,n=0,o=0;if(11!=e.length)return!1;if(!/^-?\d+$/.test(e))return!1;if(0==Number(e[0]))return!1;if(r=parseInt(e[0])+parseInt(e[2])+parseInt(e[4])+parseInt(e[6])+parseInt(e[8]),t=parseInt(e[1])+parseInt(e[3])+parseInt(e[5])+parseInt(e[7]),r*=7,Math.abs(r-t)%10!=Number(e[9]))return!1;for(o=0;o<10;o++)n+=parseInt(e[o]);return n%10==Number(e[10])}(e),cc=e=>{if(Array.isArray(e)){if(0===e.length)return!1}else{if("object"==typeof e){let t=!0;return Object.keys(e).forEach(r=>{""===e[r]&&(t=!1)}),t}if("string"==typeof e){if(""===e)return!1}else if("boolean"==typeof e&&!1===e)return!1}return!0},uc=n.createContext({});uc.displayName="ITDFormContext";const pc=n.forwardRef(({name:e="",id:r="",label:o="",placeholder:i="",error:a="",rules:s=[],mask:l=null,locked:d=!1,dependency:c="",reset:u=[],query:p="",children:f=null},h)=>{const{t:g}=t.useTranslation("itd"),m=n.useRef(null),b=n.useRef(""),{register:v,unregister:y,hasField:w,updateField:A,setFieldError:k,getFieldValue:S,getFieldInstance:_,formId:E}=n.useContext(uc),[C,j]=n.useState(!1);n.useEffect(()=>(v({name:e,field:m,valid:z(m.current?.getValue(),!1),query:p,reset:u,error:a}),j(!0),b.current=JSON.stringify(s),()=>{j(!1),y(e)}),[]),n.useEffect(()=>{const t=JSON.stringify(s);if(C&&m.current&&b.current!==t){const r=()=>{const t=m.current.getValue(),r=s.find(e=>e.hasOwnProperty("required"));if(!r||r.required||""!==t&&null!=t){const r=z(t,!1);w(e)&&A(e,t,!1,r)}else k(e,"",!0),w(e)&&A(e,t,!1,!0)};"development"===process.env.NODE_ENV?requestAnimationFrame(r):r(),b.current=t}},[s,C]),n.useImperativeHandle(h,()=>m.current);const $=(t,r=!0,n=!0)=>{C&&w(e)&&(A(e,t,r,z(t,n)),L())},z=(t,r=!0)=>{const n=function(e,t,r,n){let o=[];return e.forEach(e=>{if(e.hasOwnProperty(x.REQUIRED)&&!cc(t)&&e.required&&o.push(e.message?e.message:n("errors.required")),e.hasOwnProperty(x.TYPE)&&(e.type===exports.FormValidationTypes.MIN_LENGTH&&(ec(String(t),Number(e.value))||o.push(e.message?e.message:n("errors.minLength",{length:Number(e.value)}))),e.type===exports.FormValidationTypes.MAX_LENGTH&&(tc(String(t),Number(e.value))||o.push(e.message?e.message:n("errors.maxLength",{length:Number(e.value)}))),e.type===exports.FormValidationTypes.EXACT_LENGTH&&(oc(String(t),Number(e.value))||o.push(e.message?e.message:n("errors.exactLength",{length:Number(e.value)}))),e.type===exports.FormValidationTypes.SAME&&(rc(String(t),String(r(String(e.field))))||o.push(e.message?e.message:n("errors.fieldMustBeTheSame",{fields:e.field}))),e.type===exports.FormValidationTypes.NOT_SAME&&(nc(String(t),String(r(String(e.field))))||o.push(e.message?e.message:n("errors.fieldMustBeDifferent",{fields:e.field}))),e.type===exports.FormValidationTypes.TC_IDENTITY&&(dc(String(t))||o.push(e.message?e.message:n("errors.wrongTCIdentity"))),e.type===exports.FormValidationTypes.PASSWORD&&(Jd(String(t))||o.push(e.message?e.message:n("errors.passwordRule"))),e.type===exports.FormValidationTypes.EMAIL&&(Zd(String(t))||o.push(e.message?e.message:n("errors.invalidEmailAddress"))),e.type===exports.FormValidationTypes.USERNAME&&(Qd(String(t))||o.push(e.message?e.message:n("errors.usernameRule"))),e.type===exports.FormValidationTypes.SITE_USERNAME&&(ic(String(t))||o.push(e.message?e.message:n("errors.siteUsernameRule"))),e.type===exports.FormValidationTypes.ADMIN_USERNAME&&(ac(String(t))||o.push(e.message?e.message:n("errors.adminUsernameRule"))),e.type===exports.FormValidationTypes.URL&&(sc(String(t))||o.push(e.message?e.message:n("errors.invalidURL"))),e.type===exports.FormValidationTypes.FORBIDDEN_WORDS)){const r=Array.isArray(e.value)?e.value:void 0!==e.value?[e.value]:[];lc(String(t),r)||o.push(e.message?e.message:n("errors.forbiddenWords"))}}),o}(s,t,S,g);return n.length>0?!!(r||""!==t&&null!=t)&&(r&&k(e,n[0],r),!1):(r&&k(e,""),!0)},L=()=>{if(""===c)return;if(""===S(c))return;const e=_(c);e&&e.forceUpdate&&e.forceUpdate()};return(()=>{if(!f)return null;let t=f.props;const a={id:t.id?t.id:r||E+"_"+e,label:o,placeholder:i,className:t.className?t.className+" itd-form-item":"itd-form-item",onUpdate:$,ref:m};return l&&(a.mask=l),d&&(a.locked=d),n.cloneElement(f,{...t,...a})})()}),fc=n.forwardRef(({name:e="",className:t="",initialValues:o={},useQueryString:i=!1,onUpdate:s,onFinish:l,onFinishFailed:d,onValidated:c,children:u},f)=>{const{updated:h,setInitialValues:g,isFormValid:m,getValues:b,getFields:x,setFieldValueByName:v,resetFields:y}=n.useContext(uc),w=V(),{search:A}=a.useLocation(),k=H(),[S,_]=n.useState([]),[E,C]=n.useState(!1),[j,$]=n.useState([]),[z,L]=n.useState(!1),[F,N]=n.useState(!1);n.useEffect(()=>{u&&B()},[u]),n.useEffect(()=>{M(),D()},[z]),n.useEffect(()=>{z||0!==Object.keys(x()).length&&0!==j.length&&Object.keys(x()).length===j.length&&L(!0)},[x(),j]),n.useEffect(()=>{D()},[o]),n.useEffect(()=>{M()},[A]),n.useEffect(()=>{F&&z&&i&&Object.keys(h).length>0&&R(h)},[h]),n.useEffect(()=>{c&&m()!==E&&c(m()),C(m())},[m()]);const M=()=>{z&&i&&(I(),F||O())},D=()=>{z&&(i||F||T())},T=()=>{const e=!Object.values(o).some(e=>null!==e&&""!==e);e&&!F&&N(!0),e||F||(g(o,!1),N(!0))},O=()=>{const e=x(),t=!Object.values(e).some(e=>""!==w.get(e.query,""));if(Object.values(e).some(e=>null===e.query||""===e.query)){let t=[];throw Object.keys(e).forEach(r=>{e[r].hasOwnProperty("query")&&null!==e[r].query&&""!==e[r].query||t.push(r)}),new Error(`ITD Form Initial Fields Error: "useQueryString" is activated but "query" value is not passed to whole form elements! Invalid fields are ${t.toString()}`)}if(t&&!F&&N(!0),!t&&!F){let t={};Object.keys(e).forEach(r=>{t[r]=w.get(e[r].query,"")}),g(t,!0,!0),N(!0)}},R=e=>{let t=[],r=[];const n=x();Object.keys(e).forEach(t=>{r.push(e[t])}),vi(r,S)||(Object.keys(n).forEach(r=>{t.push({type:n[r].query,value:e[r]})}),k.set(t))},I=()=>{let e=[],t=[];const r=x();if(Object.keys(r).forEach(t=>{let n=String(w.get(r[t].query,""));e.push(n)}),vi(e,S))return;_(e),Object.keys(r).forEach(e=>{t[e]=w.get(r[e].query,"")}),Object.keys(t).forEach(e=>{v(e,t[e],!1,!1)});let n={};Object.keys(t).forEach(e=>{n[e]=t[e]}),s&&s(n)},P=()=>{if(e)try{const t=new CustomEvent("itd-input-unlock",{detail:{formId:e}});document.dispatchEvent(t)}catch{}},B=()=>{let e=[];p.getChildrenDeep(u,t=>(t.hasOwnProperty("type")&&t.type===pc&&e.push({[t.props.name]:t}),!0)),$(e)};return n.useImperativeHandle(f,()=>({fieldUpdate(e){console.log("fieldUpdate"),console.log(e)}})),r.jsx("form",{id:e,onSubmit:e=>{e&&(e.preventDefault(),e.stopPropagation()),m()?l&&l(b()):d&&d(x())},onReset:e=>{e&&(e.preventDefault(),e.stopPropagation());let t=[];Object.keys(x()).map(e=>{t.push({type:e,value:""})}),k.set(t),y(!0,!1)},onPointerDown:P,onTouchStart:P,autoComplete:"off",className:t,noValidate:!0,children:u})});var hc=n.memo(fc);function gc({name:e="",useQueryString:t=!1,onUpdate:r,onReset:o,onFieldUpdate:i}){const[a,s]=n.useState({}),[l,d]=n.useState(e),[c,u]=n.useState(!1),[p,f]=n.useState({});function h(e){return a.hasOwnProperty(e)&&void 0!==a[e]}function g(e){return h(e)?a[e].field.current:null}function m(){let e={};return Object.keys(a).forEach(t=>{e[t]=v(t)}),e}function b(e,t,r=!0){if(h(e)&&a[e].field.current){if(a[e].valid=!1,a[e].error=t,!a[e].field.current?.hasOwnProperty("setError"))throw new Error(`ITD Reference Error: You must declare the 'setError' function on the field "${e}"`);a[e].field.current?.setError?.(r?t:"")}}function x(){let e=!0;return Object.keys(a).forEach(t=>{a[t].valid||(e=!1)}),u(e),e}function v(e){if(h(e)){if(a[e].field.current?.hasOwnProperty("getValue"))return a[e].field.current?.getValue();throw new Error(`ITD Reference Error: You must declare the 'getValue' function on the field "${e}"`)}console.error(`ITD Form Error [getFieldValueByName]: There is no field registered with this name: ${e}`)}function y(e,t,r,n){if(h(e)){if(!a[e].field.current?.hasOwnProperty("setValue"))throw new Error(`ITD Reference Error: You must declare the 'setValue' function on the field "${e}"`);{let o=v(e),i=!1;i=Array.isArray(o)&&Array.isArray(t)?vi(o,t):Array.isArray(o)||Array.isArray(t)?o.toString()===t.toString():o===t,i||a[e].field.current?.setValue(t,r,n)}}else console.error(`ITD Form Error [setFieldValueByName]: There is no field registered with this name: ${e}`)}return{register:function(e){a[e.name]={name:e.name,field:e.field,value:e.field.current?.getValue(),valid:e.valid,query:e.query,reset:e.reset,error:e.error}},unregister:function(e){h(e)?(delete a[e],x()):console.error(`ITD Form Error [unregister]: There is no field registered with this name: ${e}`)},scrollTo:function(e,t){const r=void 0!==t?t:{behavior:"smooth",block:"center",inline:"nearest"},n=e=>!(!e||"function"!=typeof e.scrollIntoView)&&(e.scrollIntoView(r),!0);if(h(e)){const t=g(e);if(t&&"function"==typeof t.scrollIntoView)return t.scrollIntoView(r),!0}if("undefined"!=typeof document){const t=document.getElementById(l);if(t){const r=e.startsWith(`${l}_`)?[`#${e}`]:[`#${e}`,`#${l}_${e}`];for(const e of r){if(n(t.querySelector(e)))return!0}}if(n(document.getElementById(e)))return!0}return console.error(`ITD Form Error [scrollTo]: Could not find element in form '${l}' by name/id '${e}'. ScrollIntoView not provided.`),!1},checkFormIsValid:x,hasField:h,getValues:m,getFieldValue:function(e){return h(e)?(t=a[e].value)instanceof Object?JSON.stringify(t):t:"";var t},getFieldValueByName:v,getFieldInstance:g,getFields:function(){let e={};return Object.keys(a).forEach(t=>{e[t]=a[t]}),e},getFieldsInstance:function(){let e={};return Object.keys(a).forEach(t=>{e[t]=a[t].field.current}),e},setName:function(e){d(e)},setInitialValues:function(e,n=!0,o=!1){Object.keys(e).forEach(t=>{y(t,e[t],n,o)});let i={};return Object.keys(e).forEach(t=>{i[t]=e[t]}),n&&(t&&f(i),r&&r(i)),x(),i},setInvalidField:function(e="",t=""){b(e,t),x()},setInvalidFields:function(e=[],t=""){e.forEach(e=>{b(e,t)}),x()},setFieldValue:function(e,t){h(e)?a[e].field.current?.setValue(t,!0,!0):console.error(`ITD Form Error [setFieldValue]: There is no field registered with this name: ${e}`)},setFieldValueByName:y,setFieldError:b,removeFieldError:function(e){if(h(e)){if(a[e].valid=!0,a[e].error="",!a[e].field.current?.hasOwnProperty("setError"))throw new Error(`ITD Reference Error: You must declare the 'setError' function on the field "${e}"`);a[e].field.current?.setError?.("")}else console.error(`ITD Form Error [removeFieldError]: There is no field registered with this name: ${e}`)},updateField:function(e,n,o,s){if(h(e)){if(a[e].value=n,a[e].valid=s,o){i&&i({name:e,value:n,valid:s}),a[e].reset.length>0&&a[e].reset.forEach(e=>{a[e].value="",a[e].valid=!1,a[e].field.current?.reset(!1)});let o={...m(),[e]:n};a[e].reset.length>0&&a[e].reset.forEach(e=>{o[e]=""}),t&&s&&f(o),r&&r(o)}x()}else console.error(`ITD Form Error [updateField]: There is no field registered with this name: ${e}`)},isFormValid:n.useCallback(()=>c,[c]),isFieldsValid:function(e){let t=!0;return e.forEach(e=>{a[e].valid||(t=!1)}),t},isFieldValid:function(e){return a[e].valid},resetFields:function(e=!1,t=!1){Object.keys(a).forEach(r=>{if(!a[r].field.current?.hasOwnProperty("reset"))throw new Error(`ITD Reference Error: You must declare the 'reset' function on the field "${r}"`);a[r].field.current?.reset(e,t)}),o&&o()},removeFields:function(){s({})},formId:l,updated:p}}const mc=n.forwardRef(({initialValues:e,children:t,onUpdate:o,onReset:i,onFinish:a,onFinishFailed:s,onFieldUpdate:l,onValidated:d,useQueryString:c,className:u,name:p},f)=>{const h=n.useRef(null);n.useEffect(()=>()=>{h.current=null},[]),h.current=gc({name:p,onUpdate:o,onReset:i,onFieldUpdate:l,useQueryString:c}),n.useImperativeHandle(f,()=>h.current);return r.jsx(uc.Provider,{value:h.current,children:r.jsx(hc,{initialValues:e,useQueryString:c,onUpdate:o,onFinish:a,onFinishFailed:s,onValidated:d,name:p,className:(()=>{let e="itd-form";return p&&(e+=" "+p),u&&(e+=" "+u),e})(),children:t})})});mc.Item=pc,mc.Group=function({gap:e=15,horizontal:t=!1,className:n,children:o}){const i=()=>{let e="itd-form-group";return n&&(e+=" "+n),e};return r.jsx(Hd,{className:i(),$gap:e,$horizontal:t,children:o})},mc.Control=function({position:e="end",className:t,children:n}){const o=()=>{let e="itd-form-control";return t&&(e+=" "+t),e};return r.jsx(Ud,{className:o(),$position:e,children:n})},mc.useForm=()=>n.useContext(uc),mc.useFormAPI=()=>{const e=n.useContext(uc);if(!e)throw new Error("useFormAPI must be used within a FormContext.Provider");return e};const bc=l.div`
|
|
2385
|
+
`;const Gd=new RegExp(/^[a-zA-Z0-9.!#$%&'+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),Wd=new RegExp(/^[a-zA-Z0-9_.-]+$/),Yd=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+={};:<>|./?,"'\[\]\\`~\-])[a-zA-Z\d$begin:math:display$$end:math:display$\\`~!@#$%^&*()_+={};:<>|.\/?,"'-]{8,60}$/),qd=new RegExp(/^[a-z0-9._-]+$/),Xd=new RegExp(/^[a-zA-Z0-9]+$/),Kd=new RegExp(/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/);const Jd=e=>Yd.test(e),Zd=e=>Gd.test(e),Qd=e=>Wd.test(e),ec=(e,t)=>e.length>=t,tc=(e,t)=>e.length<=t,rc=(e,t)=>e===t,nc=(e,t)=>e!==t,oc=(e,t)=>e.length===t,ic=e=>qd.test(e),ac=e=>Xd.test(e),sc=e=>Kd.test(e),lc=(e,t)=>{if(!Array.isArray(t)||0===t.length)return!0;const r=String(e).trim().toLowerCase();return!t.some(e=>r===String(e).trim().toLowerCase())},dc=(e,t)=>!(!t||isNaN(e)||e<=0)&&e%t===0,cc=e=>function(e){var t,r=0,n=0,o=0;if(11!=e.length)return!1;if(!/^-?\d+$/.test(e))return!1;if(0==Number(e[0]))return!1;if(r=parseInt(e[0])+parseInt(e[2])+parseInt(e[4])+parseInt(e[6])+parseInt(e[8]),t=parseInt(e[1])+parseInt(e[3])+parseInt(e[5])+parseInt(e[7]),r*=7,Math.abs(r-t)%10!=Number(e[9]))return!1;for(o=0;o<10;o++)n+=parseInt(e[o]);return n%10==Number(e[10])}(e),uc=e=>{if(Array.isArray(e)){if(0===e.length)return!1}else{if("object"==typeof e){let t=!0;return Object.keys(e).forEach(r=>{""===e[r]&&(t=!1)}),t}if("string"==typeof e){if(""===e)return!1}else if("boolean"==typeof e&&!1===e)return!1}return!0},pc=n.createContext({});pc.displayName="ITDFormContext";const fc=n.forwardRef(({name:e="",id:r="",label:o="",placeholder:i="",error:a="",rules:s=[],mask:l=null,locked:d=!1,dependency:c="",reset:u=[],query:p="",children:f=null},h)=>{const{t:g}=t.useTranslation("itd"),m=n.useRef(null),b=n.useRef(""),{register:v,unregister:y,hasField:w,updateField:A,setFieldError:k,getFieldValue:S,getFieldInstance:_,formId:E}=n.useContext(pc),[C,j]=n.useState(!1);n.useEffect(()=>(v({name:e,field:m,valid:z(m.current?.getValue(),!1),query:p,reset:u,error:a}),j(!0),b.current=JSON.stringify(s),()=>{j(!1),y(e)}),[]),n.useEffect(()=>{const t=JSON.stringify(s);if(C&&m.current&&b.current!==t){const r=()=>{const t=m.current.getValue(),r=s.find(e=>e.hasOwnProperty("required"));if(!r||r.required||""!==t&&null!=t){const r=z(t,!1);w(e)&&A(e,t,!1,r)}else k(e,"",!0),w(e)&&A(e,t,!1,!0)};"development"===process.env.NODE_ENV?requestAnimationFrame(r):r(),b.current=t}},[s,C]),n.useImperativeHandle(h,()=>m.current);const $=(t,r=!0,n=!0)=>{C&&w(e)&&(A(e,t,r,z(t,n)),L())},z=(t,r=!0)=>{const n=function(e,t,r,n){let o=[];return e.forEach(e=>{if(e.hasOwnProperty(x.REQUIRED)&&!uc(t)&&e.required&&o.push(e.message?e.message:n("errors.required")),e.hasOwnProperty(x.TYPE)){if(e.type===exports.FormValidationTypes.MIN_LENGTH&&(ec(String(t),Number(e.value))||o.push(e.message?e.message:n("errors.minLength",{length:Number(e.value)}))),e.type===exports.FormValidationTypes.MAX_LENGTH&&(tc(String(t),Number(e.value))||o.push(e.message?e.message:n("errors.maxLength",{length:Number(e.value)}))),e.type===exports.FormValidationTypes.EXACT_LENGTH&&(oc(String(t),Number(e.value))||o.push(e.message?e.message:n("errors.exactLength",{length:Number(e.value)}))),e.type===exports.FormValidationTypes.SAME&&(rc(String(t),String(r(String(e.field))))||o.push(e.message?e.message:n("errors.fieldMustBeTheSame",{fields:e.field}))),e.type===exports.FormValidationTypes.NOT_SAME&&(nc(String(t),String(r(String(e.field))))||o.push(e.message?e.message:n("errors.fieldMustBeDifferent",{fields:e.field}))),e.type===exports.FormValidationTypes.TC_IDENTITY&&(cc(String(t))||o.push(e.message?e.message:n("errors.wrongTCIdentity"))),e.type===exports.FormValidationTypes.PASSWORD&&(Jd(String(t))||o.push(e.message?e.message:n("errors.passwordRule"))),e.type===exports.FormValidationTypes.EMAIL&&(Zd(String(t))||o.push(e.message?e.message:n("errors.invalidEmailAddress"))),e.type===exports.FormValidationTypes.USERNAME&&(Qd(String(t))||o.push(e.message?e.message:n("errors.usernameRule"))),e.type===exports.FormValidationTypes.SITE_USERNAME&&(ic(String(t))||o.push(e.message?e.message:n("errors.siteUsernameRule"))),e.type===exports.FormValidationTypes.ADMIN_USERNAME&&(ac(String(t))||o.push(e.message?e.message:n("errors.adminUsernameRule"))),e.type===exports.FormValidationTypes.URL&&(sc(String(t))||o.push(e.message?e.message:n("errors.invalidURL"))),e.type===exports.FormValidationTypes.FORBIDDEN_WORDS){const r=Array.isArray(e.value)?e.value:void 0!==e.value?[e.value]:[];lc(String(t),r)||o.push(e.message?e.message:n("errors.forbiddenWords"))}if(e.type===exports.FormValidationTypes.MULTIPLE_OF&&!dc(Number(t),Number(e.value))){const t=e.currency?`${e.currency}${e.value}`:String(e.value);o.push(e.message?e.message:n("errors.multipleOf",{value:t}))}}}),o}(s,t,S,g);return n.length>0?!!(r||""!==t&&null!=t)&&(r&&k(e,n[0],r),!1):(r&&k(e,""),!0)},L=()=>{if(""===c)return;if(""===S(c))return;const e=_(c);e&&e.forceUpdate&&e.forceUpdate()};return(()=>{if(!f)return null;let t=f.props;const a={id:t.id?t.id:r||E+"_"+e,label:o,placeholder:i,className:t.className?t.className+" itd-form-item":"itd-form-item",onUpdate:$,ref:m};return l&&(a.mask=l),d&&(a.locked=d),n.cloneElement(f,{...t,...a})})()}),hc=n.forwardRef(({name:e="",className:t="",initialValues:o={},useQueryString:i=!1,onUpdate:s,onFinish:l,onFinishFailed:d,onValidated:c,children:u},f)=>{const{updated:h,setInitialValues:g,isFormValid:m,getValues:b,getFields:x,setFieldValueByName:v,resetFields:y}=n.useContext(pc),w=V(),{search:A}=a.useLocation(),k=H(),[S,_]=n.useState([]),[E,C]=n.useState(!1),[j,$]=n.useState([]),[z,L]=n.useState(!1),[F,N]=n.useState(!1);n.useEffect(()=>{u&&B()},[u]),n.useEffect(()=>{M(),D()},[z]),n.useEffect(()=>{z||0!==Object.keys(x()).length&&0!==j.length&&Object.keys(x()).length===j.length&&L(!0)},[x(),j]),n.useEffect(()=>{D()},[o]),n.useEffect(()=>{M()},[A]),n.useEffect(()=>{F&&z&&i&&Object.keys(h).length>0&&R(h)},[h]),n.useEffect(()=>{c&&m()!==E&&c(m()),C(m())},[m()]);const M=()=>{z&&i&&(I(),F||O())},D=()=>{z&&(i||F||T())},T=()=>{const e=!Object.values(o).some(e=>null!==e&&""!==e);e&&!F&&N(!0),e||F||(g(o,!1),N(!0))},O=()=>{const e=x(),t=!Object.values(e).some(e=>""!==w.get(e.query,""));if(Object.values(e).some(e=>null===e.query||""===e.query)){let t=[];throw Object.keys(e).forEach(r=>{e[r].hasOwnProperty("query")&&null!==e[r].query&&""!==e[r].query||t.push(r)}),new Error(`ITD Form Initial Fields Error: "useQueryString" is activated but "query" value is not passed to whole form elements! Invalid fields are ${t.toString()}`)}if(t&&!F&&N(!0),!t&&!F){let t={};Object.keys(e).forEach(r=>{t[r]=w.get(e[r].query,"")}),g(t,!0,!0),N(!0)}},R=e=>{let t=[],r=[];const n=x();Object.keys(e).forEach(t=>{r.push(e[t])}),vi(r,S)||(Object.keys(n).forEach(r=>{t.push({type:n[r].query,value:e[r]})}),k.set(t))},I=()=>{let e=[],t=[];const r=x();if(Object.keys(r).forEach(t=>{let n=String(w.get(r[t].query,""));e.push(n)}),vi(e,S))return;_(e),Object.keys(r).forEach(e=>{t[e]=w.get(r[e].query,"")}),Object.keys(t).forEach(e=>{v(e,t[e],!1,!1)});let n={};Object.keys(t).forEach(e=>{n[e]=t[e]}),s&&s(n)},P=()=>{if(e)try{const t=new CustomEvent("itd-input-unlock",{detail:{formId:e}});document.dispatchEvent(t)}catch{}},B=()=>{let e=[];p.getChildrenDeep(u,t=>(t.hasOwnProperty("type")&&t.type===fc&&e.push({[t.props.name]:t}),!0)),$(e)};return n.useImperativeHandle(f,()=>({fieldUpdate(e){console.log("fieldUpdate"),console.log(e)}})),r.jsx("form",{id:e,onSubmit:e=>{e&&(e.preventDefault(),e.stopPropagation()),m()?l&&l(b()):d&&d(x())},onReset:e=>{e&&(e.preventDefault(),e.stopPropagation());let t=[];Object.keys(x()).map(e=>{t.push({type:e,value:""})}),k.set(t),y(!0,!1)},onPointerDown:P,onTouchStart:P,autoComplete:"off",className:t,noValidate:!0,children:u})});var gc=n.memo(hc);function mc({name:e="",useQueryString:t=!1,onUpdate:r,onReset:o,onFieldUpdate:i}){const[a,s]=n.useState({}),[l,d]=n.useState(e),[c,u]=n.useState(!1),[p,f]=n.useState({});function h(e){return a.hasOwnProperty(e)&&void 0!==a[e]}function g(e){return h(e)?a[e].field.current:null}function m(){let e={};return Object.keys(a).forEach(t=>{e[t]=v(t)}),e}function b(e,t,r=!0){if(h(e)&&a[e].field.current){if(a[e].valid=!1,a[e].error=t,!a[e].field.current?.hasOwnProperty("setError"))throw new Error(`ITD Reference Error: You must declare the 'setError' function on the field "${e}"`);a[e].field.current?.setError?.(r?t:"")}}function x(){let e=!0;return Object.keys(a).forEach(t=>{a[t].valid||(e=!1)}),u(e),e}function v(e){if(h(e)){if(a[e].field.current?.hasOwnProperty("getValue"))return a[e].field.current?.getValue();throw new Error(`ITD Reference Error: You must declare the 'getValue' function on the field "${e}"`)}console.error(`ITD Form Error [getFieldValueByName]: There is no field registered with this name: ${e}`)}function y(e,t,r,n){if(h(e)){if(!a[e].field.current?.hasOwnProperty("setValue"))throw new Error(`ITD Reference Error: You must declare the 'setValue' function on the field "${e}"`);{let o=v(e),i=!1;i=Array.isArray(o)&&Array.isArray(t)?vi(o,t):Array.isArray(o)||Array.isArray(t)?o.toString()===t.toString():o===t,i||a[e].field.current?.setValue(t,r,n)}}else console.error(`ITD Form Error [setFieldValueByName]: There is no field registered with this name: ${e}`)}return{register:function(e){a[e.name]={name:e.name,field:e.field,value:e.field.current?.getValue(),valid:e.valid,query:e.query,reset:e.reset,error:e.error}},unregister:function(e){h(e)?(delete a[e],x()):console.error(`ITD Form Error [unregister]: There is no field registered with this name: ${e}`)},scrollTo:function(e,t){const r=void 0!==t?t:{behavior:"smooth",block:"center",inline:"nearest"},n=e=>!(!e||"function"!=typeof e.scrollIntoView)&&(e.scrollIntoView(r),!0);if(h(e)){const t=g(e);if(t&&"function"==typeof t.scrollIntoView)return t.scrollIntoView(r),!0}if("undefined"!=typeof document){const t=document.getElementById(l);if(t){const r=e.startsWith(`${l}_`)?[`#${e}`]:[`#${e}`,`#${l}_${e}`];for(const e of r){if(n(t.querySelector(e)))return!0}}if(n(document.getElementById(e)))return!0}return console.error(`ITD Form Error [scrollTo]: Could not find element in form '${l}' by name/id '${e}'. ScrollIntoView not provided.`),!1},checkFormIsValid:x,hasField:h,getValues:m,getFieldValue:function(e){return h(e)?(t=a[e].value)instanceof Object?JSON.stringify(t):t:"";var t},getFieldValueByName:v,getFieldInstance:g,getFields:function(){let e={};return Object.keys(a).forEach(t=>{e[t]=a[t]}),e},getFieldsInstance:function(){let e={};return Object.keys(a).forEach(t=>{e[t]=a[t].field.current}),e},setName:function(e){d(e)},setInitialValues:function(e,n=!0,o=!1){Object.keys(e).forEach(t=>{y(t,e[t],n,o)});let i={};return Object.keys(e).forEach(t=>{i[t]=e[t]}),n&&(t&&f(i),r&&r(i)),x(),i},setInvalidField:function(e="",t=""){b(e,t),x()},setInvalidFields:function(e=[],t=""){e.forEach(e=>{b(e,t)}),x()},setFieldValue:function(e,t){h(e)?a[e].field.current?.setValue(t,!0,!0):console.error(`ITD Form Error [setFieldValue]: There is no field registered with this name: ${e}`)},setFieldValueByName:y,setFieldError:b,removeFieldError:function(e){if(h(e)){if(a[e].valid=!0,a[e].error="",!a[e].field.current?.hasOwnProperty("setError"))throw new Error(`ITD Reference Error: You must declare the 'setError' function on the field "${e}"`);a[e].field.current?.setError?.("")}else console.error(`ITD Form Error [removeFieldError]: There is no field registered with this name: ${e}`)},updateField:function(e,n,o,s){if(h(e)){if(a[e].value=n,a[e].valid=s,o){i&&i({name:e,value:n,valid:s}),a[e].reset.length>0&&a[e].reset.forEach(e=>{a[e].value="",a[e].valid=!1,a[e].field.current?.reset(!1)});let o={...m(),[e]:n};a[e].reset.length>0&&a[e].reset.forEach(e=>{o[e]=""}),t&&s&&f(o),r&&r(o)}x()}else console.error(`ITD Form Error [updateField]: There is no field registered with this name: ${e}`)},isFormValid:n.useCallback(()=>c,[c]),isFieldsValid:function(e){let t=!0;return e.forEach(e=>{a[e].valid||(t=!1)}),t},isFieldValid:function(e){return a[e].valid},resetFields:function(e=!1,t=!1){Object.keys(a).forEach(r=>{if(!a[r].field.current?.hasOwnProperty("reset"))throw new Error(`ITD Reference Error: You must declare the 'reset' function on the field "${r}"`);a[r].field.current?.reset(e,t)}),o&&o()},removeFields:function(){s({})},formId:l,updated:p}}const bc=n.forwardRef(({initialValues:e,children:t,onUpdate:o,onReset:i,onFinish:a,onFinishFailed:s,onFieldUpdate:l,onValidated:d,useQueryString:c,className:u,name:p},f)=>{const h=n.useRef(null);n.useEffect(()=>()=>{h.current=null},[]),h.current=mc({name:p,onUpdate:o,onReset:i,onFieldUpdate:l,useQueryString:c}),n.useImperativeHandle(f,()=>h.current);return r.jsx(pc.Provider,{value:h.current,children:r.jsx(gc,{initialValues:e,useQueryString:c,onUpdate:o,onFinish:a,onFinishFailed:s,onValidated:d,name:p,className:(()=>{let e="itd-form";return p&&(e+=" "+p),u&&(e+=" "+u),e})(),children:t})})});bc.Item=fc,bc.Group=function({gap:e=15,horizontal:t=!1,className:n,children:o}){const i=()=>{let e="itd-form-group";return n&&(e+=" "+n),e};return r.jsx(Hd,{className:i(),$gap:e,$horizontal:t,children:o})},bc.Control=function({position:e="end",className:t,children:n}){const o=()=>{let e="itd-form-control";return t&&(e+=" "+t),e};return r.jsx(Ud,{className:o(),$position:e,children:n})},bc.useForm=()=>n.useContext(pc),bc.useFormAPI=()=>{const e=n.useContext(pc);if(!e)throw new Error("useFormAPI must be used within a FormContext.Provider");return e};const xc=l.div`
|
|
2386
2386
|
|
|
2387
2387
|
&.itd-accordion-menu-sub-menu {
|
|
2388
2388
|
|
|
@@ -2551,7 +2551,7 @@
|
|
|
2551
2551
|
|
|
2552
2552
|
}
|
|
2553
2553
|
|
|
2554
|
-
`,
|
|
2554
|
+
`,vc=l.div`
|
|
2555
2555
|
|
|
2556
2556
|
font-size: ${e=>`${e.$size}px`};
|
|
2557
2557
|
width: ${e=>`${e.$size}px`};
|
|
@@ -2560,7 +2560,7 @@
|
|
|
2560
2560
|
display: flex;
|
|
2561
2561
|
align-items: center;
|
|
2562
2562
|
|
|
2563
|
-
`,
|
|
2563
|
+
`,yc=l.ul`
|
|
2564
2564
|
|
|
2565
2565
|
overflow: hidden;
|
|
2566
2566
|
transition: max-height 0.25s ease-out;
|
|
@@ -2568,7 +2568,7 @@
|
|
|
2568
2568
|
padding: 0px;
|
|
2569
2569
|
list-style-type: none;
|
|
2570
2570
|
|
|
2571
|
-
`,
|
|
2571
|
+
`,wc=l.div`
|
|
2572
2572
|
|
|
2573
2573
|
transition : all 0.25s ease-out;
|
|
2574
2574
|
margin-left : auto;
|
|
@@ -2582,7 +2582,7 @@
|
|
|
2582
2582
|
height: ${e=>e.$height+"px"};
|
|
2583
2583
|
}
|
|
2584
2584
|
|
|
2585
|
-
`,
|
|
2585
|
+
`,Ac=l.div`
|
|
2586
2586
|
|
|
2587
2587
|
display: flex;
|
|
2588
2588
|
justify-content: flex-start;
|
|
@@ -2595,7 +2595,7 @@
|
|
|
2595
2595
|
user-select: none;
|
|
2596
2596
|
}
|
|
2597
2597
|
|
|
2598
|
-
`;const
|
|
2598
|
+
`;const kc=l.div`
|
|
2599
2599
|
|
|
2600
2600
|
height: ${e=>`${e.$itemHeight}px`};
|
|
2601
2601
|
|
|
@@ -2609,12 +2609,12 @@
|
|
|
2609
2609
|
user-select: none;
|
|
2610
2610
|
}
|
|
2611
2611
|
|
|
2612
|
-
`,
|
|
2612
|
+
`,Sc=l.div`
|
|
2613
2613
|
|
|
2614
2614
|
margin-left: auto;
|
|
2615
2615
|
transform: rotate(-90deg);
|
|
2616
2616
|
|
|
2617
|
-
`,
|
|
2617
|
+
`,_c=l.div`
|
|
2618
2618
|
|
|
2619
2619
|
display: flex;
|
|
2620
2620
|
flex-direction: column;
|
|
@@ -2628,7 +2628,7 @@
|
|
|
2628
2628
|
font-size: 14px;
|
|
2629
2629
|
line-height: 14px;
|
|
2630
2630
|
|
|
2631
|
-
`,
|
|
2631
|
+
`,Ec=({useLink:e=!1,onlyOne:t=!1,subMenuLinkArrow:o=!0,subMenuHeight:i=60,itemHeight:a=40,iconSize:s=22,arrowSize:l=10,className:d="",onChange:c,children:u})=>{const[p,f]=n.useState(""),h=e=>{f(e),c&&c(e)};return r.jsx(_c,{className:"itd-accordion-menu "+d,children:(()=>{if(u)return"string"==typeof u?u:n.Children.map(u,r=>n.cloneElement(r,{...r.props,useLink:e,onlyOne:t,subMenuLinkArrow:o,subMenuHeight:i,itemHeight:a,iconSize:s,arrowSize:l,isSelected:p===r.props.id,onChange:h}))})()})};Ec.SubMenu=function({id:e="",link:t="",icon:o="",title:i="",isSelected:s=!1,useLink:l=!1,onlyOne:d=!1,subMenuLinkArrow:c=!0,end:u=!1,subMenuHeight:p=60,itemHeight:f=40,iconSize:h=10,arrowSize:g=20,onChange:m=()=>{},children:b=null}){const x=a.useLocation(),[v,y]=n.useState(!1),[w,A]=n.useState(!1),[k,S]=n.useState("0px"),_=n.useRef(null);n.useEffect(()=>{E()&&_.current&&(_.current.style=`${_.current.scrollHeight}px`)},[]),n.useEffect(()=>{!s&&d&&A(!1)},[s]),n.useEffect(()=>{w&&m(e),S(w&&_.current?`${_.current.scrollHeight}px`:"0px")},[w]),n.useEffect(()=>{const e=E();y(e),e&&A(!0)},[x]);const E=()=>{if(!l&&s)return!0;let e=!1;return b&&Array.isArray(b)?b.forEach(t=>{x.pathname.indexOf(t?.props.link)>-1&&(e=!0)}):x.pathname.indexOf(t)>-1&&(e=!0),e},C=()=>{A(!w)},j=()=>r.jsx(wc,{className:"itd-accordion-menu-header-arrow-icon itd-svg",$width:g,$height:g,$isSingle:!b,$isOpen:w,children:r.jsx(ni,{width:g,height:g})}),$=()=>{let e="itd-accordion-menu-header-icon";return"string"!=typeof o?e+=" itd-icon":""!==o&&(e+=" itd-icon "+o),e},z=()=>{let e="itd-accordion-menu-sub-menu";return w&&(e+=" itd-accordion-menu-sub-menu-open"),b||(e+=" itd-accordion-menu-sub-menu-single"),v&&(e+=" itd-accordion-menu-sub-menu-active"),b&&(e+=" itd-accordion-menu-sub-menu-multiple"),e};return r.jsxs(xc,{className:z(),children:[b?r.jsxs(Ac,{$height:p,onClick:C,className:"itd-accordion-menu-header",children:[r.jsx(vc,{className:$(),$size:h,children:"string"==typeof o?null:o}),r.jsx("span",{className:"itd-accordion-menu-header-text",children:i}),j()]}):r.jsxs(Ac,{$height:p,className:"itd-accordion-menu-header",as:a.NavLink,to:t,end:u,children:[r.jsx(vc,{className:$(),$size:h,children:"string"==typeof o?null:o}),r.jsx("span",{className:"itd-accordion-menu-header-text",children:i}),c?j():null]}),b?r.jsx(yc,{ref:_,style:{maxHeight:`${k}`},className:"itd-accordion-menu-collapse",children:n.Children.map(b,e=>n.cloneElement(e,{...e.props,itemHeight:f,arrowSize:g,active:x.pathname.indexOf(e.props.link)>-1}))}):null]})},Ec.Item=({link:e="",itemHeight:t=40,arrowSize:n=20,active:o=!1,end:i=!1,children:s=null})=>r.jsx("li",{className:"itd-accordion-menu-content-item",children:r.jsxs(kc,{$itemHeight:t,$isActive:o,className:"itd-accordion-menu-content",as:a.NavLink,end:i,to:e,children:[r.jsx("span",{className:"itd-accordion-menu-content-header-text",children:s}),r.jsx(Sc,{width:n,height:n,as:ni,className:"itd-accordion-menu-content-header-arrow-icon itd-svg"})]})});const Cc=l.div`
|
|
2632
2632
|
|
|
2633
2633
|
position: relative;
|
|
2634
2634
|
cursor: pointer;
|
|
@@ -2718,12 +2718,12 @@
|
|
|
2718
2718
|
}
|
|
2719
2719
|
`}
|
|
2720
2720
|
|
|
2721
|
-
`;function
|
|
2721
|
+
`;function jc({date:e,today:t,current:n,disabled:o,selected:i,handleClick:a,children:s}){const l=()=>{let e="itd-calendar-day";return t&&(e+=" itd-calendar-day-today"),i&&(e+=" itd-calendar-day-selected"),o&&(e+=" itd-calendar-day-disabled"),n&&(e+=" itd-calendar-day-current"),e};return r.jsx(Cc,{className:l(),$today:t,$selected:i,$disabled:o,$current:n,onClick:()=>a(e),children:r.jsx("span",{children:s})})}const $c=l.div`
|
|
2722
2722
|
|
|
2723
2723
|
display: flex;
|
|
2724
2724
|
height: 40px;
|
|
2725
2725
|
|
|
2726
|
-
|
|
2726
|
+
`,zc=l.div`
|
|
2727
2727
|
|
|
2728
2728
|
flex: auto;
|
|
2729
2729
|
display: flex;
|
|
@@ -2749,7 +2749,7 @@
|
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
2751
2751
|
|
|
2752
|
-
`,
|
|
2752
|
+
`,Lc=l.a`
|
|
2753
2753
|
|
|
2754
2754
|
span {
|
|
2755
2755
|
transform: rotate(135deg);
|
|
@@ -2788,7 +2788,7 @@
|
|
|
2788
2788
|
}
|
|
2789
2789
|
|
|
2790
2790
|
|
|
2791
|
-
`,
|
|
2791
|
+
`,Fc=l.a`
|
|
2792
2792
|
|
|
2793
2793
|
span {
|
|
2794
2794
|
transform: rotate(-45deg);
|
|
@@ -2827,7 +2827,7 @@
|
|
|
2827
2827
|
}
|
|
2828
2828
|
|
|
2829
2829
|
|
|
2830
|
-
`,
|
|
2830
|
+
`,Nc=l.a`
|
|
2831
2831
|
|
|
2832
2832
|
span {
|
|
2833
2833
|
transform: rotate(135deg);
|
|
@@ -2870,7 +2870,7 @@
|
|
|
2870
2870
|
left: 4px;
|
|
2871
2871
|
}
|
|
2872
2872
|
|
|
2873
|
-
`,
|
|
2873
|
+
`,Mc=l.a`
|
|
2874
2874
|
|
|
2875
2875
|
span {
|
|
2876
2876
|
transform: rotate(-45deg);
|
|
@@ -2913,20 +2913,20 @@
|
|
|
2913
2913
|
left: 4px;
|
|
2914
2914
|
}
|
|
2915
2915
|
|
|
2916
|
-
`;function
|
|
2916
|
+
`;function Dc(e){const{month:t="",year:o="",onPrevYear:i=null,onPrevMonth:a=null,onNextMonth:s=null,onNextYear:l=null,onClickMonth:d=null,onClickYear:c=null,viewMode:u="days",decadeLabel:p=""}=e;n.useEffect(()=>{},[]);return r.jsxs($c,{className:"itd-calendar-header",children:[r.jsx(Mc,{className:"itd-calendar-prev-year",onClick:i,children:r.jsx("span",{})}),"days"===u&&r.jsx(Fc,{className:"itd-calendar-prev-month",onClick:a,children:r.jsx("span",{})}),r.jsxs(zc,{className:"itd-calendar-middle",children:["days"===u&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"itd-calendar-middle-month",onClick:d,children:t}),r.jsx("div",{className:"itd-calendar-middle-year",onClick:c,children:o})]}),"months"===u&&r.jsx("div",{className:"itd-calendar-middle-year",onClick:c,children:o}),"years"===u&&r.jsx("div",{className:"itd-calendar-middle-decade",children:p||o})]}),"days"===u&&r.jsx(Lc,{className:"itd-calendar-next-month",onClick:s,children:r.jsx("span",{})}),r.jsx(Nc,{className:"itd-calendar-next-year",onClick:l,children:r.jsx("span",{})})]})}const Tc=l.div`
|
|
2917
2917
|
|
|
2918
2918
|
width: 280px;
|
|
2919
2919
|
border-radius: 6px;
|
|
2920
2920
|
background-color: #1D2649;
|
|
2921
2921
|
padding: 4px 14px 14px 14px;
|
|
2922
2922
|
|
|
2923
|
-
`,
|
|
2923
|
+
`,Oc=l.div`
|
|
2924
2924
|
|
|
2925
2925
|
display: grid;
|
|
2926
2926
|
grid-template-columns: repeat(7, 1fr);
|
|
2927
2927
|
grid-gap: 4px 0;
|
|
2928
2928
|
|
|
2929
|
-
`,
|
|
2929
|
+
`,Rc=l.div`
|
|
2930
2930
|
|
|
2931
2931
|
display: grid;
|
|
2932
2932
|
grid-gap: 0;
|
|
@@ -2948,14 +2948,14 @@
|
|
|
2948
2948
|
|
|
2949
2949
|
}
|
|
2950
2950
|
|
|
2951
|
-
`,
|
|
2951
|
+
`,Ic=l.div`
|
|
2952
2952
|
|
|
2953
2953
|
width: 100%;
|
|
2954
2954
|
height: 1px;
|
|
2955
2955
|
margin: 4px 0;
|
|
2956
2956
|
background-color: #505A7D60;
|
|
2957
2957
|
|
|
2958
|
-
`,
|
|
2958
|
+
`,Pc=l.div`
|
|
2959
2959
|
|
|
2960
2960
|
display: grid;
|
|
2961
2961
|
grid-template-columns: repeat(3, 1fr);
|
|
@@ -2974,7 +2974,7 @@
|
|
|
2974
2974
|
outline: 2px solid #2F74FF;
|
|
2975
2975
|
}
|
|
2976
2976
|
|
|
2977
|
-
`,
|
|
2977
|
+
`,Bc=l.div`
|
|
2978
2978
|
|
|
2979
2979
|
display: grid;
|
|
2980
2980
|
grid-template-columns: repeat(4, 1fr);
|
|
@@ -2992,7 +2992,7 @@
|
|
|
2992
2992
|
.itd-calendar-year-current { outline: 2px solid #2F74FF; }
|
|
2993
2993
|
.itd-calendar-year-outside { color: #ffffff80; }
|
|
2994
2994
|
|
|
2995
|
-
`,
|
|
2995
|
+
`,Vc=({value:e="",defaultValue:o="",className:i,onChange:a,disabledDate:s})=>{const{dateFormat:l}=n.useContext(Io),{t:c}=t.useTranslation("calendar"),[u,p]=n.useState(0),[f,h]=n.useState([]),[g,m]=n.useState(null),[b,x]=n.useState(d()),[v,y]=n.useState(null),[w,A]=n.useState("days"),k=e=>d(e,"MM/DD/YYYY"),S=()=>b.format("YYYY"),_=()=>b.format("M");n.useEffect(()=>{C(),E(o)},[]),n.useEffect(()=>{E(e)},[e]),n.useEffect(()=>{L()},[b]);const E=e=>{if(""===e)return;const t=d(e,l,!0);t.isValid()&&(y(t),x(t))},C=()=>{const e={weekdaysLong:c("weekdaysLong",{returnObjects:!0}),weekdaysShort:c("weekdaysShort",{returnObjects:!0}),months:c("months",{returnObjects:!0}),firstDay:parseInt(c("firstDay")),format:c("format")};j(e)},j=e=>{m(e),h(e.weekdaysShort),p(e.firstDay)},$=e=>!!s&&s(e),z=e=>{var t=e.format(l);a&&a({localizated:t,global:e.format("YYYY-MM-DD")})},L=()=>{const e=((e,t,r)=>{const n=Number.isInteger(r)&&r>=0&&r<=6?r:0;let o=d();Number.isInteger(e)&&Number.isInteger(t)&&(o=o.month(e-1).year(t));const i=o.startOf("month"),a=o.endOf("month"),s=[],l=[],c=[];let u=null;u=i;let p=0;for(;u.day()!==n&&p<7;)u=u.subtract(1,"day"),s.push(u.format("MM/DD/YYYY")),p++;for(u=i;u.month()===e-1;)l.push(u.format("MM/DD/YYYY")),u=u.add(1,"day");for(u=a;s.length+l.length+c.length<42;)u=u.add(1,"day"),c.push(u.format("MM/DD/YYYY"));return[...s.reverse(),...l,...c]})(Number(_()),Number(S()),u);let t=[];for(let n=0;n<e.length;n++){const o=k(e[n]);let i={date:o,handleClick:z};o.isSame(k(d().format("MM/DD/YYYY")))&&(i.today=!0),o.isSame(v)&&(i.selected=!0),o.format("M")===_()&&(i.current=!0),$(o)&&(i.disabled=!0),t.push(r.jsx(jc,{...i,children:o.format("D")},n))}return t},F=()=>{let e=[];for(let t=0;t<f.length;t++)e.push(r.jsx("div",{children:r.jsx("span",{children:f[t]})},t));return e},N=e=>{if("month"===e&&"days"!==w)return;const t="year"===e&&"years"===w?10:1;x(b.clone().subtract(t,e))},M=e=>{if("month"===e&&"days"!==w)return;const t="year"===e&&"years"===w?10:1;x(b.clone().add(t,e))},D=()=>{A("months")},T=()=>{A("years")},O=()=>{const e=g?.months||[];return r.jsx(Pc,{className:"itd-calendar-months",children:e.map((e,t)=>r.jsx("button",{type:"button",className:"itd-calendar-month"+(b.month()===t?" itd-calendar-month-current":""),onClick:()=>{return e=t,x(b.clone().month(e)),void A("days");var e},children:e},t))})},R=()=>{const e=10*Math.floor(b.year()/10),t=Array.from({length:12},(t,r)=>e-1+r);return r.jsx(Bc,{className:"itd-calendar-years",children:t.map(t=>r.jsx("button",{type:"button",className:"itd-calendar-year"+(b.year()===t?" itd-calendar-year-current":"")+(t<e||t>e+9?" itd-calendar-year-outside":""),onClick:()=>{return e=t,x(b.clone().year(e)),void A("months");var e},children:t},t))})},I=()=>{let e="itd-calendar";return""!==i&&(e+=" "+i),e};return g?r.jsxs(Tc,{className:I(),children:[r.jsx(Dc,{month:g?.months[Number(_())-1],year:S(),onPrevYear:()=>N("year"),onPrevMonth:()=>N("month"),onNextYear:()=>M("year"),onNextMonth:()=>M("month"),onClickMonth:D,onClickYear:T,viewMode:w,decadeLabel:(()=>{if("years"!==w)return"";const e=10*Math.floor(b.year()/10);return`${e}-${e+9}`})()}),r.jsx(Ic,{className:"itd-calendar-separator"}),"days"===w&&r.jsxs(r.Fragment,{children:[r.jsx(Rc,{className:"itd-calendar-weekdays",children:F()}),r.jsx(Oc,{className:"itd-calendar-days",children:L()})]}),"months"===w&&O(),"years"===w&&R()]}):null},Hc=l.div`
|
|
2996
2996
|
|
|
2997
2997
|
position: relative;
|
|
2998
2998
|
height: max-content;
|
|
@@ -3029,7 +3029,7 @@
|
|
|
3029
3029
|
cursor: not-allowed;
|
|
3030
3030
|
`}
|
|
3031
3031
|
|
|
3032
|
-
`,
|
|
3032
|
+
`,Uc=l.div`
|
|
3033
3033
|
|
|
3034
3034
|
box-shadow: 0 0 30px rgba(0,0,0,.25);
|
|
3035
3035
|
z-index: 2;
|
|
@@ -3041,7 +3041,7 @@
|
|
|
3041
3041
|
transform-box: fill-box;
|
|
3042
3042
|
transition-timing-function: cubic-bezier(.75,-0.5,0,1.25);
|
|
3043
3043
|
|
|
3044
|
-
`,
|
|
3044
|
+
`,Gc=l.div`
|
|
3045
3045
|
|
|
3046
3046
|
display: flex;
|
|
3047
3047
|
align-items: center;
|
|
@@ -3058,7 +3058,7 @@
|
|
|
3058
3058
|
}
|
|
3059
3059
|
}
|
|
3060
3060
|
|
|
3061
|
-
`,Gc=({className:e="",height:t=14,width:n=14,color:o="currentColor"})=>r.jsx("svg",{className:e,height:t,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",children:r.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsx("path",{d:"M7,0 C10.8659932,0 14,3.13400675 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M9.74443227,3.66246239 C9.4522194,3.58972861 9.14372814,3.68431145 8.9425,3.90833333 L7,5.85083333 L5.0575,3.90833333 C4.73574797,3.61931887 4.24412827,3.63248502 3.93830665,3.93830665 C3.63248502,4.24412827 3.61931887,4.73574797 3.90833333,5.0575 L5.85083333,7 L3.90833333,8.9425 C3.68431145,9.14372814 3.58972861,9.4522194 3.66246239,9.74443227 C3.73519617,10.0366451 3.96335486,10.2648038 4.25556773,10.3375376 C4.5477806,10.4102714 4.85627186,10.3156885 5.0575,10.0916667 L7,8.14916667 L8.9425,10.0916667 C9.14372814,10.3156885 9.4522194,10.4102714 9.74443227,10.3375376 C10.0366451,10.2648038 10.2648038,10.0366451 10.3375376,9.74443227 C10.4102714,9.4522194 10.3156885,9.14372814 10.0916667,8.9425 L8.14916667,7 L10.0916667,5.0575 C10.3156885,4.85627186 10.4102714,4.5477806 10.3375376,4.25556773 C10.2648038,3.96335486 10.0366451,3.73519617 9.74443227,3.66246239 Z",fill:o,fillRule:"nonzero"})})}),Wc=n.forwardRef(({id:e="",placeholder:t="",mask:o="##/##/####",size:a=exports.ComponentSizes.DEFAULT,variant:s="default",disabled:l=!1,floating:c=!1,position:u=exports.ComponentPositions.LEFT,className:p="",value:f="",defaultValue:h="",suffix:g,onUpdate:m,onChange:b,disabledDate:x},v)=>{const{dateFormat:y,locale:w}=n.useContext(Io),A=n.useRef(null),k=n.useRef(null),S=n.useRef(null),[_,E]=n.useState(""),[C,j]=n.useState(""),[$,z]=n.useState(!1),[L,F]=n.useState(e),[N,M]=n.useState({localizated:"",global:""}),[D,T]=n.useState(!1);n.useEffect(()=>(""===e&&F("itd-datepicker-"+fe()),""!==h&&(E(d(h).locale(w).format(y)),M({localizated:d(h).locale(w).format(y),global:h})),()=>{R(!1)}),[]),n.useEffect(()=>{""!==f&&(E(d(f).locale(w).format(y)),M({localizated:d(f).locale(w).format(y),global:f}))},[f]),n.useEffect(()=>{R($)},[$]),n.useEffect(()=>{k.current?.setError&&k.current.setError(C)},[C]),n.useEffect(()=>{""!==_&&(M({localizated:d(N.global).locale(w).format(y),global:N.global}),E(d(N.global).locale(w).format(y)))},[w]);const O=(e,t=!0,r=!0,n=!1)=>{if(!n&&(""===e.localizated||e.localizated===_))return;const o=W(e.localizated),i=o?e.global:"";E(o?e.localizated:""),m&&m(i,t,r)};n.useImperativeHandle(v,()=>({reset(e=!0,t=!0){j(""),M({localizated:"",global:""}),O("",e,t,!0)},setValue(e,t=!0,r=!0){if(N.global===e)return;const n={localizated:d(e).locale(w).format(y),global:e};M(n),O(n,t,r)},getValue:()=>""!==N.localizated?N.global:"",setError(e){j(e)},clear(){}}));const R=e=>{document[e?"addEventListener":"removeEventListener"]("pointerdown",I)},I=e=>{$&&A.current&&!A.current.contains(e.target)&&z(!1)},P=e=>{z(!(9===e.keyCode||27===e.keyCode))},B=()=>{z(!0)},V=()=>{k.current&&k.current.setFocus&&k.current.setFocus(),z(!0)},H=e=>{const t=W(e),r=o?.replace(/[^/(.*?)]/g,"_"),n={localizated:e,global:d(e,y,!0).format("YYYY-MM-DD")};j(""),t?(O(n),M(n)):E(""===e||e===r?"":e)},U=()=>{const e=o?.replace(/[^/(.*?)]/g,"_"),t=_;if(""===t)return void(""!==N.localizated&&E(N.localizated));(t.includes("_")||t===e||!W(t))&&(""!==N.localizated?E(N.localizated):E(""))},G=e=>{z(!1),M(e),O(e,!0),b&&b(e)},W=e=>{let t=d(e,y,!0).isValid(),r=!1;return x&&(r=x(d(e,y))),t&&!r},Y=()=>{let e="itd-date-picker";return e+=" itd-date-picker-"+ge(a),e+=" itd-date-picker-"+s,l&&(e+=" itd-date-picker-disabled"),C&&(e+=" itd-date-picker-error"),$&&(e+=" itd-date-picker-open"),""!==p&&(e+=" "+p),e};return r.jsxs(Vc,{className:Y(),$disabled:l,ref:A,onClick:l?void 0:V,children:[r.jsx("div",{onMouseEnter:()=>{T(!0)},onMouseLeave:()=>T(!1),children:r.jsx(Yu,{id:L,placeholder:t,value:_,floating:c,mask:o,size:a,variant:s,onChange:H,onFocus:B,onKeyDown:P,onBlur:U,keepFocus:$,focusRef:A,ref:k,disabled:l,suffix:r.jsx("div",{className:"itd-datepicker-suffix",children:D&&""!==N.localizated?r.jsx(Uc,{className:"itd-datepicker-remove-button",onClick:e=>{D&&""!==N.localizated&&(e.preventDefault(),e.stopPropagation(),M({localizated:"",global:""}),E(""),z(!1),b&&b({localizated:"",global:""}),m&&m("",!0,!0))},children:r.jsx(Gc,{width:14,height:14,className:"itd-datepicker-remove-icon clear"})}):g||r.jsx("span",{className:"itd-datepicker-icon",style:{opacity:1},children:"🗓️"})})})}),r.jsx(i.CSSTransition,{in:$,timeout:500,nodeRef:S,classNames:"datepicker-modal",unmountOnExit:!0,children:r.jsx(Hc,{$position:u,children:r.jsx(Bc,{value:N.localizated,defaultValue:N.localizated,onChange:G,disabledDate:x})})})]})});function Yc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}var qc;function Xc(){}function Kc(e){return!!(e||"").match(/\d/)}function Jc(e){return null==e}function Zc(e){return Jc(e)||function(e){return"number"==typeof e&&isNaN(e)}(e)||"number"==typeof e&&!isFinite(e)}function Qc(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function eu(e,t){void 0===t&&(t=!0);var r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNegation:r,addNegation:n}}function tu(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function ru(e,t){return Array(t+1).join(e)}function nu(e){var t=e+"",r="-"===t[0]?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(!(i=Number(i)))return r+o;var a=1+i,s=(o=o.replace(".","")).length;return a<0?o="0."+ru("0",Math.abs(a))+o:a>=s?o+=ru("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function ou(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=(-1!==e.indexOf(".")||r)&&t,o=eu(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,l=parseFloat("0."+(a||"0")),d=(a.length<=t?"0."+a:l.toFixed(t)).split("."),c=i;return i&&Number(d[0])&&(c=i.split("").reverse().reduce(function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},d[0])),""+(s?"-":"")+c+(n?".":"")+tu(d[1]||"",t,r)}function iu(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}!function(e){e.event="event",e.props="prop"}(qc||(qc={}));var au,su,lu,du=(au=function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}},lu=void 0,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return su&&e.length===su.length&&e.every(function(e,t){return e===su[t]})?lu:(su=e,lu=au.apply(void 0,e))});function cu(e){return Math.max(e.selectionStart,e.selectionEnd)}function uu(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function pu(e,t){return void 0===e&&(e=" "),"string"==typeof e?e:e[t]||" "}function fu(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function hu(e,t,r,n){var o,i,a,s=e.length;if(o=t,i=0,a=s,t=Math.min(Math.max(o,i),a),"left"===n){for(;t>=0&&!r[t];)t--;-1===t&&(t=r.indexOf(!0))}else{for(;t<=s&&!r[t];)t++;t>s&&(t=r.lastIndexOf(!0))}return-1===t&&(t=s),t}function gu(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=Boolean(Kc(e[r])||Kc(e[r-1]));return t}function mu(e,t,r,o,i,a){void 0===a&&(a=Xc);var s=function(e){var t=n.useRef(e);t.current=e;var r=n.useRef(function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return t.current.apply(t,e)});return r.current}(function(e,t){var r,n;return Zc(e)?(n="",r=""):"number"==typeof e||t?(n="number"==typeof e?nu(e):e,r=o(n)):(n=i(e,void 0),r=o(n)),{formattedValue:r,numAsString:n}}),l=n.useState(function(){return s(Jc(e)?t:e,r)}),d=l[0],c=l[1],u=e,p=r;Jc(e)&&(u=d.numAsString,p=!0);var f=s(u,p);return n.useMemo(function(){c(f)},[f.formattedValue]),[d,function(e,t){e.formattedValue!==d.formattedValue&&c({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}]}function bu(e){return e.replace(/[^0-9]/g,"")}function xu(e){return e}function vu(e){var t=e.type;void 0===t&&(t="text");var r=e.displayType;void 0===r&&(r="input");var o=e.customInput,i=e.renderText,a=e.getInputRef,s=e.format;void 0===s&&(s=xu);var l=e.removeFormatting;void 0===l&&(l=bu);var d=e.defaultValue,c=e.valueIsNumericString,u=e.onValueChange,p=e.isAllowed,f=e.onChange;void 0===f&&(f=Xc);var h=e.onKeyDown;void 0===h&&(h=Xc);var g=e.onMouseUp;void 0===g&&(g=Xc);var m=e.onFocus;void 0===m&&(m=Xc);var b=e.onBlur;void 0===b&&(b=Xc);var x=e.value,v=e.getCaretBoundary;void 0===v&&(v=gu);var y=e.isValidInputCharacter;void 0===y&&(y=Kc);var w=e.isCharacterSame,A=Yc(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),k=mu(x,d,Boolean(c),s,l,u),S=k[0],_=S.formattedValue,E=S.numAsString,C=k[1],j=n.useRef(),$=n.useRef({formattedValue:_,numAsString:E}),z=function(e,t){$.current={formattedValue:e.formattedValue,numAsString:e.value},C(e,t)},L=n.useState(!1),F=L[0],N=L[1],M=n.useRef(null),D=n.useRef({setCaretTimeout:null,focusTimeout:null});n.useEffect(function(){return N(!0),function(){clearTimeout(D.current.setCaretTimeout),clearTimeout(D.current.focusTimeout)}},[]);var T=s,O=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},R=function(e,t,r){0===e.selectionStart&&e.selectionEnd===e.value.length||(iu(e,t),D.current.setCaretTimeout=setTimeout(function(){e.value===r&&e.selectionStart!==t&&iu(e,t)},0))},I=function(e,t,r){return hu(e,t,v(e),r)},P=function(e,t,r){var n=v(t),o=function(e,t,r,n,o,i,a){void 0===a&&(a=fu);var s=o.findIndex(function(e){return e}),l=e.slice(0,s);t||r.startsWith(l)||(t=l,r=l+r,n+=l.length);for(var d=r.length,c=e.length,u={},p=new Array(d),f=0;f<d;f++){p[f]=-1;for(var h=0,g=c;h<g;h++)if(a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:f,formattedValueIndex:h})&&!0!==u[h]){p[f]=h,u[h]=!0;break}}for(var m=n;m<d&&(-1===p[m]||!i(r[m]));)m++;var b=m===d||-1===p[m]?c:p[m];for(m=n-1;m>0&&-1===p[m];)m--;var x=-1===m||-1===p[m]?0:p[m]+1;return x>b?b:n-x<b-n?x:b}(t,_,e,r,n,y,w);return o=hu(t,o,n)};n.useEffect(function(){var e=$.current,t=e.formattedValue,r=e.numAsString;_===t&&E===r||z(O(_,E),{event:void 0,source:qc.props})},[_,E]);var B=M.current?cu(M.current):void 0;("undefined"!=typeof window?n.useLayoutEffect:n.useEffect)(function(){var e=M.current;if(_!==$.current.formattedValue&&e){var t=P($.current.formattedValue,_,B);e.value=_,R(e,t,_)}},[_]);var V=function(e,t,r){var n=t.target,o=j.current?function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}}(j.current,n.selectionEnd):du(_,e),i=Object.assign(Object.assign({},o),{lastValue:_}),a=l(e,i),s=T(a);if(a=l(s,void 0),p&&!p(O(s,a))){var d=t.target,c=cu(d),u=P(e,_,c);return d.value=_,R(d,u,_),!1}return function(e){var t=e.formattedValue;void 0===t&&(t="");var r,n=e.input,o=e.source,i=e.event,a=e.numAsString;if(n){var s=e.inputValue||n.value,l=cu(n);n.value=t,void 0!==(r=P(s,t,l))&&R(n,r,t)}t!==_&&z(O(t,a),{event:i,source:o})}({formattedValue:s,numAsString:a,inputValue:e,event:t,source:r,input:t.target}),!0},H=function(e,t){void 0===t&&(t=0);var r=e.selectionStart,n=e.selectionEnd;j.current={selectionStart:r,selectionEnd:n+t}},U=!F||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",G=Object.assign({inputMode:U},A,{type:t,value:_,onChange:function(e){var t=e.target.value;V(t,e,qc.event)&&f(e),j.current=void 0},onKeyDown:function(e){var t,r=e.target,n=e.key,o=r.selectionStart,i=r.selectionEnd,a=r.value;void 0===a&&(a=""),"ArrowLeft"===n||"Backspace"===n?t=Math.max(o-1,0):"ArrowRight"===n?t=Math.min(o+1,a.length):"Delete"===n&&(t=o);var s=0;"Delete"===n&&o===i&&(s=1);var l="ArrowLeft"===n||"ArrowRight"===n;if(void 0===t||o!==i&&!l)return h(e),void H(r,s);var d=t;l?(d=I(a,t,"ArrowLeft"===n?"left":"right"))!==t&&e.preventDefault():"Delete"!==n||y(a[t])?"Backspace"!==n||y(a[t])||(d=I(a,t,"left")):d=I(a,t,"right");d!==t&&R(r,d,a),h(e),H(r,s)},onMouseUp:function(e){var t=e.target,r=function(){var e=t.selectionStart,r=t.selectionEnd,n=t.value;if(void 0===n&&(n=""),e===r){var o=I(n,e);o!==e&&R(t,o,n)}};r(),requestAnimationFrame(function(){r()}),g(e),H(t)},onFocus:function(e){e.persist&&e.persist();var t=e.target,r=e.currentTarget;M.current=t,D.current.focusTimeout=setTimeout(function(){var n=t.selectionStart,o=t.selectionEnd,i=t.value;void 0===i&&(i="");var a=I(i,n);a===n||0===n&&o===i.length||R(t,a,i),m(Object.assign(Object.assign({},e),{currentTarget:r}))},0)},onBlur:function(e){M.current=null,clearTimeout(D.current.focusTimeout),clearTimeout(D.current.setCaretTimeout),b(e)}});if("text"===r)return i?n.createElement(n.Fragment,null,i(_,A)||null):n.createElement("span",Object.assign({},A,{ref:a}),_);if(o){var W=o;return n.createElement(W,Object.assign({},G,{ref:a}))}return n.createElement("input",Object.assign({},G,{ref:a}))}function yu(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;void 0===o&&(o="");var i=t.suffix;void 0===i&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(void 0===s&&(s="thousand"),""===e||"-"===e)return e;var l=wu(t),d=l.thousandSeparator,c=l.decimalSeparator,u=0!==r&&-1!==e.indexOf(".")||r&&n,p=eu(e,a),f=p.beforeDecimal,h=p.afterDecimal,g=p.addNegation;return void 0!==r&&(h=tu(h,r,!!n)),d&&(f=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}(f,d,s)),o&&(f=o+f),i&&(h+=i),g&&(f="-"+f),e=f+(u&&c||"")+h}function wu(e){var t=e.decimalSeparator;void 0===t&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Au(e,t,r){var n;void 0===t&&(t=uu(e));var o=r.allowNegative,i=r.prefix;void 0===i&&(i="");var a=r.suffix;void 0===a&&(a="");var s=r.decimalScale,l=t.from,d=t.to,c=d.start,u=d.end,p=wu(r),f=p.allowedDecimalSeparators,h=p.decimalSeparator,g=e[u]===h;if(Kc(e)&&(e===i||e===a)&&""===t.lastValue)return e;if(u-c===1&&-1!==f.indexOf(e[c])){var m=0===s?"":h;e=e.substring(0,c)+m+e.substring(c+1,e.length)}var b=function(e,t,r){var n=!1,o=!1;i.startsWith("-")?n=!1:e.startsWith("--")?(n=!1,o=!0):a.startsWith("-")&&e.length===a.length?n=!1:"-"===e[0]&&(n=!0);var s=n?1:0;return o&&(s=2),s&&(e=e.substring(s),t-=s,r-=s),{value:e,start:t,end:r,hasNegation:n}},x=b(e,c,u),v=x.hasNegation;e=(n=x).value,c=n.start,u=n.end;var y=b(t.lastValue,l.start,l.end),w=y.start,A=y.end,k=y.value,S=e.substring(c,u);!(e.length&&k.length&&(w>k.length-a.length||A<i.length))||S&&a.startsWith(S)||(e=k);var _=0;e.startsWith(i)?_+=i.length:c<i.length&&(_=c),u-=_;var E=(e=e.substring(_)).length,C=e.length-a.length;e.endsWith(a)?E=C:(u>C||u>e.length-a.length)&&(E=u),e=e.substring(0,E),e=function(e,t){void 0===e&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}(v?"-"+e:e,o),e=(e.match(function(e){return new RegExp("(^-)|[0-9]|"+Qc(e),"g")}(h))||[]).join("");var j=e.indexOf(h),$=eu(e=e.replace(new RegExp(Qc(h),"g"),function(e,t){return t===j?".":""}),o),z=$.beforeDecimal,L=$.afterDecimal,F=$.addNegation;return d.end-d.start<l.end-l.start&&""===z&&g&&!parseFloat(L)&&(e=F?"-":""),e}function ku(e){e=function(e){var t=wu(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;void 0===o&&(o="");var i=e.allowNegative;if(void 0===i&&(i=!0),r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");return o.startsWith("-")&&i&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: "+o+"\n allowNegative: "+i+"\n "),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,o=e.onKeyDown;void 0===o&&(o=Xc);var i=e.onBlur;void 0===i&&(i=Xc);var a=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,d=e.prefix;void 0===d&&(d="");var c=e.defaultValue,u=e.value,p=e.valueIsNumericString,f=e.onValueChange,h=Yc(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=wu(e),m=g.decimalSeparator,b=g.allowedDecimalSeparators,x=function(t){return yu(t,e)},v=function(t,r){return Au(t,r,e)},y=Jc(u)?c:u,w=null!=p?p:function(e,t,r){return""===e||!(null==t?void 0:t.match(/\d/))&&!(null==r?void 0:r.match(/\d/))&&"string"==typeof e&&!isNaN(Number(e))}(y,d,t);Jc(u)?Jc(c)||(w=w||"number"==typeof c):w=w||"number"==typeof u;var A=function(e){return Zc(e)?e:("number"==typeof e&&(e=nu(e)),w&&"number"==typeof s?ou(e,s,Boolean(l)):e)},k=mu(A(u),A(c),Boolean(w),x,v,f),S=k[0],_=S.numAsString,E=S.formattedValue,C=k[1];return Object.assign(Object.assign({},h),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===m||Kc(e)},isCharacterSame:function(e){var t=e.currentValue,r=e.lastValue,n=e.formattedValue,o=e.currentValueIndex,i=e.formattedValueIndex,a=t[o],c=n[i],p=du(r,t).to,f=function(e){return v(e).indexOf(".")+d.length};return!(0===u&&l&&s&&t[p.start]===m&&f(t)<o&&f(n)>i)&&(!!(o>=p.start&&o<p.end&&b&&b.includes(a)&&c===m)||a===c)},onValueChange:C,format:x,removeFormatting:v,getCaretBoundary:function(t){return function(e,t){var r=t.prefix;void 0===r&&(r="");var n=t.suffix;void 0===n&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i="-"===e[0];o.fill(!1,0,r.length+(i?1:0));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}(t,e)},onKeyDown:function(e){var t=e.target,n=e.key,i=t.selectionStart,c=t.selectionEnd,u=t.value;if(void 0===u&&(u=""),("Backspace"===n||"Delete"===n)&&c<d.length)e.preventDefault();else if(i===c){"Backspace"===n&&"-"===u[0]&&i===d.length+1&&r&&iu(t,1),s&&l&&("Backspace"===n&&u[i-1]===m?(iu(t,i-1),e.preventDefault()):"Delete"===n&&u[i]===m&&e.preventDefault()),(null==b?void 0:b.includes(n))&&u[i]===m&&iu(t,i+1);var p=!0===a?",":a;"Backspace"===n&&u[i-1]===p&&iu(t,i-1),"Delete"===n&&u[i]===p&&iu(t,i+1),o(e)}else o(e)},onBlur:function(t){var r=_;if(r.match(/\d/g)||(r=""),n||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}(r)),l&&s&&(r=ou(r,s,l)),r!==_){var o=yu(r,e);C({formattedValue:o,value:r,floatValue:parseFloat(r)},{event:t,source:qc.event})}i(t)}})}function Su(e){var t=ku(e);return n.createElement(vu,Object.assign({},t))}function _u(e){e.mask,e.allowEmptyFormatting;var t=e.format,r=e.inputMode;void 0===r&&(r="numeric");var n=e.onKeyDown;void 0===n&&(n=Xc);var o=e.patternChar;void 0===o&&(o="#");var i=e.value,a=e.defaultValue,s=e.valueIsNumericString,l=Yc(e,["mask","allowEmptyFormatting","format","inputMode","onKeyDown","patternChar","value","defaultValue","valueIsNumericString"]);!function(e){var t=e.mask;if(t&&("string"===t?t:t.toString()).match(/\d/g))throw new Error("Mask "+t+" should not contain numeric character;")}(e);var d=function(t){return function(e,t){var r=t.format,n=t.mask,o=t.patternChar;void 0===o&&(o="#");var i=Array.from({length:e.length+1}).map(function(){return!0}),a=0,s=-1,l={};r.split("").forEach(function(t,r){var i=void 0;t===o&&(a++,i=pu(n,a-1),-1===s&&e[r]===i&&(s=r)),l[r]=i});for(var d=function(t){return r[t]===o&&e[t]!==l[t]},c=0,u=i.length;c<u;c++)i[c]=c===s||d(c)||d(c-1);return i[r.indexOf(o)]=!0,i}(t,e)},c=Jc(i)?a:i,u=null!=s?s:function(e,t){return""===e||!((null==t?void 0:t.match(/\d/))||"string"!=typeof e||!e.match(/^\d+$/)&&""!==e)}(c,t),p=Object.assign(Object.assign({},e),{valueIsNumericString:u});return Object.assign(Object.assign({},l),{value:i,defaultValue:a,valueIsNumericString:u,inputMode:r,format:function(e){return function(e,t){var r=t.format,n=t.allowEmptyFormatting,o=t.mask,i=t.patternChar;if(void 0===i&&(i="#"),""===e&&!n)return"";for(var a=0,s=r.split(""),l=0,d=r.length;l<d;l++)r[l]===i&&(s[l]=e[a]||pu(o,a),a+=1);return s.join("")}(e,p)},removeFormatting:function(e,t){return function(e,t,r){void 0===t&&(t=uu(e));var n=r.format,o=r.patternChar;void 0===o&&(o="#");var i=t.from,a=t.to,s=t.lastValue;void 0===s&&(s="");var l=function(e){return n[e]===o},d=function(e,t){for(var r="",n=0;n<e.length;n++)l(t+n)&&Kc(e[n])&&(r+=e[n]);return r},c=function(e){return e.replace(/[^0-9]/g,"")};if(!n.match(/\d/))return c(e);if((""===s||i.end-i.start===s.length)&&e.length===n.length){for(var u="",p=0;p<e.length;p++)if(l(p))Kc(e[p])&&(u+=e[p]);else if(e[p]!==n[p])return c(e);return u}var f=s.substring(0,i.start),h=e.substring(a.start,a.end),g=s.substring(i.end);return""+d(f,0)+c(h)+d(g,i.end)}(e,t,p)},getCaretBoundary:d,onKeyDown:function(e){var r=e.key,i=e.target,a=i.selectionStart,s=i.selectionEnd,l=i.value;if(a===s){var c=a;if("Backspace"===r||"Delete"===r){var u="right";if("Backspace"===r){for(;c>0&&t[c-1]!==o;)c--;u="left"}else{for(var p=t.length;c<p&&t[c]!==o;)c++;u="right"}c=hu(l,c,d(l),u)}else t[c]!==o&&"ArrowLeft"!==r&&"ArrowRight"!==r&&(c=hu(l,c+1,d(l),"right"));c!==a&&iu(i,c),n(e)}else n(e)}})}function Eu(e){var t=_u(e);return n.createElement(vu,Object.assign({},t))}const Cu=l.div`
|
|
3061
|
+
`,Wc=({className:e="",height:t=14,width:n=14,color:o="currentColor"})=>r.jsx("svg",{className:e,height:t,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",children:r.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsx("path",{d:"M7,0 C10.8659932,0 14,3.13400675 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M9.74443227,3.66246239 C9.4522194,3.58972861 9.14372814,3.68431145 8.9425,3.90833333 L7,5.85083333 L5.0575,3.90833333 C4.73574797,3.61931887 4.24412827,3.63248502 3.93830665,3.93830665 C3.63248502,4.24412827 3.61931887,4.73574797 3.90833333,5.0575 L5.85083333,7 L3.90833333,8.9425 C3.68431145,9.14372814 3.58972861,9.4522194 3.66246239,9.74443227 C3.73519617,10.0366451 3.96335486,10.2648038 4.25556773,10.3375376 C4.5477806,10.4102714 4.85627186,10.3156885 5.0575,10.0916667 L7,8.14916667 L8.9425,10.0916667 C9.14372814,10.3156885 9.4522194,10.4102714 9.74443227,10.3375376 C10.0366451,10.2648038 10.2648038,10.0366451 10.3375376,9.74443227 C10.4102714,9.4522194 10.3156885,9.14372814 10.0916667,8.9425 L8.14916667,7 L10.0916667,5.0575 C10.3156885,4.85627186 10.4102714,4.5477806 10.3375376,4.25556773 C10.2648038,3.96335486 10.0366451,3.73519617 9.74443227,3.66246239 Z",fill:o,fillRule:"nonzero"})})}),Yc=n.forwardRef(({id:e="",placeholder:t="",mask:o="##/##/####",size:a=exports.ComponentSizes.DEFAULT,variant:s="default",disabled:l=!1,floating:c=!1,position:u=exports.ComponentPositions.LEFT,className:p="",value:f="",defaultValue:h="",suffix:g,onUpdate:m,onChange:b,disabledDate:x},v)=>{const{dateFormat:y,locale:w}=n.useContext(Io),A=n.useRef(null),k=n.useRef(null),S=n.useRef(null),[_,E]=n.useState(""),[C,j]=n.useState(""),[$,z]=n.useState(!1),[L,F]=n.useState(e),[N,M]=n.useState({localizated:"",global:""}),[D,T]=n.useState(!1);n.useEffect(()=>(""===e&&F("itd-datepicker-"+fe()),""!==h&&(E(d(h).locale(w).format(y)),M({localizated:d(h).locale(w).format(y),global:h})),()=>{R(!1)}),[]),n.useEffect(()=>{""!==f&&(E(d(f).locale(w).format(y)),M({localizated:d(f).locale(w).format(y),global:f}))},[f]),n.useEffect(()=>{R($)},[$]),n.useEffect(()=>{k.current?.setError&&k.current.setError(C)},[C]),n.useEffect(()=>{""!==_&&(M({localizated:d(N.global).locale(w).format(y),global:N.global}),E(d(N.global).locale(w).format(y)))},[w]);const O=(e,t=!0,r=!0,n=!1)=>{if(!n&&(""===e.localizated||e.localizated===_))return;const o=W(e.localizated),i=o?e.global:"";E(o?e.localizated:""),m&&m(i,t,r)};n.useImperativeHandle(v,()=>({reset(e=!0,t=!0){j(""),M({localizated:"",global:""}),O("",e,t,!0)},setValue(e,t=!0,r=!0){if(N.global===e)return;const n={localizated:d(e).locale(w).format(y),global:e};M(n),O(n,t,r)},getValue:()=>""!==N.localizated?N.global:"",setError(e){j(e)},clear(){}}));const R=e=>{document[e?"addEventListener":"removeEventListener"]("pointerdown",I)},I=e=>{$&&A.current&&!A.current.contains(e.target)&&z(!1)},P=e=>{z(!(9===e.keyCode||27===e.keyCode))},B=()=>{z(!0)},V=()=>{k.current&&k.current.setFocus&&k.current.setFocus(),z(!0)},H=e=>{const t=W(e),r=o?.replace(/[^/(.*?)]/g,"_"),n={localizated:e,global:d(e,y,!0).format("YYYY-MM-DD")};j(""),t?(O(n),M(n)):E(""===e||e===r?"":e)},U=()=>{const e=o?.replace(/[^/(.*?)]/g,"_"),t=_;if(""===t)return void(""!==N.localizated&&E(N.localizated));(t.includes("_")||t===e||!W(t))&&(""!==N.localizated?E(N.localizated):E(""))},G=e=>{z(!1),M(e),O(e,!0),b&&b(e)},W=e=>{let t=d(e,y,!0).isValid(),r=!1;return x&&(r=x(d(e,y))),t&&!r},Y=()=>{let e="itd-date-picker";return e+=" itd-date-picker-"+ge(a),e+=" itd-date-picker-"+s,l&&(e+=" itd-date-picker-disabled"),C&&(e+=" itd-date-picker-error"),$&&(e+=" itd-date-picker-open"),""!==p&&(e+=" "+p),e};return r.jsxs(Hc,{className:Y(),$disabled:l,ref:A,onClick:l?void 0:V,children:[r.jsx("div",{onMouseEnter:()=>{T(!0)},onMouseLeave:()=>T(!1),children:r.jsx(qu,{id:L,placeholder:t,value:_,floating:c,mask:o,size:a,variant:s,onChange:H,onFocus:B,onKeyDown:P,onBlur:U,keepFocus:$,focusRef:A,ref:k,disabled:l,suffix:r.jsx("div",{className:"itd-datepicker-suffix",children:D&&""!==N.localizated?r.jsx(Gc,{className:"itd-datepicker-remove-button",onClick:e=>{D&&""!==N.localizated&&(e.preventDefault(),e.stopPropagation(),M({localizated:"",global:""}),E(""),z(!1),b&&b({localizated:"",global:""}),m&&m("",!0,!0))},children:r.jsx(Wc,{width:14,height:14,className:"itd-datepicker-remove-icon clear"})}):g||r.jsx("span",{className:"itd-datepicker-icon",style:{opacity:1},children:"🗓️"})})})}),r.jsx(i.CSSTransition,{in:$,timeout:500,nodeRef:S,classNames:"datepicker-modal",unmountOnExit:!0,children:r.jsx(Uc,{$position:u,children:r.jsx(Vc,{value:N.localizated,defaultValue:N.localizated,onChange:G,disabledDate:x})})})]})});function qc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}var Xc;function Kc(){}function Jc(e){return!!(e||"").match(/\d/)}function Zc(e){return null==e}function Qc(e){return Zc(e)||function(e){return"number"==typeof e&&isNaN(e)}(e)||"number"==typeof e&&!isFinite(e)}function eu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function tu(e,t){void 0===t&&(t=!0);var r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNegation:r,addNegation:n}}function ru(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function nu(e,t){return Array(t+1).join(e)}function ou(e){var t=e+"",r="-"===t[0]?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(!(i=Number(i)))return r+o;var a=1+i,s=(o=o.replace(".","")).length;return a<0?o="0."+nu("0",Math.abs(a))+o:a>=s?o+=nu("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function iu(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=(-1!==e.indexOf(".")||r)&&t,o=tu(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,l=parseFloat("0."+(a||"0")),d=(a.length<=t?"0."+a:l.toFixed(t)).split("."),c=i;return i&&Number(d[0])&&(c=i.split("").reverse().reduce(function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},d[0])),""+(s?"-":"")+c+(n?".":"")+ru(d[1]||"",t,r)}function au(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}!function(e){e.event="event",e.props="prop"}(Xc||(Xc={}));var su,lu,du,cu=(su=function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}},du=void 0,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return lu&&e.length===lu.length&&e.every(function(e,t){return e===lu[t]})?du:(lu=e,du=su.apply(void 0,e))});function uu(e){return Math.max(e.selectionStart,e.selectionEnd)}function pu(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function fu(e,t){return void 0===e&&(e=" "),"string"==typeof e?e:e[t]||" "}function hu(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function gu(e,t,r,n){var o,i,a,s=e.length;if(o=t,i=0,a=s,t=Math.min(Math.max(o,i),a),"left"===n){for(;t>=0&&!r[t];)t--;-1===t&&(t=r.indexOf(!0))}else{for(;t<=s&&!r[t];)t++;t>s&&(t=r.lastIndexOf(!0))}return-1===t&&(t=s),t}function mu(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=Boolean(Jc(e[r])||Jc(e[r-1]));return t}function bu(e,t,r,o,i,a){void 0===a&&(a=Kc);var s=function(e){var t=n.useRef(e);t.current=e;var r=n.useRef(function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return t.current.apply(t,e)});return r.current}(function(e,t){var r,n;return Qc(e)?(n="",r=""):"number"==typeof e||t?(n="number"==typeof e?ou(e):e,r=o(n)):(n=i(e,void 0),r=o(n)),{formattedValue:r,numAsString:n}}),l=n.useState(function(){return s(Zc(e)?t:e,r)}),d=l[0],c=l[1],u=e,p=r;Zc(e)&&(u=d.numAsString,p=!0);var f=s(u,p);return n.useMemo(function(){c(f)},[f.formattedValue]),[d,function(e,t){e.formattedValue!==d.formattedValue&&c({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}]}function xu(e){return e.replace(/[^0-9]/g,"")}function vu(e){return e}function yu(e){var t=e.type;void 0===t&&(t="text");var r=e.displayType;void 0===r&&(r="input");var o=e.customInput,i=e.renderText,a=e.getInputRef,s=e.format;void 0===s&&(s=vu);var l=e.removeFormatting;void 0===l&&(l=xu);var d=e.defaultValue,c=e.valueIsNumericString,u=e.onValueChange,p=e.isAllowed,f=e.onChange;void 0===f&&(f=Kc);var h=e.onKeyDown;void 0===h&&(h=Kc);var g=e.onMouseUp;void 0===g&&(g=Kc);var m=e.onFocus;void 0===m&&(m=Kc);var b=e.onBlur;void 0===b&&(b=Kc);var x=e.value,v=e.getCaretBoundary;void 0===v&&(v=mu);var y=e.isValidInputCharacter;void 0===y&&(y=Jc);var w=e.isCharacterSame,A=qc(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),k=bu(x,d,Boolean(c),s,l,u),S=k[0],_=S.formattedValue,E=S.numAsString,C=k[1],j=n.useRef(),$=n.useRef({formattedValue:_,numAsString:E}),z=function(e,t){$.current={formattedValue:e.formattedValue,numAsString:e.value},C(e,t)},L=n.useState(!1),F=L[0],N=L[1],M=n.useRef(null),D=n.useRef({setCaretTimeout:null,focusTimeout:null});n.useEffect(function(){return N(!0),function(){clearTimeout(D.current.setCaretTimeout),clearTimeout(D.current.focusTimeout)}},[]);var T=s,O=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},R=function(e,t,r){0===e.selectionStart&&e.selectionEnd===e.value.length||(au(e,t),D.current.setCaretTimeout=setTimeout(function(){e.value===r&&e.selectionStart!==t&&au(e,t)},0))},I=function(e,t,r){return gu(e,t,v(e),r)},P=function(e,t,r){var n=v(t),o=function(e,t,r,n,o,i,a){void 0===a&&(a=hu);var s=o.findIndex(function(e){return e}),l=e.slice(0,s);t||r.startsWith(l)||(t=l,r=l+r,n+=l.length);for(var d=r.length,c=e.length,u={},p=new Array(d),f=0;f<d;f++){p[f]=-1;for(var h=0,g=c;h<g;h++)if(a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:f,formattedValueIndex:h})&&!0!==u[h]){p[f]=h,u[h]=!0;break}}for(var m=n;m<d&&(-1===p[m]||!i(r[m]));)m++;var b=m===d||-1===p[m]?c:p[m];for(m=n-1;m>0&&-1===p[m];)m--;var x=-1===m||-1===p[m]?0:p[m]+1;return x>b?b:n-x<b-n?x:b}(t,_,e,r,n,y,w);return o=gu(t,o,n)};n.useEffect(function(){var e=$.current,t=e.formattedValue,r=e.numAsString;_===t&&E===r||z(O(_,E),{event:void 0,source:Xc.props})},[_,E]);var B=M.current?uu(M.current):void 0;("undefined"!=typeof window?n.useLayoutEffect:n.useEffect)(function(){var e=M.current;if(_!==$.current.formattedValue&&e){var t=P($.current.formattedValue,_,B);e.value=_,R(e,t,_)}},[_]);var V=function(e,t,r){var n=t.target,o=j.current?function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}}(j.current,n.selectionEnd):cu(_,e),i=Object.assign(Object.assign({},o),{lastValue:_}),a=l(e,i),s=T(a);if(a=l(s,void 0),p&&!p(O(s,a))){var d=t.target,c=uu(d),u=P(e,_,c);return d.value=_,R(d,u,_),!1}return function(e){var t=e.formattedValue;void 0===t&&(t="");var r,n=e.input,o=e.source,i=e.event,a=e.numAsString;if(n){var s=e.inputValue||n.value,l=uu(n);n.value=t,void 0!==(r=P(s,t,l))&&R(n,r,t)}t!==_&&z(O(t,a),{event:i,source:o})}({formattedValue:s,numAsString:a,inputValue:e,event:t,source:r,input:t.target}),!0},H=function(e,t){void 0===t&&(t=0);var r=e.selectionStart,n=e.selectionEnd;j.current={selectionStart:r,selectionEnd:n+t}},U=!F||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",G=Object.assign({inputMode:U},A,{type:t,value:_,onChange:function(e){var t=e.target.value;V(t,e,Xc.event)&&f(e),j.current=void 0},onKeyDown:function(e){var t,r=e.target,n=e.key,o=r.selectionStart,i=r.selectionEnd,a=r.value;void 0===a&&(a=""),"ArrowLeft"===n||"Backspace"===n?t=Math.max(o-1,0):"ArrowRight"===n?t=Math.min(o+1,a.length):"Delete"===n&&(t=o);var s=0;"Delete"===n&&o===i&&(s=1);var l="ArrowLeft"===n||"ArrowRight"===n;if(void 0===t||o!==i&&!l)return h(e),void H(r,s);var d=t;l?(d=I(a,t,"ArrowLeft"===n?"left":"right"))!==t&&e.preventDefault():"Delete"!==n||y(a[t])?"Backspace"!==n||y(a[t])||(d=I(a,t,"left")):d=I(a,t,"right");d!==t&&R(r,d,a),h(e),H(r,s)},onMouseUp:function(e){var t=e.target,r=function(){var e=t.selectionStart,r=t.selectionEnd,n=t.value;if(void 0===n&&(n=""),e===r){var o=I(n,e);o!==e&&R(t,o,n)}};r(),requestAnimationFrame(function(){r()}),g(e),H(t)},onFocus:function(e){e.persist&&e.persist();var t=e.target,r=e.currentTarget;M.current=t,D.current.focusTimeout=setTimeout(function(){var n=t.selectionStart,o=t.selectionEnd,i=t.value;void 0===i&&(i="");var a=I(i,n);a===n||0===n&&o===i.length||R(t,a,i),m(Object.assign(Object.assign({},e),{currentTarget:r}))},0)},onBlur:function(e){M.current=null,clearTimeout(D.current.focusTimeout),clearTimeout(D.current.setCaretTimeout),b(e)}});if("text"===r)return i?n.createElement(n.Fragment,null,i(_,A)||null):n.createElement("span",Object.assign({},A,{ref:a}),_);if(o){var W=o;return n.createElement(W,Object.assign({},G,{ref:a}))}return n.createElement("input",Object.assign({},G,{ref:a}))}function wu(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;void 0===o&&(o="");var i=t.suffix;void 0===i&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(void 0===s&&(s="thousand"),""===e||"-"===e)return e;var l=Au(t),d=l.thousandSeparator,c=l.decimalSeparator,u=0!==r&&-1!==e.indexOf(".")||r&&n,p=tu(e,a),f=p.beforeDecimal,h=p.afterDecimal,g=p.addNegation;return void 0!==r&&(h=ru(h,r,!!n)),d&&(f=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}(f,d,s)),o&&(f=o+f),i&&(h+=i),g&&(f="-"+f),e=f+(u&&c||"")+h}function Au(e){var t=e.decimalSeparator;void 0===t&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ku(e,t,r){var n;void 0===t&&(t=pu(e));var o=r.allowNegative,i=r.prefix;void 0===i&&(i="");var a=r.suffix;void 0===a&&(a="");var s=r.decimalScale,l=t.from,d=t.to,c=d.start,u=d.end,p=Au(r),f=p.allowedDecimalSeparators,h=p.decimalSeparator,g=e[u]===h;if(Jc(e)&&(e===i||e===a)&&""===t.lastValue)return e;if(u-c===1&&-1!==f.indexOf(e[c])){var m=0===s?"":h;e=e.substring(0,c)+m+e.substring(c+1,e.length)}var b=function(e,t,r){var n=!1,o=!1;i.startsWith("-")?n=!1:e.startsWith("--")?(n=!1,o=!0):a.startsWith("-")&&e.length===a.length?n=!1:"-"===e[0]&&(n=!0);var s=n?1:0;return o&&(s=2),s&&(e=e.substring(s),t-=s,r-=s),{value:e,start:t,end:r,hasNegation:n}},x=b(e,c,u),v=x.hasNegation;e=(n=x).value,c=n.start,u=n.end;var y=b(t.lastValue,l.start,l.end),w=y.start,A=y.end,k=y.value,S=e.substring(c,u);!(e.length&&k.length&&(w>k.length-a.length||A<i.length))||S&&a.startsWith(S)||(e=k);var _=0;e.startsWith(i)?_+=i.length:c<i.length&&(_=c),u-=_;var E=(e=e.substring(_)).length,C=e.length-a.length;e.endsWith(a)?E=C:(u>C||u>e.length-a.length)&&(E=u),e=e.substring(0,E),e=function(e,t){void 0===e&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}(v?"-"+e:e,o),e=(e.match(function(e){return new RegExp("(^-)|[0-9]|"+eu(e),"g")}(h))||[]).join("");var j=e.indexOf(h),$=tu(e=e.replace(new RegExp(eu(h),"g"),function(e,t){return t===j?".":""}),o),z=$.beforeDecimal,L=$.afterDecimal,F=$.addNegation;return d.end-d.start<l.end-l.start&&""===z&&g&&!parseFloat(L)&&(e=F?"-":""),e}function Su(e){e=function(e){var t=Au(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;void 0===o&&(o="");var i=e.allowNegative;if(void 0===i&&(i=!0),r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");return o.startsWith("-")&&i&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: "+o+"\n allowNegative: "+i+"\n "),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,o=e.onKeyDown;void 0===o&&(o=Kc);var i=e.onBlur;void 0===i&&(i=Kc);var a=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,d=e.prefix;void 0===d&&(d="");var c=e.defaultValue,u=e.value,p=e.valueIsNumericString,f=e.onValueChange,h=qc(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=Au(e),m=g.decimalSeparator,b=g.allowedDecimalSeparators,x=function(t){return wu(t,e)},v=function(t,r){return ku(t,r,e)},y=Zc(u)?c:u,w=null!=p?p:function(e,t,r){return""===e||!(null==t?void 0:t.match(/\d/))&&!(null==r?void 0:r.match(/\d/))&&"string"==typeof e&&!isNaN(Number(e))}(y,d,t);Zc(u)?Zc(c)||(w=w||"number"==typeof c):w=w||"number"==typeof u;var A=function(e){return Qc(e)?e:("number"==typeof e&&(e=ou(e)),w&&"number"==typeof s?iu(e,s,Boolean(l)):e)},k=bu(A(u),A(c),Boolean(w),x,v,f),S=k[0],_=S.numAsString,E=S.formattedValue,C=k[1];return Object.assign(Object.assign({},h),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===m||Jc(e)},isCharacterSame:function(e){var t=e.currentValue,r=e.lastValue,n=e.formattedValue,o=e.currentValueIndex,i=e.formattedValueIndex,a=t[o],c=n[i],p=cu(r,t).to,f=function(e){return v(e).indexOf(".")+d.length};return!(0===u&&l&&s&&t[p.start]===m&&f(t)<o&&f(n)>i)&&(!!(o>=p.start&&o<p.end&&b&&b.includes(a)&&c===m)||a===c)},onValueChange:C,format:x,removeFormatting:v,getCaretBoundary:function(t){return function(e,t){var r=t.prefix;void 0===r&&(r="");var n=t.suffix;void 0===n&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i="-"===e[0];o.fill(!1,0,r.length+(i?1:0));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}(t,e)},onKeyDown:function(e){var t=e.target,n=e.key,i=t.selectionStart,c=t.selectionEnd,u=t.value;if(void 0===u&&(u=""),("Backspace"===n||"Delete"===n)&&c<d.length)e.preventDefault();else if(i===c){"Backspace"===n&&"-"===u[0]&&i===d.length+1&&r&&au(t,1),s&&l&&("Backspace"===n&&u[i-1]===m?(au(t,i-1),e.preventDefault()):"Delete"===n&&u[i]===m&&e.preventDefault()),(null==b?void 0:b.includes(n))&&u[i]===m&&au(t,i+1);var p=!0===a?",":a;"Backspace"===n&&u[i-1]===p&&au(t,i-1),"Delete"===n&&u[i]===p&&au(t,i+1),o(e)}else o(e)},onBlur:function(t){var r=_;if(r.match(/\d/g)||(r=""),n||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}(r)),l&&s&&(r=iu(r,s,l)),r!==_){var o=wu(r,e);C({formattedValue:o,value:r,floatValue:parseFloat(r)},{event:t,source:Xc.event})}i(t)}})}function _u(e){var t=Su(e);return n.createElement(yu,Object.assign({},t))}function Eu(e){e.mask,e.allowEmptyFormatting;var t=e.format,r=e.inputMode;void 0===r&&(r="numeric");var n=e.onKeyDown;void 0===n&&(n=Kc);var o=e.patternChar;void 0===o&&(o="#");var i=e.value,a=e.defaultValue,s=e.valueIsNumericString,l=qc(e,["mask","allowEmptyFormatting","format","inputMode","onKeyDown","patternChar","value","defaultValue","valueIsNumericString"]);!function(e){var t=e.mask;if(t&&("string"===t?t:t.toString()).match(/\d/g))throw new Error("Mask "+t+" should not contain numeric character;")}(e);var d=function(t){return function(e,t){var r=t.format,n=t.mask,o=t.patternChar;void 0===o&&(o="#");var i=Array.from({length:e.length+1}).map(function(){return!0}),a=0,s=-1,l={};r.split("").forEach(function(t,r){var i=void 0;t===o&&(a++,i=fu(n,a-1),-1===s&&e[r]===i&&(s=r)),l[r]=i});for(var d=function(t){return r[t]===o&&e[t]!==l[t]},c=0,u=i.length;c<u;c++)i[c]=c===s||d(c)||d(c-1);return i[r.indexOf(o)]=!0,i}(t,e)},c=Zc(i)?a:i,u=null!=s?s:function(e,t){return""===e||!((null==t?void 0:t.match(/\d/))||"string"!=typeof e||!e.match(/^\d+$/)&&""!==e)}(c,t),p=Object.assign(Object.assign({},e),{valueIsNumericString:u});return Object.assign(Object.assign({},l),{value:i,defaultValue:a,valueIsNumericString:u,inputMode:r,format:function(e){return function(e,t){var r=t.format,n=t.allowEmptyFormatting,o=t.mask,i=t.patternChar;if(void 0===i&&(i="#"),""===e&&!n)return"";for(var a=0,s=r.split(""),l=0,d=r.length;l<d;l++)r[l]===i&&(s[l]=e[a]||fu(o,a),a+=1);return s.join("")}(e,p)},removeFormatting:function(e,t){return function(e,t,r){void 0===t&&(t=pu(e));var n=r.format,o=r.patternChar;void 0===o&&(o="#");var i=t.from,a=t.to,s=t.lastValue;void 0===s&&(s="");var l=function(e){return n[e]===o},d=function(e,t){for(var r="",n=0;n<e.length;n++)l(t+n)&&Jc(e[n])&&(r+=e[n]);return r},c=function(e){return e.replace(/[^0-9]/g,"")};if(!n.match(/\d/))return c(e);if((""===s||i.end-i.start===s.length)&&e.length===n.length){for(var u="",p=0;p<e.length;p++)if(l(p))Jc(e[p])&&(u+=e[p]);else if(e[p]!==n[p])return c(e);return u}var f=s.substring(0,i.start),h=e.substring(a.start,a.end),g=s.substring(i.end);return""+d(f,0)+c(h)+d(g,i.end)}(e,t,p)},getCaretBoundary:d,onKeyDown:function(e){var r=e.key,i=e.target,a=i.selectionStart,s=i.selectionEnd,l=i.value;if(a===s){var c=a;if("Backspace"===r||"Delete"===r){var u="right";if("Backspace"===r){for(;c>0&&t[c-1]!==o;)c--;u="left"}else{for(var p=t.length;c<p&&t[c]!==o;)c++;u="right"}c=gu(l,c,d(l),u)}else t[c]!==o&&"ArrowLeft"!==r&&"ArrowRight"!==r&&(c=gu(l,c+1,d(l),"right"));c!==a&&au(i,c),n(e)}else n(e)}})}function Cu(e){var t=Eu(e);return n.createElement(yu,Object.assign({},t))}const ju=l.div`
|
|
3062
3062
|
|
|
3063
3063
|
transition: background-color 0.2s ease;
|
|
3064
3064
|
border-radius: 6px;
|
|
@@ -3329,7 +3329,7 @@
|
|
|
3329
3329
|
|
|
3330
3330
|
`}
|
|
3331
3331
|
|
|
3332
|
-
|
|
3332
|
+
`,$u=l.div`
|
|
3333
3333
|
|
|
3334
3334
|
display : grid;
|
|
3335
3335
|
grid-auto-flow : column;
|
|
@@ -3348,13 +3348,13 @@
|
|
|
3348
3348
|
grid-template-columns: 1fr;
|
|
3349
3349
|
`}
|
|
3350
3350
|
|
|
3351
|
-
|
|
3351
|
+
`,zu=l.div`
|
|
3352
3352
|
|
|
3353
3353
|
width: 100%;
|
|
3354
3354
|
height: 100%;
|
|
3355
3355
|
justify-self: flex-start;
|
|
3356
3356
|
|
|
3357
|
-
`,
|
|
3357
|
+
`,Lu=l.div`
|
|
3358
3358
|
|
|
3359
3359
|
display: grid;
|
|
3360
3360
|
grid-auto-flow: column;
|
|
@@ -3362,7 +3362,7 @@
|
|
|
3362
3362
|
justify-items: flex-end;
|
|
3363
3363
|
width: 100%;
|
|
3364
3364
|
|
|
3365
|
-
`,
|
|
3365
|
+
`,Fu=l.div`
|
|
3366
3366
|
|
|
3367
3367
|
display: flex;
|
|
3368
3368
|
align-items: center;
|
|
@@ -3373,7 +3373,7 @@
|
|
|
3373
3373
|
transition: color .3s ease-out;
|
|
3374
3374
|
}
|
|
3375
3375
|
|
|
3376
|
-
`,
|
|
3376
|
+
`,Nu=l.div`
|
|
3377
3377
|
|
|
3378
3378
|
display: flex;
|
|
3379
3379
|
align-items: center;
|
|
@@ -3391,13 +3391,13 @@
|
|
|
3391
3391
|
justify-self: flex-end;
|
|
3392
3392
|
*/
|
|
3393
3393
|
|
|
3394
|
-
`,
|
|
3394
|
+
`,Mu=l.div`
|
|
3395
3395
|
|
|
3396
3396
|
display: flex;
|
|
3397
3397
|
align-items: center;
|
|
3398
3398
|
height: 100%;
|
|
3399
3399
|
|
|
3400
|
-
`,
|
|
3400
|
+
`,Du=l.div`
|
|
3401
3401
|
|
|
3402
3402
|
display: flex;
|
|
3403
3403
|
align-items: center;
|
|
@@ -3414,19 +3414,19 @@
|
|
|
3414
3414
|
transition: color .3s ease-out;
|
|
3415
3415
|
}
|
|
3416
3416
|
|
|
3417
|
-
`,
|
|
3417
|
+
`,Tu=l(Du)`
|
|
3418
3418
|
|
|
3419
3419
|
border-radius: 6px 0 0 6px;
|
|
3420
3420
|
|
|
3421
|
-
`,
|
|
3421
|
+
`,Ou=l(Du)`
|
|
3422
3422
|
|
|
3423
3423
|
border-radius: 0 6px 6px 0;
|
|
3424
3424
|
|
|
3425
|
-
`,
|
|
3425
|
+
`,Ru=l(ri)`
|
|
3426
3426
|
|
|
3427
3427
|
fill: #00000080;
|
|
3428
3428
|
|
|
3429
|
-
`,
|
|
3429
|
+
`,Iu=l.span`
|
|
3430
3430
|
|
|
3431
3431
|
position: absolute;
|
|
3432
3432
|
display: flex;
|
|
@@ -3461,7 +3461,7 @@
|
|
|
3461
3461
|
|
|
3462
3462
|
}
|
|
3463
3463
|
|
|
3464
|
-
`,
|
|
3464
|
+
`,Pu=l.div`
|
|
3465
3465
|
|
|
3466
3466
|
position: absolute;
|
|
3467
3467
|
border: 1px solid #f8285a;
|
|
@@ -3473,7 +3473,7 @@
|
|
|
3473
3473
|
pointer-events: none;
|
|
3474
3474
|
/* z-index: 1; */
|
|
3475
3475
|
|
|
3476
|
-
`,
|
|
3476
|
+
`,Bu=l.span`
|
|
3477
3477
|
|
|
3478
3478
|
border: 0;
|
|
3479
3479
|
clip: rect(1px 1px 1px 1px);
|
|
@@ -3485,7 +3485,7 @@
|
|
|
3485
3485
|
position: absolute;
|
|
3486
3486
|
width: 1px;
|
|
3487
3487
|
|
|
3488
|
-
`,
|
|
3488
|
+
`,Vu=l.div`
|
|
3489
3489
|
|
|
3490
3490
|
display: flex;
|
|
3491
3491
|
align-items: center;
|
|
@@ -3506,17 +3506,17 @@
|
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
3508
|
|
|
3509
|
-
`;l(
|
|
3509
|
+
`;l(Vu)`
|
|
3510
3510
|
|
|
3511
|
-
`,l(
|
|
3511
|
+
`,l(Vu)`
|
|
3512
3512
|
|
|
3513
|
-
`;const
|
|
3513
|
+
`;const Hu=l(Vu)`
|
|
3514
3514
|
|
|
3515
3515
|
&::before {
|
|
3516
3516
|
background-color: #f8285a;
|
|
3517
3517
|
}
|
|
3518
3518
|
|
|
3519
|
-
`;var
|
|
3519
|
+
`;var Uu,Gu="itd__floatingLabel__01e577ff";zd(".itd__defaultInput__01e577ff{height:100%}.itd__floatingInput__01e577ff{caret-color:rgba(0,0,0,.851);color:rgba(0,0,0,.851);font-size:13px}.itd__floatingInput__01e577ff::placeholder{color:#0000}.itd__floatingInput__01e577ff:disabled :not(.itd__floatingInput__01e577ff[data-locked=true]),.itd__floatingInput__01e577ff:disabled:not(.itd__floatingInput__01e577ff[data-locked=true]){opacity:.5}.itd__floatingLabel__01e577ff{display:block;font-size:16px;font-weight:500;max-height:0;pointer-events:none;position:relative}.itd__floatingLabel__01e577ff:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;color:#0009;content:attr(data-content);display:inline-block;filter:blur(0);position:relative;transform-origin:left top;transition:transform .2s ease-out}.itd__floatingInput__01e577ff:placeholder-shown+.itd__floatingLabel__01e577ff:before{font-smooth:always;-webkit-font-smoothing:antialiased;transform:translate3d(0,-32px,0) scale3d(.8,.8,1)}.itd__floatingInput__01e577ff:focus+.itd__floatingLabel__01e577ff:before,.itd__floatingLabel__01e577ff:before{transform:translate3d(0,-40px,0) scale3d(.8,.8,1)}.itd__floatingInput__01e577ff:focus+.itd__floatingLabel__01e577ff:before{color:#0009}.itd__floatingInputinput__01e577ff:-webkit-autofill,.itd__floatingInputinput__01e577ff:-webkit-autofill:focus,.itd__floatingInputinput__01e577ff:-webkit-autofill:hover{-webkit-text-fill-color:#3496fa!important;-webkit-box-shadow:inset 0 0 0 30px #151d3d!important}",{}),function(e){e.TEXT="text",e.NUMBER="number",e.CURRENCY="currency",e.PASSWORD="password"}(Uu||(Uu={}));let Wu=!1,Yu=!1;const qu=n.forwardRef(({id:e,placeholder:t="",value:o="",defaultValue:i="",type:a=Uu.TEXT,className:s="",size:l=exports.ComponentSizes.DEFAULT,variant:d="default",prefix:c=null,suffix:u=null,addonBefore:p=null,addonAfter:f=null,status:h=null,locked:g=null,minValue:m=0,maxValue:b=-1,maxLength:x=-1,disabled:v=!1,floating:y=!1,autoComplete:w=!1,keepFocus:A=!1,focusRef:k=null,mask:S=null,allowEmptyFormatting:_=!1,allowLeadingZeros:E=!1,decimalSeparator:C=".",thousandSeparator:j=",",decimalScale:$=2,onChange:z=null,onUpdate:L=null,onFocus:F=null,onBlur:N=null,onPressEnter:M=null,onKeyDown:D=null,children:T=null},O)=>{const R=n.useRef(null),I=n.useMemo(()=>e||"itd-input-"+fe(),[e]),[P,B]=n.useState(a===Uu.NUMBER?0:""),[V,H]=n.useState(""),[U,G]=n.useState(!1),[W,Y]=n.useState(!1),[q,X]=n.useState(!1),[K,J]=n.useState(!1),[Z,Q]=n.useState(!0),ee=()=>{!w&&Z&&Q(!1)},te=()=>{G(!1),ee()};n.useEffect(()=>{(()=>{if(Wu)return;Wu=!0,document.addEventListener("keydown",e=>{e&&"Tab"===e.key&&(Yu=!0)});const e=()=>{Yu=!1};document.addEventListener("mousedown",e,{passive:!0}),document.addEventListener("pointerdown",e,{passive:!0}),document.addEventListener("touchstart",e,{passive:!0})})(),re();const e=e=>{try{const t=(R.current?.id||"").split("_")[0];e?.detail?.formId&&t&&e.detail.formId===t&&!w&&Z&&Q(!1)}catch{}};return document.addEventListener("itd-input-unlock",e,{passive:!0}),i&&ne(i),()=>{document.removeEventListener("itd-input-unlock",e)}},[]),n.useEffect(()=>{if(!W)return;const e=e=>{R.current&&!R.current.contains(e.target)&&(G(!1),Y(!1),A&&k?.current&&X(k.current.contains(e.target)))},t=e=>{R.current&&R.current.contains(e.target)&&G(!1)};return document.addEventListener("mousedown",e),R.current?.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",e),R.current?.removeEventListener("mousedown",t)}},[W,A,k]),n.useEffect(()=>{ne(a===Uu.NUMBER?Number(o):String(o),!0,""!==o)},[o]);const re=()=>{R.current&&A&&R.current&&(R.current?.focus(),Y(!0))},ne=(e,t=!0,r=!0)=>{B(e),L&&L(e,t,r)};n.useImperativeHandle(O,()=>({setFocus(){R.current&&(Y(!0),R.current.focus()),X(!0)},reset(e=!0,t=!0){B(i||""),H(""),ne(a===Uu.NUMBER?0:"",e,t)},setValue(e,t=!0,r=!0){B(e),ne(e,t,r)},getValue:()=>P,setError(e){H(e)},forceUpdate(){ne(P)},clear(){B("")},scrollIntoView(e){R.current?.scrollIntoView(e)}}));const oe=e=>{const t="string"==typeof e&&S&&e.replace(/\D+/g,"").length<S.replace(/\D+/g,"").length;ne(e,!0,!t),z&&z(e)},ie=e=>{oe(e.value)},ae=e=>{R.current?.focus(),Y(!0),G(!0===Yu),!w&&Z&&Q(!1),F&&F(e)},se=e=>{Y(!1),G(!1),w||Q(!0),A&&q&&R.current&&(Y(!0),R.current.focus()),S&&"string"==typeof P&&P.replace(/\D+/g,"").length<S.replace(/\D+/g,"").length&&i&&ne(i,!0,!1),N?N(e):e.target.blur()},le=e=>{"Tab"===e.key&&G(!0),13===e.keyCode&&M&&M(e),D&&D(e)},de=()=>{let e={id:I,placeholder:t,value:P,type:a,spellCheck:"false",autoCorrect:"off",autoCapitalize:"none",className:y?we():ye(),onFocus:ae,onBlur:se,onKeyDown:le,disabled:v||g};return g&&(e["data-locked"]=!0),e=w?{...e,autoComplete:"on"}:{...e,autoComplete:"new-password",name:I,onMouseDown:te,onPointerDown:ee,onTouchStart:ee,readOnly:Z},S?(e={...e,format:S,mask:"_",allowEmptyFormatting:_,onChange:e=>oe(e.target.value)},r.jsx(Cu,{...e,getInputRef:R})):a===Uu.CURRENCY?(e={...e,maxLength:x,type:Uu.TEXT,allowLeadingZeros:E,decimalSeparator:C,thousandSeparator:j,decimalScale:$,getInputRef:R,onValueChange:ie,onMouseDown:te,isAllowed:e=>{const{floatValue:t}=e;return t>=m&&(t<=b||-1===b)||void 0===t}},r.jsx(_u,{...e})):a===Uu.NUMBER?(e={...e,type:Uu.NUMBER,maxLength:x,onMouseDown:te,onChange:e=>{const t=Number(e.target.value.replace(/,/g,"."));t>=m&&-1===b||t>=m&&t<=b?oe(t):t<m?oe(m):t>b&&oe(b)},ref:R},r.jsx("input",{...e})):(e={...e,maxLength:x,onChange:e=>oe(e.target.value),onMouseDown:te,ref:R},r.jsx("input",{...e}))},ce=()=>{if(p)return r.jsx(Tu,{className:"itd-input-addon-before",children:p})},ue=()=>{if(f)return r.jsx(Ou,{className:"itd-input-addon-after",children:f})},pe=()=>{if(c)return r.jsx(Fu,{className:"itd-input-prefix",children:c})},he=()=>{if(u)return r.jsx(Nu,{className:"itd-input-suffix",children:u})},me=()=>{if(g)return r.jsx(Mu,{className:"itd-input-locked",children:"boolean"!=typeof g?g:r.jsx(Ru,{className:"itd-svg",width:"18",height:"18"})})},be=()=>{if(""!==V&&!v)return r.jsx(Pu,{className:"itd-error-border"})},xe=r.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsxs("g",{id:"ErrorGroup",fillRule:"nonzero",children:[r.jsx("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),r.jsx("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),ve=()=>{if(""===V||v)return;let e={className:"itd-input-failed itd-failed-status",onPointerOver:()=>J(!0),onPointerOut:()=>J(!1)};return r.jsxs(Hu,{...e,children:[K?r.jsx(Iu,{className:"itd-input-error-tooltip itd-error-tooltip",children:V}):null,h||xe]})},ye=()=>"itd-input-default-input",we=()=>"itd-input-floating-input",Ae=()=>{let e="itd-input itd-input-"+a;return e+=" itd-input-"+ge(l),e+=" itd-input-"+d,S&&(e+=" itd-input-masked"),v&&(e+=" itd-input-disabled"),g&&(e+=" itd-input-locked"),""!==s&&(e+=" "+s),W&&U&&(e+=" keyboard-focus"),W&&(e+=" focused"),e};return(()=>{if(T)throw new Error("ITD Input Error: Remove the children!");return r.jsxs(ju,{className:Ae(),children:[ce(),r.jsxs($u,{$hasPrefix:null!==c,$hasSuffix:null!==u,$hasError:""!==V&&!v,children:[pe(),r.jsxs(zu,{className:"itd-input-middle",children:[de(),y?r.jsx("label",{htmlFor:I,className:"itd-input-floating-label "+Gu+" "+t,"data-content":t,children:r.jsx(Bu,{children:t})}):null,be()]}),r.jsxs(Lu,{children:[he(),me(),ve()]})]}),ue()]})})()});qu.displayName="ITD-Input";const Xu=l.div`
|
|
3520
3520
|
|
|
3521
3521
|
border: 1px solid #d9d9d900;
|
|
3522
3522
|
border-radius: 6px;
|
|
@@ -3669,7 +3669,7 @@
|
|
|
3669
3669
|
height: 100%;
|
|
3670
3670
|
justify-self: flex-start;
|
|
3671
3671
|
|
|
3672
|
-
`;const
|
|
3672
|
+
`;const Ku=l.div`
|
|
3673
3673
|
|
|
3674
3674
|
position: absolute;
|
|
3675
3675
|
border: 1px solid #f8285a;
|
|
@@ -3681,7 +3681,7 @@
|
|
|
3681
3681
|
pointer-events: none;
|
|
3682
3682
|
/* z-index: 1; */
|
|
3683
3683
|
|
|
3684
|
-
`,
|
|
3684
|
+
`,Ju=l.div`
|
|
3685
3685
|
|
|
3686
3686
|
display: flex;
|
|
3687
3687
|
align-items: center;
|
|
@@ -3702,17 +3702,17 @@
|
|
|
3702
3702
|
}
|
|
3703
3703
|
}
|
|
3704
3704
|
|
|
3705
|
-
`;l(
|
|
3705
|
+
`;l(Ju)`
|
|
3706
3706
|
|
|
3707
|
-
`,l(
|
|
3707
|
+
`,l(Ju)`
|
|
3708
3708
|
|
|
3709
|
-
`,l(
|
|
3709
|
+
`,l(Ju)`
|
|
3710
3710
|
|
|
3711
3711
|
&::before {
|
|
3712
3712
|
background-color: #f8285a;
|
|
3713
3713
|
}
|
|
3714
3714
|
|
|
3715
|
-
`;let
|
|
3715
|
+
`;let Zu=!1,Qu=!1;const ep=n.forwardRef(({id:e,placeholder:t="",value:o="",defaultValue:i="",className:a="",size:s=exports.ComponentSizes.DEFAULT,variant:l="default",rows:d=3,maxLength:c=-1,disabled:u=!1,showCount:p=!1,onChange:f,onUpdate:h,children:g},m)=>{const b=n.useRef(null),x=n.useMemo(()=>e||"itd-textarea-"+fe(),[e]),[v,y]=n.useState(""),[w,A]=n.useState(!1),[k,S]=n.useState(!1),[_,E]=n.useState("");n.useEffect(()=>{(()=>{if(Zu)return;Zu=!0,document.addEventListener("keydown",e=>{e&&"Tab"===e.key&&(Qu=!0)});const e=()=>{Qu=!1};document.addEventListener("mousedown",e,{passive:!0}),document.addEventListener("pointerdown",e,{passive:!0}),document.addEventListener("touchstart",e,{passive:!0})})(),i&&C(i)},[]),n.useEffect(()=>{C(String(o),!0,""!==o)},[o]);const C=(e,t=!0,r=!0)=>{y(e),h&&h(e,t,r)};n.useImperativeHandle(m,()=>({setFocus(){b.current&&b.current.focus()},reset(e=!0,t=!0){y(i||""),E(""),C("",e,t)},setValue(e,t=!0,r=!0){y(e),C(e,t,r)},getValue:()=>v,setError(e){E(e)},forceUpdate(){C(v)},clear(){y("")}}));const j=e=>{y(e.target.value),C(e.target.value,!0,!0),f&&f({value:e.target.value,className:"itd-textarea",disabled:u,target:b,stopPropagation:()=>{e.stopPropagation()},preventDefault:()=>{e.preventDefault()}})},$=e=>{S(!0),A(!0===Qu)},z=e=>{S(!1),A(!1)},L=e=>{"Tab"===e.key&&A(!0)},F=()=>{let e={id:x,placeholder:t,value:v,className:"itd-textarea-default-input"+(w?" keyboard-focus":""),disabled:u,autoComplete:"off",rows:d,maxLength:c,onChange:j,onFocus:$,onBlur:z,onKeyDown:L,onMouseDown:()=>A(!1),ref:b};return r.jsx("textarea",{...e})},N=()=>{if(""!==_&&!u)return r.jsx(Ku,{className:"itd-error-border"})},M=()=>{let e="itd-textarea";return e+=" itd-textarea-"+ge(s),e+=" itd-textarea-"+l,u&&(e+=" itd-textarea-disabled"),k&&(e+=" itd-textarea-focus"),p&&(e+=" itd-textarea-show-count"),""!==a&&(e+=" "+a),e};return(()=>{if(g)throw new Error("ITD TextArea Error: Remove the children!");return r.jsxs(Xu,{className:M(),children:[F(),N()]})})()});ep.displayName="ITD-TextArea";const tp=l.span`
|
|
3716
3716
|
|
|
3717
3717
|
content: '';
|
|
3718
3718
|
position: absolute;
|
|
@@ -3736,7 +3736,7 @@
|
|
|
3736
3736
|
|
|
3737
3737
|
}
|
|
3738
3738
|
|
|
3739
|
-
`,
|
|
3739
|
+
`,rp=l.div`
|
|
3740
3740
|
|
|
3741
3741
|
cursor: pointer;
|
|
3742
3742
|
text-indent: -9999px;
|
|
@@ -3748,7 +3748,7 @@
|
|
|
3748
3748
|
position: relative;
|
|
3749
3749
|
//box-shadow: inset 0px 0px 20px rgba(0,0,0,0.4);
|
|
3750
3750
|
|
|
3751
|
-
`,
|
|
3751
|
+
`,np=l.div`
|
|
3752
3752
|
|
|
3753
3753
|
display: flex;
|
|
3754
3754
|
flex-direction: row;
|
|
@@ -3762,7 +3762,7 @@
|
|
|
3762
3762
|
|
|
3763
3763
|
&[data-state="checked"] {
|
|
3764
3764
|
|
|
3765
|
-
${
|
|
3765
|
+
${tp} {
|
|
3766
3766
|
left: calc(100% - 3px);
|
|
3767
3767
|
transform: translateX(-100%);
|
|
3768
3768
|
background:rgb(255, 255, 255);
|
|
@@ -3772,7 +3772,7 @@
|
|
|
3772
3772
|
|
|
3773
3773
|
&[data-state="unchecked"] {
|
|
3774
3774
|
|
|
3775
|
-
${
|
|
3775
|
+
${tp} {
|
|
3776
3776
|
.itd-spin-spinner >div>div {
|
|
3777
3777
|
border-color: #e4e4e7 transparent transparent;
|
|
3778
3778
|
}
|
|
@@ -3787,7 +3787,7 @@
|
|
|
3787
3787
|
// Disabled durumları - daha spesifik selector'lar
|
|
3788
3788
|
&[data-disabled="true"][data-state="checked"] {
|
|
3789
3789
|
|
|
3790
|
-
${
|
|
3790
|
+
${tp} {
|
|
3791
3791
|
background: #ffffff;
|
|
3792
3792
|
}
|
|
3793
3793
|
|
|
@@ -3800,7 +3800,7 @@
|
|
|
3800
3800
|
|
|
3801
3801
|
&[data-disabled="true"][data-state="unchecked"] {
|
|
3802
3802
|
|
|
3803
|
-
${
|
|
3803
|
+
${tp} {
|
|
3804
3804
|
background: #ffffff;
|
|
3805
3805
|
}
|
|
3806
3806
|
|
|
@@ -3823,7 +3823,7 @@
|
|
|
3823
3823
|
cursor: progress;
|
|
3824
3824
|
}
|
|
3825
3825
|
|
|
3826
|
-
`,
|
|
3826
|
+
`,op=l.span`
|
|
3827
3827
|
|
|
3828
3828
|
position: absolute;
|
|
3829
3829
|
display: flex;
|
|
@@ -3859,7 +3859,7 @@
|
|
|
3859
3859
|
|
|
3860
3860
|
}
|
|
3861
3861
|
|
|
3862
|
-
`,
|
|
3862
|
+
`,ip=n.forwardRef(({id:e="",label:t="",checked:o,defaultChecked:i=!1,loading:a=!1,disabled:s=!1,onChange:l=null,onUpdate:d=null},c)=>{const[u,p]=n.useState(i||!1),[f,h]=n.useState(""),[g,m]=n.useState(e||`itd-switch-${fe()}`);n.useEffect(()=>{e&&e!==g&&m(e)},[e]);const b=n.useCallback((e,t=!0,r=!0)=>{d&&("development"===process.env.NODE_ENV?requestAnimationFrame(()=>d(e,t,r)):d(e,t,r))},[d]);n.useEffect(()=>{void 0!==o&&o!==u&&(p(o),b(o))},[o,b]);const x=n.useMemo(()=>({reset(e=!0,t=!0){const r=i||!1;p(r),b(r,e,t)},setValue(e,t=!0,r=!0){p(e),b(e,t,r)},getValue:()=>u,setError(e=""){h(e)},clear(){p(!1)}}),[u,i,b]);n.useImperativeHandle(c,()=>x,[x]);const v=n.useCallback(e=>{if(a||s)return e.preventDefault(),void e.stopPropagation();const t=!u;p(t),b(t),l&&l(t)},[a,s,u,b,l]),y=n.useMemo(()=>{let e="itd-switch";return u&&(e+=" itd-switch-checked"),s&&(e+=" itd-switch-disabled"),a&&(e+=" itd-switch-loading"),e},[u,s,a]);return r.jsxs(np,{className:y,children:[r.jsx("button",{id:g,type:"button",role:"switch",value:u?"on":"off","data-state":u?"checked":"unchecked","aria-checked":u,"data-disabled":s?"true":"false","data-loading":a&&!s?"true":"false",disabled:s,onClick:v,children:r.jsx(rp,{className:"itd-switch-body","data-disabled":s,children:r.jsx(tp,{className:"itd-switch-thumb",children:r.jsx(J,{size:12,updating:a&&!s})})})}),t&&r.jsx("label",{htmlFor:g,children:t}),f&&r.jsx(op,{className:"itd-switch-error-tooltip itd-error-tooltip",children:f})]})});ip.displayName="ITD-Switch";const ap=l.div`
|
|
3863
3863
|
|
|
3864
3864
|
position : relative;
|
|
3865
3865
|
width : ${e=>e.$fluid?"100%":"max-content"};
|
|
@@ -3874,7 +3874,7 @@
|
|
|
3874
3874
|
|
|
3875
3875
|
}
|
|
3876
3876
|
|
|
3877
|
-
`,
|
|
3877
|
+
`,sp=l.div`
|
|
3878
3878
|
|
|
3879
3879
|
>img {
|
|
3880
3880
|
max-width : 100%;
|
|
@@ -3905,7 +3905,7 @@
|
|
|
3905
3905
|
|
|
3906
3906
|
position: relative;
|
|
3907
3907
|
|
|
3908
|
-
`,
|
|
3908
|
+
`,lp=l.div`
|
|
3909
3909
|
|
|
3910
3910
|
display: block;
|
|
3911
3911
|
|
|
@@ -3917,7 +3917,7 @@
|
|
|
3917
3917
|
transition-duration: 500ms;
|
|
3918
3918
|
transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
3919
3919
|
|
|
3920
|
-
`,
|
|
3920
|
+
`,dp=l.div`
|
|
3921
3921
|
|
|
3922
3922
|
position: absolute;
|
|
3923
3923
|
top: 50%;
|
|
@@ -3939,7 +3939,7 @@
|
|
|
3939
3939
|
}
|
|
3940
3940
|
`}}
|
|
3941
3941
|
|
|
3942
|
-
`,
|
|
3942
|
+
`,cp=l.div`
|
|
3943
3943
|
|
|
3944
3944
|
display : flex;
|
|
3945
3945
|
justify-content : center;
|
|
@@ -3951,7 +3951,7 @@
|
|
|
3951
3951
|
height : ${e=>e.$height?Xo(e.$height):"100%"};
|
|
3952
3952
|
}
|
|
3953
3953
|
|
|
3954
|
-
`,
|
|
3954
|
+
`,up=l.div`
|
|
3955
3955
|
|
|
3956
3956
|
transition-property: all;
|
|
3957
3957
|
transition-duration: 0ms;
|
|
@@ -3987,7 +3987,7 @@
|
|
|
3987
3987
|
top: 50%;
|
|
3988
3988
|
`}
|
|
3989
3989
|
|
|
3990
|
-
`,
|
|
3990
|
+
`,pp=l.div`
|
|
3991
3991
|
|
|
3992
3992
|
position: absolute;
|
|
3993
3993
|
display: flex;
|
|
@@ -4010,7 +4010,7 @@
|
|
|
4010
4010
|
background-color: #ffffff90;
|
|
4011
4011
|
`}
|
|
4012
4012
|
|
|
4013
|
-
`,
|
|
4013
|
+
`,fp=l.div`
|
|
4014
4014
|
|
|
4015
4015
|
position: absolute;
|
|
4016
4016
|
|
|
@@ -4048,7 +4048,7 @@
|
|
|
4048
4048
|
}
|
|
4049
4049
|
`}
|
|
4050
4050
|
|
|
4051
|
-
`,
|
|
4051
|
+
`,hp=l.div`
|
|
4052
4052
|
transition-property: all;
|
|
4053
4053
|
transition-duration: 400ms;
|
|
4054
4054
|
transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
@@ -4073,7 +4073,7 @@
|
|
|
4073
4073
|
pointer-events: none;
|
|
4074
4074
|
z-index: 1;
|
|
4075
4075
|
|
|
4076
|
-
`;const
|
|
4076
|
+
`;const gp=l.div`
|
|
4077
4077
|
|
|
4078
4078
|
display: flex;
|
|
4079
4079
|
align-items: center;
|
|
@@ -4095,13 +4095,13 @@
|
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
4097
|
|
|
4098
|
-
`,
|
|
4098
|
+
`,mp=l(gp)`
|
|
4099
4099
|
|
|
4100
4100
|
&::before {
|
|
4101
4101
|
background-color: #f8285a;
|
|
4102
4102
|
}
|
|
4103
4103
|
|
|
4104
|
-
`,
|
|
4104
|
+
`,bp=l.span`
|
|
4105
4105
|
|
|
4106
4106
|
position: absolute;
|
|
4107
4107
|
display: flex;
|
|
@@ -4136,7 +4136,7 @@
|
|
|
4136
4136
|
|
|
4137
4137
|
}
|
|
4138
4138
|
|
|
4139
|
-
`,bp=n.forwardRef(({id:e="itd-upload-"+fe(),resultFileName:o=null,action:i="",filePath:a="",binaryName:s="file",showDeleteIcon:l=!1,showPreviewIcon:d=!1,buttonsPosition:c="default",padding:u=10,fluid:p=!0,fileWidth:h="100%",fileHeight:g="auto",maxFileWidth:m="none",maxFileHeight:b="none",containerWidth:x="100%",containerHeight:v="auto",previewFileWidth:y="100%",previewFileHeight:w="100%",previewFilePadding:A="0",requestMethod:k="put",maxFileSize:S=1024,disabled:_=!1,extraFormData:E={},extraQueryString:C={},extraHeader:j={},fileTypes:$=[exports.FileTypes.JPG,exports.FileTypes.PNG,exports.FileTypes.SVG,exports.FileTypes.PDF],removeAction:z="",removeExtraFormData:L={},removeExtraQueryString:F={},removeExtraHeader:N={},minImageWidth:M,minImageHeight:D,crop:T,onUpdate:O,onUploadSuccess:R,onUploadFailed:I,onRemoveFileSuccess:P,onRemoveFileFailed:B},V)=>{const H=n.useRef(null),{showModal:G}=it.useModal(),{fetch:W,cancel:Y}=U(),{t:q}=t.useTranslation("itd"),[X,K]=n.useState(!1),[J,Z]=n.useState(!1),[Q,ee]=n.useState(".svg, .png, .jpg"),[te,re]=n.useState(!1),[ne,oe]=n.useState(!1),[ie,ae]=n.useState(!1),[se,le]=n.useState(null),[de,ce]=n.useState(null),[ue,pe]=n.useState(""),[he,ge]=n.useState(!1),[me,be]=n.useState(!1),[ve,ye]=n.useState(null),[we,Ae]=n.useState(!1),[ke,Se]=n.useState(null),[_e,Ee]=n.useState(null);n.useEffect(()=>()=>{Y()},[]),n.useEffect(()=>{Z(_)},[_]),n.useEffect(()=>{ce(a?a.split("?")[0]:"")},[a]),n.useEffect(()=>{null!==de&&(void 0!==de?$e():K(!1))},[de]),n.useEffect(()=>{let e=[];$.map(t=>{e.push(Go(t))}),ee(e.join(", "))},[$]);const Ce=(e,t)=>{f.toast.error(e,{description:t,duration:5e3})},je=(e,t=!0,r=!0)=>{O&&O(e,t,r)};n.useImperativeHandle(V,()=>({setFocus(){ae(!0)},reset(e=!1,t=!1){ze(),ce(null),pe(""),je("",e,t)},setValue(e,t=!0,r=!0){ce(e),je(e,t,r)},getValue:()=>de||"",setError(e){pe(e)},forceUpdate(){je(de||"")},clear(){ce("")}}));const $e=async()=>{let e=!1;de&&(e=await Ho(de),le(e),e?je(de):je("",!0,!0),X||K(!0)),""!==de||X||K(!0),""===de&&X&&je("",!0,!0)},ze=()=>{Se(null),ye(null),Ae(!1),le(null)},Le=async()=>{Z(!0),G({content:r.jsx("div",{children:q("uploader.areYouSureToDeleteThisFile")}),title:q("uploader.removeFile"),okButtonText:q("uploader.yes"),cancelButtonText:q("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(z?W({action:z,params:L,queries:F,headers:N,onFetched:e=>{e.data.success?(ze(),je("",!0,!0),P&&P(e.data.data)):B&&B()},onError:()=>{B&&B()}}):(ze(),je("",!0,!0),P&&P()),Z(!1),!0),onCancel:()=>(Z(!1),!0)})},Fe=e=>{e.preventDefault(),me||oe(!0)},Ne=e=>{e.preventDefault(),me||oe(!1)},Me=e=>{e.preventDefault(),me||(oe(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Re(e.dataTransfer.files[0]):console.log(q("uploader.browserDoesntSupportDND")))},De=e=>{oe(!1);const t=e.target.files[0];Re(t)},Te=async({path:e,errorMessage:t,errorCode:r})=>{await Wo(1e3),ye(null),be(!1),await Wo(1500),Ae(!1),e?R&&R(e):t&&I&&I(t,r||0)},Oe=async e=>{if(!e)return;let t=new FormData;t.append(s,e),o&&t.append("name",o),Object.keys(E).forEach(e=>{t.append(e,E[e])}),W({action:i,requestMethod:k,params:t,queries:C,headers:j,onFetched:e=>{e.data.success?(Se({message:"uploader.fileUploadSuccess",status:"success"}),Ae(!0),ce(e.data.data.url),Te({path:e.data.data.url})):(Se({message:"uploader.fileUploadFailed",status:"error"}),je("",!0,!0),Te({errorMessage:"uploader.fileUploadFailed"}))},onError:(e,t)=>{Se({message:"uploader.fileUploadFailed",status:"error"}),je("",!0,!0),Te({errorMessage:e,errorCode:t})},onProgress:e=>{ye({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?Uo(e.bytes):"",total:e.total?Uo(e.total):""})}})},Re=async e=>{if(!e)return;if(!(e=>!!$.includes(e.type)||(Ce(q("uploader.error"),q("uploader.fileFormatError",{fileFormat:Q})),!1))(e))return;if(!(e=>!(e.size>1024*S&&(Ce(q("uploader.error"),q("uploader.fileSizeError",{fileSize:Uo(1024*S)})),1)))(e))return;const t=await(e=>new Promise(t=>{if(!e.type.startsWith("image/")||e.type===exports.FileTypes.SVG)return void t(!0);if(!M&&!D)return void t(!0);const r=new window.Image,n=URL.createObjectURL(e);r.onload=()=>{URL.revokeObjectURL(n);const e=!M||r.naturalWidth>=M,o=!D||r.naturalHeight>=D;if(!e||!o){const e=M&&D?`${M}x${D}`:M?`${M}px ${q("uploader.width")}`:`${D}px ${q("uploader.height")}`,n=`${r.naturalWidth}x${r.naturalHeight}`;return Ce(q("uploader.imageTooSmall"),q("uploader.imageTooSmallMessage",{required:e,actual:n})),H.current&&(H.current.value=""),void t(!1)}t(!0)},r.onerror=()=>{URL.revokeObjectURL(n),t(!0)},r.src=n}))(e);if(t){if(o){const t=Go(e.type);e=new File([e],o+t,{type:t,lastModified:e.lastModified})}if(T&&e.type.startsWith("image/")&&e.type!==exports.FileTypes.SVG){Ee(e);const t=new FileReader;return t.onload=t=>{Ie(t.target?.result,e)},void t.readAsDataURL(e)}Oe(e),be(!0)}},Ie=(e,t)=>{let n=null,i=null;const a=t.type===exports.FileTypes.PNG?"image/png":"image/webp"===t.type?"image/webp":"image/jpeg",s=async()=>{if(!n)return;const e=await n.getCroppedFile(o||_e?.name.split(".")[0]||"cropped");e&&(Ee(null),i?.(),Oe(e),be(!0))},l=()=>{Ee(null),H.current&&(H.current.value=""),i?.()};G({title:T?.modalTitle||q("uploader.cropImage"),content:r.jsx(({hideCurrentModal:t})=>(i=t||null,r.jsxs("div",{style:{width:"100%"},children:[r.jsx("div",{style:{minHeight:"400px",marginBottom:"20px"},children:r.jsx(Sp,{ref:e=>{n=e},src:e,aspectRatio:T?.aspectRatio,minWidth:T?.minWidth,minHeight:T?.minHeight,outputWidth:T?.outputWidth,outputHeight:T?.outputHeight,quality:T?.quality||.9,outputFormat:a,showGrid:T?.showGrid??!0,width:"100%",height:"400px"})}),r.jsxs(ih,{justify:"flex-end",gap:"small",children:[r.jsx(xe,{variant:"ghost",onClick:l,children:q("uploader.cancel")}),r.jsx(xe,{variant:"solid",onClick:s,children:q("uploader.crop")})]})]})),{}),showOkButton:!1,showCancelButton:!1,closeOnClickOutside:!1,showCloseButton:!0,width:"600px",onCancel:()=>(l(),!0)})},Pe=()=>{Z(!0),G({content:r.jsx(dp,{className:"itd-upload-preview-content",$width:y,$height:w,$padding:A,children:r.jsx(Vi,{src:de||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(Z(!1),!0)})},Be=()=>{if(l&&de&&!me)return r.jsx("span",{className:"delete-icon",children:r.jsx(xe,{variant:"solid",size:exports.ComponentSizes.SMALL,type:"button",circle:!0,onClick:Le,disabled:J,icon:r.jsx(li,{width:16,height:16}),className:"itd-upload-delete-button"})})},Ve=()=>{if(d&&de&&!me&&We(de))return r.jsx("span",{className:"preview-icon",children:r.jsx(xe,{variant:"solid",size:exports.ComponentSizes.SMALL,type:"button",circle:!0,onClick:Pe,disabled:J,icon:r.jsx(di,{width:16,height:16}),className:"itd-upload-preview-button"})})},He=r.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsxs("g",{id:"ErrorGroup",fillRule:"nonzero",children:[r.jsx("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),r.jsx("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),Ue=()=>{if(""===ue||me)return;let e={className:"itd-upload-failed itd-failed-status",onPointerOver:()=>ge(!0),onPointerOut:()=>ge(!1)};return r.jsxs(gp,{...e,children:[he?r.jsx(mp,{className:"itd-upload-error-tooltip itd-error-tooltip",children:ue}):null,He]})},Ge=e=>e&&e.toLowerCase().split(".").pop()||"",We=e=>{if(!e)return!1;const t=Ge(e);return["svg","png","jpg","jpeg","gif","webp"].includes(t)},Ye=()=>{if(X)return null===se?r.jsx(oi,{width:24,height:24}):We(de||"")?!1===se?r.jsx(ci,{width:40,height:40}):r.jsx(Vi,{src:de||"",width:Xo(h),height:Xo(g)}):de?(e=>{switch(Ge(e)){case"xlsx":case"xls":return r.jsx(fi,{width:40,height:40});case"pdf":return r.jsx(hi,{width:40,height:40});default:return r.jsx(pi,{width:40,height:40})}})(de):r.jsx(ci,{width:40,height:40})},qe=()=>{let e=(te||ne)&&!me&&!J;return r.jsx(up,{$isHover:e,className:"itd-upload-overlay",children:r.jsxs(cp,{$isHover:e,className:"itd-upload-overlay-content",children:[r.jsx("span",{className:"itd-upload-header",children:q("uploader.header")}),r.jsx("span",{className:"itd-upload-hint",children:q("uploader.hint")})]})})};return r.jsxs(ip,{className:"itd-upload",$fluid:p,children:[r.jsx("input",{type:"file",id:e,accept:Q,onChange:De,onFocus:e=>{e.target.matches(":focus-visible")&&ae(!0)},onBlur:()=>ae(!1),onPointerOver:()=>{!ne&&re(!0)},onPointerOut:()=>{!ne&&re(!1)},onDragOver:Fe,onDragLeave:Ne,onDrop:Me,disabled:me||J,ref:H}),r.jsx(sp,{$showFocus:ie,className:"itd-upload-label",children:r.jsxs(ap,{$showBorder:(ne||te)&&!me,$padding:u,$disabled:_,$hasError:""!==ue&&!me,$fileWidth:h,$fileHeight:g,$maxFileWidth:m,$maxFileHeight:b,$containerWidth:x,$containerHeight:v,className:"itd-upload-content",children:[Ye(),r.jsxs(pp,{className:"itd-upload-status",$isActive:me,$complete:"success"===ke?.status,$error:"error"===ke?.status,children:[r.jsx(fp,{className:"itd-upload-status-box",$progress:ve?ve.progress:0,$complete:"success"===ke?.status,$error:"error"===ke?.status}),r.jsx("span",{className:"itd-upload-status-message",children:q(we||ke?String(ke?.message):"uploader.fileUploading")}),ve?r.jsx("span",{className:"itd-upload-status-info",children:q("uploader.info",{total:ve.total,estimated:ve.estimated})}):r.jsx("span",{className:"itd-upload-status-calculating",children:q("uploader.calculating")})]}),qe(),r.jsxs(lp,{$position:""===ue?c:"default",children:[r.jsxs(ih,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Be(),Ve()]}),Ue()]})]})})]})}),xp=l.div`
|
|
4139
|
+
`,xp=n.forwardRef(({id:e="itd-upload-"+fe(),resultFileName:o=null,action:i="",filePath:a="",binaryName:s="file",showDeleteIcon:l=!1,showPreviewIcon:d=!1,buttonsPosition:c="default",padding:u=10,fluid:p=!0,fileWidth:h="100%",fileHeight:g="auto",maxFileWidth:m="none",maxFileHeight:b="none",containerWidth:x="100%",containerHeight:v="auto",previewFileWidth:y="100%",previewFileHeight:w="100%",previewFilePadding:A="0",requestMethod:k="put",maxFileSize:S=1024,disabled:_=!1,extraFormData:E={},extraQueryString:C={},extraHeader:j={},fileTypes:$=[exports.FileTypes.JPG,exports.FileTypes.PNG,exports.FileTypes.SVG,exports.FileTypes.PDF],removeAction:z="",removeExtraFormData:L={},removeExtraQueryString:F={},removeExtraHeader:N={},minImageWidth:M,minImageHeight:D,crop:T,onUpdate:O,onUploadSuccess:R,onUploadFailed:I,onRemoveFileSuccess:P,onRemoveFileFailed:B},V)=>{const H=n.useRef(null),{showModal:G}=it.useModal(),{fetch:W,cancel:Y}=U(),{t:q}=t.useTranslation("itd"),[X,K]=n.useState(!1),[J,Z]=n.useState(!1),[Q,ee]=n.useState(".svg, .png, .jpg"),[te,re]=n.useState(!1),[ne,oe]=n.useState(!1),[ie,ae]=n.useState(!1),[se,le]=n.useState(null),[de,ce]=n.useState(null),[ue,pe]=n.useState(""),[he,ge]=n.useState(!1),[me,be]=n.useState(!1),[ve,ye]=n.useState(null),[we,Ae]=n.useState(!1),[ke,Se]=n.useState(null),[_e,Ee]=n.useState(null);n.useEffect(()=>()=>{Y()},[]),n.useEffect(()=>{Z(_)},[_]),n.useEffect(()=>{ce(a?a.split("?")[0]:"")},[a]),n.useEffect(()=>{null!==de&&(void 0!==de?$e():K(!1))},[de]),n.useEffect(()=>{let e=[];$.map(t=>{e.push(Go(t))}),ee(e.join(", "))},[$]);const Ce=(e,t)=>{f.toast.error(e,{description:t,duration:5e3})},je=(e,t=!0,r=!0)=>{O&&O(e,t,r)};n.useImperativeHandle(V,()=>({setFocus(){ae(!0)},reset(e=!1,t=!1){ze(),ce(null),pe(""),je("",e,t)},setValue(e,t=!0,r=!0){ce(e),je(e,t,r)},getValue:()=>de||"",setError(e){pe(e)},forceUpdate(){je(de||"")},clear(){ce("")}}));const $e=async()=>{let e=!1;de&&(e=await Ho(de),le(e),e?je(de):je("",!0,!0),X||K(!0)),""!==de||X||K(!0),""===de&&X&&je("",!0,!0)},ze=()=>{Se(null),ye(null),Ae(!1),le(null)},Le=async()=>{Z(!0),G({content:r.jsx("div",{children:q("uploader.areYouSureToDeleteThisFile")}),title:q("uploader.removeFile"),okButtonText:q("uploader.yes"),cancelButtonText:q("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(z?W({action:z,params:L,queries:F,headers:N,onFetched:e=>{e.data.success?(ze(),je("",!0,!0),P&&P(e.data.data)):B&&B()},onError:()=>{B&&B()}}):(ze(),je("",!0,!0),P&&P()),Z(!1),!0),onCancel:()=>(Z(!1),!0)})},Fe=e=>{e.preventDefault(),me||oe(!0)},Ne=e=>{e.preventDefault(),me||oe(!1)},Me=e=>{e.preventDefault(),me||(oe(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Re(e.dataTransfer.files[0]):console.log(q("uploader.browserDoesntSupportDND")))},De=e=>{oe(!1);const t=e.target.files[0];Re(t)},Te=async({path:e,errorMessage:t,errorCode:r})=>{await Wo(1e3),ye(null),be(!1),await Wo(1500),Ae(!1),e?R&&R(e):t&&I&&I(t,r||0)},Oe=async e=>{if(!e)return;let t=new FormData;t.append(s,e),o&&t.append("name",o),Object.keys(E).forEach(e=>{t.append(e,E[e])}),W({action:i,requestMethod:k,params:t,queries:C,headers:j,onFetched:e=>{e.data.success?(Se({message:"uploader.fileUploadSuccess",status:"success"}),Ae(!0),ce(e.data.data.url),Te({path:e.data.data.url})):(Se({message:"uploader.fileUploadFailed",status:"error"}),je("",!0,!0),Te({errorMessage:"uploader.fileUploadFailed"}))},onError:(e,t)=>{Se({message:"uploader.fileUploadFailed",status:"error"}),je("",!0,!0),Te({errorMessage:e,errorCode:t})},onProgress:e=>{ye({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?Uo(e.bytes):"",total:e.total?Uo(e.total):""})}})},Re=async e=>{if(!e)return;if(!(e=>!!$.includes(e.type)||(Ce(q("uploader.error"),q("uploader.fileFormatError",{fileFormat:Q})),!1))(e))return;if(!(e=>!(e.size>1024*S&&(Ce(q("uploader.error"),q("uploader.fileSizeError",{fileSize:Uo(1024*S)})),1)))(e))return;const t=await(e=>new Promise(t=>{if(!e.type.startsWith("image/")||e.type===exports.FileTypes.SVG)return void t(!0);if(!M&&!D)return void t(!0);const r=new window.Image,n=URL.createObjectURL(e);r.onload=()=>{URL.revokeObjectURL(n);const e=!M||r.naturalWidth>=M,o=!D||r.naturalHeight>=D;if(!e||!o){const e=M&&D?`${M}x${D}`:M?`${M}px ${q("uploader.width")}`:`${D}px ${q("uploader.height")}`,n=`${r.naturalWidth}x${r.naturalHeight}`;return Ce(q("uploader.imageTooSmall"),q("uploader.imageTooSmallMessage",{required:e,actual:n})),H.current&&(H.current.value=""),void t(!1)}t(!0)},r.onerror=()=>{URL.revokeObjectURL(n),t(!0)},r.src=n}))(e);if(t){if(o){const t=Go(e.type);e=new File([e],o+t,{type:t,lastModified:e.lastModified})}if(T&&e.type.startsWith("image/")&&e.type!==exports.FileTypes.SVG){Ee(e);const t=new FileReader;return t.onload=t=>{Ie(t.target?.result,e)},void t.readAsDataURL(e)}Oe(e),be(!0)}},Ie=(e,t)=>{let n=null,i=null;const a=t.type===exports.FileTypes.PNG?"image/png":"image/webp"===t.type?"image/webp":"image/jpeg",s=async()=>{if(!n)return;const e=await n.getCroppedFile(o||_e?.name.split(".")[0]||"cropped");e&&(Ee(null),i?.(),Oe(e),be(!0))},l=()=>{Ee(null),H.current&&(H.current.value=""),i?.()};G({title:T?.modalTitle||q("uploader.cropImage"),content:r.jsx(({hideCurrentModal:t})=>(i=t||null,r.jsxs("div",{style:{width:"100%"},children:[r.jsx("div",{style:{minHeight:"400px",marginBottom:"20px"},children:r.jsx(_p,{ref:e=>{n=e},src:e,aspectRatio:T?.aspectRatio,minWidth:T?.minWidth,minHeight:T?.minHeight,outputWidth:T?.outputWidth,outputHeight:T?.outputHeight,quality:T?.quality||.9,outputFormat:a,showGrid:T?.showGrid??!0,width:"100%",height:"400px"})}),r.jsxs(ah,{justify:"flex-end",gap:"small",children:[r.jsx(xe,{variant:"ghost",onClick:l,children:q("uploader.cancel")}),r.jsx(xe,{variant:"solid",onClick:s,children:q("uploader.crop")})]})]})),{}),showOkButton:!1,showCancelButton:!1,closeOnClickOutside:!1,showCloseButton:!0,width:"600px",onCancel:()=>(l(),!0)})},Pe=()=>{Z(!0),G({content:r.jsx(cp,{className:"itd-upload-preview-content",$width:y,$height:w,$padding:A,children:r.jsx(Vi,{src:de||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(Z(!1),!0)})},Be=()=>{if(l&&de&&!me)return r.jsx("span",{className:"delete-icon",children:r.jsx(xe,{variant:"solid",size:exports.ComponentSizes.SMALL,type:"button",circle:!0,onClick:Le,disabled:J,icon:r.jsx(li,{width:16,height:16}),className:"itd-upload-delete-button"})})},Ve=()=>{if(d&&de&&!me&&We(de))return r.jsx("span",{className:"preview-icon",children:r.jsx(xe,{variant:"solid",size:exports.ComponentSizes.SMALL,type:"button",circle:!0,onClick:Pe,disabled:J,icon:r.jsx(di,{width:16,height:16}),className:"itd-upload-preview-button"})})},He=r.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsxs("g",{id:"ErrorGroup",fillRule:"nonzero",children:[r.jsx("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),r.jsx("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),Ue=()=>{if(""===ue||me)return;let e={className:"itd-upload-failed itd-failed-status",onPointerOver:()=>ge(!0),onPointerOut:()=>ge(!1)};return r.jsxs(mp,{...e,children:[he?r.jsx(bp,{className:"itd-upload-error-tooltip itd-error-tooltip",children:ue}):null,He]})},Ge=e=>e&&e.toLowerCase().split(".").pop()||"",We=e=>{if(!e)return!1;const t=Ge(e);return["svg","png","jpg","jpeg","gif","webp"].includes(t)},Ye=()=>{if(X)return null===se?r.jsx(oi,{width:24,height:24}):We(de||"")?!1===se?r.jsx(ci,{width:40,height:40}):r.jsx(Vi,{src:de||"",width:Xo(h),height:Xo(g)}):de?(e=>{switch(Ge(e)){case"xlsx":case"xls":return r.jsx(fi,{width:40,height:40});case"pdf":return r.jsx(hi,{width:40,height:40});default:return r.jsx(pi,{width:40,height:40})}})(de):r.jsx(ci,{width:40,height:40})},qe=()=>{let e=(te||ne)&&!me&&!J;return r.jsx(pp,{$isHover:e,className:"itd-upload-overlay",children:r.jsxs(up,{$isHover:e,className:"itd-upload-overlay-content",children:[r.jsx("span",{className:"itd-upload-header",children:q("uploader.header")}),r.jsx("span",{className:"itd-upload-hint",children:q("uploader.hint")})]})})};return r.jsxs(ap,{className:"itd-upload",$fluid:p,children:[r.jsx("input",{type:"file",id:e,accept:Q,onChange:De,onFocus:e=>{e.target.matches(":focus-visible")&&ae(!0)},onBlur:()=>ae(!1),onPointerOver:()=>{!ne&&re(!0)},onPointerOut:()=>{!ne&&re(!1)},onDragOver:Fe,onDragLeave:Ne,onDrop:Me,disabled:me||J,ref:H}),r.jsx(lp,{$showFocus:ie,className:"itd-upload-label",children:r.jsxs(sp,{$showBorder:(ne||te)&&!me,$padding:u,$disabled:_,$hasError:""!==ue&&!me,$fileWidth:h,$fileHeight:g,$maxFileWidth:m,$maxFileHeight:b,$containerWidth:x,$containerHeight:v,className:"itd-upload-content",children:[Ye(),r.jsxs(fp,{className:"itd-upload-status",$isActive:me,$complete:"success"===ke?.status,$error:"error"===ke?.status,children:[r.jsx(hp,{className:"itd-upload-status-box",$progress:ve?ve.progress:0,$complete:"success"===ke?.status,$error:"error"===ke?.status}),r.jsx("span",{className:"itd-upload-status-message",children:q(we||ke?String(ke?.message):"uploader.fileUploading")}),ve?r.jsx("span",{className:"itd-upload-status-info",children:q("uploader.info",{total:ve.total,estimated:ve.estimated})}):r.jsx("span",{className:"itd-upload-status-calculating",children:q("uploader.calculating")})]}),qe(),r.jsxs(dp,{$position:""===ue?c:"default",children:[r.jsxs(ah,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Be(),Ve()]}),Ue()]})]})})]})}),vp=l.div`
|
|
4140
4140
|
position: relative;
|
|
4141
4141
|
width: ${({$width:e})=>"number"==typeof e?`${e}px`:e||"100%"};
|
|
4142
4142
|
height: ${({$height:e})=>"number"==typeof e?`${e}px`:e||"400px"};
|
|
@@ -4144,22 +4144,22 @@
|
|
|
4144
4144
|
background: #1a1a1a;
|
|
4145
4145
|
border-radius: 8px;
|
|
4146
4146
|
user-select: none;
|
|
4147
|
-
`,
|
|
4147
|
+
`,yp=l.div`
|
|
4148
4148
|
position: absolute;
|
|
4149
4149
|
inset: 0;
|
|
4150
4150
|
display: flex;
|
|
4151
4151
|
align-items: center;
|
|
4152
4152
|
justify-content: center;
|
|
4153
|
-
`,
|
|
4153
|
+
`,wp=l.img`
|
|
4154
4154
|
max-width: 100%;
|
|
4155
4155
|
max-height: 100%;
|
|
4156
4156
|
object-fit: contain;
|
|
4157
4157
|
pointer-events: none;
|
|
4158
|
-
`,
|
|
4158
|
+
`,Ap=l.div`
|
|
4159
4159
|
position: absolute;
|
|
4160
4160
|
inset: 0;
|
|
4161
4161
|
pointer-events: none;
|
|
4162
|
-
`,
|
|
4162
|
+
`,kp=l.div`
|
|
4163
4163
|
position: absolute;
|
|
4164
4164
|
left: ${({$cropArea:e})=>e.x}px;
|
|
4165
4165
|
top: ${({$cropArea:e})=>e.y}px;
|
|
@@ -4197,7 +4197,7 @@
|
|
|
4197
4197
|
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
4198
4198
|
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
|
4199
4199
|
}
|
|
4200
|
-
`,
|
|
4200
|
+
`,Sp=l.div`
|
|
4201
4201
|
position: absolute;
|
|
4202
4202
|
width: 20px;
|
|
4203
4203
|
height: 20px;
|
|
@@ -4215,14 +4215,14 @@
|
|
|
4215
4215
|
background: #f0f0f0;
|
|
4216
4216
|
transform: ${({$position:e})=>{switch(e){case"ne":return"translate(50%, -50%) scale(1.1)";case"sw":return"translate(-50%, 50%) scale(1.1)";case"se":return"translate(50%, 50%) scale(1.1)";default:return"translate(-50%, -50%) scale(1.1)"}}};
|
|
4217
4217
|
}
|
|
4218
|
-
`,
|
|
4218
|
+
`,_p=n.forwardRef(({src:e,aspectRatio:t,minWidth:o,minHeight:i,outputWidth:a,outputHeight:s,quality:l=.9,outputFormat:d="image/jpeg",onCropChange:c,width:u,height:p,showGrid:f=!0},h)=>{const g=n.useRef(null),m=n.useRef(null),[b,x]=n.useState(!1),v=o??(a?Math.round(a/4):200),y=i??(s?Math.round(s/4):200),[w,A]=n.useState({x:0,y:0,width:100,height:100}),[k,S]=n.useState(!1),[_,E]=n.useState(null),[C,j]=n.useState({x:0,y:0}),[$,z]=n.useState({x:0,y:0,width:0,height:0}),L=n.useCallback(()=>{if(!m.current||!g.current)return;const e=m.current.getBoundingClientRect(),r=g.current.getBoundingClientRect(),n={x:e.left-r.left,y:e.top-r.top,width:e.width,height:e.height},o=e.width/m.current.naturalWidth,i=e.height/m.current.naturalHeight,a=v*o,s=y*i;let l=Math.max(.8*n.width,a),d=Math.max(.8*n.height,s);if(l=Math.min(l,n.width),d=Math.min(d,n.height),t){if(l/d>t){const e=d*t;e>=a?l=e:(l=a,d=l/t)}else{const e=l/t;e>=s?d=e:(d=s,l=d*t)}l>n.width&&(l=n.width,d=l/t),d>n.height&&(d=n.height,l=d*t)}const u={x:n.x+(n.width-l)/2,y:n.y+(n.height-d)/2,width:l,height:d};A(u),c?.(u)},[t,v,y,c]);n.useEffect(()=>{b&&L()},[b,L]),n.useEffect(()=>{const e=()=>{b&&L()};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[b,L]);const F=n.useCallback(e=>{if(!m.current||!g.current)return e;const t=m.current.getBoundingClientRect(),r=g.current.getBoundingClientRect(),n={left:t.left-r.left,top:t.top-r.top,right:t.right-r.left,bottom:t.bottom-r.top};let{x:o,y:i,width:a,height:s}=e;return o=Math.max(n.left,Math.min(o,n.right-a)),i=Math.max(n.top,Math.min(i,n.bottom-s)),a=Math.min(a,n.right-o),s=Math.min(s,n.bottom-i),{x:o,y:i,width:a,height:s}},[]),N=e=>{e.preventDefault();const t="touches"in e?e.touches[0].clientX:e.clientX,r="touches"in e?e.touches[0].clientY:e.clientY;S(!0),j({x:t,y:r}),z({...w})},M=e=>t=>{t.preventDefault(),t.stopPropagation();const r="touches"in t?t.touches[0].clientX:t.clientX,n="touches"in t?t.touches[0].clientY:t.clientY;E(e),j({x:r,y:n}),z({...w})};n.useEffect(()=>{const e=e=>{if(!k&&!_)return;if(!m.current||!g.current)return;const r="touches"in e?e.touches[0].clientX:e.clientX,n="touches"in e?e.touches[0].clientY:e.clientY,o=r-C.x,i=n-C.y,a=m.current.getBoundingClientRect(),s=g.current.getBoundingClientRect(),l=a.width/m.current.naturalWidth,d=a.height/m.current.naturalHeight,u=v*l,p=y*d,f=a.left-s.left,h=a.top-s.top,b=a.right-s.left,x=a.bottom-s.top;let w;if(k)w=F({...$,x:$.x+o,y:$.y+i});else{if(!_)return;{let e=$.width,r=$.height,n=$.x,a=$.y;const s=$.x+$.width,l=$.y+$.height;switch(_){case"se":{e=Math.max(u,$.width+o);const n=b-$.x;if(e=Math.min(e,n),t){r=e/t;const n=x-$.y;r>n&&(r=n,e=r*t)}else r=Math.max(p,$.height+i),r=Math.min(r,x-$.y);break}case"sw":{e=Math.max(u,$.width-o);const a=s-f;if(e=Math.min(e,a),t){r=e/t;const n=x-$.y;r>n&&(r=n,e=r*t)}else r=Math.max(p,$.height+i),r=Math.min(r,x-$.y);n=s-e;break}case"ne":{e=Math.max(u,$.width+o);const n=b-$.x;if(e=Math.min(e,n),t){r=e/t;const n=l-h;r>n&&(r=n,e=r*t)}else r=Math.max(p,$.height-i),r=Math.min(r,l-h);a=l-r;break}case"nw":{e=Math.max(u,$.width-o);const d=s-f;if(e=Math.min(e,d),t){r=e/t;const n=l-h;r>n&&(r=n,e=r*t)}else r=Math.max(p,$.height-i),r=Math.min(r,l-h);n=s-e,a=l-r;break}}switch(e<u&&(e=u,t&&(r=e/t)),r<p&&(r=p,t&&(e=r*t)),_){case"se":n=$.x,a=$.y;break;case"sw":n=s-e,a=$.y;break;case"ne":n=$.x,a=l-r;break;case"nw":n=s-e,a=l-r}w={x:n,y:a,width:e,height:r}}}A(w),c?.(w)},r=()=>{S(!1),E(null)};return(k||_)&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),document.addEventListener("touchmove",e),document.addEventListener("touchend",r)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",r)}},[k,_,C,$,F,t,v,y,c]);const D=n.useCallback(async()=>{if(!m.current||!g.current)return null;const e=m.current,t=e.getBoundingClientRect(),r=g.current.getBoundingClientRect(),n=e.naturalWidth/t.width,o=e.naturalHeight/t.height,i=t.left-r.left,c=t.top-r.top,u=(w.x-i)*n,p=(w.y-c)*o,f=w.width*n,h=w.height*o,b=document.createElement("canvas"),x=a||f,v=s||h;b.width=x,b.height=v;const y=b.getContext("2d");return y?(y.imageSmoothingEnabled=!0,y.imageSmoothingQuality="high",y.drawImage(e,u,p,f,h,0,0,x,v),new Promise(e=>{b.toBlob(t=>e(t),d,l)})):null},[w,d,l,a,s]),T=n.useCallback(async(e="cropped-image")=>{const t=await D();if(!t)return null;const r=d.split("/")[1];return new File([t],`${e}.${r}`,{type:d})},[D,d]);return n.useImperativeHandle(h,()=>({getCroppedImage:D,getCroppedFile:T,getCropArea:()=>w,reset:L})),r.jsxs(vp,{ref:g,$width:u,$height:p,children:[r.jsx(yp,{children:r.jsx(wp,{ref:m,src:e,onLoad:()=>x(!0),alt:"Crop preview",draggable:!1})}),b&&r.jsx(Ap,{children:r.jsxs(kp,{$cropArea:w,$showGrid:f,onMouseDown:N,onTouchStart:N,children:[r.jsx(Sp,{$position:"nw",onMouseDown:M("nw"),onTouchStart:M("nw")}),r.jsx(Sp,{$position:"ne",onMouseDown:M("ne"),onTouchStart:M("ne")}),r.jsx(Sp,{$position:"sw",onMouseDown:M("sw"),onTouchStart:M("sw")}),r.jsx(Sp,{$position:"se",onMouseDown:M("se"),onTouchStart:M("se")})]})})]})});_p.displayName="ImageCropper";const Ep=l(a.NavLink)`
|
|
4219
4219
|
|
|
4220
4220
|
text-decoration: none;
|
|
4221
4221
|
|
|
4222
|
-
`,
|
|
4222
|
+
`,Cp=n.memo(({to:e,children:t,...n})=>r.jsx(Ep,{to:e,...n,children:t}),(e,t)=>e.to===t.to&&e.className===t.className&&e.style===t.style&&e.children===t.children);Cp.displayName="ALink";const jp=l.div`
|
|
4223
4223
|
display: flex;
|
|
4224
4224
|
flex-direction: column;
|
|
4225
|
-
|
|
4225
|
+
`,$p=l.div`
|
|
4226
4226
|
|
|
4227
4227
|
background-color: #1D2649;
|
|
4228
4228
|
width: 100%;
|
|
@@ -4261,37 +4261,37 @@
|
|
|
4261
4261
|
}
|
|
4262
4262
|
`}
|
|
4263
4263
|
|
|
4264
|
-
|
|
4264
|
+
`,zp=l.div`
|
|
4265
4265
|
|
|
4266
4266
|
overflow: hidden;
|
|
4267
4267
|
transition: max-height 0.25s ease-out;
|
|
4268
4268
|
|
|
4269
|
-
`;var
|
|
4269
|
+
`;var Lp="itd__arrow__ffb364c6",Fp="itd__arrowNormal__ffb364c6",Np="itd__arrowOpen__ffb364c6",Mp="itd__icon__ffb364c6";zd(".itd__arrow__ffb364c6{fill:#fff9;height:20px;margin-left:auto;transform:rotate(0deg);transition:all .25s ease-out;width:20px}.itd__arrowNormal__ffb364c6{margin-left:auto;transform:rotate(-90deg)}.itd__arrowOpen__ffb364c6{fill:#fff;transform:rotate(-180deg)}.itd__icon__ffb364c6{align-items:center;color:#fff9;display:flex;font-size:22px;height:22px;margin-right:8px;width:22px}",{});const Dp=l.div`
|
|
4270
4270
|
display: flex;
|
|
4271
4271
|
flex-direction: column;
|
|
4272
|
-
`,
|
|
4272
|
+
`,Tp=({useLink:e=!1,children:t})=>{const[r,o]=n.useState("");n.useEffect(()=>{},[]);const i=e=>{o(e)};return n.createElement(Dp,null,n.Children.map(t,t=>n.cloneElement(t,{...t.props,useLink:e,hasOpen:r===t.props.id,onChange:i})))};Tp.Panel=function({id:e="",link:t="",icon:r="",title:o="",hasOpen:i=!1,useLink:s=!1,onChange:l=null,children:d=null}){const c=n.useRef(),u=a.useLocation(),[p,f]=n.useState(!1),[h,g]=n.useState(""),[m,b]=n.useState("0px");n.useEffect(()=>{g(0),x()&&c.current&&(c.current.style=`${c.current.scrollHeight}px`)},[]),n.useEffect(()=>{i||f(!1)},[i]),n.useEffect(()=>{p&&l(e),b(p&&c.current?`${c.current.scrollHeight}px`:"0px")},[p]),n.useEffect(()=>{x()&&f(!0)},[u]);const x=()=>{if(!s&&i)return!0;let e=!1;return d?d.forEach(t=>{u.pathname.indexOf(t.props.link)>-1&&(e=!0)}):u.pathname.indexOf(t)>-1&&(e=!0),e},v=()=>{f(!p)},y=()=>{let e=Lp;return e+=d?p?" "+Np:"":" "+Fp,React.createElement(ni,{width:"20",height:"20",className:e})};return React.createElement(jp,null,React.createElement("div",null,d?React.createElement($p,{className:h,onClick:v},React.createElement("div",{className:Mp+" "+r}),React.createElement("span",null,o),y()):React.createElement($p,{as:Cp,$active:x(),to:t},React.createElement("div",{className:Mp+" "+r}),React.createElement("span",null,o),y()),React.createElement(zp,{ref:c,style:{maxHeight:`${m}`}},d)))};const Op=l.keyframes`
|
|
4273
4273
|
0% { transform: scale(.2) rotate(-5deg);}
|
|
4274
4274
|
50% { transform: scale(1.3) rotate(5deg);}
|
|
4275
4275
|
60% { transform: scale(0.9) rotate(0deg);}
|
|
4276
4276
|
80% { transform: scale(1) }
|
|
4277
4277
|
100% { transform: scale(1) }
|
|
4278
|
-
`,
|
|
4278
|
+
`,Rp=l.div`
|
|
4279
4279
|
right: 10px;
|
|
4280
4280
|
position: absolute;
|
|
4281
4281
|
font-size: 20px;
|
|
4282
4282
|
color: #3395FA;
|
|
4283
|
-
animation: ${
|
|
4284
|
-
`,
|
|
4283
|
+
animation: ${Op} 0.75s;
|
|
4284
|
+
`,Ip=l.div`
|
|
4285
4285
|
color: #ffffff80;
|
|
4286
4286
|
font-size: 20px;
|
|
4287
4287
|
margin-right: 4px;
|
|
4288
|
-
`,
|
|
4288
|
+
`,Pp=l.div`
|
|
4289
4289
|
display: flex;
|
|
4290
|
-
`,
|
|
4290
|
+
`,Bp=l.label`
|
|
4291
4291
|
position: relative;
|
|
4292
4292
|
height: 100%;
|
|
4293
4293
|
width: 100%;
|
|
4294
|
-
`,
|
|
4294
|
+
`,Vp=l.div`
|
|
4295
4295
|
|
|
4296
4296
|
display: flex;
|
|
4297
4297
|
align-items: center;
|
|
@@ -4305,7 +4305,7 @@
|
|
|
4305
4305
|
font-size: 13px;
|
|
4306
4306
|
}
|
|
4307
4307
|
|
|
4308
|
-
`,
|
|
4308
|
+
`,Hp=l.div`
|
|
4309
4309
|
|
|
4310
4310
|
border: solid 1px transparent;
|
|
4311
4311
|
transition: border-color 0.2s ease;
|
|
@@ -4327,7 +4327,7 @@
|
|
|
4327
4327
|
font-size: 13px;
|
|
4328
4328
|
}
|
|
4329
4329
|
|
|
4330
|
-
`,
|
|
4330
|
+
`,Up=l.div`
|
|
4331
4331
|
|
|
4332
4332
|
position: relative;
|
|
4333
4333
|
|
|
@@ -4348,11 +4348,11 @@
|
|
|
4348
4348
|
pointer-events: none;
|
|
4349
4349
|
cursor: not-allowed;
|
|
4350
4350
|
|
|
4351
|
-
${
|
|
4351
|
+
${Bp} {
|
|
4352
4352
|
cursor: not-allowed;
|
|
4353
4353
|
}
|
|
4354
4354
|
|
|
4355
|
-
${
|
|
4355
|
+
${Hp} {
|
|
4356
4356
|
cursor: not-allowed;
|
|
4357
4357
|
background-color: #f5f5f5;
|
|
4358
4358
|
}
|
|
@@ -4361,10 +4361,10 @@
|
|
|
4361
4361
|
${({$hasCustomButton:e,$disabled:t})=>e&&!t&&l.css`
|
|
4362
4362
|
|
|
4363
4363
|
&:hover:not(&.itd-radio-selected) {
|
|
4364
|
-
${
|
|
4364
|
+
${Hp} {
|
|
4365
4365
|
border-color: #ADB1BB;
|
|
4366
4366
|
}
|
|
4367
|
-
${
|
|
4367
|
+
${Vp} {
|
|
4368
4368
|
span {
|
|
4369
4369
|
color: #071437;
|
|
4370
4370
|
}
|
|
@@ -4375,9 +4375,9 @@
|
|
|
4375
4375
|
|
|
4376
4376
|
&:checked {
|
|
4377
4377
|
|
|
4378
|
-
+ ${
|
|
4378
|
+
+ ${Bp} {
|
|
4379
4379
|
|
|
4380
|
-
${
|
|
4380
|
+
${Hp} {
|
|
4381
4381
|
|
|
4382
4382
|
border: solid 1px #3598fe;
|
|
4383
4383
|
|
|
@@ -4391,7 +4391,7 @@
|
|
|
4391
4391
|
|
|
4392
4392
|
}
|
|
4393
4393
|
|
|
4394
|
-
${
|
|
4394
|
+
${Vp} {
|
|
4395
4395
|
span {
|
|
4396
4396
|
color: #3598fe;
|
|
4397
4397
|
}
|
|
@@ -4405,7 +4405,7 @@
|
|
|
4405
4405
|
|
|
4406
4406
|
`}
|
|
4407
4407
|
|
|
4408
|
-
`,
|
|
4408
|
+
`,Gp=l.div`
|
|
4409
4409
|
|
|
4410
4410
|
position: absolute;
|
|
4411
4411
|
border: 1px solid #f8285a;
|
|
@@ -4417,15 +4417,15 @@
|
|
|
4417
4417
|
pointer-events: none;
|
|
4418
4418
|
/* z-index: 1; */
|
|
4419
4419
|
|
|
4420
|
-
`;function
|
|
4420
|
+
`;function Wp({id:e="itd-radio-button-"+fe(),name:t="",value:o="",type:i="default",buttonProps:a={},checked:s=!1,hasError:l=!1,disabled:d=!1,children:c=null,icon:u=null,image:p=null,component:f=null,onChange:h=()=>{}}){const g=()=>{console.log("handleOnChange",o),h&&h(o)};return r.jsxs(Up,{className:(()=>{let e="itd-radio";return s&&(e+=" itd-radio-selected"),l&&(e+=" itd-radio-error"),e})(),$hasCustomButton:!f,$disabled:d,children:[r.jsx("input",{type:"radio",onChange:g,id:e,name:t,value:o,checked:s,"aria-checked":s,disabled:d}),r.jsxs(Bp,{className:(()=>{let e="itd-radio-label";return s&&(e+=" itd-radio-label-selected"),l&&(e+=" itd-radio-label-error"),d&&(e+=" itd-radio-label-disabled"),e})(),htmlFor:e,children:[null!==f?r.jsx("div",{className:"itd-radio-custom-button",children:(()=>{const e={checked:s,value:o,icon:u,children:c,disabled:d};return"childProps"in f?.props&&(e.childProps={...f?.props?.childProps||{},checked:s,value:o,icon:u,children:c,disabled:d}),n.cloneElement(f,e)})()}):"default"===i?r.jsxs(Hp,{className:"itd-radio-default-button",children:[r.jsxs(Pp,{className:"itd-radio-content",children:[u?r.jsx(Ip,{className:"itd-icon itd-pre-icon "+u}):p?r.jsx(Vi,{className:"itd-image",src:p,height:"20",brokenHeight:"20"}):null,r.jsx("span",{children:c})]}),s?r.jsx(Rp,{className:"itd-icon itd-check-icon it-web-check"}):null]}):"primary"===i?r.jsx(xe,{className:"itd-radio-primary-button",selected:s,onClick:g,disabled:d,...a,children:r.jsx("span",{children:c})}):r.jsx("span",{children:c}),l?r.jsx(Gp,{className:"itd-error-border"}):null]})]})}const Yp=l.div`
|
|
4421
4421
|
display : grid;
|
|
4422
4422
|
grid-auto-flow : ${e=>e.$onlyFlow?e.$direction:"column"===e.$direction?"row":"column"};
|
|
4423
4423
|
grid-template-columns : ${e=>"row"===e.$direction||e.$onlyFlow?"auto":`repeat(${e.$length}, ${e.$autoSize?"auto":"1fr"})`};
|
|
4424
4424
|
grid-template-rows : ${e=>"column"===e.$direction||e.$onlyFlow?"auto":`repeat(${e.$length}, ${e.$autoSize?"auto":"1fr"})`};
|
|
4425
4425
|
grid-gap : ${e=>e.$gap};
|
|
4426
|
-
`,
|
|
4426
|
+
`,qp=n.forwardRef(({id:e="itd-radio-group-"+fe(),name:t="",message:o="",type:i="default",defaultValue:a="",value:s="",buttonProps:l={},className:d="",direction:c="column",gap:u="10px",length:p=3,onlyFlow:f=!1,autoSize:h=!1,disabled:g=!1,onChange:m=null,onUpdate:b=null,children:x=null},v)=>{const[y,w]=n.useState(o),[A,k]=n.useState("");n.useEffect(()=>{a&&(k(a),S(a))},[]),n.useEffect(()=>{k(s),S(s)},[s]);const S=(e,t=!0,r=!0)=>{b&&b(e,t,r)};n.useImperativeHandle(v,()=>({reset(e=!0,t=!0){k(a),w(""),S(a,e,t)},setValue(e,t=!0,r=!0){k(e),S(e,t,r)},getValue:()=>A,setError(e){w(e)},clear(){}}));const _=e=>{A!==e&&(k(e),S(e,!0,!1),w(""),m&&m(e))};return r.jsx(Yp,{id:e,className:(()=>{let e="itd-radio-group";return e+=" itd-radio-group-"+i,e+=" itd-radio-group-"+c,g&&(e+=" itd-radio-group-disabled"),y&&(e+=" itd-radio-group-error"),""!==d&&(e+=" "+d),e})(),role:"radiogroup",$direction:c,$length:p,$gap:u,$onlyFlow:f,$autoSize:h,children:(()=>{const e=r=>{if(!n.isValidElement(r))return null;if(r.type===Wp)return n.cloneElement(r,{...r.props,checked:A===r.props.value,onChange:_,hasError:""!==y,name:t,type:i,buttonProps:l,disabled:g});if(r.props.children){const t=n.Children.map(r.props.children,e);return n.cloneElement(r,{...r.props,children:t})}return r};return n.Children.map(x,e)})()})});var Xp=n.memo(qp);const Kp=()=>null;Kp.Group=Xp,Kp.Button=Wp;var Jp="itd__label__9437953e",Zp="itd__checkmark__9437953e",Qp="itd__check__9437953e",ef="itd__container__9437953e";zd(".itd__container__9437953e{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;user-select:none}.itd__label__9437953e{align-items:center;display:flex;position:relative}.itd__label__9437953e span{color:#fff9;font-size:12px;font-weight:400;line-height:1.2;margin-left:10px}.itd__checkmark__9437953e{align-items:center;background-color:#1d2649;border-radius:6px;display:flex;height:20px;justify-content:center;transition:background-color .25sn ease-out;width:20px}.itd__checkmark__9437953e svg{fill:#fff;visibility:hidden}.itd__check__9437953e{background-color:#3396fb}.itd__check__9437953e svg{animation:itd__bounce__9437953e .5s;visibility:visible}@keyframes itd__bounce__9437953e{0%{transform:scale(.2) rotate(4deg)}50%{transform:scale(1.2) rotate(-2deg)}75%{transform:scale(.9) rotate(1deg)}to{transform:scale(1) rotate(0deg)}}",{});const tf=({checked:e=!1,className:t="",children:r=null})=>n.createElement("label",{className:"itd-inline-select-checkbox-label "+t+" "+ef},n.createElement("div",{className:"itd-inline-select-checkbox-wrapper "+Jp},(()=>{let t="itd-inline-select-checkbox "+Zp;return e&&(t+=" "+Qp),n.createElement("div",{className:t},n.createElement(ai,{className:"itd-svg",width:12,height:12}))})(),n.createElement("span",null,r)));var rf="itd__option__733c7593",nf="itd__selected__733c7593",of="itd__single__733c7593";zd(".itd__option__733c7593{align-items:center;cursor:pointer;display:flex;min-width:-webkit-max-content;min-width:max-content;padding:10px 30px 10px 15px}.itd__option__733c7593:not(:last-child){margin-bottom:1px}.itd__option__733c7593:hover{background-color:rgba(29,38,73,.502)}.itd__selected__733c7593 .itd__option__733c7593 span,.itd__selected__733c7593 .itd__single__733c7593{color:#fff}.itd__option__733c7593 span,.itd__single__733c7593{color:hsla(0,0%,100%,.667);font-size:12px;font-weight:400;line-height:12px;white-space:nowrap}",{});const af=({value:e="",checked:t=!1,single:r=!1,onChange:o=null,children:i=null})=>{const[a,s]=n.useState(!1);return n.createElement("li",{onMouseEnter:e=>{s(!0),e.stopPropagation()},onMouseLeave:e=>{s(!1),e.stopPropagation()},className:(()=>{let e="itd-inline-select-item itd-inline-select-item-option";return e+=" "+rf,t&&(e+=" "+nf),t&&(e+=" itd-inline-select-item-option-selected"),a&&!t&&(e+=" itd-inline-select-item-option-active"),e})(),onClick:r=>{o(e,!t,i),r.stopPropagation()}},r?n.createElement("div",{className:"itd-item-single "+of},n.createElement("span",null,i)):n.createElement(tf,{className:"itd-item-multi",checked:t},i))};var sf=n.memo(af),lf={menu:"itd__menu__211ba801",bodyWrapper:"itd__bodyWrapper__211ba801",bodyWrapperLong:"itd__bodyWrapperLong__211ba801",menuEnter:"itd__menuEnter__211ba801",menuEnterActive:"itd__menuEnterActive__211ba801",menuExit:"itd__menuExit__211ba801",menuExitActive:"itd__menuExitActive__211ba801",menuEnterActiveLong:"itd__menuEnterActiveLong__211ba801",menuExitActiveLong:"itd__menuExitActiveLong__211ba801",bottom:"itd__bottom__211ba801",left:"itd__left__211ba801"};function df(e){const t=n.useRef(null),{value:r=[],children:o=null,onChange:a=null,isOpen:s=!1,single:l=!1,minWidth:d=0}=e,[c,u]=n.useState([]);n.useEffect(()=>{u(r)},[r]);const p=(e,t,r)=>{if(l){const n=[t?e:""];u(n),a(n,r)}else{let n=[];t?n=[...c,e]:(c.splice(c.indexOf(e),1),n=[...c]),u(n),a(n,r)}};return n.createElement(i.CSSTransition,{in:s,timeout:500,classNames:{enter:lf.menuEnter,enterActive:o.length>5?lf.menuEnterActiveLong:lf.menuEnterActive,exit:lf.menuExit,exitActive:o.length>5?lf.menuExitActiveLong:lf.menuExitActive},nodeRef:t,unmountOnExit:!0},n.createElement("div",{className:"itd-inline-select-dropdown "+lf.menu+" "+lf.bottom+" "+lf.left,style:{width:0===d?"max-content":d+"px"},ref:t},n.createElement("div",{className:lf.spacer}),n.createElement(Fd,{className:"itd-inline-select-dropdown-body "+o.length>5?lf.bodyWrapperLong:lf.bodyWrapper},n.createElement("ul",null,n.Children.map(o,e=>n.cloneElement(e,{onChange:p,checked:c.indexOf(e.props.value)>-1,key:e.props.value}))))))}zd(".itd__menu__211ba801{background-color:#050a20;border-radius:0 5px 5px 5px;box-shadow:0 20px 20px #00000040;overflow:hidden;position:absolute;transform-box:fill-box;transform-origin:50% 1%;transition-timing-function:cubic-bezier(.75,-.5,0,1.25);z-index:2}.itd__menu__211ba801 ul{min-width:-webkit-max-content;min-width:max-content}.itd__bodyWrapperLong__211ba801,.itd__bodyWrapper__211ba801{height:300px}.itd__bottom__211ba801{top:100%}.itd__left__211ba801{left:0}.itd__menuEnter__211ba801{height:50px;opacity:0}.itd__menuEnterActive__211ba801{height:300px;opacity:1;transition:height .15s ease-out}.itd__menuExit__211ba801{opacity:1}.itd__menuExitActive__211ba801{height:300px;opacity:0;transition:height .15s ease-out}.itd__menuEnterActiveLong__211ba801{height:300px;opacity:1;transition:height .15s ease-out}.itd__menuExitActiveLong__211ba801{height:300px;opacity:0;transition:height .15s ease-out}",{});const cf=l.div`
|
|
4427
4427
|
width: max-content;
|
|
4428
|
-
`,
|
|
4428
|
+
`,uf=l.span`
|
|
4429
4429
|
|
|
4430
4430
|
font-size: 13px;
|
|
4431
4431
|
font-weight: 400;
|
|
@@ -4433,7 +4433,7 @@
|
|
|
4433
4433
|
width: max-content;
|
|
4434
4434
|
transition: color .15s ease-out;
|
|
4435
4435
|
|
|
4436
|
-
`,
|
|
4436
|
+
`,pf=l.div`
|
|
4437
4437
|
|
|
4438
4438
|
display: flex;
|
|
4439
4439
|
align-items: center;
|
|
@@ -4444,7 +4444,7 @@
|
|
|
4444
4444
|
transition: transform .3s ease-out;
|
|
4445
4445
|
}
|
|
4446
4446
|
|
|
4447
|
-
`,
|
|
4447
|
+
`,ff=l.div`
|
|
4448
4448
|
|
|
4449
4449
|
display: flex;
|
|
4450
4450
|
align-items: center;
|
|
@@ -4457,23 +4457,23 @@
|
|
|
4457
4457
|
${({$open:e})=>e&&l.css`
|
|
4458
4458
|
background-color: #050A20;
|
|
4459
4459
|
|
|
4460
|
-
${
|
|
4460
|
+
${uf} {
|
|
4461
4461
|
color: #ffffff;
|
|
4462
4462
|
}
|
|
4463
4463
|
|
|
4464
|
-
${
|
|
4464
|
+
${pf} {
|
|
4465
4465
|
svg {
|
|
4466
4466
|
transform: rotate(180deg);
|
|
4467
4467
|
}
|
|
4468
4468
|
}
|
|
4469
4469
|
`}
|
|
4470
4470
|
|
|
4471
|
-
`;function
|
|
4471
|
+
`;function hf({label:e="",value:t="",count:r=0,isOpen:o=!1,single:i=!1,onChange:a=null}){const[s,l]=n.useState(o);n.useEffect(()=>{},[]),n.useEffect(()=>{l(o)},[o]);return n.createElement(ff,{$open:o,onClick:e=>(l(!s),void a(!s)),className:"itd-inline-select-selector"},n.createElement(cf,{className:"itd-inline-select-selection-item"},n.createElement(pf,null,n.createElement(uf,{className:"itd-inline-select-selection-label"},i||1===r?e:e+" ("+r+")"),n.createElement(si,{className:"itd-inline-select-arrow",width:9,height:4.5}))))}const gf=l.div`
|
|
4472
4472
|
|
|
4473
4473
|
position: relative;
|
|
4474
4474
|
width: max-content;
|
|
4475
4475
|
|
|
4476
|
-
`,
|
|
4476
|
+
`,mf=({label:e="",value:t=[],children:r=null,single:o=!1,minWidth:i=0,className:a="",onChange:s=null})=>{const l=n.useRef(null),[d,c]=n.useState(!1),[u,p]=n.useState([]),[f,h]=n.useState("");n.useEffect(()=>{t&&t.length>0&&r.length>0&&(p(t),n.Children.map(r,e=>{e.props.value===t[0]&&h(e.props.children)}))},[t,r]),P(l,()=>{c(!1)});const g=(e,t)=>{if(s?s(e,t):console.warn("InlineSelect: 'onChange' method couldn't be called because it is not defined!"),o)p(e),h(t);else{const t=e[e.length-1];p(t||[])}};return n.createElement(gf,{className:(()=>{let e="itd-inline-select";return d&&(e+=" itd-inline-select-open"),""!==a&&(e+=" "+a),e})(),ref:l},n.createElement(hf,{onChange:e=>{c(e)},isOpen:d,count:u.length,single:o,label:(()=>{let t=o||!o&&1===u.length?f:e;return""===t?"··········":t})()}),n.createElement(df,{onChange:g,value:u,isOpen:d,single:o,minWidth:i},n.Children.map(r,e=>{if(e&&e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type)return e.type===sf?n.cloneElement(e,{...e.props,onChange:g,single:o}):void 0})))};mf.Option=sf;const bf=l.div`
|
|
4477
4477
|
|
|
4478
4478
|
display: flex;
|
|
4479
4479
|
align-items: center;
|
|
@@ -4556,17 +4556,17 @@
|
|
|
4556
4556
|
}
|
|
4557
4557
|
`}
|
|
4558
4558
|
|
|
4559
|
-
`,
|
|
4559
|
+
`,xf=l.span`
|
|
4560
4560
|
font-size: 14px;
|
|
4561
4561
|
line-height: 14px;
|
|
4562
4562
|
font-weight: 500;
|
|
4563
4563
|
display: flex;
|
|
4564
4564
|
align-self: flex-start;
|
|
4565
|
-
`,
|
|
4565
|
+
`,vf=l.span`
|
|
4566
4566
|
font-weight: 400;
|
|
4567
4567
|
font-size: 13px;
|
|
4568
4568
|
line-height: 15px;
|
|
4569
|
-
`,
|
|
4569
|
+
`,yf=l.span`
|
|
4570
4570
|
|
|
4571
4571
|
display: flex;
|
|
4572
4572
|
flex-direction: column;
|
|
@@ -4574,7 +4574,7 @@
|
|
|
4574
4574
|
height: 100%;
|
|
4575
4575
|
gap: ${e=>e.$noTitle?0:"5px"};
|
|
4576
4576
|
|
|
4577
|
-
`,
|
|
4577
|
+
`,wf=l.div`
|
|
4578
4578
|
|
|
4579
4579
|
width: 16px;
|
|
4580
4580
|
min-width: 16px;
|
|
@@ -4588,17 +4588,17 @@
|
|
|
4588
4588
|
align-self: flex-start;
|
|
4589
4589
|
}
|
|
4590
4590
|
|
|
4591
|
-
`,
|
|
4591
|
+
`,Af=({type:e="info",size:t=exports.ComponentSizes.SMALL,title:n,className:o,children:i,icon:a})=>{const s=()=>{let r="itd-alert";return r+=" itd-alert-"+e,r+=" itd-alert-"+(t===exports.ComponentSizes.X_SMALL?exports.ComponentSizesSlug.X_SMALL:t===exports.ComponentSizes.SMALL?exports.ComponentSizesSlug.SMALL:t===exports.ComponentSizes.MEDIUM?exports.ComponentSizesSlug.MEDIUM:t===exports.ComponentSizes.DEFAULT?exports.ComponentSizesSlug.DEFAULT:t===exports.ComponentSizes.LARGE?exports.ComponentSizesSlug.LARGE:t===exports.ComponentSizes.X_LARGE?exports.ComponentSizesSlug.X_LARGE:exports.ComponentSizesSlug.DEFAULT),""!==o&&(r+=" "+o),r};return r.jsxs(bf,{className:s(),children:[r.jsx(wf,{children:a?"string"==typeof a?r.jsx(be,{src:a}):a:r.jsx(be,{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' strokeWidth='2' stroke-linecap='round' stroke-linejoin='round'%3e %3ccircle cx='12' cy='12' r='10'%3e%3c/circle%3e %3cline x1='12' x2='12' y1='8' y2='12'%3e%3c/line%3e %3cline x1='12' x2='12.01' y1='16' y2='16'%3e%3c/line%3e%3c/svg%3e"})}),r.jsxs(yf,{$noTitle:!n,children:[""!==n?r.jsx(xf,{children:n}):null,""!==i?r.jsx(vf,{children:i}):null]})]})};Af.displayName="ITD-Alert";const kf=l.section`
|
|
4592
4592
|
width: 100%;
|
|
4593
4593
|
height: 100%;
|
|
4594
4594
|
position: relative;
|
|
4595
4595
|
overflow: hidden;
|
|
4596
|
-
`,
|
|
4596
|
+
`,Sf=l.keyframes`
|
|
4597
4597
|
0% { transform: scale(.5); opacity: 0;}
|
|
4598
4598
|
50% { transform: scale(1.05); opacity: 1;}
|
|
4599
4599
|
75% { transform: scale(0.95); opacity: 1;}
|
|
4600
4600
|
100% { transform: scale(1); opacity: 1;}
|
|
4601
|
-
`,
|
|
4601
|
+
`,_f=l.div`
|
|
4602
4602
|
|
|
4603
4603
|
width: 100%;
|
|
4604
4604
|
height: 100%;
|
|
@@ -4607,7 +4607,7 @@
|
|
|
4607
4607
|
align-items: center;
|
|
4608
4608
|
justify-content: center;
|
|
4609
4609
|
|
|
4610
|
-
`,
|
|
4610
|
+
`,Ef=l.div`
|
|
4611
4611
|
|
|
4612
4612
|
opacity: 1;
|
|
4613
4613
|
|
|
@@ -4625,12 +4625,12 @@
|
|
|
4625
4625
|
gap : 20px;
|
|
4626
4626
|
|
|
4627
4627
|
${e=>{if(e.$animation)return l.css`
|
|
4628
|
-
animation : ${
|
|
4628
|
+
animation : ${Sf} 0.5s ease-out;
|
|
4629
4629
|
transition : all 0.5s ease-out;
|
|
4630
4630
|
transform-origin : 50% 50%;
|
|
4631
4631
|
`}}
|
|
4632
4632
|
|
|
4633
|
-
`,
|
|
4633
|
+
`,Cf=l.div`
|
|
4634
4634
|
|
|
4635
4635
|
position: relative;
|
|
4636
4636
|
display: flex;
|
|
@@ -4651,7 +4651,7 @@
|
|
|
4651
4651
|
height: auto;
|
|
4652
4652
|
}
|
|
4653
4653
|
|
|
4654
|
-
`,
|
|
4654
|
+
`,jf=l.div`
|
|
4655
4655
|
display: flex;
|
|
4656
4656
|
justify-content: center;
|
|
4657
4657
|
margin-top: 20px;
|
|
@@ -4664,7 +4664,7 @@
|
|
|
4664
4664
|
}
|
|
4665
4665
|
|
|
4666
4666
|
}
|
|
4667
|
-
|
|
4667
|
+
`,$f=l.div`
|
|
4668
4668
|
|
|
4669
4669
|
display: flex;
|
|
4670
4670
|
justify-content: center;
|
|
@@ -4675,7 +4675,7 @@
|
|
|
4675
4675
|
width: 100%;
|
|
4676
4676
|
}
|
|
4677
4677
|
|
|
4678
|
-
|
|
4678
|
+
`,zf=l.div`
|
|
4679
4679
|
|
|
4680
4680
|
display: flex;
|
|
4681
4681
|
flex-direction: column;
|
|
@@ -4683,28 +4683,28 @@
|
|
|
4683
4683
|
justify-content: center;
|
|
4684
4684
|
gap: 10px;
|
|
4685
4685
|
|
|
4686
|
-
`,
|
|
4686
|
+
`,Lf=l.div`
|
|
4687
4687
|
color: #57d43c;
|
|
4688
4688
|
font-size: 18px;
|
|
4689
4689
|
font-weight: 600;
|
|
4690
4690
|
text-align: center;
|
|
4691
4691
|
max-width: 80%;
|
|
4692
|
-
`,
|
|
4692
|
+
`,Ff=l.div`
|
|
4693
4693
|
color: #cccccc;
|
|
4694
4694
|
font-size: 13px;
|
|
4695
4695
|
line-height: 18px;
|
|
4696
4696
|
font-weight: 500;
|
|
4697
4697
|
text-align: center;
|
|
4698
4698
|
max-width: 80%;
|
|
4699
|
-
`,
|
|
4699
|
+
`,Nf=({image:e="",title:t="",description:o="",extra:i=null,footer:a=null,type:s="default",fill:l=!1,autoCenter:d=!0,background:c=!0,animation:u=!0})=>{const[p,f]=n.useState("");n.useEffect(()=>{""!==e&&f(e)},[e]);const h=()=>{if(i)return r.jsx(jf,{className:"itd-result-extras",children:i})},g=()=>{if(a)return r.jsx($f,{className:"itd-result-footer",children:a})},m=()=>{let e="itd-result";return e+=" itd-result-"+s,d&&(e+=" itd-result-auto-center"),l&&(e+=" itd-result-fill"),c&&(e+=" itd-result-background"),c||(e+=" itd-result-no-background"),e};return r.jsx(kf,{className:m(),children:r.jsx(_f,{className:"itd-result-content-wrapper",children:r.jsxs(Ef,{className:"itd-result-content",$autoCenter:d,$type:s,$background:c,$animation:u,$fill:l.toString(),children:[r.jsxs(zf,{className:"itd-result-body",children:[r.jsx(Cf,{className:"itd-image-wrapper",children:"string"==typeof p?r.jsx(Vi,{src:p}):p}),r.jsx(Lf,{className:"itd-result-title",children:t}),r.jsx(Ff,{className:"itd-result-sub-title",children:o})]}),h(),g()]})})})};Nf.displayName="ITD-Result";const Mf=l.div`
|
|
4700
4700
|
position: fixed;
|
|
4701
4701
|
bottom: 80px;
|
|
4702
4702
|
right: 30px;
|
|
4703
4703
|
visibility: hidden;
|
|
4704
|
-
`,
|
|
4704
|
+
`,Df=l.a`
|
|
4705
4705
|
|
|
4706
4706
|
visibility: ${e=>e.$show?"visible":"hidden"};
|
|
4707
|
-
animation: ${e=>e.$show?
|
|
4707
|
+
animation: ${e=>e.$show?Tf:"none"} 0.5s;
|
|
4708
4708
|
|
|
4709
4709
|
display: block;
|
|
4710
4710
|
transition: fill .3s ease-out;
|
|
@@ -4715,12 +4715,12 @@
|
|
|
4715
4715
|
fill: #3396fb;
|
|
4716
4716
|
}
|
|
4717
4717
|
|
|
4718
|
-
`,
|
|
4718
|
+
`,Tf=l.keyframes`
|
|
4719
4719
|
0% { transform: scale(.2) }
|
|
4720
4720
|
50% { transform: scale(1.1) }
|
|
4721
4721
|
75% { transform: scale(0.9) }
|
|
4722
4722
|
100% { transform: scale(1) }
|
|
4723
|
-
`;const
|
|
4723
|
+
`;const Of={"gray-1":{background:"#F9F9F9",text:"#0714374D"},"gray-2":{background:"#F9F9F9",text:"#585455"},"gray-3":{background:"#F5F5F5",text:"#071437"},black:{background:"#071437",text:"#FFFFFF"},green:{background:"#DFFFEA",text:"#17C653"},purple:{background:"#F5F1FF",text:"#7239EA"},yellow:{background:"#FFF8DD",text:"#F6C000"},red:{background:"#FFEEF3",text:"#F8285A"},brown:{background:"#FFF3F1",text:"#CB6F5B"},lavender:{background:"#FCF3FF",text:"#AB60C0"},blue:{background:"#F1F4FF",text:"#3256D9"},pink:{background:"#FFEEF6",text:"#E25698"},violet:{background:"#F5F1FF",text:"#7239EA"},"filled-brown":{background:"#F5651A",text:"#FFF9F6"},"filled-violet":{background:"#7239EA",text:"#F5F1FF"},"filled-red":{background:"#F8285A",text:"#F7EFF1"},"filled-yellow":{background:"#F6C000",text:"#FBFAF4"},"filled-pink":{background:"#CC79E3",text:"#F7F3F9"},"filled-blue":{background:"#1B84FF",text:"#EDF0F4"},"filled-green":{background:"#17C653",text:"#F5FAF6"},"filled-purple":{background:"#C417C6",text:"#F6F0F6"},"filled-black":{background:"#071437",text:"#F1F3F7"},"filled-lavender":{background:"#AB60C0",text:"#FCF3FF"},"filled-gray-1":{background:"#585455",text:"#F9F9F9"},"filled-gray-2":{background:"#585455",text:"#F9F9F9"},"filled-gray-3":{background:"#071437",text:"#F5F5F5"},orange:{background:"#FFF4E6",text:"#FF8C00"},"filled-orange":{background:"#FF8C00",text:"#FFF4E6"},teal:{background:"#E6FFFA",text:"#2DD4BF"},"filled-teal":{background:"#2DD4BF",text:"#E6FFFA"},indigo:{background:"#EEF2FF",text:"#6366F1"},"filled-indigo":{background:"#6366F1",text:"#EEF2FF"},lime:{background:"#F7FEE7",text:"#65A30D"},"filled-lime":{background:"#65A30D",text:"#F7FEE7"}},Rf=l.div`
|
|
4724
4724
|
|
|
4725
4725
|
display: flex;
|
|
4726
4726
|
align-items: center;
|
|
@@ -4788,13 +4788,13 @@
|
|
|
4788
4788
|
}
|
|
4789
4789
|
|
|
4790
4790
|
${({$status:e})=>{return t=e,l.css`
|
|
4791
|
-
background: ${
|
|
4791
|
+
background: ${Of[t].background};
|
|
4792
4792
|
span {
|
|
4793
|
-
color: ${
|
|
4793
|
+
color: ${Of[t].text};
|
|
4794
4794
|
}
|
|
4795
4795
|
`;var t}}
|
|
4796
4796
|
|
|
4797
|
-
`;const
|
|
4797
|
+
`;const If={normal:{background:"#1B84FF",remaining:"#efefef"},active:{background:"#1B84FF",remaining:"#efefef"},success:{background:"#17C653",remaining:"#efefef"},exception:{background:"#F8285A",remaining:"#efefef"}},Pf=l.div`
|
|
4798
4798
|
|
|
4799
4799
|
position: relative;
|
|
4800
4800
|
width: 100%;
|
|
@@ -4842,21 +4842,21 @@
|
|
|
4842
4842
|
|
|
4843
4843
|
${({$status:e})=>{return t=e,l.css`
|
|
4844
4844
|
.itd-progress-inner {
|
|
4845
|
-
background: ${
|
|
4845
|
+
background: ${If[t].remaining};
|
|
4846
4846
|
.itd-progress-bg {
|
|
4847
|
-
background: ${
|
|
4847
|
+
background: ${If[t].background};
|
|
4848
4848
|
}
|
|
4849
4849
|
}
|
|
4850
4850
|
.itd-progress-status {
|
|
4851
|
-
color: ${
|
|
4851
|
+
color: ${If[t].background};
|
|
4852
4852
|
}
|
|
4853
4853
|
`;var t}}
|
|
4854
4854
|
|
|
4855
|
-
`;const
|
|
4855
|
+
`;const Bf=l.div`
|
|
4856
4856
|
|
|
4857
4857
|
height: ${e=>e.$height?e.$height+"px":"75px"};
|
|
4858
4858
|
|
|
4859
|
-
`,
|
|
4859
|
+
`,Vf=l.div`
|
|
4860
4860
|
|
|
4861
4861
|
font-size: 14px;
|
|
4862
4862
|
height: 100%;
|
|
@@ -4867,6 +4867,7 @@
|
|
|
4867
4867
|
align-items: stretch;
|
|
4868
4868
|
flex-wrap: nowrap;
|
|
4869
4869
|
list-style: none;
|
|
4870
|
+
gap: 30px;
|
|
4870
4871
|
|
|
4871
4872
|
margin: 0;
|
|
4872
4873
|
padding: 0;
|
|
@@ -4883,10 +4884,6 @@
|
|
|
4883
4884
|
display: none !important;
|
|
4884
4885
|
}
|
|
4885
4886
|
|
|
4886
|
-
&:not(:last-child):not(.--hidden) {
|
|
4887
|
-
margin-right: 30px;
|
|
4888
|
-
}
|
|
4889
|
-
|
|
4890
4887
|
a {
|
|
4891
4888
|
|
|
4892
4889
|
background-color: transparent;
|
|
@@ -4947,12 +4944,12 @@
|
|
|
4947
4944
|
|
|
4948
4945
|
}
|
|
4949
4946
|
|
|
4950
|
-
`,
|
|
4947
|
+
`,Hf=l.div`
|
|
4951
4948
|
|
|
4952
4949
|
padding: 20px 0;
|
|
4953
4950
|
color: #99a1b7;
|
|
4954
4951
|
|
|
4955
|
-
`,
|
|
4952
|
+
`,Uf=l.li`
|
|
4956
4953
|
position: relative;
|
|
4957
4954
|
display: flex;
|
|
4958
4955
|
align-items: stretch;
|
|
@@ -4964,7 +4961,7 @@
|
|
|
4964
4961
|
flex-wrap: nowrap;
|
|
4965
4962
|
height: auto;
|
|
4966
4963
|
}
|
|
4967
|
-
`,
|
|
4964
|
+
`,Gf=l.button`
|
|
4968
4965
|
background-color: transparent;
|
|
4969
4966
|
border: 0;
|
|
4970
4967
|
border-bottom: 1px solid transparent;
|
|
@@ -4998,7 +4995,7 @@
|
|
|
4998
4995
|
transform: rotate(180deg);
|
|
4999
4996
|
color: #1b84ff;
|
|
5000
4997
|
}
|
|
5001
|
-
`,
|
|
4998
|
+
`,Wf=l.div`
|
|
5002
4999
|
position: absolute;
|
|
5003
5000
|
top: calc(100% - 15px);
|
|
5004
5001
|
right: 0;
|
|
@@ -5007,12 +5004,13 @@
|
|
|
5007
5004
|
border: 1px solid #e1e3ea;
|
|
5008
5005
|
border-radius: 6px;
|
|
5009
5006
|
//box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
5007
|
+
overflow: hidden;
|
|
5010
5008
|
margin: 0;
|
|
5011
5009
|
z-index: 1000;
|
|
5012
5010
|
|
|
5013
5011
|
.dropdown-item {
|
|
5014
5012
|
display: block;
|
|
5015
|
-
padding:
|
|
5013
|
+
padding: 12px 16px;
|
|
5016
5014
|
color: #99a1b7;
|
|
5017
5015
|
text-decoration: none;
|
|
5018
5016
|
transition: all .2s ease;
|
|
@@ -5043,7 +5041,7 @@
|
|
|
5043
5041
|
color: inherit;
|
|
5044
5042
|
}
|
|
5045
5043
|
}
|
|
5046
|
-
`,
|
|
5044
|
+
`,Yf=({tabs:e=[],activeTabKey:o="",className:i="",variant:s="default",height:l,onTabChange:d})=>{const{t:c}=t.useTranslation("itd"),[u,p]=n.useState(o),[f,h]=n.useState([]),[g,m]=n.useState(!1),b=n.useRef(null),x=n.useRef(null);n.useEffect(()=>{u!==o&&p(o)},[o]),n.useEffect(()=>{const e=b.current,t=x.current;if(!e||!t)return;const r=()=>{const r=t.querySelectorAll("li.tab-item"),n=t.querySelector(".more-menu-wrapper"),o=n?.querySelector("button");if(!r.length||!n||!o)return;r.forEach(e=>{e.classList.remove("--hidden")}),n.classList.remove("--hidden");let i=0;r.forEach(e=>{i+=e.offsetWidth+30}),i+=o.offsetWidth;const a=e.parentElement;let s=e.offsetWidth;if(a){const t=window.getComputedStyle(a);if("flex"===t.display){let r=0;Array.from(a.children).forEach(t=>{t!==e&&(r+=t.offsetWidth)});const n=parseFloat(t.paddingLeft)||0,o=parseFloat(t.paddingRight)||0;s=a.offsetWidth-r-n-o}}let l=o.offsetWidth;const d=[];let c=!1;r.forEach((e,t)=>{const r=e,n=r.offsetWidth+30;c?(r.classList.add("--hidden"),d.push(t)):s>=l+n?l+=n:(c=!0,r.classList.add("--hidden"),d.push(t))}),0===d.length&&n.classList.add("--hidden"),h(d)},n=setTimeout(r,100),o=new ResizeObserver(()=>{r()});return o.observe(e),e.parentElement&&o.observe(e.parentElement),window.addEventListener("resize",r),()=>{clearTimeout(n),o.disconnect(),window.removeEventListener("resize",r)}},[e]);const v=(t,r)=>(()=>{let t=!1;return e.map(e=>{e.link&&(t=!0)}),t})()?"":u?u===t?"active":"":o&&0===r?"active":"",y=e=>{p(e),d&&d(e)},w=(e,t)=>r.jsx("a",{className:v(e.key,t),onClick:()=>y(e.key),children:r.jsx("span",{children:e.tab})}),A=(e,t)=>r.jsx(a.NavLink,{className:v(e.key,t),onClick:()=>y(e.key),to:e.link?e.link:"",children:r.jsx("span",{children:e.tab})});return r.jsxs(Bf,{ref:b,$height:l,className:`itd-tabs ${i||""}`,children:[r.jsx(Vf,{$isBold:"bold"===s,children:r.jsxs("ul",{ref:x,children:[e.map((e,t)=>r.jsx("li",{className:"tab-item",children:e.link?A(e,t):w(e,t)},e.key)),r.jsxs(Uf,{className:"more-menu-wrapper --hidden",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[r.jsxs(Gf,{$isBold:"bold"===s,className:g?"--open":"",children:[r.jsx("span",{children:c("tabs.more")}),r.jsx(()=>r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M2.5 4.5L6 8L9.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),{})]}),g&&f.length>0&&r.jsx(Wf,{children:e.map((e,t)=>((e,t)=>{const n=`dropdown-item ${v(e.key,t)} ${f.includes(t)?"":"--hidden"}`.trim();return e.link?r.jsx(a.NavLink,{className:n,onClick:()=>y(e.key),to:e.link,children:r.jsx("span",{children:e.tab})},e.key):r.jsx("a",{className:n,onClick:()=>y(e.key),children:r.jsx("span",{children:e.tab})},e.key)})(e,t))})]})]})}),(()=>{const t=e.filter(e=>e.key===u)[0];if(t&&t.children)return r.jsx(Hf,{className:"itd-content-body",children:t.children})})()]})},qf=l.div`
|
|
5047
5045
|
|
|
5048
5046
|
position: relative;
|
|
5049
5047
|
width: 100%;
|
|
@@ -5052,7 +5050,7 @@
|
|
|
5052
5050
|
height: 100%;
|
|
5053
5051
|
}
|
|
5054
5052
|
|
|
5055
|
-
`,
|
|
5053
|
+
`,Xf=l.div`
|
|
5056
5054
|
|
|
5057
5055
|
position: relative;
|
|
5058
5056
|
background-color: #ffffff;
|
|
@@ -5067,7 +5065,7 @@
|
|
|
5067
5065
|
min-width : ${e=>e.$minWidth?"number"==typeof e.$minWidth?e.$minWidth+"px":e.$minWidth:"200px"};
|
|
5068
5066
|
min-height : ${e=>e.$minHeight?"number"==typeof e.$minHeight?e.$minHeight+"px":e.$minHeight:"100px"};
|
|
5069
5067
|
|
|
5070
|
-
`,
|
|
5068
|
+
`,Kf=l.div`
|
|
5071
5069
|
|
|
5072
5070
|
padding: 0 30px;
|
|
5073
5071
|
min-width: 0;
|
|
@@ -5086,24 +5084,24 @@
|
|
|
5086
5084
|
align-items: center;
|
|
5087
5085
|
}
|
|
5088
5086
|
|
|
5089
|
-
`,
|
|
5087
|
+
`,Jf=l.div`
|
|
5090
5088
|
padding: 20px 0;
|
|
5091
5089
|
height: 100%;
|
|
5092
5090
|
|
|
5093
5091
|
h2 {
|
|
5094
5092
|
white-space: nowrap;
|
|
5095
5093
|
}
|
|
5096
|
-
`,
|
|
5094
|
+
`,Zf=l.div`
|
|
5097
5095
|
|
|
5098
5096
|
display: grid;
|
|
5099
5097
|
padding: ${e=>e.$padding?e.$padding:"30px"};
|
|
5100
5098
|
|
|
5101
|
-
`,
|
|
5099
|
+
`,Qf=l.div`
|
|
5102
5100
|
display: flex;
|
|
5103
5101
|
flex-direction: row;
|
|
5104
5102
|
justify-content: space-between;
|
|
5105
5103
|
gap: 10px;
|
|
5106
|
-
`,
|
|
5104
|
+
`,eh=l.div`
|
|
5107
5105
|
|
|
5108
5106
|
&:has(table.itd-table-no-data), &:has(table.itd-table-empty) {
|
|
5109
5107
|
height: 100%;
|
|
@@ -5524,7 +5522,7 @@
|
|
|
5524
5522
|
|
|
5525
5523
|
}
|
|
5526
5524
|
|
|
5527
|
-
`,
|
|
5525
|
+
`,th=l.div`
|
|
5528
5526
|
|
|
5529
5527
|
height: 150px;
|
|
5530
5528
|
display: flex;
|
|
@@ -5547,7 +5545,7 @@
|
|
|
5547
5545
|
fill: #4D4D4D;
|
|
5548
5546
|
}
|
|
5549
5547
|
|
|
5550
|
-
`,
|
|
5548
|
+
`,rh=l.span`
|
|
5551
5549
|
|
|
5552
5550
|
${e=>{if(e.$overflow)return l.css`
|
|
5553
5551
|
overflow : hidden;
|
|
@@ -5557,7 +5555,7 @@
|
|
|
5557
5555
|
display : block;
|
|
5558
5556
|
`}}
|
|
5559
5557
|
|
|
5560
|
-
`,
|
|
5558
|
+
`,nh=l.span`
|
|
5561
5559
|
|
|
5562
5560
|
${e=>{if(e.$overflow)return l.css`
|
|
5563
5561
|
overflow : hidden;
|
|
@@ -5567,7 +5565,7 @@
|
|
|
5567
5565
|
display : block;
|
|
5568
5566
|
`}}
|
|
5569
5567
|
|
|
5570
|
-
`,
|
|
5568
|
+
`,oh=n.forwardRef(({columns:e,data:o,cellHeight:i,size:a=exports.ComponentSizes.DEFAULT,headless:s=!1,bordered:l=!1,dashed:d=!1,noGaps:c=!1,hideGroupButtons:u=!1,getTRProps:p},f)=>{const{t:h}=t.useTranslation("itd"),[g,m]=n.useState(new Set),b=e=>{m(t=>{const r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})};n.useImperativeHandle(f,()=>({toggleRow:b,expandedRows:g}));const x=(e,t)=>{let r={};return"string"==typeof e.width?r.width=e.width:"number"==typeof e.width?r.minWidth=e.width+"px":r.width="auto",void 0!==e.maxWidth&&("string"==typeof e.maxWidth?r.maxWidth=e.maxWidth:"number"==typeof e.maxWidth&&(r.maxWidth=e.maxWidth+"px")),void 0!==e.minWidth&&("string"==typeof e.minWidth?r.minWidth=e.minWidth:"number"==typeof e.minWidth&&(r.minWidth=e.minWidth+"px")),"td"===t&&("string"==typeof i?r.height=i:"number"==typeof i?r.minHeight=i+"px":r.height="auto"),r},v=()=>{let e=!1;return o?.map(t=>{t.hasOwnProperty("children")&&(e=!0)}),!u&&e},y=(e,t,r)=>p?p(e,t,r):{},w=(e,t,r)=>{let n={"data-index":t+"_"+e,"data-level":t};return t>0&&(0===e&&(n["data-first"]="true"),e===r-1&&(n["data-last"]="true")),n},A=(t,o=0)=>t.map((i,a)=>r.jsxs(n.Fragment,{children:[r.jsxs("tr",{...w(a,o,t?.length),...y(i,a,o),children:[v()?i.children?r.jsx("td",{style:{width:"40px"},children:r.jsx("div",{className:"expand-button",children:r.jsx(xe,{variant:"filled",size:exports.ComponentSizes.X_SMALL,onClick:()=>b(i.key),circle:!0,children:r.jsx("span",{children:g.has(i.key)?"-":"+"})})})}):r.jsx("td",{}):null,e.map(e=>r.jsx("td",{style:x(e,"td"),children:r.jsx(nh,{$overflow:e.overflow,title:String(i[e.dataIndex]),children:e.render?e.render(i[e.dataIndex],i,o):e.dataIndex?String(i[e.dataIndex]):null})},String(e.key)+"_"+a+"_"+o))]}),i.children&&g.has(i.key)&&A(i.children,o+1)]},String(o+"_"+a+"_"+i.key)));return r.jsx(eh,{$size:a,$noGaps:c,children:r.jsxs("table",{className:(()=>{let e="itd-table";return e+=" itd-table-"+ge(a),s&&(e+=" itd-table-headless"),l&&(e+=" itd-table-bordered"),c&&(e+=" itd-table-no-gaps"),o||(e+=" itd-table-empty"),0===o?.length&&(e+=" itd-table-no-data"),e+=d?" itd-table-dashed":" itd-table-solid",e+=" itd-table-main-table",e})(),children:[(()=>{if(!s)return r.jsx("thead",{children:r.jsxs("tr",{children:[v()&&r.jsx("th",{style:{maxWidth:"40px"}}),e.map(e=>r.jsx("th",{style:x(e,"th"),children:r.jsx(rh,{$overflow:e.overflow,children:e.title})},String(e.key)))]})})})(),o?0===o.length?r.jsx("tbody",{children:r.jsx("tr",{children:r.jsx("td",{colSpan:e.length,children:r.jsx(th,{children:r.jsxs("div",{children:[r.jsx(ui,{height:30}),r.jsx("span",{children:h("table.noData")})]})})})})}):r.jsx("tbody",{children:A(o)}):r.jsx("tbody",{children:r.jsx("tr",{children:r.jsx("td",{colSpan:e.length,children:r.jsx(th,{})})})})]})})}),ih=l.div`
|
|
5571
5569
|
|
|
5572
5570
|
display : flex;
|
|
5573
5571
|
|
|
@@ -5601,4 +5599,4 @@
|
|
|
5601
5599
|
gap : ${r};
|
|
5602
5600
|
`}}}
|
|
5603
5601
|
|
|
5604
|
-
`,ih=({gap:e,justify:t,align:n,vertical:o,wrap:i,stretch:a,style:s,className:l,children:d})=>r.jsx(oh,{$gap:e,$justify:t,$align:n,$vertical:o,$wrap:i,$stretch:a,style:s,className:l,children:d}),ah={tr:{itd:_,calendar:C},en:{itd:E,calendar:j}};e.use(t.initReactI18next).init({resources:ah,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}}),exports.ALink=Ep,exports.Accordion=_c,exports.AddDefaultThemeStyle=function(){const e=document.createElement("style");document.head.appendChild(e),e.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Xo,exports.AddZero=function(e){var t=Number(e),r=e.toString().split(".");return(-1===e.toString().indexOf(".")||r[1].length<3||r[1].length>2)&&(e=(t=t.toFixed(2)).toString()),parseFloat(e).toFixed(2)},exports.Alert=wf,exports.ArrowIcon=ni,exports.BackToTop=ii,exports.BackTop=function(e){const{children:t=null}=e,[o,i]=n.useState(!1);n.useEffect(()=>(document.addEventListener("scroll",a),()=>{document.removeEventListener("scroll",a)}),[]);const a=()=>{i(document.body.scrollTop>window.innerHeight)},s=()=>{window.scrollTo({top:0,behavior:"smooth"})};return r.jsx(Nf,{className:"itd-back-to-top",children:r.jsx(Mf,{onClick:s,$show:o,children:t||r.jsx(ii,{width:30,height:30})})})},exports.Base64Decode=function(e){return decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))},exports.Base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(Number("0x"+t))}))},exports.Button=xe,exports.Calendar=Bc,exports.Card=({title:e,titleSeparator:t,extra:o,tabs:i,onTabChange:a,minWidth:s,minHeight:l,children:d,activeTabKey:c="",updating:u=!1,contentPadding:p="30px"})=>{n.useEffect(()=>{});const f=()=>{if(o)return r.jsx(Zf,{className:"itd-card-extra",children:o})},h=()=>{if(i)return r.jsx(Wf,{tabs:i,activeTabKey:c,onTabChange:e=>a&&a(e)})},g=()=>{if(e)return r.jsx(Kf,{className:"itd-card-title",children:r.jsx(ei,{children:e})})},m=()=>!!(e||o||i);return r.jsx(Yf,{className:"itd-card",children:r.jsx(J,{updating:u,className:"itd-card-spin",children:r.jsxs(qf,{className:"itd-card-body",$minWidth:s,$minHeight:l,$hasHeader:m(),children:[(()=>{if(m())return r.jsxs(Xf,{$showSeparator:t,className:"itd-card-header",children:[g(),h(),f()]})})(),(()=>{if(d)return r.jsx(Jf,{className:"itd-card-body",$padding:p,children:d})})()]})})})},exports.CheckFileURL=Ho,exports.Checkbox=Ci,exports.Checkmark=ai,exports.ChunkArray=function(e,t){let r=0,n=[];for(r=0;r<e.length;r+=t){const o=e.slice(r,r+t);"object"!=typeof o&&n.push(o)}return n},exports.Collapse=Dp,exports.ConsoleLog=I,exports.ConvertCurrency=function(e,t){return e||(e=0),Bo(e,"TRY"===t?"₺":"USD"===t?"$":"EUR"===t?"€":"?")},exports.DatePicker=Wc,exports.DetermineNewHeight=function(e,t,r){return e/t*r},exports.DetermineNewWidth=function(e,t,r){return t/e*r},exports.FileChecker=function(e="config",t="resource"){let r=void 0!==performance.getEntries().filter(e=>e.entryType===t).filter(t=>t.name.indexOf(e)>-1)[0];return r?console.log("script already loaded"):console.log("script was not loaded"),r},exports.FileDocument=pi,exports.FileExcel=fi,exports.FilePdf=hi,exports.FindSelector=function(e){let t=!1;return document.querySelectorAll("head > style").forEach(r=>{Array(r.sheet.rules).forEach(r=>{for(var n=0;n<r.length;n++)r[n].cssText.search(e)>-1&&(t=!0)})}),t},exports.Flex=ih,exports.Form=mc,exports.FormatBytes=Uo,exports.FormatDate=function(e,t="tr",r="D MMMM YYYY dddd"){return d(new Date(e)).locale(t).format(r)},exports.FormatDateTime=function(e,t="tr",r="D MMMM YYYY dddd - HH:mm"){return d(new Date(e)).locale(t).format(r)},exports.FormatSimpleDate=function(e,t="tr",r="D MMMM YYYY"){return d(new Date(e)).locale(t).format(r)},exports.FormatSimpleDateTime=function(e,t="tr",r="MM/DD/YYYY - HH:mm"){return d(new Date(e)).locale(t).format(r)},exports.FormatTime=function(e,t="tr",r="HH:mm"){return d(e).locale(t).format(r)},exports.GetByCurrency=function(e,t=!0,r="",n=2){if(""===r)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");isNaN(e)&&(e=0);let o=Po(r);return t?new Intl.NumberFormat(o,{style:"currency",currency:r,minimumFractionDigits:n,maximumFractionDigits:n}).format(e):new Intl.NumberFormat(o,{minimumFractionDigits:n,maximumFractionDigits:n}).format(e)},exports.GetCountryCodeByCurrencyCode=Po,exports.GetCountryCodeByLanguage=function(e){return"tr"===e?"tur":"en"===e?"usa":"language_not_found"},exports.GetCurrencyFormat=function(e,t=""){if(""===t)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===e?"":e=`${Vo(t)}${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=Vo,exports.GetDecimalByCurrency=function(e=""){if(""===e)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===e?",":"EUR"===e||"USD"===e?".":","},exports.GetTypeByFileType=Go,exports.H1=({children:e})=>r.jsx(Ko,{children:r.jsx("span",{children:e})}),exports.H2=ei,exports.H3=({children:e})=>r.jsx(Zo,{children:r.jsx("span",{children:e})}),exports.H4=ti,exports.ITDContext=Io,exports.ITDProvider=t=>{const[o,i]=n.useState(t.theme?t.theme:"dark"),[a,s]=n.useState(t.dateFormat?t.dateFormat:"MM/DD/YYYY"),[l,d]=n.useState(t.language?t.language:"en"),[c,u]=n.useState("en-US"),[p,f]=n.useState("");n.useEffect(()=>{t.theme&&i(t.theme),t.language&&(d(t.language),e.changeLanguage(t.language)),t.dateFormat&&s(t.dateFormat)},[t.theme,t.language,t.dateFormat]);const h=n.useCallback(e=>{i(e)},[]),g=n.useCallback(e=>{f(e)},[]),m=n.useCallback(e=>{s(e)},[]),b=n.useCallback(e=>{u(e)},[]),x=n.useCallback(t=>{d(t),e.changeLanguage(t)},[]),v=n.useMemo(()=>({theme:o,brokenImage:p,dateFormat:a,language:l,locale:c,changeTheme:h,changeBrokenImage:g,changeDateFormat:m,changeLanguage:x,changeLocale:b}),[o,p,a,l,c,h,g,m,x,b]);return r.jsx(Ro,{className:"itd-provider","data-theme":o,"data-lang":l,children:r.jsx(Io.Provider,{value:v,children:r.jsx(To,{children:r.jsx(tt,{children:t.children})})})})},exports.Image=Vi,exports.ImageCropper=Sp,exports.InlineSVGCached=be,exports.InlineSelect=gf,exports.InlineSelectArrow=si,exports.Input=Yu,exports.IsValidJSON=function(e){e="string"!=typeof e?JSON.stringify(e):e;try{e=JSON.parse(String(e))}catch(e){return!1}return"object"==typeof e&&null!==e},exports.LockIcon=ri,exports.ModalManager=it,exports.NoData=ui,exports.Notification=Oo,exports.Picture=ci,exports.Progress=function({status:e,percent:t=0,alwaysShowPercent:n=!1,showInfo:o=!0,className:i=""}){const a=()=>{let r="itd-progress";return r+=" itd-progress-percent-"+t,e&&(r+=" itd-progress-"+e),""!==i&&null!==i&&(r+=" "+i),r},s=r.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),l=r.jsx("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),d=()=>e||(t<100?"normal":"success"),c=()=>{if(o)return r.jsx("span",{className:"itd-progress-status",children:u()})},u=()=>{const e=d();if("active"===e||"normal"===e||n){const e=t%1!=0?t.toFixed(2):Math.floor(t).toString();return r.jsx("span",{className:"itd-progress-status-text",children:e+"%"})}return"success"===e?s:"exception"===e?l:void 0};return r.jsx(If,{$status:d(),$percent:t,className:a(),children:r.jsxs("div",{className:"itd-progress-outer",children:[r.jsx("div",{className:"itd-progress-inner",children:r.jsx("div",{className:"itd-progress-bg"})}),c()]})})},exports.Radio=Xp,exports.RemoveUnits=function(e){return e?(e=e.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(e)):0},exports.Result=Ff,exports.SVGLoader=(e,t,n)=>r.jsx(qo,{$width:t,$height:n,children:r.jsx(be,{src:e})}),exports.Select=Vd,exports.Spin=J,exports.Status=function({variant:e="gray-1",size:t=exports.ComponentSizes.DEFAULT,stretch:n=!1,bold:o=!0,children:i="",className:a=""}){const s=()=>{let r="itd-status";return r+=" itd-status-"+e,r+=" itd-status-"+ge(t),n&&(r+=" itd-status-stretch"),o&&(r+=" itd-status-bold"),""!==a&&null!==a&&(r+=" "+a),r};return r.jsx(Of,{$status:e,$bold:o,className:s(),children:r.jsx("span",{children:i})})},exports.Switch=op,exports.Table=nh,exports.Tabs=Wf,exports.TextArea=Qu,exports.TinyScrollbar=Fd,exports.Trash=li,exports.UniUpperCase=function(e="",t="tr"){var r={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===t&&(e=e.replace(/(([iışğüçö]))/g,e=>r[e])),e.toUpperCase()},exports.UpdateThemeStyle=function(e){var t="",r=document.styleSheets[0];Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),r.hasOwnProperty("cssRules")&&(r.cssRules[0].style.cssText=t)},exports.Upload=bp,exports.UploadIcon=oi,exports.Wait=Wo,exports.ZoomIn=di,exports.ZoomOut=({className:e="",height:t=24,width:n=24})=>r.jsx("svg",{className:e,height:t,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:r.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[r.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),r.jsx("path",{d:"M14.2928932,16.7071068 C13.9023689,16.3165825 13.9023689,15.6834175 14.2928932,15.2928932 C14.6834175,14.9023689 15.3165825,14.9023689 15.7071068,15.2928932 L19.7071068,19.2928932 C20.0976311,19.6834175 20.0976311,20.3165825 19.7071068,20.7071068 C19.3165825,21.0976311 18.6834175,21.0976311 18.2928932,20.7071068 L14.2928932,16.7071068 Z",fill:"#000000",fillRule:"nonzero",opacity:"0.3"}),r.jsx("path",{d:"M11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 Z M11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 C14.8659932,4 18,7.13400675 18,11 C18,14.8659932 14.8659932,18 11,18 Z",fill:"#000000",fillRule:"nonzero"}),r.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=ah,exports.toKebabCase=function(e,t=!1,r=!1){const n=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],o={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return e=e.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,e=>o[e]||e),t&&(e=e.split(" ").filter(e=>!n.includes(e.toLowerCase())).join(" ")),r&&(e=e.replace(/\d+/g,"")),(e=(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(e,t=!1)=>{n.useEffect(()=>{var n=!1,o=document.head,i=r();return document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&(n=!0)}),n||o.appendChild(i),()=>{t&&document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&document.head.removeChild(t)})}},[e]);const r=()=>{var t=document.createElement("link");return t.type="text/css",t.rel="stylesheet",t.href=e,t}},exports.useAvoidCollision=({obstacles:e=[".chat-bubble",".whatsapp-button",".cookie-consent","[data-fixed-obstacle='true']"],corner:t="bottom-right",autoAvoid:r=!0,extraBottom:o=0,minGap:i=8}={})=>{const[a,s]=n.useState(o),l=n.useMemo(()=>{let n=0;const a=()=>{if(!r)return void s(o);const n=window.innerHeight;let a=0;e.flatMap(e=>Array.from(document.querySelectorAll(e))).forEach(e=>{const r=getComputedStyle(e),o="none"===r.display||"hidden"===r.visibility||"0"===r.opacity,s="fixed"===r.position||"sticky"===r.position;if(o||!s)return;const l=e.getBoundingClientRect(),d=Math.max(0,n-l.top),c=Math.min(d,l.height),u=(()=>{const e=window.innerWidth/2;return"bottom-right"===t?l.right>e:"bottom-left"===t?l.left<e:l.left<=e&&l.right>=e})();c>0&&u&&(a=Math.max(a,Math.ceil(c+i)))}),s(a+o)};return{schedule:()=>{cancelAnimationFrame(n),n=requestAnimationFrame(a)},cancel:()=>cancelAnimationFrame(n)}},[e,t,r,o,i]);return n.useEffect(()=>{l.schedule();const e=()=>l.schedule(),t=()=>l.schedule();window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0});const r=new MutationObserver(()=>l.schedule());r.observe(document.body,{childList:!0,subtree:!0,attributes:!0});const n=new ResizeObserver(()=>l.schedule());return n.observe(document.body),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t),r.disconnect(),n.disconnect(),l.cancel()}},[l]),{bottomOffset:a}},exports.useComponentSize=e=>{const[t,r]=n.useState({width:0,height:0});return n.useEffect(()=>{if(!e.current)return;const t=new ResizeObserver(e=>{e.forEach(({target:e})=>{r({width:e.clientWidth,height:e.clientHeight})})});return t.observe(e.current),()=>t.disconnect()},[e]),[t]},exports.useConnectionStatus=e=>{n.useEffect(()=>{const t=t=>{e(exports.ConnectionStatus.ONLINE,t)},r=t=>{e(exports.ConnectionStatus.OFFLINE,t)};return window.addEventListener(exports.ConnectionStatus.ONLINE,t),window.addEventListener(exports.ConnectionStatus.OFFLINE,r),()=>{window.removeEventListener(exports.ConnectionStatus.ONLINE,t),window.removeEventListener(exports.ConnectionStatus.OFFLINE,r)}},[e])},exports.useConstructor=(e=()=>{})=>{const[t,r]=n.useState(!1);t||(e(),r(!0))},exports.useContextBridge=(...e)=>{if(0===e.length)return({children:e})=>r.jsx(r.Fragment,{children:e});const t=e.map(n.useContext),o=n.useRef(t);return o.current=t,n.useMemo(()=>({children:t})=>e.reduceRight((e,t,n)=>r.jsx(t.Provider,{value:o.current[n],children:e}),t),[])},exports.useCoreFetch=U,exports.useKeyboardShortcut=({key:e,onKeyPressed:t})=>{n.useEffect(()=>{function r(r){r.key===e&&(r.preventDefault(),t())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,t])},exports.useModal=rt,exports.useModalFull=ot,exports.useModalState=nt,exports.useMultiQuery=H,exports.useOnClickOutside=P,exports.useOnESCKeyDown=B,exports.useOnResize=e=>{n.useEffect(()=>{const t=t=>{e(t)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])},exports.useOrientation=()=>{const[e,t]=n.useState(()=>G());return n.useEffect(()=>{if(!("undefined"!=typeof window))return;const e=window.screen&&window.screen.orientation,r=()=>t(G());if(e&&"function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof window.matchMedia){const e=window.matchMedia("(orientation: portrait)"),r=e=>{const r=e.matches;t(r?"portrait":"landscape")};if("function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof e.addListener)return e.addListener(r),()=>e.removeListener(r)}return window.addEventListener("orientationchange",r),window.addEventListener("resize",r),()=>{window.removeEventListener("orientationchange",r),window.removeEventListener("resize",r)}},[]),e},exports.useReCaptcha=e=>{let t;const[r,o]=n.useState("");n.useEffect(()=>()=>{document.body.removeChild(t)},[]);return{loadReCaptcha:e=>{t=document.createElement("script"),t.src="https://www.google.com/recaptcha/api.js?render="+e,t.onload=function(){o(e)},document.body.appendChild(t)},executeReCaptcha:()=>{if(""===r)return I.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(e&&e(null));window.grecaptcha.ready(t=>{try{window.grecaptcha.execute(r,{action:"login"}).then(t=>{I.double("ReCaptcha V3","Token is valid"),console.log("token: "+t),e&&e(t)})}catch(e){I.double("ReCaptcha V3","Token is invalid","error")}})}}},exports.useSingleQuery=V;
|
|
5602
|
+
`,ah=({gap:e,justify:t,align:n,vertical:o,wrap:i,stretch:a,style:s,className:l,children:d})=>r.jsx(ih,{$gap:e,$justify:t,$align:n,$vertical:o,$wrap:i,$stretch:a,style:s,className:l,children:d}),sh={tr:{itd:_,calendar:C},en:{itd:E,calendar:j}};e.use(t.initReactI18next).init({resources:sh,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}}),exports.ALink=Cp,exports.Accordion=Ec,exports.AddDefaultThemeStyle=function(){const e=document.createElement("style");document.head.appendChild(e),e.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Xo,exports.AddZero=function(e){var t=Number(e),r=e.toString().split(".");return(-1===e.toString().indexOf(".")||r[1].length<3||r[1].length>2)&&(e=(t=t.toFixed(2)).toString()),parseFloat(e).toFixed(2)},exports.Alert=Af,exports.ArrowIcon=ni,exports.BackToTop=ii,exports.BackTop=function(e){const{children:t=null}=e,[o,i]=n.useState(!1);n.useEffect(()=>(document.addEventListener("scroll",a),()=>{document.removeEventListener("scroll",a)}),[]);const a=()=>{i(document.body.scrollTop>window.innerHeight)},s=()=>{window.scrollTo({top:0,behavior:"smooth"})};return r.jsx(Mf,{className:"itd-back-to-top",children:r.jsx(Df,{onClick:s,$show:o,children:t||r.jsx(ii,{width:30,height:30})})})},exports.Base64Decode=function(e){return decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))},exports.Base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(Number("0x"+t))}))},exports.Button=xe,exports.Calendar=Vc,exports.Card=({title:e,titleSeparator:t,extra:o,tabs:i,onTabChange:a,minWidth:s,minHeight:l,children:d,activeTabKey:c="",updating:u=!1,contentPadding:p="30px"})=>{n.useEffect(()=>{});const f=()=>{if(o)return r.jsx(Qf,{className:"itd-card-extra",children:o})},h=()=>{if(i)return r.jsx(Yf,{tabs:i,activeTabKey:c,onTabChange:e=>a&&a(e)})},g=()=>{if(e)return r.jsx(Jf,{className:"itd-card-title",children:r.jsx(ei,{children:e})})},m=()=>!!(e||o||i);return r.jsx(qf,{className:"itd-card",children:r.jsx(J,{updating:u,className:"itd-card-spin",children:r.jsxs(Xf,{className:"itd-card-body",$minWidth:s,$minHeight:l,$hasHeader:m(),children:[(()=>{if(m())return r.jsxs(Kf,{$showSeparator:t,className:"itd-card-header",children:[g(),h(),f()]})})(),(()=>{if(d)return r.jsx(Zf,{className:"itd-card-body",$padding:p,children:d})})()]})})})},exports.CheckFileURL=Ho,exports.Checkbox=Ci,exports.Checkmark=ai,exports.ChunkArray=function(e,t){let r=0,n=[];for(r=0;r<e.length;r+=t){const o=e.slice(r,r+t);"object"!=typeof o&&n.push(o)}return n},exports.Collapse=Tp,exports.ConsoleLog=I,exports.ConvertCurrency=function(e,t){return e||(e=0),Bo(e,"TRY"===t?"₺":"USD"===t?"$":"EUR"===t?"€":"?")},exports.DatePicker=Yc,exports.DetermineNewHeight=function(e,t,r){return e/t*r},exports.DetermineNewWidth=function(e,t,r){return t/e*r},exports.FileChecker=function(e="config",t="resource"){let r=void 0!==performance.getEntries().filter(e=>e.entryType===t).filter(t=>t.name.indexOf(e)>-1)[0];return r?console.log("script already loaded"):console.log("script was not loaded"),r},exports.FileDocument=pi,exports.FileExcel=fi,exports.FilePdf=hi,exports.FindSelector=function(e){let t=!1;return document.querySelectorAll("head > style").forEach(r=>{Array(r.sheet.rules).forEach(r=>{for(var n=0;n<r.length;n++)r[n].cssText.search(e)>-1&&(t=!0)})}),t},exports.Flex=ah,exports.Form=bc,exports.FormatBytes=Uo,exports.FormatDate=function(e,t="tr",r="D MMMM YYYY dddd"){return d(new Date(e)).locale(t).format(r)},exports.FormatDateTime=function(e,t="tr",r="D MMMM YYYY dddd - HH:mm"){return d(new Date(e)).locale(t).format(r)},exports.FormatSimpleDate=function(e,t="tr",r="D MMMM YYYY"){return d(new Date(e)).locale(t).format(r)},exports.FormatSimpleDateTime=function(e,t="tr",r="MM/DD/YYYY - HH:mm"){return d(new Date(e)).locale(t).format(r)},exports.FormatTime=function(e,t="tr",r="HH:mm"){return d(e).locale(t).format(r)},exports.GetByCurrency=function(e,t=!0,r="",n=2){if(""===r)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");isNaN(e)&&(e=0);let o=Po(r);return t?new Intl.NumberFormat(o,{style:"currency",currency:r,minimumFractionDigits:n,maximumFractionDigits:n}).format(e):new Intl.NumberFormat(o,{minimumFractionDigits:n,maximumFractionDigits:n}).format(e)},exports.GetCountryCodeByCurrencyCode=Po,exports.GetCountryCodeByLanguage=function(e){return"tr"===e?"tur":"en"===e?"usa":"language_not_found"},exports.GetCurrencyFormat=function(e,t=""){if(""===t)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===e?"":e=`${Vo(t)}${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=Vo,exports.GetDecimalByCurrency=function(e=""){if(""===e)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===e?",":"EUR"===e||"USD"===e?".":","},exports.GetTypeByFileType=Go,exports.H1=({children:e})=>r.jsx(Ko,{children:r.jsx("span",{children:e})}),exports.H2=ei,exports.H3=({children:e})=>r.jsx(Zo,{children:r.jsx("span",{children:e})}),exports.H4=ti,exports.ITDContext=Io,exports.ITDProvider=t=>{const[o,i]=n.useState(t.theme?t.theme:"dark"),[a,s]=n.useState(t.dateFormat?t.dateFormat:"MM/DD/YYYY"),[l,d]=n.useState(t.language?t.language:"en"),[c,u]=n.useState("en-US"),[p,f]=n.useState("");n.useEffect(()=>{t.theme&&i(t.theme),t.language&&(d(t.language),e.changeLanguage(t.language)),t.dateFormat&&s(t.dateFormat)},[t.theme,t.language,t.dateFormat]);const h=n.useCallback(e=>{i(e)},[]),g=n.useCallback(e=>{f(e)},[]),m=n.useCallback(e=>{s(e)},[]),b=n.useCallback(e=>{u(e)},[]),x=n.useCallback(t=>{d(t),e.changeLanguage(t)},[]),v=n.useMemo(()=>({theme:o,brokenImage:p,dateFormat:a,language:l,locale:c,changeTheme:h,changeBrokenImage:g,changeDateFormat:m,changeLanguage:x,changeLocale:b}),[o,p,a,l,c,h,g,m,x,b]);return r.jsx(Ro,{className:"itd-provider","data-theme":o,"data-lang":l,children:r.jsx(Io.Provider,{value:v,children:r.jsx(To,{children:r.jsx(tt,{children:t.children})})})})},exports.Image=Vi,exports.ImageCropper=_p,exports.InlineSVGCached=be,exports.InlineSelect=mf,exports.InlineSelectArrow=si,exports.Input=qu,exports.IsValidJSON=function(e){e="string"!=typeof e?JSON.stringify(e):e;try{e=JSON.parse(String(e))}catch(e){return!1}return"object"==typeof e&&null!==e},exports.LockIcon=ri,exports.ModalManager=it,exports.NoData=ui,exports.Notification=Oo,exports.Picture=ci,exports.Progress=function({status:e,percent:t=0,alwaysShowPercent:n=!1,showInfo:o=!0,className:i=""}){const a=()=>{let r="itd-progress";return r+=" itd-progress-percent-"+t,e&&(r+=" itd-progress-"+e),""!==i&&null!==i&&(r+=" "+i),r},s=r.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),l=r.jsx("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),d=()=>e||(t<100?"normal":"success"),c=()=>{if(o)return r.jsx("span",{className:"itd-progress-status",children:u()})},u=()=>{const e=d();if("active"===e||"normal"===e||n){const e=t%1!=0?t.toFixed(2):Math.floor(t).toString();return r.jsx("span",{className:"itd-progress-status-text",children:e+"%"})}return"success"===e?s:"exception"===e?l:void 0};return r.jsx(Pf,{$status:d(),$percent:t,className:a(),children:r.jsxs("div",{className:"itd-progress-outer",children:[r.jsx("div",{className:"itd-progress-inner",children:r.jsx("div",{className:"itd-progress-bg"})}),c()]})})},exports.Radio=Kp,exports.RemoveUnits=function(e){return e?(e=e.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(e)):0},exports.Result=Nf,exports.SVGLoader=(e,t,n)=>r.jsx(qo,{$width:t,$height:n,children:r.jsx(be,{src:e})}),exports.Select=Vd,exports.Spin=J,exports.Status=function({variant:e="gray-1",size:t=exports.ComponentSizes.DEFAULT,stretch:n=!1,bold:o=!0,children:i="",className:a=""}){const s=()=>{let r="itd-status";return r+=" itd-status-"+e,r+=" itd-status-"+ge(t),n&&(r+=" itd-status-stretch"),o&&(r+=" itd-status-bold"),""!==a&&null!==a&&(r+=" "+a),r};return r.jsx(Rf,{$status:e,$bold:o,className:s(),children:r.jsx("span",{children:i})})},exports.Switch=ip,exports.Table=oh,exports.Tabs=Yf,exports.TextArea=ep,exports.TinyScrollbar=Fd,exports.Trash=li,exports.UniUpperCase=function(e="",t="tr"){var r={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===t&&(e=e.replace(/(([iışğüçö]))/g,e=>r[e])),e.toUpperCase()},exports.UpdateThemeStyle=function(e){var t="",r=document.styleSheets[0];Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),r.hasOwnProperty("cssRules")&&(r.cssRules[0].style.cssText=t)},exports.Upload=xp,exports.UploadIcon=oi,exports.Wait=Wo,exports.ZoomIn=di,exports.ZoomOut=({className:e="",height:t=24,width:n=24})=>r.jsx("svg",{className:e,height:t,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:r.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[r.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),r.jsx("path",{d:"M14.2928932,16.7071068 C13.9023689,16.3165825 13.9023689,15.6834175 14.2928932,15.2928932 C14.6834175,14.9023689 15.3165825,14.9023689 15.7071068,15.2928932 L19.7071068,19.2928932 C20.0976311,19.6834175 20.0976311,20.3165825 19.7071068,20.7071068 C19.3165825,21.0976311 18.6834175,21.0976311 18.2928932,20.7071068 L14.2928932,16.7071068 Z",fill:"#000000",fillRule:"nonzero",opacity:"0.3"}),r.jsx("path",{d:"M11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 Z M11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 C14.8659932,4 18,7.13400675 18,11 C18,14.8659932 14.8659932,18 11,18 Z",fill:"#000000",fillRule:"nonzero"}),r.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=sh,exports.toKebabCase=function(e,t=!1,r=!1){const n=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],o={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return e=e.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,e=>o[e]||e),t&&(e=e.split(" ").filter(e=>!n.includes(e.toLowerCase())).join(" ")),r&&(e=e.replace(/\d+/g,"")),(e=(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(e,t=!1)=>{n.useEffect(()=>{var n=!1,o=document.head,i=r();return document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&(n=!0)}),n||o.appendChild(i),()=>{t&&document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&document.head.removeChild(t)})}},[e]);const r=()=>{var t=document.createElement("link");return t.type="text/css",t.rel="stylesheet",t.href=e,t}},exports.useAvoidCollision=({obstacles:e=[".chat-bubble",".whatsapp-button",".cookie-consent","[data-fixed-obstacle='true']"],corner:t="bottom-right",autoAvoid:r=!0,extraBottom:o=0,minGap:i=8}={})=>{const[a,s]=n.useState(o),l=n.useMemo(()=>{let n=0;const a=()=>{if(!r)return void s(o);const n=window.innerHeight;let a=0;e.flatMap(e=>Array.from(document.querySelectorAll(e))).forEach(e=>{const r=getComputedStyle(e),o="none"===r.display||"hidden"===r.visibility||"0"===r.opacity,s="fixed"===r.position||"sticky"===r.position;if(o||!s)return;const l=e.getBoundingClientRect(),d=Math.max(0,n-l.top),c=Math.min(d,l.height),u=(()=>{const e=window.innerWidth/2;return"bottom-right"===t?l.right>e:"bottom-left"===t?l.left<e:l.left<=e&&l.right>=e})();c>0&&u&&(a=Math.max(a,Math.ceil(c+i)))}),s(a+o)};return{schedule:()=>{cancelAnimationFrame(n),n=requestAnimationFrame(a)},cancel:()=>cancelAnimationFrame(n)}},[e,t,r,o,i]);return n.useEffect(()=>{l.schedule();const e=()=>l.schedule(),t=()=>l.schedule();window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0});const r=new MutationObserver(()=>l.schedule());r.observe(document.body,{childList:!0,subtree:!0,attributes:!0});const n=new ResizeObserver(()=>l.schedule());return n.observe(document.body),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t),r.disconnect(),n.disconnect(),l.cancel()}},[l]),{bottomOffset:a}},exports.useComponentSize=e=>{const[t,r]=n.useState({width:0,height:0});return n.useEffect(()=>{if(!e.current)return;const t=new ResizeObserver(e=>{e.forEach(({target:e})=>{r({width:e.clientWidth,height:e.clientHeight})})});return t.observe(e.current),()=>t.disconnect()},[e]),[t]},exports.useConnectionStatus=e=>{n.useEffect(()=>{const t=t=>{e(exports.ConnectionStatus.ONLINE,t)},r=t=>{e(exports.ConnectionStatus.OFFLINE,t)};return window.addEventListener(exports.ConnectionStatus.ONLINE,t),window.addEventListener(exports.ConnectionStatus.OFFLINE,r),()=>{window.removeEventListener(exports.ConnectionStatus.ONLINE,t),window.removeEventListener(exports.ConnectionStatus.OFFLINE,r)}},[e])},exports.useConstructor=(e=()=>{})=>{const[t,r]=n.useState(!1);t||(e(),r(!0))},exports.useContextBridge=(...e)=>{if(0===e.length)return({children:e})=>r.jsx(r.Fragment,{children:e});const t=e.map(n.useContext),o=n.useRef(t);return o.current=t,n.useMemo(()=>({children:t})=>e.reduceRight((e,t,n)=>r.jsx(t.Provider,{value:o.current[n],children:e}),t),[])},exports.useCoreFetch=U,exports.useKeyboardShortcut=({key:e,onKeyPressed:t})=>{n.useEffect(()=>{function r(r){r.key===e&&(r.preventDefault(),t())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,t])},exports.useModal=rt,exports.useModalFull=ot,exports.useModalState=nt,exports.useMultiQuery=H,exports.useOnClickOutside=P,exports.useOnESCKeyDown=B,exports.useOnResize=e=>{n.useEffect(()=>{const t=t=>{e(t)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])},exports.useOrientation=()=>{const[e,t]=n.useState(()=>G());return n.useEffect(()=>{if(!("undefined"!=typeof window))return;const e=window.screen&&window.screen.orientation,r=()=>t(G());if(e&&"function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof window.matchMedia){const e=window.matchMedia("(orientation: portrait)"),r=e=>{const r=e.matches;t(r?"portrait":"landscape")};if("function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof e.addListener)return e.addListener(r),()=>e.removeListener(r)}return window.addEventListener("orientationchange",r),window.addEventListener("resize",r),()=>{window.removeEventListener("orientationchange",r),window.removeEventListener("resize",r)}},[]),e},exports.useReCaptcha=e=>{let t;const[r,o]=n.useState("");n.useEffect(()=>()=>{document.body.removeChild(t)},[]);return{loadReCaptcha:e=>{t=document.createElement("script"),t.src="https://www.google.com/recaptcha/api.js?render="+e,t.onload=function(){o(e)},document.body.appendChild(t)},executeReCaptcha:()=>{if(""===r)return I.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(e&&e(null));window.grecaptcha.ready(t=>{try{window.grecaptcha.execute(r,{action:"login"}).then(t=>{I.double("ReCaptcha V3","Token is valid"),console.log("token: "+t),e&&e(t)})}catch(e){I.double("ReCaptcha V3","Token is invalid","error")}})}}},exports.useSingleQuery=V;
|