<!-- Backend Bundle JavaScript -->
<script src="<?php echo e(asset('js/backend-bundle.min.js')); ?>"></script>

<script src="<?php echo e(asset('js/raphael-min.js')); ?>"></script>

<script src="<?php echo e(asset('js/morris.js')); ?>"></script>
<script src="<?php echo e(asset('vendor/tinymce/js/tinymce/tinymce.min.js')); ?>"></script>
<script src="<?php echo e(asset('vendor/confirmJS/jquery-confirm.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/jquery.validate.min.js')); ?>"></script>
<script>
    // Text Editor code
      if (typeof(tinyMCE) != "undefined") {
         // tinymceEditor()
         function tinymceEditor(target, button, height = 200) {
            var rtl = $("html[lang=ar]").attr('dir');
            tinymce.init({
               selector: target || '.textarea',
               directionality : rtl,
               height: height,
               plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'help', 'wordcount' ],
               toolbar: 'undo redo | blocks | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help',
               content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
               automatic_uploads: false,
               /*file_picker_types: 'image',
               file_picker_callback: function(cb, value, meta) {
                  var input = document.createElement('input');
                  input.setAttribute('type', 'file');
                  input.setAttribute('accept', 'image/*');

                  input.onchange = function() {
                     var file = this.files[0];

                     var reader = new FileReader();
                     reader.onload = function() {
                        var id = 'blobid' + (new Date()).getTime();
                        var blobCache = tinymce.activeEditor.editorUpload.blobCache;
                        var base64 = reader.result.split(',')[1];
                        var blobInfo = blobCache.create(id, file, base64);
                        blobCache.add(blobInfo);

                        cb(blobInfo.blobUri(), { title: file.name });
                     };
                     reader.readAsDataURL(file);
                  };
                  input.click();
               }*/
            });
         }
      }
      function showCheckLimitData(id){
         var checkbox =  $('#'+id).is(":checked")
         if(checkbox == true){
            $('.'+id).removeClass('d-none')
         }else{
            $('.'+id).addClass('d-none')

         }
      }
</script>
<script>
   function formValidation(formId, rules, messages) {
      $(formId).validate({
         rules: rules,
         messages: messages,
         errorClass: "help-block error",
         highlight: function(element) {
            $(element).closest(".form-group.row").addClass("has-error");
         },
         unhighlight: function(element) {
            $(element).closest(".form-group.row").removeClass("has-error");
         },
         errorPlacement: function(error, element) {
            if (element.hasClass('select2js')) {
               error.insertAfter(element.next('.select2-container'));
            } else {
               error.insertAfter(element);
            }
         }
      });
      $('.select2js').on('change', function() {
         $(this).valid();
      });
  }
</script>
<?php if(isset($assets) && in_array('map', $assets)): ?>
    <script src="https://maps.googleapis.com/maps/api/js?key=<?php echo e(env('GOOGLE_MAP_KEY')); ?>&libraries=drawing" defer></script>
<?php endif; ?>
<?php echo $__env->yieldContent('bottom_script'); ?>

<!-- Masonary Gallery Javascript -->
<script src="<?php echo e(asset('js/masonry.pkgd.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/imagesloaded.pkgd.min.js')); ?>"></script>

<!-- Vectoe Map JavaScript -->
<script src="<?php echo e(asset('js/vector-map-custom.js')); ?>"></script>

<!-- Chart Custom JavaScript -->
<script src="<?php echo e(asset('js/customizer.js')); ?>"></script>

<!-- Chart Custom JavaScript -->
<script src="<?php echo e(asset('js/chart-custom.js')); ?>"></script>

<!-- slider JavaScript -->
<script src="<?php echo e(asset('js/slider.js')); ?>"></script>

<!-- Emoji picker -->
<script type="module" src="<?php echo e(asset('vendor/emoji-picker-element/index.js')); ?>"></script>
<script type="module" src="<?php echo e(asset('vendor/magnific-popup/js/jquery.magnific-popup.min.js')); ?>"></script>

<?php if(isset($assets) && (in_array('datatable',$assets))): ?>
<!-- <script src="<?php echo e(asset('vendor/datatables/js/jquery.dataTables.min.js')); ?>"></script> -->
<!-- <script src="<?php echo e(asset('vendor/datatables/js/dataTables.bootstrap4.min.js')); ?>"></script> -->
<!-- <script src="<?php echo e(asset('vendor/datatables/js/dataTables.buttons.min.js')); ?>"></script> -->
<!-- <script src="<?php echo e(asset('vendor/datatables/js/buttons.bootstrap4.min.js')); ?>"></script> -->
<script src="<?php echo e(asset('vendor/datatables/buttons.server-side.js')); ?>"></script>
<!-- <script src="<?php echo e(asset('vendor/datatables/js/dataTables.select.min.js')); ?>"></script> -->
<?php endif; ?>

<!-- app JavaScript -->
<?php if(isset($assets) && in_array('phone', $assets) ||  in_array('contact_nbr', $assets)): ?>
    <script src="<?php echo e(asset('vendor/intlTelInput/js/intlTelInput-jquery.min.js')); ?>"></script>
    <script src="<?php echo e(asset('vendor/intlTelInput/js/intlTelInput.min.js')); ?>"></script>
<?php endif; ?>

<script src="<?php echo e(asset('js/app.js')); ?>" defer></script>
<?php echo $__env->make('helper.app_message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<?php if(isset($assets) && (in_array('location',$assets))): ?>
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo e(env('GOOGLE_MAP_API_KEY')); ?>&libraries=places" defer></script>
<?php endif; ?>

<script src="<?php echo e(asset('js/sweetalert2.js')); ?>"></script>
<?php /**PATH /www/wwwroot/mxunzo.atharvatek.com/resources/views/partials/_scripts.blade.php ENDPATH**/ ?>