@mertcankocak/core-project 1.4.0 → 1.6.0
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/components/FormikCheckbox/FormikCheckbox.d.ts +46 -0
- package/dist/components/FormikCheckbox/FormikCheckbox.d.ts.map +1 -0
- package/dist/components/FormikCheckbox/index.d.ts +3 -0
- package/dist/components/FormikCheckbox/index.d.ts.map +1 -0
- package/dist/components/FormikMultiSelect/FormikMultiSelect.d.ts +53 -0
- package/dist/components/FormikMultiSelect/FormikMultiSelect.d.ts.map +1 -0
- package/dist/components/FormikMultiSelect/index.d.ts +3 -0
- package/dist/components/FormikMultiSelect/index.d.ts.map +1 -0
- package/dist/components/FormikRadioButton/FormikRadioButton.d.ts +46 -0
- package/dist/components/FormikRadioButton/FormikRadioButton.d.ts.map +1 -0
- package/dist/components/FormikRadioButton/index.d.ts +3 -0
- package/dist/components/FormikRadioButton/index.d.ts.map +1 -0
- package/dist/components/FormikUploadSection/FormikUploadSection.d.ts +51 -0
- package/dist/components/FormikUploadSection/FormikUploadSection.d.ts.map +1 -0
- package/dist/components/FormikUploadSection/index.d.ts +3 -0
- package/dist/components/FormikUploadSection/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/core-project.es.js +1354 -768
- package/dist/core-project.umd.js +10 -10
- package/package.json +1 -1
package/dist/core-project.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(c,me){typeof exports=="object"&&typeof module<"u"?me(exports,require("yup"),require("file-type"),require("react"),require("formik"),require("@mui/material"),require("@mui/icons-material"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","yup","file-type","react","formik","@mui/material","@mui/icons-material","lodash"],me):(c=typeof globalThis<"u"?globalThis:c||self,me(c.CoreProject={},c.Yup,c.FileType,c.React,c.Formik,c.MaterialUI,c.MaterialUIIcons,c._))})(this,function(c,me,Fe,S,$e,M,Ne,pr){"use strict";function vr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,u.get?u:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const N=vr(me),De=/^[0-9]{11}$/;function Be(t){if(!De.test(t))return!1;const n=t.split("").map(Number);return!(n[0]===0||n.slice(0,9).reduce((l,i)=>l+i,0)%10!==n[9]||n.slice(0,10).reduce((l,i)=>l+i,0)%10!==n[10])}function yr(t){const{required:n=!1,message:r="Geçerli bir T.C. kimlik numarası giriniz",requiredMessage:u="T.C. kimlik numarası zorunludur",name:l="tcKimlikNo"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.matches(De,"T.C. kimlik numarası 11 haneli olmalıdır"),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Be(a)}}),i}const Le=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;function Ve(t){return Le.test(t)}function br(t){const{required:n=!1,message:r="Geçerli bir email adresi giriniz",requiredMessage:u="Email zorunludur",name:l="email"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.email(r).test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ve(a)}}),i}const Ge=/^(\+90\s?)?(0?5\d{2})\s?(\d{3})\s?(\d{2})\s?(\d{2})$/;function qe(t){const n=t.replace(/\s+/g,"").replace(/[-\+()]/g,"");return n.length!==10&&n.length!==11||!n.match(/^(0?5\d{9})$/)?!1:Ge.test(t)||/^0?5\d{9}$/.test(n)}function Er(t){const{required:n=!1,message:r="Geçerli bir telefon numarası giriniz (05XX XXX XX XX)",requiredMessage:u="Telefon numarası zorunludur",name:l="phone"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:qe(a)}}),i}function _r(t,n){const{minLength:r=8,requireUppercase:u=!0,requireLowercase:l=!0,requireNumber:i=!0,requireSpecialChar:a=!0}=n||{},f=[];return t.length<r&&f.push(`Şifre en az ${r} karakter olmalıdır`),u&&!/[A-Z]/.test(t)&&f.push("Şifre en az bir büyük harf içermelidir"),l&&!/[a-z]/.test(t)&&f.push("Şifre en az bir küçük harf içermelidir"),i&&!/\d/.test(t)&&f.push("Şifre en az bir rakam içermelidir"),a&&!/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(t)&&f.push("Şifre en az bir özel karakter içermelidir"),{isValid:f.length===0,errors:f}}function Rr(t){const{required:n=!1,requiredMessage:r="Şifre zorunludur",minLength:u=8,requireUppercase:l=!0,requireLowercase:i=!0,requireNumber:a=!0,requireSpecialChar:f=!0,minLengthMessage:h=`Şifre en az ${u} karakter olmalıdır`,uppercaseMessage:P="Şifre en az bir büyük harf içermelidir",lowercaseMessage:T="Şifre en az bir küçük harf içermelidir",numberMessage:k="Şifre en az bir rakam içermelidir",specialCharMessage:R="Şifre en az bir özel karakter içermelidir"}=t||{};let v=N.string();return n&&(v=v.required(r)),v=v.min(u,h),l&&(v=v.matches(/[A-Z]/,P)),i&&(v=v.matches(/[a-z]/,T)),a&&(v=v.matches(/\d/,k)),f&&(v=v.matches(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,R)),v}function Tr(t,n){const{required:r=!1,message:u="Şifreler eşleşmiyor",requiredMessage:l="Şifre tekrarı zorunludur"}=n||{};let i=N.string();return r&&(i=i.required(l)),i=i.oneOf([N.ref(t)],u),i}const Ce=/^[a-zA-ZçğıöşüÇĞIİÖŞÜ\s]+$/;function Ue(t){return!t||t.trim().length===0||t.trim().length<2?!1:Ce.test(t)}function kr(t){const{required:n=!1,message:r="İsim sadece harf içermelidir",requiredMessage:u="İsim zorunludur",name:l="name"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.min(2,"İsim en az 2 karakter olmalıdır").matches(Ce,r).test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ue(a)}}),i}const Xe=/^TR\d{2}[0-9A-Z]{4}\d{1}[0-9A-Z]{15,30}$/i;function Ke(t){const n=t.replace(/\s+/g,"").toUpperCase();if(!Xe.test(n))return!1;const u=(n.slice(4)+n.slice(0,4)).split("").map(i=>{const a=i.charCodeAt(0);return a>=65&&a<=90?a-55:i}).join("");return BigInt(u)%BigInt(97)===BigInt(1)}function Sr(t){const{required:n=!1,message:r="Geçerli bir IBAN numarası giriniz",requiredMessage:u="IBAN zorunludur",name:l="iban"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ke(a)}}),i}const Ye=/^\d{13,19}$/;function We(t){const n=t.replace(/\s+/g,"").replace(/-/g,"");if(!Ye.test(n))return!1;let r=0,u=!1;for(let l=n.length-1;l>=0;l--){let i=parseInt(n[l],10);u&&(i*=2,i>9&&(i-=9)),r+=i,u=!u}return r%10===0}function Dr(t){const{required:n=!1,message:r="Geçerli bir kredi kartı numarası giriniz",requiredMessage:u="Kredi kartı numarası zorunludur",name:l="creditCard"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:We(a)}}),i}const Ze=/^\d{10}$/;function He(t){if(!Ze.test(t))return!1;const n=t.split("").map(Number);return n.slice(0,9).reduce((l,i,a)=>{const f=(a+1)%9||9;return l+i*f},0)%11%10===n[9]}function Cr(t){const{required:n=!1,message:r="Geçerli bir VKN (Vergi Kimlik Numarası) giriniz",requiredMessage:u="VKN zorunludur",name:l="vkn"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:He(a)}}),i}const we=/^(\d{2})\s?([A-ZÇĞIİÖŞÜ]{1,3})\s?(\d{2,4})$/i;function Je(t){const n=t.replace(/\s+/g," ").trim().toUpperCase();if(!we.test(n))return!1;const r=n.match(we);if(!r)return!1;const[,u,l,i]=r,a=parseInt(u,10);return!(a<1||a>81||l.length<1||l.length>3||i.length<2||i.length>4)}function wr(t){const{required:n=!1,message:r="Geçerli bir araç plakası giriniz (örn: 34 ABC 123)",requiredMessage:u="Araç plakası zorunludur",name:l="plate"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Je(a)}}),i}function he(t){const n=t.split(".");return n.length>1?n[n.length-1].toLowerCase():""}async function Pr(t,n){const{maxSize:r,minSize:u,allowedExtensions:l=[],allowedMimeTypes:i=[]}=n||{},a=[];if(r&&t.size>r){const f=(r/1048576).toFixed(2);a.push(`Dosya boyutu en fazla ${f} MB olmalıdır`)}if(u&&t.size<u){const f=(u/1048576).toFixed(2);a.push(`Dosya boyutu en az ${f} MB olmalıdır`)}if(l.length>0&&i.length===0&&console.warn("⚠️ UYARI: Sadece dosya uzantısı kontrolü yapılıyor. Güvenlik için 'allowedMimeTypes' parametresini kullanarak magic bytes kontrolü yapmanız önerilir."),l.length>0&&t instanceof File){const f=he(t.name);l.includes(f)||a.push(`İzin verilen dosya uzantıları: ${l.join(", ")}`)}if(i.length>0)try{const f=await t.arrayBuffer(),h=new Uint8Array(f),P=await Fe.fileTypeFromBuffer(h);P?i.includes(P.mime)||a.push(`Dosya tipi uyumsuz. Beklenen: ${i.join(", ")}, Tespit edilen: ${P.mime}. (Dosya uzantısı: ${t instanceof File?he(t.name):"bilinmiyor"})`):a.push("Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir.")}catch{a.push("Dosya tipi kontrol edilemedi. Dosya okunamadı.")}return{isValid:a.length===0,errors:a}}function jr(t){const{required:n=!1,message:r="Geçerli bir dosya seçiniz",requiredMessage:u="Dosya zorunludur",name:l="file",maxSize:i,minSize:a,allowedExtensions:f=[],allowedMimeTypes:h=[],sizeMessage:P,extensionMessage:T}=t||{};let k=N.mixed();return n&&(k=k.required(u)),k=k.test({name:l,message:r||"Geçerli bir dosya seçiniz",async test(R){if(!n&&!R)return!0;if(n&&!R||!(R instanceof File))return!1;if(i&&R.size>i){const v=(i/1048576).toFixed(2);return this.createError({message:P||`Dosya boyutu en fazla ${v} MB olmalıdır`})}if(a&&R.size<a){const v=(a/1048576).toFixed(2);return this.createError({message:P||`Dosya boyutu en az ${v} MB olmalıdır`})}if(f.length>0){const v=he(R.name);if(!f.includes(v))return this.createError({message:T||`İzin verilen dosya uzantıları: ${f.join(", ")}`})}if(h.length>0)try{const v=await R.arrayBuffer(),K=new Uint8Array(v),z=await Fe.fileTypeFromBuffer(K);if(!z)return this.createError({message:"Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir."});if(!h.includes(z.mime)){const ee=he(R.name);return this.createError({message:`Dosya tipi uyumsuz. Beklenen: ${h.join(", ")}, Tespit edilen: ${z.mime}. (Dosya uzantısı: ${ee})`})}}catch{return this.createError({message:"Dosya tipi kontrol edilemedi. Dosya okunamadı."})}return!0}}),k}function Or(t,n){const{minDate:r,maxDate:u}=n||{},l=typeof t=="string"?new Date(t):t;if(isNaN(l.getTime()))return{isValid:!1,error:"Geçersiz tarih formatı"};if(r){const i=typeof r=="string"?new Date(r):r;if(l<i)return{isValid:!1,error:`Tarih ${i.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`}}if(u){const i=typeof u=="string"?new Date(u):u;if(l>i)return{isValid:!1,error:`Tarih ${i.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`}}return{isValid:!0}}function Pe(t){const{required:n=!1,requiredMessage:r="Tarih zorunludur",minDate:u,maxDate:l,minDateMessage:i,maxDateMessage:a}=t||{};let f=N.date();if(n&&(f=f.required(r)),u){const h=typeof u=="string"?new Date(u):u;f=f.min(h,i||`Tarih ${h.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`)}if(l){const h=typeof l=="string"?new Date(l):l;f=f.max(h,a||`Tarih ${h.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`)}return f}function Ar(t){return Pe({...t,maxDate:new Date,maxDateMessage:(t==null?void 0:t.message)||"Tarih geçmiş bir tarih olmalıdır"})}function zr(t){return Pe({...t,minDate:new Date,minDateMessage:(t==null?void 0:t.message)||"Tarih gelecek bir tarih olmalıdır"})}var je={exports:{}},ge={};/**
|
|
1
|
+
(function(m,ke){typeof exports=="object"&&typeof module<"u"?ke(exports,require("yup"),require("file-type"),require("react"),require("formik"),require("@mui/material"),require("@mui/icons-material"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","yup","file-type","react","formik","@mui/material","@mui/icons-material","lodash"],ke):(m=typeof globalThis<"u"?globalThis:m||self,ke(m.CoreProject={},m.Yup,m.FileType,m.React,m.Formik,m.MaterialUI,m.MaterialUIIcons,m._))})(this,function(m,ke,Ne,h,me,d,le,Er){"use strict";function kr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const ae=kr(ke),Se=/^[0-9]{11}$/;function Le(t){if(!Se.test(t))return!1;const n=t.split("").map(Number);return!(n[0]===0||n.slice(0,9).reduce((l,a)=>l+a,0)%10!==n[9]||n.slice(0,10).reduce((l,a)=>l+a,0)%10!==n[10])}function xr(t){const{required:n=!1,message:r="Geçerli bir T.C. kimlik numarası giriniz",requiredMessage:o="T.C. kimlik numarası zorunludur",name:l="tcKimlikNo"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.matches(Se,"T.C. kimlik numarası 11 haneli olmalıdır"),a=a.test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Le(i)}}),a}const Ve=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;function Ue(t){return Ve.test(t)}function Rr(t){const{required:n=!1,message:r="Geçerli bir email adresi giriniz",requiredMessage:o="Email zorunludur",name:l="email"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.email(r).test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Ue(i)}}),a}const Ge=/^(\+90\s?)?(0?5\d{2})\s?(\d{3})\s?(\d{2})\s?(\d{2})$/;function Ke(t){const n=t.replace(/\s+/g,"").replace(/[-\+()]/g,"");return n.length!==10&&n.length!==11||!n.match(/^(0?5\d{9})$/)?!1:Ge.test(t)||/^0?5\d{9}$/.test(n)}function _r(t){const{required:n=!1,message:r="Geçerli bir telefon numarası giriniz (05XX XXX XX XX)",requiredMessage:o="Telefon numarası zorunludur",name:l="phone"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Ke(i)}}),a}function jr(t,n){const{minLength:r=8,requireUppercase:o=!0,requireLowercase:l=!0,requireNumber:a=!0,requireSpecialChar:i=!0}=n||{},f=[];return t.length<r&&f.push(`Şifre en az ${r} karakter olmalıdır`),o&&!/[A-Z]/.test(t)&&f.push("Şifre en az bir büyük harf içermelidir"),l&&!/[a-z]/.test(t)&&f.push("Şifre en az bir küçük harf içermelidir"),a&&!/\d/.test(t)&&f.push("Şifre en az bir rakam içermelidir"),i&&!/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(t)&&f.push("Şifre en az bir özel karakter içermelidir"),{isValid:f.length===0,errors:f}}function Cr(t){const{required:n=!1,requiredMessage:r="Şifre zorunludur",minLength:o=8,requireUppercase:l=!0,requireLowercase:a=!0,requireNumber:i=!0,requireSpecialChar:f=!0,minLengthMessage:v=`Şifre en az ${o} karakter olmalıdır`,uppercaseMessage:I="Şifre en az bir büyük harf içermelidir",lowercaseMessage:S="Şifre en az bir küçük harf içermelidir",numberMessage:k="Şifre en az bir rakam içermelidir",specialCharMessage:D="Şifre en az bir özel karakter içermelidir"}=t||{};let y=ae.string();return n&&(y=y.required(r)),y=y.min(o,v),l&&(y=y.matches(/[A-Z]/,I)),a&&(y=y.matches(/[a-z]/,S)),i&&(y=y.matches(/\d/,k)),f&&(y=y.matches(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,D)),y}function Tr(t,n){const{required:r=!1,message:o="Şifreler eşleşmiyor",requiredMessage:l="Şifre tekrarı zorunludur"}=n||{};let a=ae.string();return r&&(a=a.required(l)),a=a.oneOf([ae.ref(t)],o),a}const we=/^[a-zA-ZçğıöşüÇĞIİÖŞÜ\s]+$/;function Xe(t){return!t||t.trim().length===0||t.trim().length<2?!1:we.test(t)}function Dr(t){const{required:n=!1,message:r="İsim sadece harf içermelidir",requiredMessage:o="İsim zorunludur",name:l="name"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.min(2,"İsim en az 2 karakter olmalıdır").matches(we,r).test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Xe(i)}}),a}const We=/^TR\d{2}[0-9A-Z]{4}\d{1}[0-9A-Z]{15,30}$/i;function Ye(t){const n=t.replace(/\s+/g,"").toUpperCase();if(!We.test(n))return!1;const o=(n.slice(4)+n.slice(0,4)).split("").map(a=>{const i=a.charCodeAt(0);return i>=65&&i<=90?i-55:a}).join("");return BigInt(o)%BigInt(97)===BigInt(1)}function Sr(t){const{required:n=!1,message:r="Geçerli bir IBAN numarası giriniz",requiredMessage:o="IBAN zorunludur",name:l="iban"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Ye(i)}}),a}const $e=/^\d{13,19}$/;function He(t){const n=t.replace(/\s+/g,"").replace(/-/g,"");if(!$e.test(n))return!1;let r=0,o=!1;for(let l=n.length-1;l>=0;l--){let a=parseInt(n[l],10);o&&(a*=2,a>9&&(a-=9)),r+=a,o=!o}return r%10===0}function wr(t){const{required:n=!1,message:r="Geçerli bir kredi kartı numarası giriniz",requiredMessage:o="Kredi kartı numarası zorunludur",name:l="creditCard"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:He(i)}}),a}const Ze=/^\d{10}$/;function Je(t){if(!Ze.test(t))return!1;const n=t.split("").map(Number);return n.slice(0,9).reduce((l,a,i)=>{const f=(i+1)%9||9;return l+a*f},0)%11%10===n[9]}function Pr(t){const{required:n=!1,message:r="Geçerli bir VKN (Vergi Kimlik Numarası) giriniz",requiredMessage:o="VKN zorunludur",name:l="vkn"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Je(i)}}),a}const Pe=/^(\d{2})\s?([A-ZÇĞIİÖŞÜ]{1,3})\s?(\d{2,4})$/i;function Qe(t){const n=t.replace(/\s+/g," ").trim().toUpperCase();if(!Pe.test(n))return!1;const r=n.match(Pe);if(!r)return!1;const[,o,l,a]=r,i=parseInt(o,10);return!(i<1||i>81||l.length<1||l.length>3||a.length<2||a.length>4)}function Or(t){const{required:n=!1,message:r="Geçerli bir araç plakası giriniz (örn: 34 ABC 123)",requiredMessage:o="Araç plakası zorunludur",name:l="plate"}=t||{};let a=ae.string();return n&&(a=a.required(o)),a=a.test({name:l,message:r,test(i){return!n&&(!i||i.trim()==="")?!0:n&&!i||!i||typeof i!="string"?!1:Qe(i)}}),a}function xe(t){const n=t.split(".");return n.length>1?n[n.length-1].toLowerCase():""}async function Ir(t,n){const{maxSize:r,minSize:o,allowedExtensions:l=[],allowedMimeTypes:a=[]}=n||{},i=[];if(r&&t.size>r){const f=(r/1048576).toFixed(2);i.push(`Dosya boyutu en fazla ${f} MB olmalıdır`)}if(o&&t.size<o){const f=(o/1048576).toFixed(2);i.push(`Dosya boyutu en az ${f} MB olmalıdır`)}if(l.length>0&&a.length===0&&console.warn("⚠️ UYARI: Sadece dosya uzantısı kontrolü yapılıyor. Güvenlik için 'allowedMimeTypes' parametresini kullanarak magic bytes kontrolü yapmanız önerilir."),l.length>0&&t instanceof File){const f=xe(t.name);l.includes(f)||i.push(`İzin verilen dosya uzantıları: ${l.join(", ")}`)}if(a.length>0)try{const f=await t.arrayBuffer(),v=new Uint8Array(f),I=await Ne.fileTypeFromBuffer(v);I?a.includes(I.mime)||i.push(`Dosya tipi uyumsuz. Beklenen: ${a.join(", ")}, Tespit edilen: ${I.mime}. (Dosya uzantısı: ${t instanceof File?xe(t.name):"bilinmiyor"})`):i.push("Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir.")}catch{i.push("Dosya tipi kontrol edilemedi. Dosya okunamadı.")}return{isValid:i.length===0,errors:i}}function Ar(t){const{required:n=!1,message:r="Geçerli bir dosya seçiniz",requiredMessage:o="Dosya zorunludur",name:l="file",maxSize:a,minSize:i,allowedExtensions:f=[],allowedMimeTypes:v=[],sizeMessage:I,extensionMessage:S}=t||{};let k=ae.mixed();return n&&(k=k.required(o)),k=k.test({name:l,message:r||"Geçerli bir dosya seçiniz",async test(D){if(!n&&!D)return!0;if(n&&!D||!(D instanceof File))return!1;if(a&&D.size>a){const y=(a/1048576).toFixed(2);return this.createError({message:I||`Dosya boyutu en fazla ${y} MB olmalıdır`})}if(i&&D.size<i){const y=(i/1048576).toFixed(2);return this.createError({message:I||`Dosya boyutu en az ${y} MB olmalıdır`})}if(f.length>0){const y=xe(D.name);if(!f.includes(y))return this.createError({message:S||`İzin verilen dosya uzantıları: ${f.join(", ")}`})}if(v.length>0)try{const y=await D.arrayBuffer(),J=new Uint8Array(y),U=await Ne.fileTypeFromBuffer(J);if(!U)return this.createError({message:"Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir."});if(!v.includes(U.mime)){const q=xe(D.name);return this.createError({message:`Dosya tipi uyumsuz. Beklenen: ${v.join(", ")}, Tespit edilen: ${U.mime}. (Dosya uzantısı: ${q})`})}}catch{return this.createError({message:"Dosya tipi kontrol edilemedi. Dosya okunamadı."})}return!0}}),k}function Fr(t,n){const{minDate:r,maxDate:o}=n||{},l=typeof t=="string"?new Date(t):t;if(isNaN(l.getTime()))return{isValid:!1,error:"Geçersiz tarih formatı"};if(r){const a=typeof r=="string"?new Date(r):r;if(l<a)return{isValid:!1,error:`Tarih ${a.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`}}if(o){const a=typeof o=="string"?new Date(o):o;if(l>a)return{isValid:!1,error:`Tarih ${a.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`}}return{isValid:!0}}function Oe(t){const{required:n=!1,requiredMessage:r="Tarih zorunludur",minDate:o,maxDate:l,minDateMessage:a,maxDateMessage:i}=t||{};let f=ae.date();if(n&&(f=f.required(r)),o){const v=typeof o=="string"?new Date(o):o;f=f.min(v,a||`Tarih ${v.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`)}if(l){const v=typeof l=="string"?new Date(l):l;f=f.max(v,i||`Tarih ${v.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`)}return f}function zr(t){return Oe({...t,maxDate:new Date,maxDateMessage:(t==null?void 0:t.message)||"Tarih geçmiş bir tarih olmalıdır"})}function Br(t){return Oe({...t,minDate:new Date,minDateMessage:(t==null?void 0:t.message)||"Tarih gelecek bir tarih olmalıdır"})}var Ie={exports:{}},Re={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var qe;function Mr(){if(qe)return Re;qe=1;var t=h,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(f,v,I){var S,k={},D=null,y=null;I!==void 0&&(D=""+I),v.key!==void 0&&(D=""+v.key),v.ref!==void 0&&(y=v.ref);for(S in v)o.call(v,S)&&!a.hasOwnProperty(S)&&(k[S]=v[S]);if(f&&f.defaultProps)for(S in v=f.defaultProps,v)k[S]===void 0&&(k[S]=v[S]);return{$$typeof:n,type:f,key:D,ref:y,props:k,_owner:l.current}}return Re.Fragment=r,Re.jsx=i,Re.jsxs=i,Re}var _e={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var er;function
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`)
|
|
21
|
-
`+
|
|
17
|
+
*/var er;function Nr(){return er||(er=1,process.env.NODE_ENV!=="production"&&function(){var t=h,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),J=Symbol.iterator,U="@@iterator";function q(e){if(e===null||typeof e!="object")return null;var s=J&&e[J]||e[U];return typeof s=="function"?s:null}var G=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var s=arguments.length,c=new Array(s>1?s-1:0),g=1;g<s;g++)c[g-1]=arguments[g];C("error",e,c)}}function C(e,s,c){{var g=G.ReactDebugCurrentFrame,B=g.getStackAddendum();B!==""&&(s+="%s",c=c.concat([B]));var N=c.map(function(O){return String(O)});N.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,N)}}var L=!1,w=!1,V=!1,F=!1,_=!1,j;j=Symbol.for("react.module.reference");function z(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===a||_||e===l||e===I||e===S||F||e===y||L||w||V||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===k||e.$$typeof===i||e.$$typeof===f||e.$$typeof===v||e.$$typeof===j||e.getModuleId!==void 0))}function Q(e,s,c){var g=e.displayName;if(g)return g;var B=s.displayName||s.name||"";return B!==""?c+"("+B+")":c}function W(e){return e.displayName||"Context"}function K(e){if(e==null)return null;if(typeof e.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case r:return"Portal";case a:return"Profiler";case l:return"StrictMode";case I:return"Suspense";case S:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var s=e;return W(s)+".Consumer";case i:var c=e;return W(c._context)+".Provider";case v:return Q(e,e.render,"ForwardRef");case k:var g=e.displayName||null;return g!==null?g:K(e.type)||"Memo";case D:{var B=e,N=B._payload,O=B._init;try{return K(O(N))}catch{return null}}}return null}var R=Object.assign,x=0,E,P,M,re,pe,ue,fe;function oe(){}oe.__reactDisabledLog=!0;function p(){{if(x===0){E=console.log,P=console.info,M=console.warn,re=console.error,pe=console.group,ue=console.groupCollapsed,fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:oe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}x++}}function A(){{if(x--,x===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},e,{value:E}),info:R({},e,{value:P}),warn:R({},e,{value:M}),error:R({},e,{value:re}),group:R({},e,{value:pe}),groupCollapsed:R({},e,{value:ue}),groupEnd:R({},e,{value:fe})})}x<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=G.ReactCurrentDispatcher,ee;function se(e,s,c){{if(ee===void 0)try{throw Error()}catch(B){var g=B.stack.trim().match(/\n( *(at )?)/);ee=g&&g[1]||""}return`
|
|
18
|
+
`+ee+e}}var ce=!1,ge;{var je=typeof WeakMap=="function"?WeakMap:Map;ge=new je}function de(e,s){if(!e||ce)return"";{var c=ge.get(e);if(c!==void 0)return c}var g;ce=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var N;N=Z.current,Z.current=null,p();try{if(s){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(ne){g=ne}Reflect.construct(e,[],O)}else{try{O.call()}catch(ne){g=ne}e.call(O.prototype)}}else{try{throw Error()}catch(ne){g=ne}e()}}catch(ne){if(ne&&g&&typeof ne.stack=="string"){for(var T=ne.stack.split(`
|
|
19
|
+
`),te=g.stack.split(`
|
|
20
|
+
`),$=T.length-1,H=te.length-1;$>=1&&H>=0&&T[$]!==te[H];)H--;for(;$>=1&&H>=0;$--,H--)if(T[$]!==te[H]){if($!==1||H!==1)do if($--,H--,H<0||T[$]!==te[H]){var ie=`
|
|
21
|
+
`+T[$].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),typeof e=="function"&&ge.set(e,ie),ie}while($>=1&&H>=0);break}}}finally{ce=!1,Z.current=N,A(),Error.prepareStackTrace=B}var Ee=e?e.displayName||e.name:"",he=Ee?se(Ee):"";return typeof e=="function"&&ge.set(e,he),he}function Ce(e,s,c){return de(e,!1)}function ve(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function ye(e,s,c){if(e==null)return"";if(typeof e=="function")return de(e,ve(e));if(typeof e=="string")return se(e);switch(e){case I:return se("Suspense");case S:return se("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Ce(e.render);case k:return ye(e.type,s,c);case D:{var g=e,B=g._payload,N=g._init;try{return ye(N(B),s,c)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,Y={},Te=G.ReactDebugCurrentFrame;function De(e){if(e){var s=e._owner,c=ye(e.type,e._source,s?s.type:null);Te.setExtraStackFrame(c)}else Te.setExtraStackFrame(null)}function Jr(e,s,c,g,B){{var N=Function.call.bind(X);for(var O in e)if(N(e,O)){var T=void 0;try{if(typeof e[O]!="function"){var te=Error((g||"React class")+": "+c+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw te.name="Invariant Violation",te}T=e[O](s,O,g,c,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){T=$}T&&!(T instanceof Error)&&(De(B),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",c,O,typeof T),De(null)),T instanceof Error&&!(T.message in Y)&&(Y[T.message]=!0,De(B),b("Failed %s type: %s",c,T.message),De(null))}}}var Qr=Array.isArray;function Ae(e){return Qr(e)}function qr(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,c=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c}}function et(e){try{return lr(e),!1}catch{return!0}}function lr(e){return""+e}function ur(e){if(et(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qr(e)),lr(e)}var cr=G.ReactCurrentOwner,rt={key:!0,ref:!0,__self:!0,__source:!0},fr,dr;function tt(e){if(X.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function nt(e){if(X.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function at(e,s){typeof e.ref=="string"&&cr.current}function it(e,s){{var c=function(){fr||(fr=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}}function st(e,s){{var c=function(){dr||(dr=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};c.isReactWarning=!0,Object.defineProperty(e,"ref",{get:c,configurable:!0})}}var ot=function(e,s,c,g,B,N,O){var T={$$typeof:n,type:e,key:s,ref:c,props:O,_owner:N};return T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(T,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(T,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T};function lt(e,s,c,g,B){{var N,O={},T=null,te=null;c!==void 0&&(ur(c),T=""+c),nt(s)&&(ur(s.key),T=""+s.key),tt(s)&&(te=s.ref,at(s,B));for(N in s)X.call(s,N)&&!rt.hasOwnProperty(N)&&(O[N]=s[N]);if(e&&e.defaultProps){var $=e.defaultProps;for(N in $)O[N]===void 0&&(O[N]=$[N])}if(T||te){var H=typeof e=="function"?e.displayName||e.name||"Unknown":e;T&&it(O,H),te&&st(O,H)}return ot(e,T,te,B,g,cr.current,O)}}var Fe=G.ReactCurrentOwner,hr=G.ReactDebugCurrentFrame;function be(e){if(e){var s=e._owner,c=ye(e.type,e._source,s?s.type:null);hr.setExtraStackFrame(c)}else hr.setExtraStackFrame(null)}var ze;ze=!1;function Be(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function mr(){{if(Fe.current){var e=K(Fe.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function ut(e){return""}var pr={};function ct(e){{var s=mr();if(!s){var c=typeof e=="string"?e:e.displayName||e.name;c&&(s=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+c+">.")}return s}}function gr(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var c=ct(s);if(pr[c])return;pr[c]=!0;var g="";e&&e._owner&&e._owner!==Fe.current&&(g=" It was passed a child from "+K(e._owner.type)+"."),be(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',c,g),be(null)}}function vr(e,s){{if(typeof e!="object")return;if(Ae(e))for(var c=0;c<e.length;c++){var g=e[c];Be(g)&&gr(g,s)}else if(Be(e))e._store&&(e._store.validated=!0);else if(e){var B=q(e);if(typeof B=="function"&&B!==e.entries)for(var N=B.call(e),O;!(O=N.next()).done;)Be(O.value)&&gr(O.value,s)}}}function ft(e){{var s=e.type;if(s==null||typeof s=="string")return;var c;if(typeof s=="function")c=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===v||s.$$typeof===k))c=s.propTypes;else return;if(c){var g=K(s);Jr(c,e.props,"prop",g,e)}else if(s.PropTypes!==void 0&&!ze){ze=!0;var B=K(s);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dt(e){{for(var s=Object.keys(e.props),c=0;c<s.length;c++){var g=s[c];if(g!=="children"&&g!=="key"){be(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),be(null);break}}e.ref!==null&&(be(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),be(null))}}var yr={};function br(e,s,c,g,B,N){{var O=z(e);if(!O){var T="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(T+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var te=ut();te?T+=te:T+=mr();var $;e===null?$="null":Ae(e)?$="array":e!==void 0&&e.$$typeof===n?($="<"+(K(e.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):$=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,T)}var H=lt(e,s,c,B,N);if(H==null)return H;if(O){var ie=s.children;if(ie!==void 0)if(g)if(Ae(ie)){for(var Ee=0;Ee<ie.length;Ee++)vr(ie[Ee],e);Object.freeze&&Object.freeze(ie)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else vr(ie,e)}if(X.call(s,"key")){var he=K(e),ne=Object.keys(s).filter(function(yt){return yt!=="key"}),Me=ne.length>0?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}";if(!yr[he+Me]){var vt=ne.length>0?"{"+ne.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,xe,ae,mt,ae),hr[ae+xe]=!0}}return e===u?ut(A):ot(A),A}}function lt(e,s,o){return gr(e,s,o,!0)}function ct(e,s,o){return gr(e,s,o,!1)}var ft=ct,dt=lt;pe.Fragment=u,pe.jsx=ft,pe.jsxs=dt}()),pe}process.env.NODE_ENV==="production"?je.exports=Ir():je.exports=Mr();var C=je.exports;function rr(t){return t.replace(/ı/g,"I").replace(/i/g,"İ").replace(/ğ/g,"Ğ").replace(/ü/g,"Ü").replace(/ş/g,"Ş").replace(/ö/g,"Ö").replace(/ç/g,"Ç").toUpperCase().replace(/I/g,"ı").replace(/İ/g,"İ").replace(/Ğ/g,"ğ").replace(/Ü/g,"ü").replace(/Ş/g,"ş").replace(/Ö/g,"ö").replace(/Ç/g,"ç")}const xr=300,Fr=1,$r=["password","email","number","tel","url"],Nr=["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"];function Br(t,n,r){return r||$r.includes(n)||!t?t:rr(t)}function Lr(t){return/[0-9.]/.test(t)||Nr.includes(t)}function Vr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:r.length<=8?`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8)}`}function Gr(t){const r=t.replace(/\D/g,"").slice(0,8);return r.length===0?"":r.length<=2?r:r.length<=4?`${r.slice(0,2)}/${r.slice(2)}`:`${r.slice(0,2)}/${r.slice(2,4)}/${r.slice(4)}`}function qr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`}function Ur(t){const r=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase().slice(0,26);return r.length===0?"":r.length<=4?r:r.length<=8?`${r.slice(0,4)} ${r.slice(4)}`:r.length<=12?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8)}`:r.length<=16?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12)}`:r.length<=20?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16)}`:r.length<=24?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20)}`:`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20,24)} ${r.slice(24)}`}function Xr(t,n){if(!n)return t;if(typeof n=="function")return n(t);switch(n){case"phone":return Vr(t);case"date":return Gr(t);case"tcKimlikNo":return qr(t);case"iban":return Ur(t);default:return t}}const tr=S.forwardRef(({name:t,label:n,type:r="text",placeholder:u,className:l,fieldToSearch:i,onSuggestionSearch:a,disabled:f=!1,step:h,min:P,max:T,startAdornment:k,endAdornment:R,disableUppercase:v=!1,required:K=!1,fullWidth:z,debounceDelay:ee=xr,minSearchLength:U=Fr,helperText:E,autoFocus:Y,multiline:se,rows:re,maxLength:W,errorMessageFormatter:O,"aria-label":X,"aria-describedby":V,sx:Z,inputSx:te,inputElementSx:H,mask:I,showPasswordToggle:g=!1,...y},B)=>{const[G,x,ne]=$e.useField(t),[_e,oe]=S.useState([]),[ve,ye]=S.useState(!1),[Oe,Re]=S.useState(!1),[J,be]=S.useState(!1),q=S.useRef(i&&a?pr.debounce(async D=>{if(D.length>=U){ye(!0);try{const w=await a(i,D);oe(w)}catch(w){console.error("Search error:",w),oe([])}ye(!1)}else oe([])},ee):null).current;S.useEffect(()=>{q&&G.value&&q(G.value)},[G.value,q]),S.useEffect(()=>()=>{q&&q.cancel()},[q]);const Q=S.useCallback(D=>{let w=Br(D,r,v);return I&&r!=="password"&&(w=Xr(w,I)),w},[r,v,I]),ue=S.useCallback(()=>{be(D=>!D)},[]),Ee=S.useMemo(()=>r==="password"&&J?"text":r,[r,J]),ie=S.useMemo(()=>{if(!(!x.touched||!x.error))return O?O(x.error):x.error},[x.touched,x.error,O]),Te=S.useMemo(()=>ie||E,[ie,E]),le=S.useMemo(()=>{var D;return{name:t,label:n,type:Ee,placeholder:u,required:K,disabled:f,error:x.touched&&!!x.error,helperText:Te,className:l,fullWidth:z!==void 0?z:!!n,autoFocus:Y,multiline:se,rows:re,sx:H?[Z,{"& .MuiInputBase-input":H}].filter(Boolean):Z,inputProps:{maxLength:W,step:h,min:P,max:T,...r==="number"&&{onKeyDown:w=>{Lr(w.key)||w.preventDefault()}},...y.inputProps},InputProps:{startAdornment:k?C.jsx(M.InputAdornment,{position:"start",children:k}):void 0,endAdornment:C.jsxs(C.Fragment,{children:[r==="password"&&g&&C.jsx(M.InputAdornment,{position:"end",children:C.jsx(M.IconButton,{"aria-label":"Şifreyi göster/gizle",onClick:ue,edge:"end",children:J?C.jsx(Ne.VisibilityOff,{}):C.jsx(Ne.Visibility,{})})}),R?C.jsx(M.InputAdornment,{position:"end",children:R}):void 0,(D=y.InputProps)==null?void 0:D.endAdornment]}),...te&&{sx:te},...y.InputProps},"aria-label":X,"aria-describedby":V||(ie?`${t}-error`:void 0),"aria-invalid":x.touched&&x.error?!0:void 0,ref:B,...y}},[t,n,Ee,u,K,f,x.touched,x.error,Te,l,z,Y,se,re,W,h,P,T,k,R,X,V,Z,te,H,I,g,J,Ee,y]);if(i&&a)return C.jsx(M.Autocomplete,{freeSolo:!0,open:Oe,onOpen:()=>Re(!0),onClose:()=>Re(!1),options:_e,loading:ve,disabled:f,value:G.value||"",onChange:(D,w)=>{const ke=w||"";ne.setValue(Q(ke))},onInputChange:(D,w)=>{ne.setValue(Q(w))},renderInput:D=>{var w;return C.jsx(M.TextField,{...D,...le,InputProps:{...D.InputProps,...le.InputProps,endAdornment:C.jsxs(C.Fragment,{children:[ve?C.jsx(M.CircularProgress,{color:"inherit",size:20}):null,(w=le.InputProps)==null?void 0:w.endAdornment,D.InputProps.endAdornment]})},ref:B})}});const ce=S.useCallback(D=>{const w=D.target.value;ne.setValue(Q(w))},[ne,Q]);return C.jsx(M.TextField,{...le,value:G.value||"",onChange:ce,onBlur:G.onBlur})});tr.displayName="FormikTextField";const nr=S.forwardRef(({name:t,options:n=[],label:r,placeholder:u,className:l,disabled:i=!1,required:a=!1,fullWidth:f=!0,helperText:h,autoFocus:P,errorMessageFormatter:T,"aria-label":k,"aria-describedby":R,sx:v,formControlSx:K,multiple:z=!1,searchable:ee=!1,searchPlaceholder:U,onChange:E,renderOption:Y,...se},re)=>{const[W,O,X]=$e.useField(t),V=S.useMemo(()=>{if(!(!O.touched||!O.error))return T?T(O.error):O.error},[O.touched,O.error,T]),Z=S.useMemo(()=>V||h,[V,h]),te=S.useCallback(g=>{const y=g.target.value;X.setValue(y),E&&E(y)},[X,E]),H=S.useCallback((g,y)=>{if(z){const B=Array.isArray(y)?y.map(G=>G.value):[];X.setValue(B),E&&E(B)}else{const B=y&&!Array.isArray(y)?y.value:"";X.setValue(B),E&&E(B)}},[X,E,z]),I=`${t}-select`;return ee?C.jsx(M.Autocomplete,{ref:re,options:n,getOptionLabel:g=>g.label,value:z?n.filter(g=>{var y;return(y=W.value)==null?void 0:y.includes(g.value)}):n.find(g=>g.value===W.value)||null,onChange:H,multiple:z,disabled:i,fullWidth:f,renderInput:g=>C.jsx(M.TextField,{...g,name:t,label:r,placeholder:U||u,required:a,error:O.touched&&!!O.error,helperText:Z,className:l,autoFocus:P,inputProps:{...g.inputProps,"aria-label":k,"aria-describedby":R||(V?`${t}-error`:void 0),"aria-invalid":O.touched&&O.error?!0:void 0},sx:v}),renderOption:(g,y)=>S.createElement("li",{...g,key:y.value},Y?Y(y,n.indexOf(y)):y.label),getOptionDisabled:g=>{if(typeof g=="object")return g.disabled||!1;const y=n.find(B=>B.value===g);return(y==null?void 0:y.disabled)||!1}}):C.jsxs(M.FormControl,{ref:re,fullWidth:f,error:O.touched&&!!O.error,className:l,disabled:i,required:a,sx:K,children:[r&&C.jsx(M.InputLabel,{id:`${I}-label`,required:a,children:r}),C.jsxs(M.Select,{labelId:r?`${I}-label`:void 0,id:I,name:t,value:W.value??(z?[]:""),onChange:te,onBlur:W.onBlur,label:r,displayEmpty:!!u,multiple:z,autoFocus:P,inputProps:{"aria-label":k,"aria-describedby":R||(V?`${t}-error`:void 0),"aria-invalid":O.touched&&O.error?!0:void 0},sx:v,...se,children:[u&&C.jsx(M.MenuItem,{value:z?[]:"",disabled:!0,children:u}),n.map(g=>C.jsx(M.MenuItem,{value:g.value,disabled:g.disabled,children:Y?Y(g,n.indexOf(g)):g.label},g.value))]}),Z&&C.jsx(M.FormHelperText,{children:Z})]})});nr.displayName="FormikDropdown",c.CREDIT_CARD_REGEX=Ye,c.EMAIL_REGEX=Le,c.FormikDropdown=nr,c.FormikTextField=tr,c.IBAN_REGEX=Xe,c.NAME_REGEX=Ce,c.PHONE_REGEX=Ge,c.PLATE_REGEX=we,c.TC_KIMLIK_NO_REGEX=De,c.VKN_REGEX=Ze,c.creditCardSchema=Dr,c.dateSchema=Pe,c.emailSchema=br,c.fileSchema=jr,c.futureDateSchema=zr,c.getFileExtension=he,c.ibanSchema=Sr,c.nameSchema=kr,c.passwordMatchSchema=Tr,c.passwordSchema=Rr,c.pastDateSchema=Ar,c.phoneSchema=Er,c.plateSchema=wr,c.tcKimlikNoSchema=yr,c.toTurkishUpperCase=rr,c.validateCreditCard=We,c.validateDate=Or,c.validateEmail=Ve,c.validateFile=Pr,c.validateIBAN=Ke,c.validateName=Ue,c.validatePassword=_r,c.validatePhone=qe,c.validatePlate=Je,c.validateTCKimlikNo=Be,c.validateVKN=He,c.vknSchema=Cr,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
30
|
+
<%s key={someKey} {...props} />`,Me,he,vt,he),yr[he+Me]=!0}}return e===o?dt(H):ft(H),H}}function ht(e,s,c){return br(e,s,c,!0)}function mt(e,s,c){return br(e,s,c,!1)}var pt=mt,gt=ht;_e.Fragment=o,_e.jsx=pt,_e.jsxs=gt}()),_e}process.env.NODE_ENV==="production"?Ie.exports=Mr():Ie.exports=Nr();var u=Ie.exports;function rr(t){return t.replace(/ı/g,"I").replace(/i/g,"İ").replace(/ğ/g,"Ğ").replace(/ü/g,"Ü").replace(/ş/g,"Ş").replace(/ö/g,"Ö").replace(/ç/g,"Ç").toUpperCase().replace(/I/g,"ı").replace(/İ/g,"İ").replace(/Ğ/g,"ğ").replace(/Ü/g,"ü").replace(/Ş/g,"ş").replace(/Ö/g,"ö").replace(/Ç/g,"ç")}const Lr=300,Vr=1,Ur=["password","email","number","tel","url"],Gr=["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"];function Kr(t,n,r){return r||Ur.includes(n)||!t?t:rr(t)}function Xr(t){return/[0-9.]/.test(t)||Gr.includes(t)}function Wr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:r.length<=8?`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8)}`}function Yr(t){const r=t.replace(/\D/g,"").slice(0,8);return r.length===0?"":r.length<=2?r:r.length<=4?`${r.slice(0,2)}/${r.slice(2)}`:`${r.slice(0,2)}/${r.slice(2,4)}/${r.slice(4)}`}function $r(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`}function Hr(t){const r=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase().slice(0,26);return r.length===0?"":r.length<=4?r:r.length<=8?`${r.slice(0,4)} ${r.slice(4)}`:r.length<=12?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8)}`:r.length<=16?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12)}`:r.length<=20?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16)}`:r.length<=24?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20)}`:`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20,24)} ${r.slice(24)}`}function Zr(t,n){if(!n)return t;if(typeof n=="function")return n(t);switch(n){case"phone":return Wr(t);case"date":return Yr(t);case"tcKimlikNo":return $r(t);case"iban":return Hr(t);default:return t}}const tr=h.forwardRef(({name:t,label:n,type:r="text",placeholder:o,className:l,fieldToSearch:a,onSuggestionSearch:i,disabled:f=!1,step:v,min:I,max:S,startAdornment:k,endAdornment:D,disableUppercase:y=!1,required:J=!1,fullWidth:U,debounceDelay:q=Lr,minSearchLength:G=Vr,helperText:b,autoFocus:C,multiline:L,rows:w,maxLength:V,errorMessageFormatter:F,"aria-label":_,"aria-describedby":j,sx:z,inputSx:Q,inputElementSx:W,mask:K,showPasswordToggle:R=!1,...x},E)=>{const[P,M,re]=me.useField(t),[pe,ue]=h.useState([]),[fe,oe]=h.useState(!1),[p,A]=h.useState(!1),[Z,ee]=h.useState(!1),se=h.useRef(a&&i?Er.debounce(async X=>{if(X.length>=G){oe(!0);try{const Y=await i(a,X);ue(Y)}catch(Y){console.error("Search error:",Y),ue([])}oe(!1)}else ue([])},q):null).current;h.useEffect(()=>{se&&P.value&&se(P.value)},[P.value,se]),h.useEffect(()=>()=>{se&&se.cancel()},[se]);const ce=h.useCallback(X=>{let Y=Kr(X,r,y);return K&&r!=="password"&&(Y=Zr(Y,K)),Y},[r,y,K]),ge=h.useCallback(()=>{ee(X=>!X)},[]),je=h.useMemo(()=>r==="password"&&Z?"text":r,[r,Z]),de=h.useMemo(()=>{if(!(!M.touched||!M.error))return F?F(M.error):M.error},[M.touched,M.error,F]),Ce=h.useMemo(()=>de||b,[de,b]),ve=h.useMemo(()=>{var X;return{name:t,label:n,type:je,placeholder:o,required:J,disabled:f,error:M.touched&&!!M.error,helperText:Ce,className:l,fullWidth:U!==void 0?U:!!n,autoFocus:C,multiline:L,rows:w,sx:W?[z,{"& .MuiInputBase-input":W}].filter(Boolean):z,inputProps:{maxLength:V,step:v,min:I,max:S,...r==="number"&&{onKeyDown:Y=>{Xr(Y.key)||Y.preventDefault()}},...x.inputProps},InputProps:{startAdornment:k?u.jsx(d.InputAdornment,{position:"start",children:k}):void 0,endAdornment:u.jsxs(u.Fragment,{children:[r==="password"&&R&&u.jsx(d.InputAdornment,{position:"end",children:u.jsx(d.IconButton,{"aria-label":"Şifreyi göster/gizle",onClick:ge,edge:"end",children:Z?u.jsx(le.VisibilityOff,{}):u.jsx(le.Visibility,{})})}),D?u.jsx(d.InputAdornment,{position:"end",children:D}):void 0,(X=x.InputProps)==null?void 0:X.endAdornment]}),...Q&&{sx:Q},...x.InputProps},"aria-label":_,"aria-describedby":j||(de?`${t}-error`:void 0),"aria-invalid":M.touched&&M.error?!0:void 0,ref:E,...x}},[t,n,je,o,J,f,M.touched,M.error,Ce,l,U,C,L,w,V,v,I,S,k,D,_,j,z,Q,W,K,R,Z,je,x]);if(a&&i)return u.jsx(d.Autocomplete,{freeSolo:!0,open:p,onOpen:()=>A(!0),onClose:()=>A(!1),options:pe,loading:fe,disabled:f,value:P.value||"",onChange:(X,Y)=>{const Te=Y||"";re.setValue(ce(Te))},onInputChange:(X,Y)=>{re.setValue(ce(Y))},renderInput:X=>{var Y;return u.jsx(d.TextField,{...X,...ve,InputProps:{...X.InputProps,...ve.InputProps,endAdornment:u.jsxs(u.Fragment,{children:[fe?u.jsx(d.CircularProgress,{color:"inherit",size:20}):null,(Y=ve.InputProps)==null?void 0:Y.endAdornment,X.InputProps.endAdornment]})},ref:E})}});const ye=h.useCallback(X=>{const Y=X.target.value;re.setValue(ce(Y))},[re,ce]);return u.jsx(d.TextField,{...ve,value:P.value||"",onChange:ye,onBlur:P.onBlur})});tr.displayName="FormikTextField";const nr=h.forwardRef(({name:t,options:n=[],label:r,placeholder:o,className:l,disabled:a=!1,required:i=!1,fullWidth:f=!0,helperText:v,autoFocus:I,errorMessageFormatter:S,"aria-label":k,"aria-describedby":D,sx:y,formControlSx:J,multiple:U=!1,searchable:q=!1,searchPlaceholder:G,onChange:b,renderOption:C,...L},w)=>{const[V,F,_]=me.useField(t),j=h.useMemo(()=>{if(!(!F.touched||!F.error))return S?S(F.error):F.error},[F.touched,F.error,S]),z=h.useMemo(()=>j||v,[j,v]),Q=h.useCallback(R=>{const x=R.target.value;_.setValue(x),b&&b(x)},[_,b]),W=h.useCallback((R,x)=>{if(U){const E=Array.isArray(x)?x.map(P=>P.value):[];_.setValue(E),b&&b(E)}else{const E=x&&!Array.isArray(x)?x.value:"";_.setValue(E),b&&b(E)}},[_,b,U]),K=`${t}-select`;return q?u.jsx(d.Autocomplete,{ref:w,options:n,getOptionLabel:R=>R.label,value:U?n.filter(R=>{var x;return(x=V.value)==null?void 0:x.includes(R.value)}):n.find(R=>R.value===V.value)||null,onChange:W,multiple:U,disabled:a,fullWidth:f,renderInput:R=>u.jsx(d.TextField,{...R,name:t,label:r,placeholder:G||o,required:i,error:F.touched&&!!F.error,helperText:z,className:l,autoFocus:I,inputProps:{...R.inputProps,"aria-label":k,"aria-describedby":D||(j?`${t}-error`:void 0),"aria-invalid":F.touched&&F.error?!0:void 0},sx:y}),renderOption:(R,x)=>h.createElement("li",{...R,key:x.value},C?C(x,n.indexOf(x)):x.label),getOptionDisabled:R=>{if(typeof R=="object")return R.disabled||!1;const x=n.find(E=>E.value===R);return(x==null?void 0:x.disabled)||!1}}):u.jsxs(d.FormControl,{ref:w,fullWidth:f,error:F.touched&&!!F.error,className:l,disabled:a,required:i,sx:J,children:[r&&u.jsx(d.InputLabel,{id:`${K}-label`,required:i,children:r}),u.jsxs(d.Select,{labelId:r?`${K}-label`:void 0,id:K,name:t,value:V.value??(U?[]:""),onChange:Q,onBlur:V.onBlur,label:r,displayEmpty:!!o,multiple:U,autoFocus:I,inputProps:{"aria-label":k,"aria-describedby":D||(j?`${t}-error`:void 0),"aria-invalid":F.touched&&F.error?!0:void 0},sx:y,...L,children:[o&&u.jsx(d.MenuItem,{value:U?[]:"",disabled:!0,children:o}),n.map(R=>u.jsx(d.MenuItem,{value:R.value,disabled:R.disabled,children:C?C(R,n.indexOf(R)):R.label},R.value))]}),z&&u.jsx(d.FormHelperText,{children:z})]})});nr.displayName="FormikDropdown";const ar=h.forwardRef(({name:t,options:n=[],label:r,placeholder:o,className:l,disabled:a=!1,required:i=!1,fullWidth:f=!0,helperText:v,autoFocus:I,errorMessageFormatter:S,"aria-label":k,"aria-describedby":D,sx:y,formControlSx:J,searchable:U=!1,searchPlaceholder:q,onChange:G,renderOption:b,renderValue:C,chipMaxWidth:L,...w},V)=>{const[F,_,j]=me.useField(t),z=h.useMemo(()=>{if(!(!_.touched||!_.error))return S?S(_.error):_.error},[_.touched,_.error,S]),Q=h.useMemo(()=>z||v,[z,v]),W=h.useCallback(E=>{const P=E.target.value;j.setValue(P),G&&G(P)},[j,G]),K=h.useCallback((E,P)=>{const M=P.map(re=>re.value);j.setValue(M),G&&G(M)},[j,G]),R=h.useCallback(E=>E.length===0?o||"":u.jsx(d.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:E.map(P=>{const M=n.find(re=>re.value===P);return u.jsx(d.Chip,{label:(M==null?void 0:M.label)||String(P),size:"small",sx:{maxWidth:L,"& .MuiChip-label":{overflow:L?"hidden":"visible",textOverflow:L?"ellipsis":"clip"}}},P)})}),[n,o,L]),x=`${t}-multiselect`;return U?u.jsx(d.Autocomplete,{ref:V,multiple:!0,options:n,getOptionLabel:E=>E.label,value:n.filter(E=>(F.value||[]).includes(E.value)),onChange:K,disabled:a,fullWidth:f,renderInput:E=>u.jsx(d.TextField,{...E,name:t,label:r,placeholder:q||o,required:i,error:_.touched&&!!_.error,helperText:Q,className:l,autoFocus:I,inputProps:{...E.inputProps,"aria-label":k,"aria-describedby":D||(z?`${t}-error`:void 0),"aria-invalid":_.touched&&_.error?!0:void 0},sx:y}),renderOption:(E,P)=>h.createElement("li",{...E,key:P.value},b?b(P,n.indexOf(P)):P.label),renderTags:(E,P)=>u.jsx(d.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:E.map((M,re)=>h.createElement(d.Chip,{...P({index:re}),key:M.value,label:M.label,size:"small",sx:{maxWidth:L,"& .MuiChip-label":{overflow:L?"hidden":"visible",textOverflow:L?"ellipsis":"clip"}}}))}),getOptionDisabled:E=>E.disabled||!1}):u.jsxs(d.FormControl,{ref:V,fullWidth:f,error:_.touched&&!!_.error,className:l,disabled:a,required:i,sx:J,children:[r&&u.jsx(d.InputLabel,{id:`${x}-label`,required:i,children:r}),u.jsxs(d.Select,{labelId:r?`${x}-label`:void 0,id:x,name:t,multiple:!0,value:F.value||[],onChange:W,onBlur:F.onBlur,label:r,displayEmpty:!!o,autoFocus:I,input:u.jsx(d.OutlinedInput,{label:r}),renderValue:E=>{const P=E;return C?C(P):R(P)},inputProps:{"aria-label":k,"aria-describedby":D||(z?`${t}-error`:void 0),"aria-invalid":_.touched&&_.error?!0:void 0},sx:y,...w,children:[o&&u.jsx(d.MenuItem,{value:"",disabled:!0,children:o}),n.map(E=>u.jsx(d.MenuItem,{value:E.value,disabled:E.disabled,children:b?b(E,n.indexOf(E)):E.label},E.value))]}),Q&&u.jsx(d.FormHelperText,{children:Q})]})});ar.displayName="FormikMultiSelect";const ir=h.forwardRef(({name:t,label:n,accept:r,multiple:o=!1,maxFiles:l,maxSize:a,disabled:i=!1,required:f=!1,helperText:v,errorMessageFormatter:I,sx:S,onChange:k,renderPreview:D,showPreview:y=!0,showFileSize:J=!0,uploadButtonText:U="Dosya Seç",dragAndDrop:q=!1,"aria-label":G,"aria-describedby":b},C)=>{const[L,w,V]=me.useField(t),[F,_]=h.useState(!1),j=h.useRef(null),z=h.useMemo(()=>{if(!(!w.touched||!w.error))return I?I(w.error):w.error},[w.touched,w.error,I]),Q=h.useMemo(()=>z||v,[z,v]),W=h.useCallback(p=>{if(p===0)return"0 Bytes";const A=1024,Z=["Bytes","KB","MB","GB"],ee=Math.floor(Math.log(p)/Math.log(A));return Math.round(p/Math.pow(A,ee)*100)/100+" "+Z[ee]},[]),K=h.useCallback(p=>{const A=p.type;return A.startsWith("image/")?u.jsx(le.Image,{}):A==="application/pdf"?u.jsx(le.PictureAsPdf,{}):A.startsWith("text/")?u.jsx(le.Description,{}):u.jsx(le.InsertDriveFile,{})},[]),R=h.useCallback(p=>{if(f&&p.length===0)return"En az bir dosya seçmelisiniz";if(l&&p.length>l)return`Maksimum ${l} dosya seçebilirsiniz`;if(a&&p.filter(Z=>Z.size>a).length>0)return`Bazı dosyalar çok büyük. Maksimum boyut: ${W(a)}`},[f,l,a,W]),x=h.useCallback(p=>{if(!p||p.length===0)return;const A=Array.from(p),Z=R(A);if(Z){V.setError(Z);return}const ee=o?[...L.value||[],...A]:A.slice(0,1);V.setValue(ee),V.setError(void 0),k&&k(ee)},[L.value,o,R,V,k]),E=h.useCallback(p=>{x(p.target.files)},[x]),P=h.useCallback(p=>{const A=(L.value||[]).filter((Z,ee)=>ee!==p);V.setValue(A.length>0?A:[]),V.setError(void 0),k&&k(A)},[L.value,V,k]),M=h.useCallback(p=>{p.preventDefault(),p.stopPropagation(),q&&!i&&_(!0)},[q,i]),re=h.useCallback(p=>{p.preventDefault(),p.stopPropagation(),_(!1)},[]),pe=h.useCallback(p=>{p.preventDefault(),p.stopPropagation()},[]),ue=h.useCallback(p=>{if(p.preventDefault(),p.stopPropagation(),_(!1),i)return;const A=p.dataTransfer.files;x(A)},[i,x]),fe=h.useCallback((p,A)=>{const Z=p.type.startsWith("image/"),ee=Z?URL.createObjectURL(p):null;return u.jsxs(d.Paper,{elevation:2,sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2},children:[Z&&ee?u.jsx(d.Box,{component:"img",src:ee,alt:p.name,sx:{width:60,height:60,objectFit:"cover",borderRadius:1}}):u.jsx(d.Box,{sx:{fontSize:40,color:"text.secondary"},children:K(p)}),u.jsxs(d.Box,{sx:{flex:1,minWidth:0},children:[u.jsx(d.Typography,{variant:"body2",noWrap:!0,children:p.name}),J&&u.jsx(d.Typography,{variant:"caption",color:"text.secondary",children:W(p.size)})]}),u.jsx(d.IconButton,{size:"small",onClick:()=>P(A),disabled:i,"aria-label":"Dosyayı kaldır",children:u.jsx(le.Delete,{})})]},`${p.name}-${A}`)},[K,W,J,P,i]),oe=L.value||[];return u.jsxs(d.Box,{ref:C,sx:{width:"100%",...S},children:[n&&u.jsxs(d.Typography,{variant:"body2",sx:{mb:1,fontWeight:500},component:"label",children:[n,f&&u.jsx("span",{style:{color:"red"},children:" *"})]}),u.jsxs(d.Box,{onDragEnter:M,onDragOver:pe,onDragLeave:re,onDrop:ue,sx:{border:`2px dashed ${F?"primary.main":w.touched&&w.error?"error.main":"divider"}`,borderRadius:2,p:3,textAlign:"center",backgroundColor:F?"action.hover":"background.paper",transition:"all 0.3s ease",cursor:i?"not-allowed":"pointer",opacity:i?.6:1},onClick:()=>{var p;return!i&&((p=j.current)==null?void 0:p.click())},"aria-label":G||n||"Dosya yükleme alanı","aria-describedby":b||(z?`${t}-error`:void 0),"aria-invalid":w.touched&&w.error?!0:void 0,children:[u.jsx("input",{ref:j,type:"file",accept:r,multiple:o,onChange:E,style:{display:"none"},disabled:i,"aria-label":G||n}),u.jsx(le.CloudUpload,{sx:{fontSize:48,color:"text.secondary",mb:1}}),u.jsx(d.Typography,{variant:"body1",sx:{mb:1},children:q?"Dosyaları buraya sürükleyin veya tıklayın":U}),r&&u.jsxs(d.Typography,{variant:"caption",color:"text.secondary",children:["Kabul edilen formatlar: ",r]}),a&&u.jsxs(d.Typography,{variant:"caption",color:"text.secondary",display:"block",children:["Maksimum dosya boyutu: ",W(a)]}),l&&u.jsxs(d.Typography,{variant:"caption",color:"text.secondary",display:"block",children:["Maksimum dosya sayısı: ",l]})]}),y&&oe.length>0&&u.jsx(d.Box,{sx:{mt:2},children:oe.map((p,A)=>D?u.jsx(d.Box,{children:D(p,A)},`${p.name}-${A}`):fe(p,A))}),!y&&oe.length>0&&u.jsx(d.Box,{sx:{mt:2,display:"flex",flexWrap:"wrap",gap:1},children:oe.map((p,A)=>u.jsx(d.Chip,{label:`${p.name} (${W(p.size)})`,onDelete:()=>P(A),deleteIcon:u.jsx(le.Delete,{}),disabled:i},`${p.name}-${A}`))}),Q&&u.jsx(d.Typography,{variant:"caption",color:w.touched&&w.error?"error":"text.secondary",sx:{mt:1,display:"block"},id:z?`${t}-error`:void 0,children:Q})]})});ir.displayName="FormikUploadSection";const sr=h.forwardRef(({name:t,options:n=[],label:r,className:o,disabled:l=!1,required:a=!1,helperText:i,errorMessageFormatter:f,sx:v,formControlSx:I,labelSx:S,onChange:k,row:D=!1,renderOption:y,"aria-label":J,"aria-describedby":U,...q},G)=>{const[b,C,L]=me.useField(t),w=h.useMemo(()=>{if(!(!C.touched||!C.error))return f?f(C.error):C.error},[C.touched,C.error,f]),V=h.useMemo(()=>w||i,[w,i]),F=h.useCallback(_=>{const j=_.target.value,z=n.find(W=>String(W.value)===j),Q=(z==null?void 0:z.value)||j;L.setValue(Q),k&&k(Q)},[L,k,n]);return u.jsxs(d.FormControl,{ref:G,component:"fieldset",error:C.touched&&!!C.error,className:o,disabled:l,required:a,fullWidth:!0,sx:I,children:[r&&u.jsx(d.FormLabel,{component:"legend",sx:S,required:a,children:r}),u.jsx(d.RadioGroup,{name:t,value:b.value??"",onChange:F,onBlur:b.onBlur,row:D,"aria-label":J||r,"aria-describedby":U||(w?`${t}-error`:void 0),"aria-invalid":C.touched&&C.error?!0:void 0,sx:v,...q,children:n.map((_,j)=>u.jsx(d.FormControlLabel,{value:String(_.value),control:u.jsx(d.Radio,{}),label:y?y(_,j):_.label,disabled:_.disabled||l},_.value))}),V&&u.jsx(d.FormHelperText,{id:w?`${t}-error`:void 0,children:V})]})});sr.displayName="FormikRadioButton";const or=h.forwardRef(({name:t,options:n=[],label:r,className:o,disabled:l=!1,required:a=!1,helperText:i,errorMessageFormatter:f,sx:v,formControlSx:I,labelSx:S,onChange:k,row:D=!1,renderOption:y,"aria-label":J,"aria-describedby":U,...q},G)=>{const[b,C,L]=me.useField(t),w=h.useMemo(()=>{if(!(!C.touched||!C.error))return f?f(C.error):C.error},[C.touched,C.error,f]),V=h.useMemo(()=>w||i,[w,i]),F=h.useCallback(j=>{const z=b.value||[],W=z.includes(j)?z.filter(K=>K!==j):[...z,j];L.setValue(W),k&&k(W)},[b.value,L,k]),_=h.useCallback(j=>(b.value||[]).includes(j),[b.value]);return u.jsxs(d.FormControl,{ref:G,component:"fieldset",error:C.touched&&!!C.error,className:o,disabled:l,required:a,fullWidth:!0,sx:I,children:[r&&u.jsx(d.FormLabel,{component:"legend",sx:S,required:a,children:r}),u.jsx(d.FormGroup,{row:D,"aria-label":J||r,"aria-describedby":U||(w?`${t}-error`:void 0),"aria-invalid":C.touched&&C.error?!0:void 0,sx:v,...q,children:n.map((j,z)=>u.jsx(d.FormControlLabel,{control:u.jsx(d.Checkbox,{checked:_(j.value),onChange:()=>F(j.value),onBlur:b.onBlur,name:`${t}-${j.value}`,disabled:j.disabled||l}),label:y?y(j,z):j.label},j.value))}),V&&u.jsx(d.FormHelperText,{id:w?`${t}-error`:void 0,children:V})]})});or.displayName="FormikCheckbox",m.CREDIT_CARD_REGEX=$e,m.EMAIL_REGEX=Ve,m.FormikCheckbox=or,m.FormikDropdown=nr,m.FormikMultiSelect=ar,m.FormikRadioButton=sr,m.FormikTextField=tr,m.FormikUploadSection=ir,m.IBAN_REGEX=We,m.NAME_REGEX=we,m.PHONE_REGEX=Ge,m.PLATE_REGEX=Pe,m.TC_KIMLIK_NO_REGEX=Se,m.VKN_REGEX=Ze,m.creditCardSchema=wr,m.dateSchema=Oe,m.emailSchema=Rr,m.fileSchema=Ar,m.futureDateSchema=Br,m.getFileExtension=xe,m.ibanSchema=Sr,m.nameSchema=Dr,m.passwordMatchSchema=Tr,m.passwordSchema=Cr,m.pastDateSchema=zr,m.phoneSchema=_r,m.plateSchema=Or,m.tcKimlikNoSchema=xr,m.toTurkishUpperCase=rr,m.validateCreditCard=He,m.validateDate=Fr,m.validateEmail=Ue,m.validateFile=Ir,m.validateIBAN=Ye,m.validateName=Xe,m.validatePassword=jr,m.validatePhone=Ke,m.validatePlate=Qe,m.validateTCKimlikNo=Le,m.validateVKN=Je,m.vknSchema=Pr,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|