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