<?php $__env->startSection('title', 'About US : Our Impact' ); ?>
<?php $__env->startSection('content'); ?>
<style>
    .about-us-wrap .banefits-list {
        margin-bottom: 10px;
    }

    .header-page-detail.about-us-wrap .scroll {
        margin-bottom: 0px;
        height: calc(100vh - 278px);
    }

    .banefits-list-detail {
        position: relative;
    }

    .banefits-list-detail .close-upload-item {
        right: -18px;
        top: -29px;
    }

    .video-preview video {
        width: 100%;
        height: 309px;
        object-fit: cover;
        border-radius: 10px;
    }

    .video-preview {
        height: 309px;
        width: 100%;
    }

    .image-preview img {
        width: 100%;
        height: 309px;
        object-fit: cover;
        border-radius: 10px;
    }

    .image-preview {
        height: 309px;
        width: 100%;
    }

    .dragging {
        border: 2px dashed #999;
        background: #f0f0f0;
    }

    .dropArea {
        border: 2px dashed #ccc;
        padding: 20px;
        text-align: left;
        margin-top: 10px;
    }

    .dropArea.highlight {
        border-color: #000;
    }
</style>
<div class="middle-part-wrap impact-page-wrap">
    <div class="header-page-wrap">
        <form id="ourPurposeFrm" enctype="multipart/form-data">
            <div class="header-page-detail about-us-wrap outimpact-wrap">
                <div class="scroll">
                    <div class="header-page-top-section">
                        <div class="header-page-top-section-detail-left">
                            <h4>Header Video</h4>
                            <?php
                                $headerVideoVisible =
                                    !empty($purposeDetails) &&
                                    $purposeDetails->fileType == 2 &&
                                    !empty($purposeDetails->filePath)
                                        ? ''
                                        : 'none';
                            ?>
                            <div class="uploader-wrap" id="video-upload" data-type="video">
                                <div class="uploader-button upBtnVideo">
                                    <a href="javascript:void(0);" class="file-input" data-type="video"
                                        data-input="header-video">
                                        <img src="<?php echo e(asset('images/play-icon.png')); ?>"
                                            style="display:<?php echo e(!empty($purposeDetails) && $purposeDetails->fileType == 2 && !empty($purposeDetails->filePath) ? 'none' : ''); ?>;">
                                    </a>
                                    <input type="file" id="header-video-file" name="header_video" accept="video/*"
                                        data-value="<?php echo e(!empty($purposeDetails) && $purposeDetails->fileType == 2 && !empty($purposeDetails->filePath) ? $purposeDetails->filePath : ''); ?>"
                                        style="display:none;">
                                </div>
                                <div class="uploader-text"
                                    style="display:<?php echo e(!empty($purposeDetails) && $purposeDetails->fileType == 2 && !empty($purposeDetails->filePath) ? 'none' : ''); ?>;">
                                    <p>Upload video (under <?php echo e(config('app.videoMaxSize')); ?>MB).</p>
                                </div>
                                <div class="close-upload-item">
                                    <a href="javascript:void(0);" class="remove-video" data-input="header-video"
                                        style="display:<?php echo e($headerVideoVisible); ?>;"><img
                                            src="<?php echo e(asset('images/close.png')); ?>"></a>
                                </div>
                                <div class="video-preview header-video-preview"
                                    style="display:<?php echo e($headerVideoVisible); ?>;">
                                    <video
                                        <?php if(!empty($purposeDetails) && $purposeDetails->fileType == 2): ?> src="<?php echo e(getMedia($purposeDetails->filePath)); ?>" <?php endif; ?>
                                        controls id="header-video-preview"></video>
                                </div>
                            </div>
                        </div>
                        <div class="saprator">
                            <p>OR</p>
                        </div>
                        <div class="header-page-top-section-detail-right">
                            <h4>Header Image</h4>
                            <?php
                                $headerImageVisible =
                                    !empty($purposeDetails) &&
                                    $purposeDetails->fileType == 1 &&
                                    !empty($purposeDetails->filePath)
                                        ? ''
                                        : 'none';
                            ?>
                            <div class="uploader-wrap" id="image-upload" data-type="image">
                                <div class="uploader-button">
                                    <a href="javascript:void(0);" class="file-input" data-type="image"
                                        data-input="header-image">
                                        <img src="<?php echo e(asset('images/image-icon.png')); ?>"
                                            style="display:<?php echo e(!empty($purposeDetails) && $purposeDetails->fileType == 1 && !empty($purposeDetails->filePath) ? 'none' : ''); ?>;">
                                    </a>
                                    <input type="file" id="header-image-file" name="header_image" accept="image/*"
                                        data-value="<?php echo e(!empty($purposeDetails) && $purposeDetails->fileType == 1 && !empty($purposeDetails->filePath) ? $purposeDetails->filePath : ''); ?>"
                                        style="display:none;">
                                </div>
                                <div class="uploader-text"
                                    style="display:<?php echo e(!empty($purposeDetails) && $purposeDetails->fileType == 1 && !empty($purposeDetails->filePath) ? 'none' : ''); ?>;">
                                    <p>Upload image (under <?php echo e(config('app.imageMaxSize')); ?>MB).</p>
                                </div>
                                <div class="close-upload-item">
                                    <a href="javascript:void(0);" class="remove-image" data-input="header-image"
                                        style="display:<?php echo e($headerImageVisible); ?>;"><img
                                            src="<?php echo e(asset('images/close.png')); ?>"></a>
                                </div>
                                <div class="image-preview header-image-preview"
                                    style="display:<?php echo e($headerImageVisible); ?>;">
                                    <img <?php if(!empty($purposeDetails) && $purposeDetails->fileType == 1 && !empty($purposeDetails->filePath)): ?> src="<?php echo e(getMedia($purposeDetails->filePath)); ?>" <?php endif; ?>
                                        id="header-image-preview">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="add-new-service-detail-bottom">
                        <div class="add-new-service-detail-bottom-box">
                            <h4>Header Title</h4>
                            <div class="form-group">
                                <input type="text" class="form-control" placeholder="Enter header title"
                                    name="title" value="<?php echo e(@$purposeDetails->title); ?>" maxlength="100">
                            </div>
                        </div>
                    </div>
                    <div class="add-new-service-detail-bottom">
                        <div class="add-new-service-detail-bottom-box">
                            <h4>Header Overview</h4>
                            <div class="form-group">
                                <textarea class="form-control" placeholder="Enter header overview" name="overview" maxlength="500"><?php echo e(@$purposeDetails->overview); ?></textarea>
                            </div>
                        </div>
                    </div>
                    
                    <div class="our-impact-wrap bottom-space-10">
                        <div class="leadership-top-header">
                            <h3>Impact</h3>
                            <a href="/admin/about-us/our-impact/add">Add New Impact</a>
                        </div>
                        <?php if(count($impacts) > 0): ?>
                        <div class="leadership-list-data">
                            <ul>
                                <?php $__currentLoopData = $impacts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li>
                                    <div class="leadership-list-text">
                                        <div class="leadership-bio-data">
                                            <div class="leadership-list-text-left">
                                                <img src="<?php echo e(getMedia($value->filePath)); ?>">
                                            </div>
                                            <div class="leadership-list-text-middle">
                                                <h5><?php echo e($value->title); ?></h5>
                                                <p><?php echo $value->description; ?></p>
                                            </div>
                                        </div>
                                        <div class="leadership-list-text-right">
                                            <ul>
                                                <li>
                                                    <a href="javascript:void(0);" data-id="<?php echo e($value->id); ?>"
                                                    data-key="<?php echo e($key); ?>"
                                                    data-fullname=""
                                                    class="delete deleteRecord">Delete</a>
                                                </li>
                                                <li>
                                                    <a href="/admin/about-us/our-impact/edit/<?php echo e($value->id); ?>" class="edit">Edit</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
                </div>
                <div class="submit-button">
                    <button type="submit" class="submit-btn"
                        id="submitBtn"><?php echo e(!empty($headerDetails) && !empty($headerDetails->id) ? 'Update' : 'Add'); ?></button>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" src="<?php echo asset('plugin/tinyeditor/tinymce.min.js'); ?>"></script>
