Path : /var/www/html/phkaymedia/vendor/livewire/livewire/src/Features/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/html/phkaymedia/vendor/livewire/livewire/src/Features/OptimizeRenderedDom.php |
<?php namespace Livewire\Features; use Livewire\Livewire; class OptimizeRenderedDom { static function init() { return new static; } protected $htmlHashesByComponent = []; function __construct() { Livewire::listen('component.dehydrate.initial', function ($component, $response) { $response->memo['htmlHash'] = hash('crc32b', $response->effects['html'] ?? ''); }); Livewire::listen('component.hydrate.subsequent', function ($component, $request) { $this->htmlHashesByComponent[$component->id] = $request->memo['htmlHash']; }); Livewire::listen('component.dehydrate.subsequent', function ($component, $response) { $oldHash = $this->htmlHashesByComponent[$component->id] ?? null; $response->memo['htmlHash'] = $newHash = hash('crc32b', $response->effects['html'] ?? ''); if ($oldHash === $newHash) { $response->effects['html'] = null; } }); Livewire::listen('flush-state', function() { $this->htmlHashesByComponent = []; }); } }