@php $uid = 'ag_' . uniqid(); $labels = $aspectGrid['labels'] ?? []; $matrix = $aspectGrid['matrix'] ?? []; // ✅ Açı isimleri (type -> name) $aspectNames = [ '0' => t('synod'), '30' => '30°', '45' => '45°', '60' => t('sextile'), '90' => t('square'), '120' => t('triangle'), '135' => '135°', '150' => '150°', '180' => t('anti'), 'PAR' => t('parallel'), 'CPAR' => t('contra-parallel'), ]; // ✅ AI Chat için natal açı pairs verisi oluştur $natalPairsForJson = []; for ($i = 0; $i < count($labels); $i++) { for ($j = 0; $j < $i; $j++) { $cell = $matrix[$i][$j] ?? null; if ($cell) { $aspType = is_array($cell) ? $cell['type'] ?? '' : $cell; $aspOrb = is_array($cell) ? $cell['orb'] ?? 0 : 0; $natalPairsForJson[] = [ 'planet_a' => $labels[$i]['name'] ?? '', 'planet_a_sign' => $labels[$i]['sign'] ?? '', 'planet_b' => $labels[$j]['name'] ?? '', 'planet_b_sign' => $labels[$j]['sign'] ?? '', 'aspect_type' => $aspectNames[$aspType] ?? $aspType, 'orb' => $aspOrb, ]; } } } $natalJsonData = ['chart' => 'Natal', 'pairs' => $natalPairsForJson]; // Açı ikonları ve renkleri (aspect-pairs-table ile aynı) // ✅ Tooltip: hangi iki gezegenin kesişimi olduğu ilk satırda, açı adı ve orb // derecesi ikinci satırda gösterilir (native title tooltip'te \n ikinci satıra geçer). $icon = function ($t, $planetA = null, $planetB = null) use ($aspectNames) { $type = is_array($t) ? $t['type'] ?? '' : $t; $orb = is_array($t) ? ($t['orb'] ?? ($t['orb_val'] ?? 0)) : 0; $aspName = $aspectNames[(string) $type] ?? (string) $type; $title = $aspName . "\n" . number_format((float) $orb, 1) . '°'; if ($planetA && $planetB) { $title = e($planetA) . ' - ' . e($planetB) . "\n" . $title; } return match ((string) $type) { '0' => '', '30' => '', '45' => '', '60' => '', '90' => '', '120' => '', '135' => '', '150' => '', '180' => '', 'PAR' => '||', 'CPAR' => '', default => '', }; }; @endphp
{{-- Açı Tablosu --}}
{{-- ✅ 1) MATRİS (boyutları kilitli, saf hali) --}}
@for ($i = 0; $i < count($labels); $i++) @php $rowIsAst = !empty($labels[$i]['is_asteroid']); @endphp @for ($j = 0; $j <= $i; $j++) @php $colIsAst = !empty($labels[$j]['is_asteroid']); @endphp @if ($j < $i) @php $t = $matrix[$i][$j] ?? null; @endphp @else @endif @endfor @for ($k = $i + 1; $k < count($labels); $k++) @php $colIsAst2 = !empty($labels[$k]['is_asteroid']); @endphp @endfor @endfor
{!! $t ? $icon($t, $labels[$i]['name'] ?? '', $labels[$j]['name'] ?? '') : '' !!} @if (!empty($labels[$i]['is_plain_text'])) {!! $labels[$i]['glyph_html'] ?? '' !!} @else {!! $labels[$i]['glyph_html'] ?? '' !!} @endif
@if (!empty($fixedStarConjunctions)) @endif