<script type="text/javascript">
    var headerVideoElement = $('#header-video-file');
    var headerImageElement = $('#header-image-file');
    var headerVideoFile = null;
    var headerImageFile = null;
    var headerMediaFileName = null;

    var errorMessage = '';
    var isFileValid = false;

    const mediaElements = {
        'Header Video': $('#header-video-file'),
        'Header Image': $('#header-image-file')
    };
    var mediaPath = "<?php echo e(config('app.AWS_S3_URL')); ?>";

    $(document).ready(function() {
        activeLi('about us');
        $('#ourimpact').addClass("active");
        tinyEditor('culture_description');   
        $('input:not([type="file"])').addClass('removeSameValueAndSpace').addClass('required');
        $('textarea').addClass('removeSameValueAndSpace').addClass('required');
        $('#ourPurposeFrm').validate({
            submitHandler: function(form) {
                saveAboutRecord();
            }
        });

        $(document).on('click', '.file-input', function(event) {
            event.stopPropagation();
            const type = $(this).data('type');
            const inputContent = $(this).data('input');
            headerVideoFile = headerVideoElement.attr('data-value');
            headerImageFile = headerImageElement.attr('data-value');
            if (inputContent && (inputContent === 'header-image' && headerVideoFile) || (
                    inputContent === 'header-video' && headerImageFile)) {
                displayMessageModal(
                    `Please remove existing uploaded Header ${headerVideoFile ? 'video' : 'image'} before uploading a new Header ${type}.`,
                    'error');
                return;
            }
            if (inputContent == "header-video" || inputContent == "header-image") {
                $(`#${inputContent}-file`).val('');
                $(`#${inputContent}-file`).click();
            } else {
                $(`#${inputContent}-${type}-file`).val('');
                $(`#${inputContent}-${type}-file`).click();
            }
        });

        $(document).on('change', 'input[type="file"]', function(event) {
            event.stopPropagation();
            const type = $(this).attr('id').split('-')[1];
            const elementId = $(this).attr('id');
            let inputContent = null;
            if (elementId == "header-video-file" || elementId == "header-image-file") {
                inputContent = $(this).attr('id').split('-')[0] + '-' + $(this).attr('id')
                    .split('-')[1];
            } else {
                inputContent = $(this).attr('id').split('-')[0];
            }
            handleFileUpload(event, type,
                `${inputContent === "header-video" || inputContent === "header-image" ? `${inputContent}-preview` : `${inputContent}-${type}-preview`}`,
                inputContent);
        });

        function handleFileUpload(event, type, previewElement, inputContent) {
            var file = event.target.files[0];
            if (!file) return;
            var fileName = file.name.replace(/\s/g, "_");
            var validationResult = {
                isFileValid: false,
                errorMessage: ''
            };
            if (type === 'video') {
                validationResult = validateVideoFile(file);
            } else if (type === 'image') {
                validationResult = validateImageFile(file);
            }
            if (validationResult.isFileValid) {
                var reader = new FileReader();
                reader.onload = function(e) {
                    if (type === 'video' && inputContent) {
                        $(`.${previewElement}`).show();
                        $(`.file-input`).closest(
                                `[data-input="${inputContent == 'header-video' ? inputContent : inputContent.split('-')[0]}"]`
                            ).parent()
                            .css('display', 'none');
                        $(`.file-input`).closest(
                                `[data-input="${inputContent == 'header-video' ? inputContent : inputContent.split('-')[0]}"]`
                            ).parent()
                            .next().find('p').parent()
                            .css('display', 'none');
                        $(`.${previewElement}`).parent().find('a').show();
                        $(`#${previewElement}`).attr('src', e.target.result);
                        if (inputContent == "header-video") {
                            $(`#${inputContent}-file`).attr('data-value', e.target.result);
                            $(`#${inputContent}-file`).attr('data-filename', fileName);
                            $(`#${inputContent}-file`).prop('readonly', true);
                        } else {
                            $(`#${inputContent}-${type}-file`).attr('data-value', e.target.result);
                            $(`#${inputContent}-${type}-file`).attr('data-filename', fileName);
                            $(`#${inputContent}-${type}-file`).prop('readonly', true);
                        }
                        if (inputContent == "header-video") {
                            $(`.file-input`).closest(`[data-input="header-image"]`).parent().next().find(
                                'p').parent().css('display', '');
                            $(`.file-input[data-input="header-image"]`).find('img').attr('src',
                                "<?php echo e(asset('images/image-icon.png')); ?>").show();
                            $(`#header-image-preview`).attr('src', "");
                            $(`.header-image-preview`).hide();
                            $(`#header-image-file`).val('');
                            $(`#header-image-file`).attr('data-value', "");
                            $(`#header-image-file`).attr('data-filename', "");
                            $(`#header-image-file`).prop('readonly', false);
                            $('.remove-image[data-input="header-image"]').hide();
                            $(`.file-input[data-input="header-image"]`).parent().show();
                        }
                    } else if (type === 'image' && inputContent) {
                        $(`.${previewElement}`).show();
                        $(`.file-input`).closest(
                            `[data-input="${inputContent == 'header-image' ? inputContent : inputContent.split('-')[0]}"]`
                        ).parent().css('display', 'none');
                        $(`.file-input`).closest(
                            `[data-input="${inputContent == 'header-image' ? inputContent : inputContent.split('-')[0]}"]`
                        ).parent().next().find('p').parent().css('display', 'none');
                        $(`.${previewElement}`).parent().find('a').show();
                        $(`#${previewElement}`).attr('src', e.target.result);
                        if (inputContent == "header-image") {
                            $(`#${inputContent}-file`).attr('data-value', e.target.result);
                            $(`#${inputContent}-file`).attr('data-filename', fileName);
                            $(`#${inputContent}-file`).prop('readonly', true);
                        } else {
                            $(`#${inputContent}-${type}-file`).attr('data-value', e.target.result);
                            $(`#${inputContent}-${type}-file`).attr('data-filename', fileName);
                            $(`#${inputContent}-${type}-file`).prop('readonly', true);
                        }
                        if (inputContent == "header-image") {
                            $(`.file-input`).closest(`[data-input="header-video"]`).parent().next().find(
                                'p').parent().css('display', '');
                            $(`.file-input[data-input="header-video"]`).find('img').attr('src',
                                "<?php echo e(asset('images/play-icon.png')); ?>").show();
                            $(`#header-video-preview`).attr('src', "");
                            $(`.header-video-preview`).hide();
                            $(`#header-video-file`).val('');
                            $(`#header-video-file`).attr('data-value', "");
                            $(`#header-video-file`).attr('data-filename', "");
                            $(`#header-video-file`).prop('readonly', false);
                            $('.remove-video[data-input="header-video"]').hide();
                            $(`.file-input[data-input="header-video"]`).parent().show();
                        }
                    }
                };
                reader.readAsDataURL(file);
            } else {
                displayMessageModal(validationResult.errorMessage, 'error');
            }
        }

        $(document).on('click', '.remove-video,.remove-image', function(event) {
            event.stopPropagation();
            const uploaderWrap = $(this).closest('.uploader-wrap');
            const fileInput = uploaderWrap.find('input[type="file"]');
            const inputContent = $(this).attr('data-input');
            let previewElement = null;
            if (inputContent == "header-video" || inputContent == "header-image") {
                previewElement = `${inputContent}-preview`;
            } else {
                previewElement = `${inputContent}-${uploaderWrap.attr('data-type')}-preview`;
            }
            if (previewElement) {
                $(`.${previewElement}`).hide();
                $(`#${previewElement}`).attr('src', '');
                $(fileInput).parent().show();
                $(fileInput).closest('.file-input').show();
                $(fileInput).parent().find('img').show();
                $(fileInput).parent().next().find('p').parent().show();
                $(fileInput).attr('data-value', '');
                $(fileInput).attr('data-filename', '');
                $(fileInput).prop('readonly', false);
                $(this).hide();
            }
        });

        function validateVideoFile(file) {
            const validTypes = [
                'video/mp4',
            ];
            const maxSize = videoMaxSize * 1024 * 1024;

            if (!validTypes.includes(file.type)) {
                return {
                    isFileValid: false,
                    errorMessage: 'Invalid video format. Allowed only mp4 video format.'
                };
            }

            if (file.size > maxSize) {
                return {
                    isFileValid: false,
                    errorMessage: `Video file size exceeds ${videoMaxSize} MB.`
                };
            }

            return {
                isFileValid: true,
                errorMessage: ''
            };
        }

        function validateImageFile(file) {
            const validTypes = [
                'image/png',
                'image/jpeg',
                'image/jpg'
            ];
            const maxSize = imageMaxSize * 1024 * 1024;

            if (!validTypes.includes(file.type)) {
                return {
                    isFileValid: false,
                    errorMessage: 'Invalid image format. Allowed formats are png, jpg, jpeg and svg.'
                };
            }

            if (file.size > maxSize) {
                return {
                    isFileValid: false,
                    errorMessage: `Image file size exceeds ${imageMaxSize} MB.`
                };
            }

            return {
                isFileValid: true,
                errorMessage: ''
            };
        }

        $(document).on('dragover', '.uploader-wrap', function(event) {
            event.preventDefault();
            event.stopPropagation();
            $(this).addClass('dragging');
        });

        $(document).on('dragleave', '.uploader-wrap', function(event) {
            event.preventDefault();
            event.stopPropagation();
            $(this).removeClass('dragging');
        });

        $(document).on('drop', '.uploader-wrap', function(event) {
            event.preventDefault();
            event.stopPropagation();
            $(this).removeClass('dragging');
            const files = event.originalEvent.dataTransfer.files;
            if (files.length) {
                const file = files[0];
                const type = $(this).attr('data-type');
                const elementId = $(this).find('input[type="file"]').attr('id');
                let inputContent = null;
                if (elementId == "header-video-file" || elementId == "header-image-file") {
                    inputContent = `${elementId.split('-')[0]}-${elementId.split('-')[1]}`;
                } else {
                    inputContent = elementId.split('-')[0];
                }
                headerVideoFile = headerVideoElement.attr('data-value');
                headerImageFile = headerImageElement.attr('data-value');
                if (inputContent && (inputContent === 'header-image' && headerVideoFile) || (
                        inputContent === 'header-video' && headerImageFile) || (inputContent ===
                        'header-image' && headerImageFile) || (inputContent === 'header-video' &&
                        headerVideoFile)) {
                    displayMessageModal(
                        `Please remove existing uploaded Header ${headerVideoFile ? 'video' : 'image'} before uploading a new Header ${type}.`,
                        'error');
                    return;
                }
                const mockEvent = {
                    target: {
                        files: [file]
                    }
                };
                handleFileUpload(mockEvent, type,
                    `${inputContent === "header-video" || inputContent === "header-image" ? `${inputContent}-preview` : `${inputContent}-${type}-preview`}`,
                    inputContent);
            }
        });
    });

    function saveAboutRecord() {
        var isFormValid = true;
        headerVideoFile = headerVideoElement.attr('data-value');
        headerImageFile = headerImageElement.attr('data-value');
        var formData = new FormData($('#ourPurposeFrm')[0]);
        var token = "<?php echo e(csrf_token()); ?>";
        var url = "<?php echo e(url('admin/about-us/saveImpactDetails')); ?>";
        if (!validateMediaFiles(mediaElements)) {
            isFormValid = false;
            return;
        }
        if (isFormValid) {
            $('button[type="submit"]').attr('disabled', 'disabled').css({
                'background': '#031128',
                'color': '#ffffff',
                'cursor': 'not-allowed'
            });
            $('body').prepend('<div class="loader"></div>');
            if (headerVideoFile) {
                headerMediaFileName = headerVideoElement.attr('data-filename');
                formData.append('header_video', headerVideoFile);
                formData.append('fileType', 'video');
            } else if (headerImageFile) {
                headerMediaFileName = headerImageElement.attr('data-filename');
                formData.append('header_image', headerImageFile);
                formData.append('fileType', 'image');
            }
            formData.append('headerMediaFileName', headerMediaFileName);

            formData.append('_token', token);
            $.ajax({
                url: url,
                type: "POST",
                cache: false,
                contentType: false,
                processData: false,
                dataType: "json",
                data: formData,
                success: function(response) {
                    $('.loader').remove();
                    $('button[type="submit"]').removeAttr('disabled').css({
                        'background': '#ffffff',
                        'color': '#031128',
                        'cursor': 'pointer'
                    });
                    displayMessageModal(response.message, 'success', 'selfReload');
                },
                error: function(error) {
                    $('.loader').remove();
                    $('button[type="submit"]').removeAttr('disabled').css({
                        'background': '#ffffff',
                        'color': '#031128',
                        'cursor': 'pointer'
                    });
                    displayMessageModal(error.responseJSON.message, 'error');
                }
            });
        }
    }

    function validateMediaFiles(mediaElements) {
        let isFormValid = true;
        let missingImages = [];
        let headerVideoFile = mediaElements['Header Video'].attr('data-value');
        let headerImageFile = mediaElements['Header Image'].attr('data-value');
        if (!headerVideoFile && !headerImageFile) {
            missingImages.push('Header Video or Header Image');
        }
        for (let key in mediaElements) {
            if (key !== 'Header Video' && key !== 'Header Image') {
                const imageFile = mediaElements[key].attr('data-value');
                if (!imageFile) {
                    missingImages.push(key);
                }
            }
        }
        if (missingImages.length > 0) {
            let message = '<ul id="errorList">';

            if (!headerVideoFile && !headerImageFile) {
                message += '<li>Please upload Header Video or Image File.</li>';
            }
            if (missingImages.length > 0) {
                let otherMissingImages = missingImages.filter(item => item !== 'Header Video or Header Image');
                if (otherMissingImages.length > 0) {
                    let missingImagesMessage = otherMissingImages.length === 1 ?
                        otherMissingImages[0] :
                        otherMissingImages.slice(0, -1).join(', ') + ' and ' + otherMissingImages[otherMissingImages
                            .length - 1];
                    if (otherMissingImages.length === 1) {
                        message += `<li>Please upload ${missingImagesMessage} image.</li>`;
                    } else {
                        message += `<li>Please upload the following images: ${missingImagesMessage}.</li>`;
                    }
                }
            }
            message += '</ul>';
            displayMessageModal(message, 'error');
            isFormValid = false;
        }

        return isFormValid;
    }
    $(document).on('click', '.deleteRecord', function(e) {
        e.stopPropagation();
        var $this = $(this);
        var id = $this.attr('data-id');
        var name = $this.attr('data-fullname');
        var key = $this.attr('data-key');
        $('#confirmActiveInactive').attr('data-id', id);
        $('#confirmActiveInactive').attr('data-key', key);
        $('.activeInactiveModal .modal-body').html(
            `Are you want to delete ${name ? name.toUpperCase() : ''} record?`);
        $('.activeInactiveModal').modal('show');
    });
    $(document).on('click', '.close,#cancelActiveInactive', function(e) {
        e.preventDefault();
        $('#confirmActiveInactive').attr('data-id', '');
        $('#confirmActiveInactive').attr('data-key', '');
        $('.activeInactiveModal').modal('hide');
    });
    $(document).on('click', '#confirmActiveInactive', function(e) {
            e.preventDefault();
            $('.activeInactiveModal').modal('hide');
            var $this = $(this);
            var id = $this.attr('data-id');
            var key = $this.attr('data-key');
            var url = "<?php echo e(url('admin/about-us/our-impact/deleteImpact')); ?>";
            if (id) {
                $('body').prepend('<div class="loader"></div>');
                var formData = new FormData();
                var token = "<?php echo e(csrf_token()); ?>";
                formData.append('_token', token);
                formData.append('id', id);
                $.ajax({
                    url: url,
                    type: "POST",
                    cache: false,
                    contentType: false,
                    processData: false,
                    dataType: "json",
                    data: formData,
                    success: function(response) {
                        $('.loader').remove();
                        $('html, body').animate({
                            scrollTop: $('body').offset().top
                        }, 300);
                        $(`#record_${key}`).remove();
                        if ($('.listRecordsLi').length == 0) {
                            $('.listRecordsUl').html(`<li>
                            <div class="alert text-center alert-warning">
                                No records found.
                            </div>
                            </li>`);
                        }
                        $('.closeBtn').prop('disabled', true);
                        $('.closeBtn').hide();
                        displayMessageModal(response.message, 'success');
                        setTimeout(() => {
                            location.reload(true);
                        }, 2000);
                    },
                    error: function(error) {
                        $('.loader').remove();
                        displayMessageModal(error.responseJSON.message, 'error');
                    }
                });
            }
        });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/anser-backend/resources/views/about-us/ourimpact.blade.php ENDPATH**/ ?>