{"id":32,"date":"2025-12-30T19:38:05","date_gmt":"2025-12-30T19:38:05","guid":{"rendered":"https:\/\/darkgoldenrod-quetzal-444860.hostingersite.com\/?p=32"},"modified":"2025-12-30T19:38:06","modified_gmt":"2025-12-30T19:38:06","slug":"%d8%aa%d9%82%d8%b3%d9%8a%d9%85-%d8%a7%d9%84%d9%88%d8%b1%d8%ab-%d9%88-%d8%ad%d8%a7%d8%b3%d8%a8%d8%a9-%d8%a7%d9%84%d9%85%d9%88%d8%a7%d8%b1%d9%8a%d8%ab-%d8%a7%d9%84%d8%b4%d8%b1%d8%b9%d9%8a%d8%a9-%d8%a8","status":"publish","type":"post","link":"https:\/\/hasabah.com\/?p=32","title":{"rendered":"\u062a\u0642\u0633\u064a\u0645 \u0627\u0644\u0648\u0631\u062b \u0648 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u0628\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"ar\" dir=\"rtl\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u0627\u0644\u062f\u0642\u064a\u0642\u0629 &#8211; \u0627\u0644\u0642\u0627\u0646\u0648\u0646 \u0627\u0644\u0633\u0639\u0648\u062f\u064a | \u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629<\/title>\n    <meta name=\"description\" content=\"\u062d\u0627\u0633\u0628\u0629 \u0645\u0648\u0627\u0631\u064a\u062b \u062f\u0642\u064a\u0642\u0629 \u0648\u0641\u0642 \u0627\u0644\u0642\u0627\u0646\u0648\u0646 \u0627\u0644\u0633\u0639\u0648\u062f\u064a \u0648\u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629. \u0627\u062d\u0633\u0628 \u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629 \u0628\u062f\u0642\u0629 \u0645\u0639 \u0634\u0631\u062d \u0627\u0644\u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u0639\u064a\u0629\">\n    <meta name=\"keywords\" content=\"\u062d\u0627\u0633\u0628\u0629 \u0645\u0648\u0627\u0631\u064a\u062b, \u0627\u0644\u0645\u064a\u0631\u0627\u062b \u0627\u0644\u0633\u0639\u0648\u062f\u064a, \u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629, \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629, \u0627\u0644\u0641\u0631\u0627\u0626\u0636, \u0642\u0633\u0645\u0629 \u0627\u0644\u062a\u0631\u0643\u0629\">\n    <meta name=\"author\" content=\"\u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b\">\n    <meta name=\"robots\" content=\"index, follow\">\n    <link rel=\"canonical\" href=\"https:\/\/www.yoursite.com\/\u062d\u0627\u0633\u0628\u0629-\u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b\">\n    \n    <!-- Open Graph -->\n    <meta property=\"og:title\" content=\"\u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u0627\u0644\u062f\u0642\u064a\u0642\u0629\">\n    <meta property=\"og:description\" content=\"\u062d\u0627\u0633\u0628\u0629 \u062f\u0642\u064a\u0642\u0629 \u0644\u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0645\u064a\u0631\u0627\u062b \u0648\u0641\u0642 \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629 \u0648\u0627\u0644\u0642\u0627\u0646\u0648\u0646 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\">\n    <meta property=\"og:type\" content=\"website\">\n    \n    <style>\n        :root {\n            --main-color: #1a5fb4;\n            --accent-color: #c64600;\n            --light-bg: #f6f5f4;\n            --border-color: #ddd;\n        }\n        \n        * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n            font-family: system-ui, -apple-system, sans-serif;\n        }\n        \n        body {\n            background: #f8f9fa;\n            color: #333;\n            line-height: 1.6;\n            min-height: 100vh;\n        }\n        \n        .container {\n            max-width: 1200px;\n            margin: 0 auto;\n            padding: 0 15px;\n        }\n        \n        header {\n            background: var(--main-color);\n            color: white;\n            padding: 1rem 0;\n        }\n        \n        .header-content {\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            flex-wrap: wrap;\n        }\n        \n        .logo {\n            font-size: 1.5rem;\n            font-weight: bold;\n        }\n        \n        main {\n            padding: 2rem 0;\n        }\n        \n        .calculator-grid {\n            display: grid;\n            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n            gap: 1.5rem;\n            margin-top: 1.5rem;\n        }\n        \n        .card {\n            background: white;\n            border-radius: 8px;\n            padding: 1.5rem;\n            box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n        }\n        \n        .card h3 {\n            color: var(--main-color);\n            margin-bottom: 1rem;\n            padding-bottom: 0.5rem;\n            border-bottom: 2px solid var(--main-color);\n        }\n        \n        .form-group {\n            margin-bottom: 1rem;\n        }\n        \n        label {\n            display: block;\n            margin-bottom: 0.5rem;\n            font-weight: 500;\n        }\n        \n        input, select {\n            width: 100%;\n            padding: 0.5rem;\n            border: 1px solid var(--border-color);\n            border-radius: 4px;\n            font-size: 1rem;\n        }\n        \n        .btn {\n            background: var(--accent-color);\n            color: white;\n            border: none;\n            padding: 0.75rem 1.5rem;\n            border-radius: 4px;\n            cursor: pointer;\n            font-weight: bold;\n            width: 100%;\n            margin-top: 1rem;\n        }\n        \n        .btn:hover {\n            opacity: 0.9;\n        }\n        \n        .heir-item {\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            padding: 0.5rem;\n            background: var(--light-bg);\n            margin-bottom: 0.5rem;\n            border-radius: 4px;\n        }\n        \n        .heir-controls {\n            display: flex;\n            align-items: center;\n            gap: 0.5rem;\n        }\n        \n        .count-btn {\n            background: var(--main-color);\n            color: white;\n            border: none;\n            width: 25px;\n            height: 25px;\n            border-radius: 50%;\n            cursor: pointer;\n        }\n        \n        .delete-btn {\n            background: #dc3545;\n        }\n        \n        table {\n            width: 100%;\n            border-collapse: collapse;\n            margin-top: 1rem;\n        }\n        \n        th, td {\n            padding: 0.75rem;\n            text-align: right;\n            border-bottom: 1px solid var(--border-color);\n        }\n        \n        th {\n            background: var(--main-color);\n            color: white;\n        }\n        \n        .note {\n            background: #fff3cd;\n            border: 1px solid #ffeaa7;\n            padding: 1rem;\n            border-radius: 4px;\n            margin: 1rem 0;\n        }\n        \n        footer {\n            background: #333;\n            color: white;\n            padding: 2rem 0;\n            margin-top: 2rem;\n        }\n        \n        @media (max-width: 768px) {\n            .calculator-grid {\n                grid-template-columns: 1fr;\n            }\n        }\n    <\/style>\n<\/head>\n<body>\n    <header>\n        <div class=\"container\">\n            <div class=\"header-content\">\n                <div class=\"logo\">\u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629<\/div>\n                <nav>\n                    <div style=\"color: white; font-size: 0.9rem;\">\u062d\u0627\u0633\u0628\u0629 \u062f\u0642\u064a\u0642\u0629 \u0648\u0641\u0642 \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629<\/div>\n                <\/nav>\n            <\/div>\n        <\/div>\n    <\/header>\n\n    <main class=\"container\">\n        <h1 style=\"text-align: center; color: var(--main-color); margin-bottom: 0.5rem;\">\n            \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629\n        <\/h1>\n        <p style=\"text-align: center; color: #666; margin-bottom: 2rem;\">\n            \u062d\u0633\u0627\u0628 \u062f\u0642\u064a\u0642 \u0644\u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629 \u0648\u0641\u0642 \u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629 \u0648\u0627\u0644\u0642\u0627\u0646\u0648\u0646 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\n        <\/p>\n        \n        <div class=\"note\">\n            <strong>\u0645\u0644\u0627\u062d\u0638\u0629:<\/strong> \u0647\u0630\u0647 \u0627\u0644\u062d\u0627\u0633\u0628\u0629 \u062a\u0639\u0637\u064a \u0646\u062a\u0627\u0626\u062c \u062f\u0642\u064a\u0642\u0629 \u0648\u0641\u0642 \u0627\u0644\u0645\u0630\u0647\u0628 \u0627\u0644\u062d\u0646\u0628\u0644\u064a \u0645\u0639 \u0645\u0631\u0627\u0639\u0627\u0629 \u062c\u0645\u064a\u0639 \u0627\u0644\u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u0639\u064a\u0629.\n        <\/div>\n\n        <div class=\"calculator-grid\">\n            <!-- \u0642\u0633\u0645 \u0627\u0644\u0625\u062f\u062e\u0627\u0644 -->\n            <div class=\"card\">\n                <h3>\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u062a\u0631\u0643\u0629 \u0648\u0627\u0644\u0648\u0631\u062b\u0629<\/h3>\n                \n                <div class=\"form-group\">\n                    <label for=\"estateValue\">\u0642\u064a\u0645\u0629 \u0627\u0644\u062a\u0631\u0643\u0629 (\u0631\u064a\u0627\u0644 \u0633\u0639\u0648\u062f\u064a)<\/label>\n                    <input type=\"number\" id=\"estateValue\" min=\"0\" value=\"100000\" step=\"1000\">\n                <\/div>\n                \n                <div class=\"form-group\">\n                    <label for=\"debts\">\u0627\u0644\u062f\u064a\u0648\u0646 \u0639\u0644\u0649 \u0627\u0644\u062a\u0631\u0643\u0629<\/label>\n                    <input type=\"number\" id=\"debts\" min=\"0\" value=\"0\" step=\"1000\">\n                <\/div>\n                \n                <div class=\"form-group\">\n                    <label for=\"wills\">\u0627\u0644\u0648\u0635\u0627\u064a\u0627<\/label>\n                    <input type=\"number\" id=\"wills\" min=\"0\" value=\"0\" step=\"1000\">\n                <\/div>\n                \n                <div class=\"form-group\">\n                    <label for=\"heirType\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0648\u0631\u064a\u062b<\/label>\n                    <select id=\"heirType\">\n                        <option value=\"son\">\u0627\u0628\u0646<\/option>\n                        <option value=\"daughter\">\u0627\u0628\u0646\u0629<\/option>\n                        <option value=\"father\">\u0623\u0628<\/option>\n                        <option value=\"mother\">\u0623\u0645<\/option>\n                        <option value=\"wife\">\u0632\u0648\u062c\u0629<\/option>\n                        <option value=\"husband\">\u0632\u0648\u062c<\/option>\n                        <option value=\"fullBrother\">\u0623\u062e \u0634\u0642\u064a\u0642<\/option>\n                        <option value=\"fullSister\">\u0623\u062e\u062a \u0634\u0642\u064a\u0642\u0629<\/option>\n                    <\/select>\n                <\/div>\n                \n                <button id=\"addHeir\" class=\"btn\" style=\"background: var(--main-color);\">\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0648\u0631\u064a\u062b<\/button>\n                \n                <div id=\"heirsList\" style=\"margin-top: 1rem;\">\n                    <!-- \u0627\u0644\u0648\u0631\u062b\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0648\u0646 -->\n                <\/div>\n                \n                <button id=\"calculate\" class=\"btn\">\u062d\u0633\u0627\u0628 \u0627\u0644\u0623\u0646\u0635\u0628\u0629<\/button>\n            <\/div>\n\n            <!-- \u0642\u0633\u0645 \u0627\u0644\u0646\u062a\u0627\u0626\u062c -->\n            <div class=\"card\">\n                <h3>\u0646\u062a\u0627\u0626\u062c \u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u064a\u0631\u0627\u062b<\/h3>\n                <div id=\"resultsContainer\">\n                    <p style=\"text-align: center; color: #666;\">\u0633\u064a\u0638\u0647\u0631 \u0647\u0646\u0627 \u0646\u062a\u0627\u0626\u062c \u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u064a\u0631\u0627\u062b<\/p>\n                <\/div>\n            <\/div>\n        <\/div>\n        \n        <div class=\"card\" style=\"margin-top: 1.5rem;\">\n            <h3>\u0634\u0631\u062d \u0627\u0644\u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u0639\u064a\u0629<\/h3>\n            <div id=\"explanation\">\n                <p>\u062a\u0638\u0647\u0631 \u0647\u0646\u0627 \u0627\u0644\u0634\u0631\u062d \u0627\u0644\u062a\u0641\u0635\u064a\u0644\u064a \u0644\u0644\u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u0627\u0644\u0645\u062a\u0639\u0644\u0642\u0629 \u0628\u062d\u0627\u0644\u0629 \u0627\u0644\u0645\u064a\u0631\u0627\u062b \u0628\u0639\u062f \u0627\u0644\u062d\u0633\u0627\u0628.<\/p>\n            <\/div>\n        <\/div>\n    <\/main>\n\n    <footer>\n        <div class=\"container\">\n            <div style=\"text-align: center;\">\n                <h3 style=\"margin-bottom: 1rem;\">\u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629<\/h3>\n                <p>\u0623\u062f\u0627\u0629 \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a\u0629 \u062f\u0642\u064a\u0642\u0629 \u0644\u062d\u0633\u0627\u0628 \u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629 \u0648\u0641\u0642 \u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629<\/p>\n                <p style=\"margin-top: 1rem; font-size: 0.9rem;\">\u0644\u0644\u0623\u063a\u0631\u0627\u0636 \u0627\u0644\u062a\u0639\u0644\u064a\u0645\u064a\u0629 \u0648\u0627\u0644\u0625\u0631\u0634\u0627\u062f\u064a\u0629<\/p>\n            <\/div>\n        <\/div>\n    <\/footer>\n\n<script>\n\/\/ \u062e\u0648\u0627\u0631\u0632\u0645\u064a\u0629 \u062f\u0642\u064a\u0642\u0629 \u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b\nclass InheritanceCalculator {\n    constructor() {\n        this.heirNames = {\n            son: '\u0627\u0628\u0646', daughter: '\u0627\u0628\u0646\u0629', father: '\u0623\u0628', mother: '\u0623\u0645',\n            wife: '\u0632\u0648\u062c\u0629', husband: '\u0632\u0648\u062c', \n            fullBrother: '\u0623\u062e \u0634\u0642\u064a\u0642', fullSister: '\u0623\u062e\u062a \u0634\u0642\u064a\u0642\u0629'\n        };\n        \n        this.heirs = [];\n    }\n\n    \/\/ \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\n    calculate(estateValue, debts, wills) {\n        const netEstate = Math.max(0, estateValue - debts - wills);\n        if (netEstate <= 0) return { success: false, error: '\u0644\u0627 \u062a\u0648\u062c\u062f \u062a\u0631\u0643\u0629 \u0644\u0644\u062a\u0648\u0632\u064a\u0639' };\n        \n        \/\/ \u062a\u062d\u0644\u064a\u0644 \u0627\u0644\u0648\u0631\u062b\u0629\n        const analysis = this.analyzeHeirs();\n        if (!analysis.hasHeirs) return { success: false, error: '\u0644\u0627 \u064a\u0648\u062c\u062f \u0648\u0631\u062b\u0629' };\n        \n        \/\/ \u062d\u0633\u0627\u0628 \u0627\u0644\u0641\u0631\u0648\u0636\n        const fixedShares = this.calculateFixedShares(analysis, netEstate);\n        \n        \/\/ \u062d\u0633\u0627\u0628 \u0627\u0644\u0639\u0635\u0628\u0627\u062a\n        const residual = netEstate - fixedShares.total;\n        const asabaShares = this.calculateAsabaShares(analysis, residual);\n        \n        \/\/ \u0627\u0644\u062c\u0645\u0639 \u0627\u0644\u0646\u0647\u0627\u0626\u064a\n        const allShares = [...fixedShares.shares, ...asabaShares.shares];\n        const finalResult = this.finalizeDistribution(allShares, netEstate);\n        \n        return {\n            success: true,\n            netEstate,\n            distribution: finalResult,\n            explanation: this.generateExplanation(analysis)\n        };\n    }\n\n    analyzeHeirs() {\n        const analysis = {\n            hasChildren: false,\n            hasSon: false,\n            hasDaughter: false,\n            hasFather: false,\n            hasMother: false,\n            hasSpouse: false,\n            hasSiblings: false,\n            hasHeirs: this.heirs.length > 0,\n            childrenCount: 0,\n            daughtersCount: 0,\n            sonsCount: 0\n        };\n        \n        this.heirs.forEach(heir => {\n            switch(heir.type) {\n                case 'son': \n                    analysis.hasChildren = true;\n                    analysis.hasSon = true;\n                    analysis.sonsCount += heir.count;\n                    analysis.childrenCount += heir.count;\n                    break;\n                case 'daughter': \n                    analysis.hasChildren = true;\n                    analysis.hasDaughter = true;\n                    analysis.daughtersCount += heir.count;\n                    analysis.childrenCount += heir.count;\n                    break;\n                case 'father': analysis.hasFather = true; break;\n                case 'mother': analysis.hasMother = true; break;\n                case 'wife': \n                case 'husband': \n                    analysis.hasSpouse = true; \n                    break;\n                case 'fullBrother':\n                case 'fullSister':\n                    analysis.hasSiblings = true;\n                    break;\n            }\n        });\n        \n        return analysis;\n    }\n\n    calculateFixedShares(analysis, netEstate) {\n        const shares = [];\n        let total = 0;\n        \n        this.heirs.forEach(heir => {\n            let share = 0;\n            let reason = '';\n            \n            switch(heir.type) {\n                case 'husband':\n                    share = analysis.hasChildren ? 0.25 : 0.5;\n                    reason = analysis.hasChildren ? '\u0627\u0644\u0631\u0628\u0639 \u0644\u0648\u062c\u0648\u062f \u0627\u0644\u0641\u0631\u0639 \u0627\u0644\u0648\u0627\u0631\u062b' : '\u0627\u0644\u0646\u0635\u0641 \u0644\u0639\u062f\u0645 \u0648\u062c\u0648\u062f \u0627\u0644\u0641\u0631\u0639 \u0627\u0644\u0648\u0627\u0631\u062b';\n                    break;\n                    \n                case 'wife':\n                    share = analysis.hasChildren ? 0.125 : 0.25;\n                    reason = analysis.hasChildren ? '\u0627\u0644\u062b\u0645\u0646 \u0644\u0648\u062c\u0648\u062f \u0627\u0644\u0641\u0631\u0639 \u0627\u0644\u0648\u0627\u0631\u062b' : '\u0627\u0644\u0631\u0628\u0639 \u0644\u0639\u062f\u0645 \u0648\u062c\u0648\u062f \u0627\u0644\u0641\u0631\u0639 \u0627\u0644\u0648\u0627\u0631\u062b';\n                    break;\n                    \n                case 'father':\n                    if (analysis.hasChildren) {\n                        share = 1\/6;\n                        reason = '\u0627\u0644\u0633\u062f\u0633 \u0644\u0648\u062c\u0648\u062f \u0627\u0644\u0641\u0631\u0639 \u0627\u0644\u0648\u0627\u0631\u062b';\n                    } else {\n                        \/\/ \u0623\u0628 \u064a\u0623\u062e\u0630 \u0627\u0644\u0628\u0627\u0642\u064a \u062a\u0639\u0635\u064a\u0628\u0627\u064b\n                        return;\n                    }\n                    break;\n                    \n                case 'mother':\n                    if (analysis.hasChildren || analysis.hasSiblings) {\n                        share = 1\/6;\n                        reason = analysis.hasChildren ? '\u0627\u0644\u0633\u062f\u0633 \u0644\u0648\u062c\u0648\u062f \u0627\u0644\u0641\u0631\u0639 \u0627\u0644\u0648\u0627\u0631\u062b' : '\u0627\u0644\u0633\u062f\u0633 \u0644\u0648\u062c\u0648\u062f \u0627\u0644\u0625\u062e\u0648\u0629';\n                    } else {\n                        share = 1\/3;\n                        reason = '\u0627\u0644\u062b\u0644\u062b \u0644\u0639\u062f\u0645 \u0648\u062c\u0648\u062f \u0641\u0631\u0639 \u0648\u0627\u0631\u062b \u0648\u0644\u0627 \u0625\u062e\u0648\u0629';\n                    }\n                    break;\n                    \n                case 'daughter':\n                    if (!analysis.hasSon) {\n                        if (analysis.daughtersCount === 1) {\n                            share = 0.5;\n                            reason = '\u0627\u0644\u0646\u0635\u0641 \u0644\u0644\u0627\u0646\u0641\u0631\u0627\u062f';\n                        } else {\n                            share = 2\/3;\n                            reason = '\u0627\u0644\u062b\u0644\u062b\u0627\u0646 \u0644\u0644\u062a\u0639\u062f\u062f';\n                        }\n                    }\n                    break;\n                    \n                case 'fullSister':\n                    if (!analysis.hasFather && !analysis.hasSon) {\n                        const sisters = this.heirs.filter(h => h.type === 'fullSister');\n                        const sistersCount = sisters.reduce((sum, s) => sum + s.count, 0);\n                        \n                        if (sistersCount === 1) {\n                            share = 0.5;\n                            reason = '\u0627\u0644\u0646\u0635\u0641 \u0644\u0644\u0627\u0646\u0641\u0631\u0627\u062f';\n                        } else {\n                            share = 2\/3;\n                            reason = '\u0627\u0644\u062b\u0644\u062b\u0627\u0646 \u0644\u0644\u062a\u0639\u062f\u062f';\n                        }\n                    }\n                    break;\n            }\n            \n            if (share > 0) {\n                const amount = netEstate * share * heir.count;\n                total += amount;\n                \n                shares.push({\n                    name: heir.name,\n                    count: heir.count,\n                    share: share,\n                    amount: amount,\n                    reason: reason,\n                    type: '\u0641\u0631\u0636'\n                });\n            }\n        });\n        \n        return { shares, total };\n    }\n\n    calculateAsabaShares(analysis, residual) {\n        const shares = [];\n        let total = 0;\n        \n        if (residual <= 0) return { shares, total };\n        \n        \/\/ \u0627\u0644\u0639\u0635\u0628\u0627\u062a \u0627\u0644\u0623\u0633\u0627\u0633\u064a\u0648\u0646: \u0627\u0644\u0623\u0628\u0646\u0627\u0621\n        if (analysis.hasSon || analysis.hasDaughter) {\n            const maleParts = analysis.sonsCount * 2;\n            const femaleParts = analysis.daughtersCount;\n            const totalParts = maleParts + femaleParts;\n            const partValue = residual \/ totalParts;\n            \n            \/\/ \u062a\u0648\u0632\u064a\u0639 \u0639\u0644\u0649 \u0627\u0644\u0623\u0628\u0646\u0627\u0621\n            this.heirs.forEach(heir => {\n                if (heir.type === 'son') {\n                    const amount = partValue * 2 * heir.count;\n                    total += amount;\n                    shares.push({\n                        name: heir.name,\n                        count: heir.count,\n                        share: (2 * heir.count) \/ totalParts,\n                        amount: amount,\n                        reason: '\u062a\u0639\u0635\u064a\u0628 \u0644\u0644\u0630\u0643\u0631 \u0645\u062b\u0644 \u062d\u0638 \u0627\u0644\u0623\u0646\u062b\u064a\u064a\u0646',\n                        type: '\u062a\u0639\u0635\u064a\u0628'\n                    });\n                }\n                \n                if (heir.type === 'daughter' && analysis.hasSon) {\n                    const amount = partValue * heir.count;\n                    total += amount;\n                    shares.push({\n                        name: heir.name,\n                        count: heir.count,\n                        share: heir.count \/ totalParts,\n                        amount: amount,\n                        reason: '\u062a\u0639\u0635\u064a\u0628 \u0645\u0639 \u0627\u0644\u0625\u062e\u0648\u0629 \u0644\u0644\u0630\u0643\u0631 \u0645\u062b\u0644 \u062d\u0638 \u0627\u0644\u0623\u0646\u062b\u064a\u064a\u0646',\n                        type: '\u062a\u0639\u0635\u064a\u0628'\n                    });\n                }\n            });\n        }\n        \/\/ \u0627\u0644\u0623\u0628 \u064a\u0623\u062e\u0630 \u0627\u0644\u0628\u0627\u0642\u064a \u0625\u0630\u0627 \u0644\u0645 \u064a\u0648\u062c\u062f \u0623\u0628\u0646\u0627\u0621\n        else if (analysis.hasFather && !analysis.hasChildren) {\n            this.heirs.forEach(heir => {\n                if (heir.type === 'father') {\n                    const amount = residual;\n                    total += amount;\n                    shares.push({\n                        name: heir.name,\n                        count: heir.count,\n                        share: 1,\n                        amount: amount,\n                        reason: '\u0627\u0644\u062a\u0639\u0635\u064a\u0628 \u0644\u0639\u062f\u0645 \u0648\u062c\u0648\u062f \u0641\u0631\u0639 \u0648\u0627\u0631\u062b',\n                        type: '\u062a\u0639\u0635\u064a\u0628'\n                    });\n                }\n            });\n        }\n        \n        return { shares, total };\n    }\n\n    finalizeDistribution(shares, netEstate) {\n        const total = shares.reduce((sum, s) => sum + s.amount, 0);\n        const discrepancy = netEstate - total;\n        \n        if (Math.abs(discrepancy) > 0.01) {\n            \/\/ \u062a\u0639\u062f\u064a\u0644 \u0628\u0633\u064a\u0637 \u0644\u0644\u062a\u0648\u0632\u064a\u0639\n            const adjustment = discrepancy \/ shares.length;\n            shares.forEach(s => {\n                s.amount += adjustment;\n                s.amount = Math.max(0, s.amount);\n            });\n        }\n        \n        return shares;\n    }\n\n    generateExplanation(analysis) {\n        let explanation = '<h4>\u0627\u0644\u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u0627\u0644\u0645\u0637\u0628\u0642\u0629:<\/h4><ul>';\n        \n        if (analysis.hasSpouse) {\n            explanation += '<li>\u0644\u0644\u0632\u0648\u062c \u0627\u0644\u0646\u0635\u0641 \u0645\u0639 \u0639\u062f\u0645 \u0627\u0644\u0648\u0644\u062f\u060c \u0648\u0627\u0644\u0631\u0628\u0639 \u0645\u0639 \u0627\u0644\u0648\u0644\u062f<\/li>';\n            explanation += '<li>\u0644\u0644\u0632\u0648\u062c\u0629 \u0627\u0644\u0631\u0628\u0639 \u0645\u0639 \u0639\u062f\u0645 \u0627\u0644\u0648\u0644\u062f\u060c \u0648\u0627\u0644\u062b\u0645\u0646 \u0645\u0639 \u0627\u0644\u0648\u0644\u062f<\/li>';\n        }\n        \n        if (analysis.hasFather) {\n            explanation += '<li>\u0644\u0644\u0623\u0628 \u0627\u0644\u0633\u062f\u0633 \u0645\u0639 \u0627\u0644\u0648\u0644\u062f\u060c \u0648\u0627\u0644\u0628\u0627\u0642\u064a \u062a\u0639\u0635\u064a\u0628\u0627\u064b \u0645\u0639 \u0639\u062f\u0645 \u0627\u0644\u0648\u0644\u062f<\/li>';\n        }\n        \n        if (analysis.hasMother) {\n            explanation += '<li>\u0644\u0644\u0623\u0645 \u0627\u0644\u0633\u062f\u0633 \u0645\u0639 \u0627\u0644\u0648\u0644\u062f \u0623\u0648 \u0627\u0644\u0625\u062e\u0648\u0629\u060c \u0648\u0627\u0644\u062b\u0644\u062b \u0645\u0639 \u0639\u062f\u0645\u0647\u0645\u0627<\/li>';\n        }\n        \n        if (analysis.hasSon || analysis.hasDaughter) {\n            explanation += '<li>\u0644\u0644\u0630\u0643\u0631 \u0645\u062b\u0644 \u062d\u0638 \u0627\u0644\u0623\u0646\u062b\u064a\u064a\u0646 \u0641\u064a \u0627\u0644\u062a\u0639\u0635\u064a\u0628<\/li>';\n        }\n        \n        explanation += '<\/ul>';\n        return explanation;\n    }\n}\n\n\/\/ \u062a\u0637\u0628\u064a\u0642 \u0627\u0644\u0648\u0627\u062c\u0647\u0629\nconst calculator = new InheritanceCalculator();\n\ndocument.getElementById('addHeir').addEventListener('click', () => {\n    const type = document.getElementById('heirType').value;\n    const name = calculator.heirNames[type];\n    \n    const existing = calculator.heirs.find(h => h.type === type);\n    if (existing) {\n        existing.count++;\n    } else {\n        calculator.heirs.push({ type, name, count: 1 });\n    }\n    \n    updateHeirsList();\n});\n\ndocument.getElementById('calculate').addEventListener('click', () => {\n    const estateValue = parseFloat(document.getElementById('estateValue').value) || 0;\n    const debts = parseFloat(document.getElementById('debts').value) || 0;\n    const wills = parseFloat(document.getElementById('wills').value) || 0;\n    \n    const result = calculator.calculate(estateValue, debts, wills);\n    \n    if (result.success) {\n        displayResults(result);\n    } else {\n        document.getElementById('resultsContainer').innerHTML = `\n            <div class=\"note\" style=\"background: #f8d7da; color: #721c24;\">\n                <strong>\u062e\u0637\u0623:<\/strong> ${result.error}\n            <\/div>\n        `;\n    }\n});\n\nfunction updateHeirsList() {\n    const container = document.getElementById('heirsList');\n    container.innerHTML = '';\n    \n    calculator.heirs.forEach((heir, index) => {\n        const div = document.createElement('div');\n        div.className = 'heir-item';\n        div.innerHTML = `\n            <span>${heir.name}<\/span>\n            <div class=\"heir-controls\">\n                <button class=\"count-btn\" onclick=\"updateHeirCount(${index}, -1)\">-<\/button>\n                <span>${heir.count}<\/span>\n                <button class=\"count-btn\" onclick=\"updateHeirCount(${index}, 1)\">+<\/button>\n                <button class=\"count-btn delete-btn\" onclick=\"removeHeir(${index})\">\u00d7<\/button>\n            <\/div>\n        `;\n        container.appendChild(div);\n    });\n}\n\nfunction updateHeirCount(index, delta) {\n    if (calculator.heirs[index]) {\n        calculator.heirs[index].count += delta;\n        if (calculator.heirs[index].count <= 0) {\n            calculator.heirs.splice(index, 1);\n        }\n        updateHeirsList();\n    }\n}\n\nfunction removeHeir(index) {\n    calculator.heirs.splice(index, 1);\n    updateHeirsList();\n}\n\nfunction displayResults(result) {\n    let html = `\n        <div class=\"note\" style=\"background: #d1ecf1; color: #0c5460;\">\n            <strong>\u0635\u0627\u0641\u064a \u0627\u0644\u062a\u0631\u0643\u0629:<\/strong> ${result.netEstate.toLocaleString()} \u0631\u064a\u0627\u0644\n        <\/div>\n        \n        <table>\n            <thead>\n                <tr>\n                    <th>\u0627\u0644\u0648\u0631\u064a\u062b<\/th>\n                    <th>\u0627\u0644\u0639\u062f\u062f<\/th>\n                    <th>\u0627\u0644\u0646\u0635\u064a\u0628<\/th>\n                    <th>\u0627\u0644\u0642\u064a\u0645\u0629<\/th>\n                    <th>\u0627\u0644\u0633\u0628\u0628<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody>\n    `;\n    \n    let total = 0;\n    result.distribution.forEach(item => {\n        const percentage = (item.share * 100).toFixed(2);\n        total += item.amount;\n        \n        html += `\n            <tr>\n                <td>${item.name}<\/td>\n                <td>${item.count}<\/td>\n                <td>${percentage}%<\/td>\n                <td>${item.amount.toFixed(2)}<\/td>\n                <td style=\"font-size: 0.9em;\">${item.reason}<\/td>\n            <\/tr>\n        `;\n    });\n    \n    html += `\n            <\/tbody>\n            <tfoot>\n                <tr style=\"font-weight: bold; background: #f8f9fa;\">\n                    <td colspan=\"3\">\u0627\u0644\u0645\u062c\u0645\u0648\u0639<\/td>\n                    <td colspan=\"2\">${total.toFixed(2)} \u0631\u064a\u0627\u0644<\/td>\n                <\/tr>\n            <\/tfoot>\n        <\/table>\n    `;\n    \n    document.getElementById('resultsContainer').innerHTML = html;\n    document.getElementById('explanation').innerHTML = result.explanation;\n}\n\n\/\/ \u0625\u0636\u0627\u0641\u0629 \u0628\u0639\u0636 \u0627\u0644\u0648\u0631\u062b\u0629 \u0644\u0644\u0628\u062f\u0627\u064a\u0629\ncalculator.heirs = [\n    { type: 'wife', name: '\u0632\u0648\u062c\u0629', count: 1 },\n    { type: 'father', name: '\u0623\u0628', count: 1 },\n    { type: 'mother', name: '\u0623\u0645', count: 1 },\n    { type: 'son', name: '\u0627\u0628\u0646', count: 2 },\n    { type: 'daughter', name: '\u0627\u0628\u0646\u0629', count: 1 }\n];\n\nupdateHeirsList();\n<\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u0627\u0644\u062f\u0642\u064a\u0642\u0629 &#8211; \u0627\u0644\u0642\u0627\u0646\u0648\u0646 \u0627\u0644\u0633\u0639\u0648\u062f\u064a | \u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u062d\u0627\u0633\u0628\u0629 \u062f\u0642\u064a\u0642\u0629 \u0648\u0641\u0642 \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0645\u0648\u0627\u0631\u064a\u062b \u0627\u0644\u0634\u0631\u0639\u064a\u0629 \u062d\u0633\u0627\u0628 \u062f\u0642\u064a\u0642 \u0644\u0623\u0646\u0635\u0628\u0629 \u0627\u0644\u0648\u0631\u062b\u0629 \u0648\u0641\u0642 \u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u064a\u0639\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629 \u0648\u0627\u0644\u0642\u0627\u0646\u0648\u0646 \u0627\u0644\u0633\u0639\u0648\u062f\u064a \u0645\u0644\u0627\u062d\u0638\u0629: \u0647\u0630\u0647 \u0627\u0644\u062d\u0627\u0633\u0628\u0629 \u062a\u0639\u0637\u064a \u0646\u062a\u0627\u0626\u062c \u062f\u0642\u064a\u0642\u0629 \u0648\u0641\u0642 \u0627\u0644\u0645\u0630\u0647\u0628 \u0627\u0644\u062d\u0646\u0628\u0644\u064a \u0645\u0639 \u0645\u0631\u0627\u0639\u0627\u0629 \u062c\u0645\u064a\u0639 \u0627\u0644\u0623\u062d\u0643\u0627\u0645 \u0627\u0644\u0634\u0631\u0639\u064a\u0629. \u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u062a\u0631\u0643\u0629 \u0648\u0627\u0644\u0648\u0631\u062b\u0629 \u0642\u064a\u0645\u0629 \u0627\u0644\u062a\u0631\u0643\u0629 (\u0631\u064a\u0627\u0644 \u0633\u0639\u0648\u062f\u064a) \u0627\u0644\u062f\u064a\u0648\u0646 \u0639\u0644\u0649 \u0627\u0644\u062a\u0631\u0643\u0629 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/hasabah.com\/index.php?rest_route=\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasabah.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasabah.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasabah.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hasabah.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":1,"href":"https:\/\/hasabah.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/hasabah.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/hasabah.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasabah.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasabah.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}