{"id":9001,"date":"2026-09-07T20:30:00","date_gmt":"2026-09-07T20:30:00","guid":{"rendered":"https:\/\/next.theblueportugal.com\/?page_id=9001"},"modified":"2026-09-13T12:58:40","modified_gmt":"2026-09-13T11:58:40","slug":"%d8%ad%d8%a7%d8%b3%d8%a8%d8%a9-%d8%aa%d9%83%d9%84%d9%81%d8%a9-%d8%a7%d9%84%d8%aa%d8%a3%d8%b4%d9%8a%d8%b1%d8%a9-%d8%a7%d9%84%d8%b0%d9%87%d8%a8%d9%8a%d8%a9-%d9%84%d9%84%d8%a8%d8%b1%d8%aa%d8%ba%d8%a7","status":"publish","type":"page","link":"https:\/\/theblueportugal.com\/ar\/cost-calculator-portugal-golden-visa\/","title":{"rendered":"\u062d\u0627\u0633\u0628\u0629 \u062a\u0643\u0644\u0641\u0629 \u0627\u0644\u062a\u0623\u0634\u064a\u0631\u0629 \u0627\u0644\u0630\u0647\u0628\u064a\u0629 \u0644\u0644\u0628\u0631\u062a\u063a\u0627\u0644"},"content":{"rendered":"\n<style>\n\/* =========================================================\nTBP NEXT \u2014 COST CALCULATOR PAGE \u2014 DISPLAY FIX \u2014 START\n========================================================= *\/\n\n\/* Hide the WordPress page title on the calculator landing page. *\/\nbody:has(.tbp-next-calculator-page) .entry-header,\nbody:has(.tbp-next-calculator-page) .page-header,\nbody:has(.tbp-next-calculator-page) h1.entry-title{\n  display:none!important;\n}\n\n\/* The plugin markup correctly uses the HTML \"hidden\" attribute,\n   but its own .tbp-gv-success { display:flex; } rule overrides it.\n   Force hidden result\/success states to remain hidden until JS reveals them. *\/\n.tbp-next-calculator-page .tbp-gv-success[hidden],\n.tbp-next-calculator-page .tbp-gv-full-result[hidden]{\n  display:none!important;\n}\n\n.tbp-next-calculator-page{\n  width:100%;\n}\n\n\/* =========================================================\nTBP NEXT \u2014 COST CALCULATOR PAGE \u2014 DISPLAY FIX \u2014 END\n========================================================= *\/\n<\/style>\n\n<div class=\"tbp-next-calculator-page\">\n\n\n\t\t<div id=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c\"\n\t\t\tclass=\"tbp-gv-calculator tbp-gv-mode-full\"\n\t\t\tdata-config=\"{&quot;ajax_url&quot;:&quot;https:\\\/\\\/theblueportugal.com\\\/wp-admin\\\/admin-ajax.php&quot;,&quot;nonce&quot;:&quot;263030912a&quot;,&quot;mode&quot;:&quot;full&quot;,&quot;currency&quot;:&quot;EUR&quot;,&quot;horizon&quot;:5,&quot;fees&quot;:{&quot;application&quot;:{&quot;label&quot;:&quot;Application&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;per_applicant&quot;,&quot;amount&quot;:632.1000000000000227373675443232059478759765625,&quot;member_amount&quot;:0,&quot;years&quot;:[1,4]},&quot;permit_issuance&quot;:{&quot;label&quot;:&quot;Issue of the new residence permit card&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;per_applicant&quot;,&quot;amount&quot;:6314.1999999999998181010596454143524169921875,&quot;member_amount&quot;:0,&quot;years&quot;:[2]},&quot;permit_renewal&quot;:{&quot;label&quot;:&quot;Renewal residence permit card&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;per_applicant&quot;,&quot;amount&quot;:3157.8000000000001818989403545856475830078125,&quot;member_amount&quot;:0,&quot;years&quot;:[4]},&quot;consultancy&quot;:{&quot;label&quot;:&quot;Consultancy fee&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;fixed_family&quot;,&quot;amount&quot;:1000,&quot;member_amount&quot;:0,&quot;years&quot;:[1]},&quot;legal_initial&quot;:{&quot;label&quot;:&quot;Lawyer - Legal Fees Concession&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;main_plus_family_member&quot;,&quot;amount&quot;:3000,&quot;member_amount&quot;:750,&quot;years&quot;:[1]},&quot;legal_renewal&quot;:{&quot;label&quot;:&quot;Lawyer - Legal Fees Renewal&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;main_plus_family_member&quot;,&quot;amount&quot;:1500,&quot;member_amount&quot;:750,&quot;years&quot;:[4]},&quot;documentation&quot;:{&quot;label&quot;:&quot;Lawyer - Documentation Costs&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;fixed_family&quot;,&quot;amount&quot;:150,&quot;member_amount&quot;:0,&quot;years&quot;:[1,4]},&quot;tax_representation&quot;:{&quot;label&quot;:&quot;TBP Tax Representation&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;main_spouse&quot;,&quot;amount&quot;:150,&quot;member_amount&quot;:0,&quot;years&quot;:[2,3,4,5]},&quot;travel&quot;:{&quot;label&quot;:&quot;Traveling Costs&quot;,&quot;active&quot;:1,&quot;calc_type&quot;:&quot;user_input&quot;,&quot;amount&quot;:0,&quot;member_amount&quot;:0,&quot;years&quot;:[2,4]}}}\">\n\n\t\t\t<div class=\"tbp-gv-shell\">\n\t\t\t\t<div class=\"tbp-gv-heading\">\n\t\t\t\t\t<span class=\"tbp-gv-eyebrow\">PORTUGAL GOLDEN VISA COST CALCULATOR<\/span>\n\t\t\t\t\t<h2>Estimate Your Golden Visa Costs<\/h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tAdjust your family details and see an instant\n\t\t\t\t\t\t<strong>5-year cost estimate<\/strong> update as you go.\n\t\t\t\t\t<\/p>\n\t\t\t\t<\/div>\n\n\t\t\t\t<form class=\"tbp-gv-form\" novalidate>\n\t\t\t\t\t<div class=\"tbp-gv-flow-card\">\n\n\t\t\t\t\t\t<section class=\"tbp-gv-family-section\">\n\t\t\t\t\t\t\t<div class=\"tbp-gv-section-label\">YOUR FAMILY<\/div>\n\n\t\t\t\t\t\t\t<div class=\"tbp-gv-input-grid\">\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-field\">\n\t\t\t\t\t\t\t\t\t<label>Spouse<\/label>\n\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-segmented\" role=\"group\" aria-label=\"Spouse\">\n\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"is-active\" data-spouse=\"0\">No<\/button>\n\t\t\t\t\t\t\t\t\t\t<button type=\"button\" data-spouse=\"1\">Yes<\/button>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"spouse\" class=\"tbp-gv-spouse\" value=\"0\">\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-dependants\">Dependants<\/label>\n\t\t\t\t\t\t\t\t\t<select id=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-dependants\" name=\"dependants\" class=\"tbp-gv-dependants\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"0\">0<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"1\">1<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"2\">2<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"3\">3<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"4\">4<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"5\">5<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"6\">6<\/option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/select>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-field tbp-gv-field-travel\">\n\t\t\t\t\t\t\t\t\t<label for=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-travel\">\n\t\t\t\t\t\t\t\t\t\tEstimated family travel cost <span>Optional<\/span>\n\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-money-input\">\n\t\t\t\t\t\t\t\t\t\t<span>\u20ac<\/span>\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tid=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-travel\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"travel_cost\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"tbp-gv-travel\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\tmin=\"0\"\n\t\t\t\t\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\t\t\t\t\tinputmode=\"decimal\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"0\">\n\t\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t<small>Estimated family travel cost per trip to Portugal.<\/small>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/section>\n\n\t\t\t\t\t\t<section class=\"tbp-gv-preview-section\" aria-live=\"polite\">\n\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-topline\">\n\t\t\t\t\t\t\t\t<span class=\"tbp-gv-section-label tbp-gv-section-label-blue\">YOUR 5-YEAR ESTIMATE<\/span>\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-profile\">1 applicant \u00b7 no spouse \u00b7 0 dependants<\/div>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-years\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-year\">\n\t\t\t\t\t\t\t\t\t\t<span>Year 1<\/span>\n\t\t\t\t\t\t\t\t\t\t<strong>\u20ac4\u066c782.10<\/strong>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-year\">\n\t\t\t\t\t\t\t\t\t\t<span>Year 2<\/span>\n\t\t\t\t\t\t\t\t\t\t<strong>\u20ac6\u066c464.20<\/strong>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-year\">\n\t\t\t\t\t\t\t\t\t\t<span>Year 3<\/span>\n\t\t\t\t\t\t\t\t\t\t<strong>\u20ac150.00<\/strong>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-year\">\n\t\t\t\t\t\t\t\t\t\t<span>Year 4<\/span>\n\t\t\t\t\t\t\t\t\t\t<strong>\u20ac5\u066c589.90<\/strong>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-preview-year\">\n\t\t\t\t\t\t\t\t\t\t<span>Year 5<\/span>\n\t\t\t\t\t\t\t\t\t\t<strong>\u20ac150.00<\/strong>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<div class=\"tbp-gv-locked-breakdown\">\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-locked-copy\">\n\t\t\t\t\t\t\t\t\t<span class=\"tbp-gv-locked-kicker\">YOUR FULL COST REPORT<\/span>\n\t\t\t\t\t\t\t\t\t<strong>See what each cost includes - and what it covers<\/strong>\n\t\t\t\t\t\t\t\t\t<span>Fee explanations, estimated timing and a detailed cost-by-cost breakdown for your 5-year plan.<\/span>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-blur-lines\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t<div><span><\/span><b><\/b><\/div>\n\t\t\t\t\t\t\t\t\t<div><span><\/span><b><\/b><\/div>\n\t\t\t\t\t\t\t\t\t<div><span><\/span><b><\/b><\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-total-block\">\n\t\t\t\t\t\t\t\t\t<span>Estimated 5-year total<\/span>\n\t\t\t\t\t\t\t\t\t<strong class=\"tbp-gv-preview-total\">\u20ac17\u066c136.20<\/strong>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"tbp-gv-report-jump\"\n\t\t\t\t\t\t\t\t\thref=\"#tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-name\">\n\t\t\t\t\t\t\t\t\tGet Full Report by Email\n\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/section>\n\n\t\t\t\t\t\t<section class=\"tbp-gv-details-section\">\n\t\t\t\t\t\t\t<div class=\"tbp-gv-details-head\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<span class=\"tbp-gv-section-label tbp-gv-section-label-blue\">YOUR DETAILS<\/span>\n\t\t\t\t\t\t\t\t\t<p>Receive the full cost report, fee explanations and timing breakdown by email.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<span class=\"tbp-gv-fast-note\">Takes about 30 seconds<\/span>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<div class=\"tbp-gv-lead-grid\">\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-lead-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-name\">Name<\/label>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tid=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-name\"\n\t\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\t\tclass=\"tbp-gv-name\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tautocomplete=\"name\"\n\t\t\t\t\t\t\t\t\t\trequired>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-lead-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-email\">Email<\/label>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tid=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-email\"\n\t\t\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t\t\t\tautocomplete=\"email\"\n\t\t\t\t\t\t\t\t\t\trequired>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-lead-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-phone\">\n\t\t\t\t\t\t\t\t\t\tPhone <span>Optional<\/span>\n\t\t\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tid=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-phone\"\n\t\t\t\t\t\t\t\t\t\tname=\"phone\"\n\t\t\t\t\t\t\t\t\t\ttype=\"tel\"\n\t\t\t\t\t\t\t\t\t\tautocomplete=\"tel\">\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-lead-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-country\">\n\t\t\t\t\t\t\t\t\t\tCountry <span>Optional<\/span>\n\t\t\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tid=\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c-country\"\n\t\t\t\t\t\t\t\t\t\tname=\"country\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tautocomplete=\"country-name\">\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<div class=\"tbp-gv-details-bottom\">\n\t\t\t\t\t\t\t\t<label class=\"tbp-gv-advisor\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"advisor_opt_in\" value=\"1\">\n\t\t\t\t\t\t\t\t\t<span>I'd like a Golden Visa advisor to contact me about my estimate.<\/span>\n\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t<div class=\"tbp-gv-submit-wrap\">\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"tbp-gv-submit\">Send My Detailed Estimate<\/button>\n\t\t\t\t\t\t\t\t\t<span class=\"tbp-gv-status\" aria-live=\"polite\"><\/span>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<div class=\"tbp-gv-hp\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<label>Website\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"website\" tabindex=\"-1\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/form>\n\n\t\t\t\t<div class=\"tbp-gv-success\" hidden>\n\t\t\t\t\t<span class=\"tbp-gv-success-check\">\u2713<\/span>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>Your estimate request has been received.<\/strong>\n\t\t\t\t\t\t<span>Your on-page estimate remains available above.<\/span>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"tbp-gv-full-result\" hidden>\n\t\t\t\t\t\t<div class=\"tbp-gv-breakdown-heading\">\n\t\t\t\t\t\t\t<span class=\"tbp-gv-section-label tbp-gv-section-label-blue\">DETAILED BREAKDOWN<\/span>\n\t\t\t\t\t\t\t<h3>How Your Estimated Costs Are Distributed<\/h3>\n\t\t\t\t\t\t\t<p>Indicative amounts based on the current calculator settings.<\/p>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t<div class=\"tbp-gv-breakdown\"><\/div>\n\n\t\t\t\t\t\t<p class=\"tbp-gv-disclaimer\">\n\t\t\t\t\t\t\tThis estimate is indicative and based on the information provided. Government, legal and third-party fees may change.\t\t\t\t\t\t<\/p>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"tbp-gv-updated\">\n\t\t\t\t\t\t\t\tFee assumptions last updated: 2026-09-07\t\t\t\t\t\t\t<\/p>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\n\t\t\t\t<script data-nowprocket data-no-optimize=\"1\" data-no-defer=\"1\">\n\t\t\t\t(function () {\n\t\t\t\t\tvar root = document.getElementById(\"tbp-gv-calculator-d874812b-471b-4d43-86a9-82ac371d6e5c\");\n\t\t\t\t\tif (!root || root.getAttribute('data-tbp-critical-preview') === '1') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\troot.setAttribute('data-tbp-critical-preview', '1');\n\n\t\t\t\t\tvar config = {};\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconfig = JSON.parse(root.getAttribute('data-config') || '{}');\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconfig = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tvar spouseInput = root.querySelector('.tbp-gv-spouse');\n\t\t\t\t\tvar dependantsInput = root.querySelector('.tbp-gv-dependants');\n\t\t\t\t\tvar travelInput = root.querySelector('.tbp-gv-travel');\n\t\t\t\t\tvar totalEl = root.querySelector('.tbp-gv-preview-total');\n\t\t\t\t\tvar profileEl = root.querySelector('.tbp-gv-preview-profile');\n\t\t\t\t\tvar yearsEl = root.querySelector('.tbp-gv-preview-years');\n\n\t\t\t\t\tif (!spouseInput || !dependantsInput || !travelInput || !totalEl || !profileEl || !yearsEl) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction formatMoney(value) {\n\t\t\t\t\t\tvar number = Number(value || 0);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn new Intl.NumberFormat('en-IE', {\n\t\t\t\t\t\t\t\tstyle: 'currency',\n\t\t\t\t\t\t\t\tcurrency: config.currency || 'EUR',\n\t\t\t\t\t\t\t\tminimumFractionDigits: 2,\n\t\t\t\t\t\t\t\tmaximumFractionDigits: 2\n\t\t\t\t\t\t\t}).format(number);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\treturn '\u20ac' + number.toFixed(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction calculate() {\n\t\t\t\t\t\tvar fees = config.fees || {};\n\t\t\t\t\t\tvar horizon = Math.max(1, parseInt(config.horizon || 5, 10));\n\t\t\t\t\t\tvar spouse = parseInt(spouseInput.value || 0, 10) || 0;\n\t\t\t\t\t\tvar dependants = parseInt(dependantsInput.value || 0, 10) || 0;\n\t\t\t\t\t\tvar travel = parseFloat(travelInput.value || 0) || 0;\n\t\t\t\t\t\tif (travel < 0) travel = 0;\n\n\t\t\t\t\t\tvar familyMembers = spouse + dependants;\n\t\t\t\t\t\tvar applicants = 1 + familyMembers;\n\t\t\t\t\t\tvar totals = {};\n\t\t\t\t\t\tvar year;\n\n\t\t\t\t\t\tfor (year = 1; year <= horizon; year++) {\n\t\t\t\t\t\t\ttotals[year] = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tObject.keys(fees).forEach(function (key) {\n\t\t\t\t\t\t\tvar fee = fees[key];\n\t\t\t\t\t\t\tif (!fee || !parseInt(fee.active || 0, 10)) return;\n\n\t\t\t\t\t\t\tvar amount = parseFloat(fee.amount || 0) || 0;\n\t\t\t\t\t\t\tvar memberAmount = parseFloat(fee.member_amount || 0) || 0;\n\t\t\t\t\t\t\tvar value = 0;\n\n\t\t\t\t\t\t\tswitch (fee.calc_type) {\n\t\t\t\t\t\t\t\tcase 'per_applicant':\n\t\t\t\t\t\t\t\t\tvalue = amount * applicants;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'main_only':\n\t\t\t\t\t\t\t\t\tvalue = amount;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'main_spouse':\n\t\t\t\t\t\t\t\t\tvalue = amount * (1 + spouse);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'main_plus_family_member':\n\t\t\t\t\t\t\t\t\tvalue = amount + (memberAmount * familyMembers);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'user_input':\n\t\t\t\t\t\t\t\t\tvalue = travel;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'fixed_family':\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tvalue = amount;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar years = fee.years || [];\n\t\t\t\t\t\t\tfor (var i = 0; i < years.length; i++) {\n\t\t\t\t\t\t\t\tvar y = parseInt(years[i], 10);\n\t\t\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(totals, y)) {\n\t\t\t\t\t\t\t\t\ttotals[y] += value;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvar grandTotal = 0;\n\t\t\t\t\t\tfor (year = 1; year <= horizon; year++) {\n\t\t\t\t\t\t\ttotals[year] = Math.round((totals[year] + 0.0000001) * 100) \/ 100;\n\t\t\t\t\t\t\tgrandTotal += totals[year];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgrandTotal = Math.round((grandTotal + 0.0000001) * 100) \/ 100;\n\n\t\t\t\t\t\tif (totalEl) totalEl.textContent = formatMoney(grandTotal);\n\t\t\t\t\t\tif (profileEl) profileEl.textContent =\n\t\t\t\t\t\t\tapplicants + ' applicant' + (applicants === 1 ? '' : 's') +\n\t\t\t\t\t\t\t' \u00b7 ' + (spouse ? 'with spouse' : 'no spouse') +\n\t\t\t\t\t\t\t' \u00b7 ' + dependants + ' dependant' + (dependants === 1 ? '' : 's');\n\n\t\t\t\t\t\tif (!yearsEl) { return; }\n\t\t\t\t\t\tyearsEl.innerHTML = '';\n\t\t\t\t\t\tfor (year = 1; year <= horizon; year++) {\n\t\t\t\t\t\t\tvar card = document.createElement('div');\n\t\t\t\t\t\t\tcard.className = 'tbp-gv-preview-year';\n\n\t\t\t\t\t\t\tvar label = document.createElement('span');\n\t\t\t\t\t\t\tlabel.textContent = 'Year ' + year;\n\n\t\t\t\t\t\t\tvar valueEl = document.createElement('strong');\n\t\t\t\t\t\t\tvalueEl.textContent = formatMoney(totals[year]);\n\n\t\t\t\t\t\t\tcard.appendChild(label);\n\t\t\t\t\t\t\tcard.appendChild(valueEl);\n\t\t\t\t\t\t\tyearsEl.appendChild(card);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction activateSpouse(button) {\n\t\t\t\t\t\tvar buttons = root.querySelectorAll('[data-spouse]');\n\t\t\t\t\t\tfor (var i = 0; i < buttons.length; i++) {\n\t\t\t\t\t\t\tbuttons[i].classList.remove('is-active');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbutton.classList.add('is-active');\n\t\t\t\t\t\tif (spouseInput) {\n\t\t\t\t\t\t\tspouseInput.value = button.getAttribute('data-spouse') || '0';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalculate();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar spouseButtons = root.querySelectorAll('[data-spouse]');\n\t\t\t\t\tfor (var j = 0; j < spouseButtons.length; j++) {\n\t\t\t\t\t\t(function (button) {\n\t\t\t\t\t\t\tbutton.addEventListener('click', function () {\n\t\t\t\t\t\t\t\tactivateSpouse(button);\n\t\t\t\t\t\t\t}, false);\n\t\t\t\t\t\t\tbutton.addEventListener('touchend', function () {\n\t\t\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t\tif (spouseInput.value !== (button.getAttribute('data-spouse') || '0')) {\n\t\t\t\t\t\t\t\t\t\tactivateSpouse(button);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\t\t}, { passive: true });\n\t\t\t\t\t\t})(spouseButtons[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tdependantsInput.addEventListener('change', calculate, false);\n\t\t\t\t\tdependantsInput.addEventListener('input', calculate, false);\n\t\t\t\t\ttravelInput.addEventListener('input', calculate, false);\n\t\t\t\t\ttravelInput.addEventListener('change', calculate, false);\n\t\t\t\t\ttravelInput.addEventListener('keyup', calculate, false);\n\n\t\t\t\t\tcalculate();\n\t\t\t\t})();\n\t\t\t\t<\/script>\n\n\t\t\n\n\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-9001","page","type-page","status-publish"],"acf":[],"_links":{"self":[{"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/pages\/9001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/comments?post=9001"}],"version-history":[{"count":1,"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/pages\/9001\/revisions"}],"predecessor-version":[{"id":9002,"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/pages\/9001\/revisions\/9002"}],"wp:attachment":[{"href":"https:\/\/theblueportugal.com\/ar\/wp-json\/wp\/v2\/media?parent=9001"}],"curies":[{"name":"\u0648\u0648\u0631\u062f\u0628\u0631\u064a\u0633","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}