Snippets Collections
add_filter( 'eapro_field_typography_customwebfonts', 'eapro_field_typography_customwebfonts_modified' );
if( ! function_exists('eapro_field_typography_customwebfonts_modified')) {
    function eapro_field_typography_customwebfonts_modified() {
        // your custom fonts 
	$custom_fonts = array(
            'Spartan Light',
            'Spartan Regular',
        );
        return $custom_fonts;
    }
}
SELECT 
  content.title,
  content.body,
  content.published,
  author.url,
FROM 
  `3000_forum_boards___updated_daily___english.socialgist_boards_english_public`
  -- Make sure these parameters match the names you set for the dataset and tables
WHERE 
  content.published BETWEEN '2023-01-01' AND '2024-02-29'
  AND (content.body LIKE '%Super Bowl%' OR content.title LIKE '%Super Bowl%')
LIMIT 10;
SELECT
  content.title,
  content.body,
  content.published,
  author.url
FROM
  `200_boards___updated_daily___chinese.socialgist_boards_chinese_public`
-- Make sure the dataset and table selectors use the same name you set when you linked the dataset.
WHERE
  LOWER(content.body) LIKE '%经济%' 
-- The keyword is the word 'economy' in Chinese characters. You can change this to any keyword you wish to scan for in the content body. 
ORDER BY
  content.published DESC
LIMIT 10 -- Limits the results to 100 for demonstration purposes.
//All images in this app come from Code.organd are
//Creative Commons free to use 
var namesList = getColumn("100 Birds of the World", "Name");
var colorsList = getColumn("100 Birds of the World", "Primary Color");
var birdImageList = getColumn("100 Birds of the World", "Image of Bird");
var index = 0;

//Filtered Lists
var filternameList = [];
var filterbirdImageList = [];

onEvent("colorDropDown", "click", function( ) {
  var color = getText("colorDropDown");
  createFilteredList(color);
});

onEvent("leftButton", "click", function( ) {
  index = index - 1;
  updatescreen();
});

onEvent("rightButton", "click", function( ) {
  index = index + 1;
  updatescreen();
});

function createFilteredList(color) {
filterbirdImageList = [];
filternameList = [];
  for (var i = 0; i < colorsList.length; i++) {
    if (color == colorsList[i]) {
      appendItem(filterbirdImageList, birdImageList[i]);
      appendItem(filternameList, namesList[i]);
    }
  }
console.log(filternameList); 
updatescreen();
}

function updatescreen(){
  if (index > 0 && index < filternameList.length){
    setImageURL("birdImage", filterbirdImageList[index]);
    setText("nameLabel", filternameList[index]);
  } else {
    index = 0;
    setImageURL("birdImage", filterbirdImageList[index]);
    setText("nameLabel", filternameList[index]);
  }
}

//forgot to call the function "updatescreen" 
function product_dropdown_shortcode() {
    ob_start();

    // Query to get all products
    $products = get_posts(array(
        'post_type' => 'product',
        'posts_per_page' => -1,
    ));

    // Output the dropdown HTML
    ?>
    <select id="product_dropdown">
        <option value="">Select a product</option>
        <?php foreach ($products as $product) : ?>
            <option value="<?php echo esc_attr($product->ID); ?>"><?php echo esc_html($product->post_title); ?></option>
        <?php endforeach; ?>
    </select>
    <script>
        jQuery(function($) {
            // Initialize select2 for searchable dropdown
            $('#product_dropdown').select2();
        });
    </script>
    <?php

    return ob_get_clean();
}
add_shortcode('product_dropdown', 'product_dropdown_shortcode');
function enqueue_select2() {
    // Enqueue Select2 library
    wp_enqueue_script('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-beta.1/js/select2.min.js', array('jquery'), '4.1.0-beta.1', true);
    wp_enqueue_style('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-beta.1/css/select2.min.css', array(), '4.1.0-beta.1');
}
add_action('wp_enqueue_scripts', 'enqueue_select2');
-- SQL USER VOOR KLANT MET RESTRICTIES
CREATE USER aagbi_klant WITH PASSWORD = 'zm]vU!Cc<DBaUtJA';
GRANT SELECT ON SCHEMA :: [rep] TO aagbi_klant;
GRANT SELECT ON SCHEMA :: [rep_crs] TO aagbi_klant;
GRANT SELECT ON SCHEMA :: [pbi] TO aagbi_klant;
GRANT SELECT ON SCHEMA :: [aut] TO aagbi_klant;
 
-- MANAGED IDENTITY
CREATE USER [adf-aagbigen-p01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-p01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-p01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-p01];
GRANT EXECUTE TO [adf-aagbigen-p01];
 
-- SQL ONSDB USER ZONDER RESTRICTIES
CREATE USER aagbi_onsdb_klant WITH PASSWORD = '_WP_-@z[A<6e)55A';
ALTER ROLE db_datareader ADD MEMBER aagbi_onsdb_klant;
ALTER ROLE db_datawriter ADD MEMBER aagbi_onsdb_klant;
ALTER ROLE db_ddladmin ADD MEMBER aagbi_onsdb_klant;
GRANT EXECUTE TO aagbi_onsdb_klant;
 
-- MANAGED IDENTITY GEN
CREATE USER [adf-aagbigen-p01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-p01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-p01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-p01];
CREATE USER [adf-aagbigen-p02] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-p02];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-p02];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-p02];
CREATE USER [adf-aagbigen-s01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-s01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-s01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-s01];
CREATE USER [adf-aagbimgt-p01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbimgt-p01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbimgt-p01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbimgt-p01];
 
 
-- MANAGED IDENTITY CUS
CREATE USER [adf-aagbicus-p01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbicus-p01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbicus-p01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbicus-p01];
CREATE USER [adf-aagbigen-p02] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-p02];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-p02];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-p02];
CREATE USER [adf-aagbigen-s01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-s01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-s01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-s01];
CREATE USER [adf-aagbimgt-p01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbimgt-p01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbimgt-p01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbimgt-p01];
 
-- MANAGED IDENTITY STO
CREATE USER [adf-aagbigen-d01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-d01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-d01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-d01];
CREATE USER [adf-aagbigen-d02] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-d02];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-d02];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-d02];
CREATE USER [adf-aagbigen-a01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-a01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-a01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-a01];
CREATE USER [adf-aagbigen-a02] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-a02];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-a02];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-a02];
CREATE USER [adf-aagbigen-p01] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-p01];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-p01];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-p01];
CREATE USER [adf-aagbigen-p02] FROM  EXTERNAL PROVIDER  WITH DEFAULT_SCHEMA=[dbo]
ALTER ROLE db_datareader ADD MEMBER [adf-aagbigen-p02];
ALTER ROLE db_datawriter ADD MEMBER [adf-aagbigen-p02];
ALTER ROLE db_ddladmin ADD MEMBER [adf-aagbigen-p02];
 
-- SQL USER ZONDER RESTRICTIES
CREATE USER aagbi_klant WITH PASSWORD = 'wm2[>E-@q^aZm$-T';
ALTER ROLE db_datareader ADD MEMBER aagbi_klant;
ALTER ROLE db_datawriter ADD MEMBER aagbi_klant;
ALTER ROLE db_ddladmin ADD MEMBER aagbi_klant;
GRANT EXECUTE TO aagbi_klant;
 
-- SQL USER WACHTWOORD AANPASSEN
ALTER USER aagbi_klant WITH PASSWORD = '_WP_-@z[A<6e)55A';
 SELECT state_desc
    ,permission_name
    ,'ON'
    ,class_desc
    ,SCHEMA_NAME(major_id)
    ,'TO'
    ,USER_NAME(grantee_principal_id)
FROM sys.database_permissions AS PERM
JOIN sys.database_principals AS Prin
    ON PERM.grantee_principal_id  = Prin.principal_id
        AND class_desc = 'SCHEMA'
sudo -i sed '/deb cdrom:/s/ universe//' /etc/apt/sources.list
sudo add-apt-repository universe
controllers/project/projectAttributes/projectAttributes.controller.ts

import { PrismaClient } from "@prisma/client";
import { NextFunction, Request, Response } from "express";
import catchAsync from "../../../utils/catchAsync";
import AppError from "../../../utils/appError";
const prisma = new PrismaClient();
const createProjectCategory = catchAsync(
  async (req: Request, res: Response, next: NextFunction) => {
    const { name } = req.body;
    const businessId = req.params.business_id;
    const business = await prisma.business.findFirst({
      where: {
        id: businessId,
      },
    });
    if (!business) {
      return next(new AppError("This business doesn't exist", 400));
    }
    if (!name || name.length === 0) {
      return next(new AppError("Project category name can't be empty", 400));
    }

    const isProjectCategoryExit = await prisma.projectCategory.findFirst({
      where: { businessId: businessId, name: name },
    });

@@ -55,7 +55,114 @@ const createProjectCategory = catchAsync(

    res.status(200).json({
      projectCategories: projectCategories,
      message: "Project Category added successfully",
    });
  }
);

const editProjectCategory = catchAsync(
  async (req: Request, res: Response, next: NextFunction) => {
    const { name } = req.body;

    const businessId = req.params.business_id;
    const categoryId = req.params.category_id;

    const business = await prisma.business.findFirst({
      where: {
        id: businessId,
      },
    });

    if (!business) {
      return next(new AppError("This business doesn't exist", 400));
    }

    if (!name || name.length === 0) {
      return next(new AppError("Project category name can't be empty", 400));
    }

    const isProjectCategoryExist = await prisma.projectCategory.findFirst({
      where: { businessId: businessId, id: categoryId },
    });

    if(!isProjectCategoryExist) {
      return next(new AppError("Project category doesn't exist", 400));
    }

    const isProjectCategoryNameExit = await prisma.projectCategory.findFirst({
      where: { businessId: businessId, name: name },
    });

    if (isProjectCategoryNameExit) {
      return next(
        new AppError(
          "This project category already exist in this business",
          400
        )
      );
    }

    await prisma.projectCategory.update({
      where: {
        id: categoryId
      },
      data: {
        name,
        business: {
          connect: {
            id: businessId,
          },
        },
      },
    });

    const projectCategories = await prisma.projectCategory.findMany({
      where: { businessId: businessId },
    });

    res.status(200).json({
      projectCategories: projectCategories,
      message: "Project category edited successfully",
    });
  }
);

const deleteProjectCategory = catchAsync(
  async (req: Request, res: Response, next: NextFunction) => {
    const businessId = req.params.business_id;
    const categoryId = req.params.category_id;

    const business = await prisma.business.findFirst({
      where: {
        id: businessId,
      },
    });

    if (!business) {
      return next(new AppError("This business doesn't exist", 400));
    }

    const isProjectCategoryExist = await prisma.projectCategory.findFirst({
      where: { businessId: businessId, id: categoryId },
    });

    if(!isProjectCategoryExist) {
      return next(new AppError("Project category doesn't exist", 400));
    }

    await prisma.projectCategory.delete({
      where: {
        id: categoryId
      },
    });

    const projectCategories = await prisma.projectCategory.findMany({
      where: { businessId: businessId },
    });

    res.status(200).json({
      projectCategories: projectCategories,
      message: "Project category deleted successfully",
    });
  }
);
@@ -107,7 +214,112 @@ const createProjectTag = catchAsync(

    res.status(200).json({
      projectTags: projectTags,
      message: "Project Tag added successfully",
      message: "Project tag added successfully",
    });
  }
);

const editProjectTag = catchAsync(
  async (req: Request, res: Response, next: NextFunction) => {
    const { name } = req.body;

    const businessId = req.params.business_id;
    const tagId =  req.params.tag_id;

    const business = await prisma.business.findFirst({
      where: {
        id: businessId,
      },
    });

    if (!business) {
      return next(new AppError("This business doesn't exist", 400));
    }

    if (!name || name.length === 0) {
      return next(new AppError("Project tag name can't be empty", 400));
    }

    const isProjectTagExist = await prisma.projectTag.findFirst({
      where: { businessId: businessId, id: tagId },
    });

    if(!isProjectTagExist) {
      return next(new AppError("Project tag doesn't exist", 400));
    }

    const isProjectTagNameExit = await prisma.projectTag.findFirst({
      where: { businessId: businessId, name: name },
    });

    if (isProjectTagNameExit) {
      return next(
        new AppError("This project tag already exist in this business", 400)
      );
    }

    await prisma.projectTag.update({
      where: {
        id: tagId
      },
      data: {
        name,
        business: {
          connect: {
            id: businessId,
          },
        },
      },
    });

    const projectTags = await prisma.projectTag.findMany({
      where: { businessId: businessId },
    });

    res.status(200).json({
      projectTags: projectTags,
      message: "Project tag edited successfully",
    });
  }
);

const deleteProjectTag = catchAsync(
  async (req: Request, res: Response, next: NextFunction) => {
    const businessId = req.params.business_id;
    const tagId =  req.params.tag_id;

    const business = await prisma.business.findFirst({
      where: {
        id: businessId,
      },
    });

    if (!business) {
      return next(new AppError("This business doesn't exist", 400));
    }


    const isProjectTagExist = await prisma.projectTag.findFirst({
      where: { businessId: businessId, id: tagId },
    });

    if(!isProjectTagExist) {
      return next(new AppError("Project tag doesn't exist", 400));
    }

    await prisma.projectTag.delete({
      where: {
        id: tagId
      },
    });

    const projectTags = await prisma.projectTag.findMany({
      where: { businessId: businessId },
    });

    res.status(200).json({
      projectTags: projectTags,
      message: "Project tag deleted successfully",
    });
  }
);
@@ -148,6 +360,10 @@ const getProjectAttributes = catchAsync(

export default {
  createProjectCategory,
  editProjectCategory,
  deleteProjectCategory,
  getProjectAttributes,
  createProjectTag,
  editProjectTag,
  deleteProjectTag
};


////another file
prisma/dbml/schema.dbml
Table Invoice {
  address String
  phone String
  email String
  description String
  note String
  description Json
  note Json
  invoiceItems InvoiceItem [not null]
  subTotalPrice Float
  discountPrice Float
  
 ////ANPOTHER FILE
  router/business.router.ts
@@ -229,11 +229,33 @@ business_router
        projectAttributesController.createProjectCategory
    );

business_router
    .route("/business/:business_id/project-category/:category_id/")
    .patch(
        checkAccess.businessActionRestrcition("create-project-category"),
        projectAttributesController.createProjectCategory
    )
    .delete(
        checkAccess.businessActionRestrcition("create-project-category"),
        projectAttributesController.deleteProjectCategory
    );

business_router
    .route("/business/:business_id/project-tag/")
    .post(
        checkAccess.businessActionRestrcition("create-project-tag"),
        projectAttributesController.createProjectTag
    );

business_router
    .route("/business/:business_id/project-tag/:tag_id/")
    .patch(
        checkAccess.businessActionRestrcition("create-project-tag"),
        projectAttributesController.editProjectTag
    )
    .delete(
        checkAccess.businessActionRestrcition("create-project-tag"),
        projectAttributesController.deleteProjectTag
    );

export { business_router };
import math


class Circle:
    def __init__(self, radius):
        self._radius = radius
        self._area = None

    @property
    def radius(self):
        return self._radius

    @radius.setter
    def radius(self, value):
        if value < 0:
            raise ValueError('Radius must be positive')

        if value != self._radius:
            self._radius = value
            self._area = None

    @property
    def area(self):
        if self._area is None:
            self._area = math.pi * self.radius ** 2

        return self._area
Code language: Python (python)
numbers = (*odd_numbers, *even_numbers)
print(numbers)
Code language: Python (python)
numbers = (*odd_numbers, *even_numbers)
print(numbers)
Code language: Python (python)
numbers = (*odd_numbers, *even_numbers)
print(numbers)
Code language: Python (python)
add_filter(
    'sp_wpcp_image_attachments',
    function( $attachments, $shortcode_id ) {
        // your shortocde id
        if ( '1252' === $shortcode_id ) {
            $gallery     = get_field('gallery');
            if ( is_array( $gallery ) ) {
                $attachments = $gallery;
            }
        }
        return $attachments;
    },
    10,
    2
);
// add back to text
function add_back_to_text_before_breadcrumbs($crumbs) {
    // Check if it's a product category page
    if (is_product_category()) {
        // Check if there are at least two breadcrumbs (home and one category)
        if (count($crumbs) >= 1) {
            // Get the first breadcrumb (home)
            $home_breadcrumb = reset($crumbs);

            // Get the depth of the first category
            $first_category_depth = $home_breadcrumb[2]['depth'];

            // Check if it's the first-level category
            if ($first_category_depth === 0) {
                // Add "Back to: " before the breadcrumbs
                array_unshift($crumbs, array('text' => 'Back to: ', 'url' => home_url('/')));
            }
        }
    }

    return $crumbs;
}
add_filter('woocommerce_get_breadcrumb', 'add_back_to_text_before_breadcrumbs', 10, 2);
Thật sự ghét loại khuôn mẫu này. Đặc biệt ghét loại người này.
Mình k biết mình nhiều tuổi hơn bạn không.
Mình cũng k biết cuộc sống mình và bạn cách nhau nhiều k.
Nhưng mà còn người thay đổi theo k gian sống. Ta không xứng tầm với nơi ở.
Con người thay đổi k gian sống. Nơi ở k xứng tầm với ta.
Vì vậy cư xử bình thường, thoải mái là được. Những tiểu tiết là ánh nhìn của bọn nhìn những thứ mình k xứng tầm. Sự thoải mái là cách cư xử đúng về những thứ của mình.
<!-- wp:social-links --><ul class="wp-block-social-links"><!-- wp:social-link {"url":"https://gravatar.com/will1234565a758999c15","service":"chain","label":"test","rel":"me"} /--></ul><!-- /wp:social-links -->
{"status":401,"message":"invalid csrf token"}
#include <stdio.h>

int main() {
    float a, b;
    float *p1;
    float *p2;
    
    p1 = &a;
    p2 = &b;
    
    printf("Entrer a : ");
    scanf("%d", p1);
    printf("Entrer b : ");
    scanf("%d", p2);
    
    printf("a + b = %.2f\n", *p1 + *p2);
    printf("a - b = %.2f\n", *p1 - *p2);
    printf("a * b = %.2f\n", *p1 * *p2);

    if(*p2 != 0)
        printf("a / b = %.2f\n", *p1 / *p2);
    else
        printf("La division par 0 est impossible.");

    return 0;
}
#include <stdio.h>

int main() {
    int a;
    int *p;
    
    p = &a;
    
    printf("Entrer a : ");
    scanf("%d", p);

    if(*p % 2 == 0)
        printf("Le nombre %d est pair", *p);
    else
        printf("Le nombre %d est impair", *p);

    return 0;
}
#include <stdio.h>

int main() {
    int a;
    int *p;
    
    p = &a;
    
    printf("Entrer a : ");
    scanf("%d", p);

    printf("Les diviseurs du nombre %d sont : ", *p);
    int i = 1; 
    while(i <= *p) { 
        if (*p % i == 0) {
            printf("%d ", i);
        }
        i++;
    }
        
    return 0;
}
#include <stdio.h>

int main() {
    float a, b;
    float *p1;
    float *p2;
    
    p1 = &a;
    p2 = &b;
    
    printf("Entrer a : ");
    scanf("%f", p1);
    printf("Entrer b : ");
    scanf("%f", p2);
    
    if((*p1 * *p2) >= 0) {
        printf("Même signe :\n");
        printf("La valeur de a est %.2f et la valeur de b est %.2f.", *p2, *p1);
    } else { 
        *p1 = *p1 + *p2;
        *p2 = *p1 * *p2;
        printf("Différent signe :\n");
        printf("La valeur de a est %.2f et la valeur de b est %.2f.", *p1, *p2);
    }
    
    return 0;
}
selector li.elementor-icon-list-item.elementor-inline-item > span {
    display: none;
}
clientIPAddress 183.82.120.213
X-ClientId: 163B959F1BEA47B98367ADE37A6F9743
X-FEServer PN3PR01CA0063
Date:2/28/2024 1:35:22 PM
<!--HTML Code-->
  
  <form id="contact_form" method="post">
    <div class="row">
        <div class="col-md-12 form-group g-mb-20">
            <input type="text" class="form-control" id="txtContactName" name="txtContactName" placeholder="Full Name" tabindex="201" required>
            <div class="error-message" id="txtContactName-error"></div>
        </div>

        <div class="col-md-12 form-group g-mb-20">
            <input type="email" class="form-control" id="txtContactEmail" name="txtContactEmail" placeholder="Email Address" tabindex="202" required>
            <div class="error-message" id="txtContactEmail-error"></div>
        </div>

        <div class="col-md-12 form-group g-mb-20">
            <input type="text" class="form-control" id="txtContactPhone" name="txtContactPhone" placeholder="Contact Number" maxlength="10" tabindex="203" required>
            <div class="error-message" id="txtContactPhone-error"></div>
        </div> 

        <div class="col-md-12 form-group g-mb-40">
            <textarea class="form-control" id="txtContactMessage" name="txtContactMessage" rows="7" placeholder="Message" maxlength="160" tabindex="204" required></textarea>
            <div class="error-message" id="txtContactMessage-error"></div>
        </div>
    </div>
    <input type="submit" class="btn btn-lg u-btn-primary g-font-weight-600 g-font-size-default rounded-0 text-uppercase g-py-15 g-px-30" id="btnContactSubmit" name="btnContactSubmit" value="SUBMIT">
</form>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>
<script>
	
</script>
<script>
    $(document).ready(function() {
        $('#contact_form').validate({
            rules: {
                txtContactName: "required",
                txtContactEmail: {
                    required: true,
                    email: true
                },
                txtContactPhone: {
                    required: true,
                    digits: true,
                    maxlength: 10
                },
                txtContactMessage: "required"
            },
            messages: {
                txtContactName: "Please enter your full name",
                txtContactEmail: {
                    required: "Please enter your email address",
                    email: "Please enter a valid email address"
                },
                txtContactPhone: {
                    required: "Please enter your contact number",
                    digits: "Please enter only digits",
                    maxlength: "Please enter a valid 10-digit phone number"
                },
                txtContactMessage: "Please enter your message"
            },
            errorPlacement: function(error, element) {
                error.appendTo(element.closest('.form-group').find('.error-message'));
            },
            submitHandler: function(form) {
                var formData = $(form).serialize();
                $.ajax({
                    type: 'POST',
                    url: 'mail.php',
                    data: formData,
                    success: function(response) {
                        $('#contact_form').append('<div class="success-message" style="color: green;">Message sent successfully!</div>');
                        setTimeout(function() {
                            $('#contact_form')[0].reset();
                        }, 4000);
                    },
                    error: function(xhr, status, error) {
                        console.error(xhr.responseText);
                        alert('Error: ' + xhr.responseText);
                    }
                });
            }
        });
    });
</script>

PHP Miler folder should be there
Create folder name with mail.php and add below code there 
<?php
// Include PHPMailer autoload file

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

// Load Composer's autoloader
require 'phpmailer/vendor/autoload.php';

// Check if the form is submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Retrieve form data
    $name = $_POST['txtContactName'];
    $email = $_POST['txtContactEmail'];
    $phone = $_POST['txtContactPhone'];
    $message = $_POST['txtContactMessage'];

    // Initialize PHPMailer
    $mail = new PHPMailer(true);
    try {
        // SMTP settings
		$mail->IsSMTP();        // Sets Mailer to send message using SMTP
		$mail->SMTPAuth = true; // Authentication enabled
		$mail->SMTPSecure = 'tls'; // Secure transfer enabled REQUIRED for Gmail
		$mail->Host = 'smtp-relay.brevo.com';
		$mail->Port = 587;
		$mail->Username = 'advanceindiaprojectltd@gmail.com';
		$mail->Password = 'xsmtpsib-e66045ab99d2f28608d548ca33a5a3ac8cc14a6896d682cbdc5418c80154b5eb-6B5QJOyT18GvbzmZ';
		$mail->SMTPOptions = array(
			'ssl' => array(
				'verify_peer' => false,
				'verify_peer_name' => false,
				'allow_self_signed' => true
			)
		);

        // Recipients
        $mail->setFrom($email, $name);
        $mail->addAddress('roshan@teamvariance.com'); // Add recipient email address

        // Content
        $mail->isHTML(true);
        $mail->Subject = 'Contact Form Submission';
		// Construct HTML table for the email body
        $message = '
            <h3 align="center">Details</h3>
            <table border="1" width="100%" cellpadding="5" cellspacing="5">
                <tr>
                    <td width="30%">Name</td>
                    <td width="70%">' . $name . '</td>
                </tr> 
                <tr>
                    <td width="30%">Email</td>
                    <td width="70%">' . $email . '</td>
                </tr>
                <tr>
                    <td width="30%">Phone</td>
                    <td width="70%">' . $phone . '</td>
                </tr>
                <tr>
                    <td width="30%">Message</td>
                    <td width="70%">' . $message . '</td>
                </tr>
            </table>
        ';
        $mail->Body = $message;

        // Send email
        $mail->send();
        
        // Return success message
        echo "success";
    } catch (Exception $e) {
        // Return error message
        echo "error";
    }
}
?>



#include <stdio.h>

void main() {
    int arr1[50][50], brr1[50][50], crr1[50][50], i, j, n;

    // Prompt user for input
    printf("\n\nAddition of two Matrices :\n");
    printf("------------------------------\n");
    printf("Input the size of the square matrix (less than 5): ");
    scanf("%d", &n);

    // Input elements for the first matrix
    printf("Input elements in the first matrix :\n");
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++) {
            printf("element - [%d],[%d] : ", i, j);
            scanf("%d", &arr1[i][j]);
        }
    }

    // Input elements for the second matrix
    printf("Input elements in the second matrix :\n");
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++) {
            printf("element - [%d],[%d] : ", i, j);
            scanf("%d", &brr1[i][j]);
        }
    }

    // Display the first matrix
    printf("\nThe First matrix is :\n");
    for (i = 0; i < n; i++) {
        printf("\n");
        for (j = 0; j < n; j++)
            printf("%d\t", arr1[i][j]);
    }

    // Display the second matrix
    printf("\nThe Second matrix is :\n");
    for (i = 0; i < n; i++) {
        printf("\n");
        for (j = 0; j < n; j++)
            printf("%d\t", brr1[i][j]);
    }

    // Calculate the sum of the matrices
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
            crr1[i][j] = arr1[i][j] + brr1[i][j];

    // Display the addition of two matrices
    printf("\nThe Addition of two matrix is : \n");
    for (i = 0; i < n; i++) {
        printf("\n");
        for (j = 0; j < n; j++)
            printf("%d\t", crr1[i][j]);
    }
    printf("\n\n");
}

#include <stdio.h>

int main() {
    // Declare matrices and variables
    int arr1[50][50], brr1[50][50], crr1[50][50], i, j, k, r1, c1, r2, c2, sum = 0;

    // Display multiplication of two matrices
    printf("\n\nMultiplication of two Matrices :\n");
    printf("----------------------------------\n");

    // Input rows and columns of the first matrix
    printf("\nInput the rows and columns of the first matrix: ");
    scanf("%d %d", &r1, &c1);

    // Input rows and columns of the second matrix
    printf("\nInput the rows and columns of the second matrix: ");
    scanf("%d %d", &r2, &c2);

    // Check if multiplication is possible
    if (c1 != r2) {
        printf("Multiplication of matrices is not possible.\n");
        printf("Column of the first matrix and row of the second matrix must be the same.\n");
    } else {
        // Input elements in the first matrix
        printf("Input elements in the first matrix:\n");
        for (i = 0; i < r1; i++) {
            for (j = 0; j < c1; j++) {
                printf("element - [%d],[%d] : ", i, j);
                scanf("%d", &arr1[i][j]);
            }
        }

        // Input elements in the second matrix
        printf("Input elements in the second matrix:\n");
        for (i = 0; i < r2; i++) {
            for (j = 0; j < c2; j++) {
                printf("element - [%d],[%d] : ", i, j);
                scanf("%d", &brr1[i][j]);
            }
        }

        // Display the first matrix
        printf("\nThe First matrix is:\n");
        for (i = 0; i < r1; i++) {
            printf("\n");
            for (j = 0; j < c1; j++)
                printf("%d\t", arr1[i][j]);
        }

        // Display the second matrix
        printf("\nThe Second matrix is:\n");
        for (i = 0; i < r2; i++) {
            printf("\n");
            for (j = 0; j < c2; j++)
                printf("%d\t", brr1[i][j]);
        }

        // Matrix multiplication
        for (i = 0; i < r1; i++) { // Row of first matrix
            for (j = 0; j < c2; j++) { // Column of second matrix
                sum = 0;
                for (k = 0; k < c1; k++)
                    sum = sum + arr1[i][k] * brr1[k][j];
                crr1[i][j] = sum;
            }
        }

        // Display the result of matrix multiplication
        printf("\nThe multiplication of two matrices is:\n");
        for (i = 0; i < r1; i++) {
            printf("\n");
            for (j = 0; j < c2; j++)
                printf("%d\t", crr1[i][j]);
        }
    }
    printf("\n\n");
    return 0;
}
const handleUpdate=()=>{
  toast.promise(
                axiosInstance
                    .patch(
                        `api/business/${businessId}/department/${department.id}`,
                        values,
                        {
                            headers: {
                                "Content-Type": "application/json",
                            },
                        }
                    )
                    .then((res) => {
                        setDepartments(res.data.departments);
                    })
                    .finally(() => {
                        setIsLoading(false);
                    }),
                {
                    loading: "updating the department",
                    success: "Department is updated",
                    error: (err) =>
                        err?.response?.data?.message
                            ? err?.response.data?.message
                            : err?.response?.data,
                }
            );
  
}
  var newStafflist = [];
  for (var i = 0; i < staffdata.length; i++) {
    var department = staffdata[i][4];
    if (depData.flat().includes(department) && department !== "") {
      newStafflist.push([staffdata[i][2], staffdata[i][3], staffdata[i][4], staffdata[i][5], staffdata[i][8], staffdata[i][9], staffdata[i][10], staffdata[i][7]]);
    }
  }
<div id="checkout-step_calendar" class="step-content" data-role="content" role="tabpanel" aria-hidden="false">
    <form class="form calendar" id="co-calendar-form" novalidate="novalidate">
      <div class="shipping-calendar-items">
        <!--ko foreach: { data: method.data, as: 'day'}-->
        <div class="shipping-calendar-item">
          <div class="title">
            <span class="day" data-bind="text: day.short_date"></span>
            <span class="week" data-bind="text: '('+$t(day.short_day)+')'"></span>
            <!-- ko if: day.available && day.urgent_shipping_fee-->
            <span class="urgent-label" data-bind="i18n: 'Urgent Order'"></span>
            <!-- /ko -->
          </div>
          <div class="content">
            <!-- ko if: day.available -->
            <div class="field">
              <!-- ko if: day.urgent_shipping_fee -->
              <input type="radio" class="radio" name="delivery-date" data-bind="value: day.date, attr: {id: day.date, 'data-urgent-price-id':day.urgent_price_id}, click: function(data, event){ return $parents[1].selectDeliveryDate(day) }">
              <!-- /ko -->
              <!-- ko ifnot: day.urgent_shipping_fee -->
              <input type="radio" class="radio" name="delivery-date" data-bind="value: day.date, attr: {id: day.date}, click: function(data, event){ return $parents[1].selectDeliveryDate(day) }">
              <!-- /ko -->
              <!-- ko if: day.urgent_shipping_fee -->
              <label class="label" data-bind="attr:{for:day.date},html:$t('Urgent Order Fee<span>(incl. delivery)</span>')"></label>
              <!-- /ko -->
              <!-- ko ifnot: day.urgent_shipping_fee -->
              <!-- ko if: $parents[1].currentSelectedMethod().extension_attributes -->
              <!-- ko if : ($parents[1].currentSelectedMethod().extension_attributes.free_weekdays).indexOf(day.short_day) === -1-->
              <label class="label" data-bind="attr:{for:day.date},i18n:'Delivery'"></label>
              <!-- /ko -->
              <!-- ko ifnot : ($parents[1].currentSelectedMethod().extension_attributes.free_weekdays).indexOf(day.short_day) === -1-->
              <label class="label" data-bind="style:{color:'red','font-weight':'bold'},attr:{for:day.date},i18n:'Free Delivery'"></label>
              <!-- /ko -->
              <!-- /ko -->

              <!-- /ko -->
              <!-- ko foreach: $parents[1].getRegion('price') -->
              <!-- ko template: getTemplate() --><!-- /ko -->
              <!-- /ko -->
              <!-- ko if: day.urgent_shipping_fee -->
              <strong>*</strong>
              <!-- /ko -->
            </div>
            <!-- ko if: 0 -->
            <div class="field">
              <!-- ko if: day.urgent_shipping_fee -->
              <input type="radio" class="radio delivery-date-time" name="delivery-date" data-bind="value: day.date + '_time', attr: {id: day.date + '_time', 'data-urgent-price-id':day.urgent_price_id}, click: function(data, event){ return $parents[1].selectDeliveryDateWithSpecificTimeslot(day) }">
              <!-- /ko -->
              <!-- ko ifnot: day.urgent_shipping_fee -->
              <input type="radio" class="radio delivery-date-time" name="delivery-date" data-bind="value: day.date + '_time', attr: {id: day.date + '_time'}, click: function(data, event){ return $parents[1].selectDeliveryDateWithSpecificTimeslot(day) }">
              <!-- /ko -->
              <select class="timeslot-select" data-bind="attr:{name: day.date + '_timeslot', id: day.date + '_timeslot'}, event:{ change: $parents[1].selectDeliveryTimeslot }">
                <!-- ko if: day.urgent_shipping_fee -->
                <option data-bind="i18n:'Specific Time'" value=""></option>
                <!-- /ko -->
                <!-- ko ifnot: day.urgent_shipping_fee -->
                <option data-bind="i18n:'Specific Time'" value=""></option>
                <!-- /ko -->
                <!--ko foreach: { data: day.timeslots, as: 'timeslot'}-->
                <option data-bind="value: timeslot, text: timeslot"></option>
                <!-- /ko -->
              </select>
              <!-- ko foreach: $parents[1].getRegion('timeslot-price') -->
              <!-- ko template: getTemplate() --><!-- /ko -->
              <!-- /ko -->
              <!-- ko if: day.urgent_shipping_fee --><strong>*</strong><!-- /ko -->
            </div>
            <!-- /ko -->
            <!-- /ko -->
            <!-- ko ifnot: day.available -->
            <div class="field">
              <span data-bind="i18n:'Today Close'"></span>
            </div>
            <!-- /ko -->

            <!-- ko if: day.available && day.urgent_shipping_fee-->
            <div class="field notes">
              <span data-bind="i18n: '*The price is included the urgent fee.'"></span>
            </div>
            <!-- /ko -->
          </div>
        </div>
        <!-- /ko -->
      </div>
    </form>
  </div>

Don't put space in calc:

class="w-[calc(100%+2rem)]"
new_stocks = {symbol: price * 1.02 for (symbol, price) in stocks.items()}

Code language: Python (python)
// Function to create the custom product dropdown shortcode
function custom_product_dropdown_shortcode() {
  ob_start(); // Start output buffering

  // Get the referring URL and selected product name
  $referring_url = wp_get_referer();
  $selected_product_name = '';
  $selected_product_id = ''; // Initialize for product ID selection

  if ($referring_url) {
    $url_parts = parse_url($referring_url);
    if (isset($url_parts['path'])) {
      $path_parts = explode('/', $url_parts['path']);
      $product_index = array_search('product', $path_parts);
      if ($product_index !== false && isset($path_parts[$product_index + 1])) {
        $selected_product_name = $path_parts[$product_index + 1];
        $selected_product_id = $path_parts[$product_index + 1]; // Assuming product ID in URL
      }
    }
  }

  // Create the dropdown with search functionality using Select2
  echo '<select id="product_name" name="product_name">';
  echo '<option value="">Select Product</option>';
  echo '<option data-tokens="Search Products" disabled hidden></option>'; // Search placeholder

  $products = array(); // Store product data for filtering

  $query = new WP_Query(array(
    'post_type' => 'product',
    'post_status' => 'publish',
    'posts_per_page' => '-1'
  ));

  if ($query->have_posts()) :
    while ($query->have_posts()) : $query->the_post();
      $product = wc_get_product(get_the_ID());
      $price = $product->get_price_html();
      $selected = '';
      // Use product name for comparison
      if (get_the_title() === $selected_product_name) {
        $selected = 'selected="selected"';
      }

      $products[] = array(
        'id' => get_the_title(), // Store product name instead of ID
        'text' => get_the_title() 
      );
    endwhile;
  else:
    echo '<option value="">No products found</option>';
  endif;

  wp_reset_postdata();

  foreach ($products as $product) {
    echo '<option value="' . $product['id'] . '" ' . $selected . '>' . $product['text'] . '</option>';
  }

  echo '</select>';

  // Enqueue JavaScript for search functionality
  wp_enqueue_script('select2'); // Assuming you've added the Select2 library
  ?>
  <script>
    jQuery(function($) {
      $('#product_name').select2({
        data: <?php echo json_encode(array_map(function($product) {
          return array('id' => $product['id'], 'text' => $product['text']);
        }, $products)); ?>,
        placeholder: 'Search Products'
      });
    });
  </script>
  <?php

  return ob_get_clean(); // Return the output and clean buffer
}

// Add the shortcode to WordPress
add_shortcode('custom_product_dropdown', 'custom_product_dropdown_shortcode');







//below code is same as above but instead of product name is saving in back the product ID is saving :






// Function to create the custom product dropdown shortcode
function custom_product_dropdown_shortcode() {
  ob_start(); // Start output buffering

  // Get the referring URL and selected product name
  $referring_url = wp_get_referer();
  $selected_product_name = '';
  $selected_product_id = ''; // Initialize for product ID selection

  if ($referring_url) {
    $url_parts = parse_url($referring_url);
    if (isset($url_parts['path'])) {
      $path_parts = explode('/', $url_parts['path']);
      $product_index = array_search('product', $path_parts);
      if ($product_index !== false && isset($path_parts[$product_index + 1])) {
        $selected_product_name = $path_parts[$product_index + 1];
        $selected_product_id = $path_parts[$product_index + 1]; // Assuming product ID in URL
      }
    }
  }

  // Create the dropdown with search functionality using Select2
  echo '<select id="product_name" name="product_name">';
  echo '<option value="">Select Product</option>';
  echo '<option data-tokens="Search Products" disabled hidden></option>'; // Search placeholder

  $products = array(); // Store product data for filtering

  $query = new WP_Query(array(
    'post_type' => 'product',
    'post_status' => 'publish',
    'posts_per_page' => '-1'
  ));

  if ($query->have_posts()) :
    while ($query->have_posts()) : $query->the_post();
      $product = wc_get_product(get_the_ID());
      $price = $product->get_price_html();
      $selected = '';
      // Use product ID for comparison
      if (get_the_ID() === $selected_product_id) {
        $selected = 'selected="selected"';
      }

      $products[] = array(
        'id' => get_the_ID(), // Add ID for selection
        'text' => get_the_title() 
      );
    endwhile;
  else:
    echo '<option value="">No products found</option>';
  endif;

  wp_reset_postdata();

  echo '</select>';

  // Enqueue JavaScript for search functionality
  wp_enqueue_script('select2'); // Assuming you've added the Select2 library
  ?>
  <script>
    jQuery(function($) {
      $('#product_name').select2({
        data: <?php echo json_encode(array_map(function($product) {
          return array('id' => $product['id'], 'text' => $product['text']);
        }, $products)); ?>,
        placeholder: 'Search Products'
      });
    });
  </script>
  <?php

  return ob_get_clean(); // Return the output and clean buffer
}

// Add the shortcode to WordPress
add_shortcode('custom_product_dropdown', 'custom_product_dropdown_shortcode');

ChatGPT








// by below code the search bar for page using shortcode not drodown a searchbar


function product_search_shortcode() {
    ob_start(); ?>

    <div class="product-search-container">
        <input type="text" id="product-search-input" placeholder="Search for a product...">
        <div id="product-search-results"></div>
    </div>

    <script>
    jQuery(document).ready(function($) {
        $('#product-search-input').keyup(function() {
            var searchQuery = $(this).val();

            $.ajax({
                url: '<?php echo admin_url('admin-ajax.php'); ?>',
                type: 'POST',
                data: {
                    'action': 'product_search',
                    'search_query': searchQuery
                },
                success: function(response) {
                    $('#product-search-results').html(response);
                }
            });
        });

        $(document).on('click', '.product-item', function() {
            var selectedProduct = $(this).text();
            $('#product-search-input').val(selectedProduct);
            $('#product-search-results').html('');
        });
    });
    </script>

    <?php
    return ob_get_clean();
}
add_shortcode('product_search', 'product_search_shortcode');

function product_search_callback() {
    $search_query = $_POST['search_query'];

    $products = wc_get_products(array(
        'status' => 'publish',
        'limit' => -1,
        's' => $search_query,
    ));

    if ($products) {
        foreach ($products as $product) {
            echo '<div class="product-item">' . $product->get_name() . '</div>';
        }
    } else {
        echo '<div class="product-item">No products found</div>';
    }

    wp_die();
}
add_action('wp_ajax_product_search', 'product_search_callback');
add_action('wp_ajax_nopriv_product_search', 'product_search_callback');

 const handleDelete = (e: any) => {
        e.preventDefault();
        toast.promise(
            axiosInstance
                .delete(
                    `api/business/${businessStore?.id}/agreement/${singleData?.id}`
                )
                .then((res) => {
                    setAgreements(res?.data?.agreements);
                    setTypeFilterOptions(res?.data?.typeFilterOptions);
                }),
            {
                loading: "Deleteing agreement file",
                success: "Agreement file is deleted",
                error: (err: any) =>
                    err?.response?.data?.message
                        ? err?.response.data?.message
                        : err?.response?.data,
            }
        );
    };
cities = ['New York', 'Beijing', 'Cairo', 'Mumbai', 'Mexico']

for item in enumerate(cities):
    print(item)
Code language: Python (python)
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Background Color Changer</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      text-align: center;
    }
    button {
      padding: 10px 20px;
      font-size: 16px;
      cursor: pointer;
    }
  </style>
</head>
<body>

<h1>Background Color Changer</h1>
<button id="changeColorBtn">Change Color</button>

<script>
  // Selecting the button element
  const changeColorBtn = document.getElementById('changeColorBtn');

  // Adding an event listener to the button
  changeColorBtn.addEventListener('click', function() {
    // Generating a random color
    const randomColor = '#' + Math.floor(Math.random()*16777215).toString(16);

    // Changing the background color of the body
    document.body.style.backgroundColor = randomColor;

    // Logging the color change
    console.log('Background color changed to: ' + randomColor);
  });
</script>

</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
  <style>
    @import url("https://fonts.googleapis.com/css2?family=Open+Sans&display=swap");

    :root {
      --primary: #015478;
      --white: #fff;
      --icon-clr: #aaaaaa;
      --facebook-clr: #3b5998;
      --twitter-clr: #55acee;
      --instagram-clr: #bc2a8d;
      --reddit-clr: #ff4500;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      list-style: none;
      text-decoration: none;
      font-family: "Open Sans", sans-serif;
      user-select: none;
    }

    .ss_wrap {
      position: relative;
      margin: 0px !important;
    }

    .ss_wrap .ss_btn {
      background: var(--white);
      color: var(--icon-clr);
      width: 50px;
      height: 50px;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 3px;
      font-size: 1.4rem;
      border-radius: 3px;
      cursor: pointer;
    }

    .ss_btn .icon {
      display: flex;
    }
    
    .dd_list .icon{
      font-size: 1.3rem;
    }

    .ss_wrap .dd_list {
      position: absolute;
    }

    .ss_wrap .dd_list ul {
      display: none;
      width: auto;
      background: var(--white);
      margin: 0 10px;
      box-shadow: 0px 0px 20px #ededed;
      border-radius: 3px;
      position: relative;
    }

    .ss_wrap .dd_list ul li a {
      display: flex;
      width: 50px;
      height: 50px;
      margin: 0 10px;
      justify-content: center;
      align-items: center;
      color: var(--icon-clr);
    }

    .ss_wrap .dd_list ul:before {
      content: "";
      position: absolute;
      border: 8px solid;
    }

    /* social share 3 */
    .ss_wrap.ss_wrap_3 {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .ss_wrap.ss_wrap_3 .dd_list {
      top: 50px;
      left: 50%;
      transform: translateX(-50%);
    }

    .ss_wrap.ss_wrap_3 .dd_list ul {
      flex-direction: column;
      width: 175px;
      border-radius: 3px;
    }

    .ss_wrap.ss_wrap_3 .dd_list ul li a {
      width: 100%;
      margin: 0;
      justify-content: unset;
      padding: 0 10px;
    }

    .ss_wrap.ss_wrap_3 .dd_list ul li a span {
      display: flex;
    }

    .ss_wrap.ss_wrap_3 .dd_list ul li a span.icon {
      width: 25px;
      margin-right: 10px;
    }

    .ss_wrap.ss_wrap_3 .dd_list ul li a span.text {
      width: 125px;
    }

    .ss_wrap.ss_wrap_3 .dd_list ul:before {
      top: -15px;
      left: 50%;
      transform: translateX(-50%);
      border-color: transparent transparent var(--primary) transparent;
    }

    .ss_wrap.ss_wrap_3 .icon{
    color: black;
    }
    
    .ss_wrap.ss_wrap_3 span.text:hover {
      color: var(--primary);
    }

    .ss_wrap .ss_btn.active + .dd_list ul {
      display: flex;
    }
  </style>
</head>
<body>
  <div class="social_share_wrap">
    <div class="ss_wrap ss_wrap_3">
      <div class="ss_btn">
        <span class="icon">
          <ion-icon name="share-social"></ion-icon>
        </span>Share
      </div>

      <div class="dd_list">
        <ul>
          <li><a href="#" class="facebook" onclick="shareFacebook()">
            <span class="icon">
              <ion-icon name="logo-facebook"></ion-icon>
            </span>
            <span class="text">
              Facebook
            </span>
          </a></li>
          <li><a href="#" class="whatsapp" onclick="shareWhatsapp()">
            <span class="icon">
              <ion-icon name="logo-whatsapp"></ion-icon>
            </span>
            <span class="text">
              Whatsapp
            </span>
          </a></li>
          <li><a href="#" class="email" onclick="shareEmail()">
            <span class="icon">
              <ion-icon name="mail"></ion-icon>
            </span>
            <span class="text">
              Email
            </span>
          </a></li>
          <li><a href="#" class="sms" onclick="shareSMS()">
            <span class="icon">
              <ion-icon name="chatbox"></ion-icon>
            </span>
            <span class="text">
              SMS
            </span>
          </a></li>
          <li><a href="#" class="copy-link" onclick="copyLink()">
            <span class="icon">
              <ion-icon name="copy"></ion-icon>
            </span>
            <span class="text">
              Copy Link
            </span>
          </a></li>
        </ul>
      </div>
    </div>
  </div>
<script>
    document.addEventListener('DOMContentLoaded', function () {
        var ss_btn_3 = document.querySelector(".ss_wrap_3 .ss_btn");
        var dd_list_3 = document.querySelector(".ss_wrap_3 .dd_list");

        ss_btn_3.addEventListener("click", function (event) {
            event.stopPropagation();
            this.classList.toggle("active");
        });

        dd_list_3.addEventListener("click", function (event) {
            event.stopPropagation();
        });

        // Add an event listener to close the dropdown when clicking anywhere outside
        document.addEventListener('click', function () {
            ss_btn_3.classList.remove("active");
        });

        // Prevent event propagation when clicking on icons
        var icons = document.querySelectorAll(".ss_wrap_3 .icon");
        icons.forEach(function (icon) {
            icon.addEventListener("click", function (event) {
                event.stopPropagation();
            });
        });
    });

    function showCopiedMessage() {
        alert('Link Copied');
    }

    function shareFacebook() {
        window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(window.location.href));
    }

    function shareWhatsapp() {
        window.open('https://api.whatsapp.com/send?text=' + encodeURIComponent(window.location.href));
    }

    function shareEmail() {
        window.open('mailto:?body=Check this out: ' + encodeURIComponent(window.location.href));
    }

    function shareSMS() {
        window.open('sms:&body=' + encodeURIComponent(window.location.href));
    }

    function copyLink() {
        var dummy = document.createElement("textarea");
        document.body.appendChild(dummy);
        dummy.value = window.location.href;
        dummy.select();
        document.execCommand("copy");
        document.body.removeChild(dummy);

        // Show the "Link Copied" message
        showCopiedMessage();
    }

    // Add an event listener to close the share box when clicking anywhere on the screen
    document.body.addEventListener('click', function (event) {
        // Check if the click is outside the share box
        var shareBox = document.querySelector('.social_share_wrap');
        if (!shareBox.contains(event.target)) {
            // Clicked outside the share box, close it
            var ss_btn = document.querySelector(".ss_wrap_3 .ss_btn");
            ss_btn.classList.remove("active");
        }
    });
</script>
</body>
</html>
{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/5e432067e4b0edb47be84657"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=5e432067e4b0edb47be84657","rel":"related"}},"id":"5e432067e4b0edb47be84657","title":"State-wide Layers","summary":"Each state has a zipped folder that contains six Geotiff files:  1- <StateName>_avg.tif  ===> The value of each cell in this raster layer is the avarage area of all buildings that intersect the cell. The unit is sq meter.  2- <StateName>_cnt.tif  ===> The value of each cell in this raster layer is the number of buildings that intersect the cell.  3- <StateName>_max.tif  ===> The value of each cell in this raster layer is the maximum of area of all building that intersect the cell. The unit is sq meter. 4- <StateName>_min.tif  ===> The value of each cell in this raster layer is the minimum of area of all building that intersect the cell. The unit is sq meter. 5- <StateName>_sum.tif  ===> The value of each cell in this raster layer is [...]","body":"Each state has a zipped folder that contains six Geotiff files:<br>\n<br>\n1- &lt;StateName&gt;_avg.tif&nbsp; ===&gt; The value of each cell in this raster layer is the avarage area of all buildings that intersect the cell. The unit is sq meter.&nbsp;<br>\n2- &lt;StateName&gt;_cnt.tif&nbsp; ===&gt; The value of each cell in this raster layer is the number of buildings that intersect the cell.&nbsp;<br>\n3- &lt;StateName&gt;_max.tif&nbsp; ===&gt; The value of each cell in this raster layer is the maximum of area of all building that intersect the cell. The unit is sq meter.<br>\n4- &lt;StateName&gt;_min.tif&nbsp; ===&gt; The value of each cell in this raster layer is the minimum of area of all building that intersect the cell. The unit is sq meter.<br>\n5- &lt;StateName&gt;_sum.tif&nbsp; ===&gt; The value of each cell in this raster layer is the area of the cell that is covered by building footprints The unit is sq meter. the range is 0 to 900 sq meter.<br>\n6- &lt;StateName&gt;_cntroid.tif&nbsp; ===&gt; The value of each cell in this raster layer is the number of building centroids that intersect the cell.&nbsp;","citation":"Heris, M.P., Foks, N., Bagstad, K., and Troy, A., 2020, A national dataset of rasterized building footprints for the U.S.: U.S. Geological Survey data release, https://doi.org/10.5066/P9J2Y1WG.","provenance":{"dataSource":"Input directly","dateCreated":"2020-02-11T21:45:11Z","lastUpdated":"2022-08-28T21:14:53Z"},"hasChildren":false,"parentId":"5d27a8dfe4b0941bde650fc7","contacts":[{"name":"Mehdi Pourpeikari Heris","oldPartyId":75894,"type":"Point of Contact","contactType":"person","email":"mpourpeikariheris@usgs.gov","active":true,"jobTitle":"volunteer","firstName":"Mehdi","lastName":"Pourpeikari Heris","organization":{"displayText":"Geosciences and Environmental Change Science Center"},"primaryLocation":{"name":"CN=Mehdi Pourpeikari Heris,OU=GECSC,OU=Users,OU=DenverCO-G GEC,OU=DenverCO-M,OU=CR,DC=gs,DC=doi,DC=net - Primary Location","building":"DFC Bldg 25","buildingCode":"KAE","officePhone":"3032361330","streetAddress":{"line1":"W 6th Ave Kipling St","city":"Lakewood","state":"CO","zip":"80225","country":"US"},"mailAddress":{}}},{"name":"Mehdi Pourpeikari Heris","oldPartyId":75894,"type":"Originator","contactType":"person","email":"mpourpeikariheris@usgs.gov","active":true,"jobTitle":"volunteer","firstName":"Mehdi","lastName":"Pourpeikari Heris","organization":{"displayText":"Geosciences and Environmental Change Science Center"},"primaryLocation":{"name":"CN=Mehdi Pourpeikari Heris,OU=GECSC,OU=Users,OU=DenverCO-G GEC,OU=DenverCO-M,OU=CR,DC=gs,DC=doi,DC=net - Primary Location","building":"DFC Bldg 25","buildingCode":"KAE","officePhone":"3032361330","streetAddress":{"line1":"W 6th Ave Kipling St","city":"Lakewood","state":"CO","zip":"80225","country":"US"},"mailAddress":{}}},{"name":"Nathan Foks","type":"Originator","email":"nfoks@mymail.mines.edu","active":true,"firstName":"Nathan","lastName":"Foks","organization":{},"primaryLocation":{"streetAddress":{},"mailAddress":{}}},{"name":"Kenneth J Bagstad","oldPartyId":24439,"type":"Originator","contactType":"person","email":"kjbagstad@usgs.gov","active":true,"jobTitle":"Research Economist","firstName":"Kenneth","middleName":"J","lastName":"Bagstad","organization":{"displayText":"Geosciences and Environmental Change Science Center"},"primaryLocation":{"name":"Kenneth J Bagstad/GEOG/USGS/DOI - Primary Location","building":"DFC Bldg 25","buildingCode":"KAE","officePhone":"3032361330","faxPhone":"3032365349","streetAddress":{"line1":"W 6th Ave Kipling St","city":"Lakewood","state":"CO","zip":"80225","country":"US"},"mailAddress":{}},"orcId":"0000-0001-8857-5615"},{"name":"Austin Troy","type":"Originator","organization":{},"primaryLocation":{"streetAddress":{},"mailAddress":{}}},{"name":"Mehdi Pourpeikari Heris","oldPartyId":75894,"type":"Metadata Contact","contactType":"person","email":"mpourpeikariheris@usgs.gov","active":true,"jobTitle":"volunteer","firstName":"Mehdi","lastName":"Pourpeikari Heris","organization":{"displayText":"Geosciences and Environmental Change Science Center"},"primaryLocation":{"name":"CN=Mehdi Pourpeikari Heris,OU=GECSC,OU=Users,OU=DenverCO-G GEC,OU=DenverCO-M,OU=CR,DC=gs,DC=doi,DC=net - Primary Location","building":"DFC Bldg 25","buildingCode":"KAE","officePhone":"3032361330","streetAddress":{"line1":"W 6th Ave Kipling St","city":"Lakewood","state":"CO","zip":"80225","country":"US"},"mailAddress":{}}},{"name":"U.S. Geological Survey","oldPartyId":18139,"type":"Publisher","contactType":"organization","onlineResource":"http://www.usgs.gov/","active":true,"aliases":["{\"name\":\"USGS\"}","{\"name\":\"Geological Survey (U.S.)\"}","{\"name\":\"U.S. GEOLOGICAL SURVEY\"}"],"fbmsCodes":["GG00000000"],"logoUrl":"http://my.usgs.gov/static-cache/images/dataOwner/v1/logosMed/USGSLogo.gif","smallLogoUrl":"http://my.usgs.gov/static-cache/images/dataOwner/v1/logosSmall/USGSLogo.gif","organization":{},"primaryLocation":{"name":"U.S. Geological Survey - Location","streetAddress":{},"mailAddress":{}}},{"name":"U.S. Geological Survey - ScienceBase","oldPartyId":70157,"type":"Distributor","contactType":"organization","onlineResource":"https://www.sciencebase.gov","email":"sciencebase@usgs.gov","organization":{},"primaryLocation":{"name":"U.S. Geological Survey - ScienceBase - Location","officePhone":"18882758747","streetAddress":{},"mailAddress":{"line1":"Denver Federal Center","line2":"Building 810","mailStopCode":"302","city":"Denver","state":"CO","zip":"80225","country":"United States"}}}],"dates":[{"type":"Publication","dateString":"2020-02-28","label":"Publication Date"}],"files":[{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"DistrictofColumbia.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__c1/53/e1/c153e196622c92951ff942df8df492a91c15881a","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":3413856,"dateUploaded":"2020-02-11T23:06:25Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"ea65377e5967904eec49c38934f4afca","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__c1%2F53%2Fe1%2Fc153e196622c92951ff942df8df492a91c15881a","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__c1%2F53%2Fe1%2Fc153e196622c92951ff942df8df492a91c15881a"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"RhodeIsland.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__9e/3c/7d/9e3c7d1dbebfb6210512b91f988ed0b6ad807409","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":20232974,"dateUploaded":"2020-02-11T23:07:36Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"3d64e3627d7dbc095fd5bb77cc57d83c","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__9e%2F3c%2F7d%2F9e3c7d1dbebfb6210512b91f988ed0b6ad807409","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__9e%2F3c%2F7d%2F9e3c7d1dbebfb6210512b91f988ed0b6ad807409"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Delaware.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__95/25/e8/9525e8b796c7387cc77efc226e04896aa53aa0c5","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":22992871,"dateUploaded":"2020-02-11T23:07:43Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"84eae35374a2eb25e670d1d3b4dbf945","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__95%2F25%2Fe8%2F9525e8b796c7387cc77efc226e04896aa53aa0c5","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__95%2F25%2Fe8%2F9525e8b796c7387cc77efc226e04896aa53aa0c5"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Vermont.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__15/16/da/1516da81b1c881ff9fb528f3ffa15ec6930c355a","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":29878415,"dateUploaded":"2020-02-11T23:08:09Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"3e33629cb2009579a0ca4175fef37241","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__15%2F16%2Fda%2F1516da81b1c881ff9fb528f3ffa15ec6930c355a","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__15%2F16%2Fda%2F1516da81b1c881ff9fb528f3ffa15ec6930c355a"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Wyoming.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__63/95/8f/63958fef36806c385a6163c681fdc3d8d2630f6f","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":31025768,"dateUploaded":"2020-02-11T23:08:20Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"34222e282e005be4b480e69f5f90168c","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__63%2F95%2F8f%2F63958fef36806c385a6163c681fdc3d8d2630f6f","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__63%2F95%2F8f%2F63958fef36806c385a6163c681fdc3d8d2630f6f"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Utah.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__99/02/2b/99022b0e3a8f1d158fa595d818e83ce490f16736","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":34773757,"dateUploaded":"2020-02-11T23:08:27Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"a21404c85c374d8cdc9819c2ebc4c680","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__99%2F02%2F2b%2F99022b0e3a8f1d158fa595d818e83ce490f16736","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__99%2F02%2F2b%2F99022b0e3a8f1d158fa595d818e83ce490f16736"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"SouthDakota.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__92/d2/f8/92d2f845b18a1e4db3fe3373a66ce0293de6fd23","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":44655285,"dateUploaded":"2020-02-11T23:09:08Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"ca1e48ca289e6574fc209e62a62d9a39","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__92%2Fd2%2Ff8%2F92d2f845b18a1e4db3fe3373a66ce0293de6fd23","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__92%2Fd2%2Ff8%2F92d2f845b18a1e4db3fe3373a66ce0293de6fd23"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"NewHampshire.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__69/bf/f9/69bff90f5b538a12c0a8be312956a32ee116b99f","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":44827838,"dateUploaded":"2020-02-11T23:09:08Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"8e17a957a36b2955b4f305e138af82a1","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__69%2Fbf%2Ff9%2F69bff90f5b538a12c0a8be312956a32ee116b99f","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__69%2Fbf%2Ff9%2F69bff90f5b538a12c0a8be312956a32ee116b99f"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"NorthDakota.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__21/16/af/2116af2a512bcbf49166269371f40c786ed6a723","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":45632865,"dateUploaded":"2020-02-11T23:09:10Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"bc6ebe342bd36e2215ed56a66a906655","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__21%2F16%2Faf%2F2116af2a512bcbf49166269371f40c786ed6a723","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__21%2F16%2Faf%2F2116af2a512bcbf49166269371f40c786ed6a723"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Nevada.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__4b/02/ac/4b02ac3471c150d2c82948635742dfa083b6bef0","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":48203368,"dateUploaded":"2020-02-11T23:09:21Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"c64c6ba1d4623d7002933e73761ee7b8","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__4b%2F02%2Fac%2F4b02ac3471c150d2c82948635742dfa083b6bef0","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__4b%2F02%2Fac%2F4b02ac3471c150d2c82948635742dfa083b6bef0"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Maine.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__b0/7d/10/b07d10c3535b9ab4295e8f5fa21bd9bec5adbeed","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":61782571,"dateUploaded":"2020-02-11T23:10:05Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"23e280844ac369cf651e3155a45c82b1","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b0%2F7d%2F10%2Fb07d10c3535b9ab4295e8f5fa21bd9bec5adbeed","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b0%2F7d%2F10%2Fb07d10c3535b9ab4295e8f5fa21bd9bec5adbeed"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Montana.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__eb/7b/fd/eb7bfd7a9d2e20731126c9428dc7bcac14b9338a","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":62631678,"dateUploaded":"2020-02-11T23:10:08Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"c6913e8370cd65f35cf082dc5dd5ebd2","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__eb%2F7b%2Ffd%2Feb7bfd7a9d2e20731126c9428dc7bcac14b9338a","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__eb%2F7b%2Ffd%2Feb7bfd7a9d2e20731126c9428dc7bcac14b9338a"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Idaho.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__f1/c9/82/f1c982cfff40a1cd1c99d4f91b245e6f81628403","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":67336491,"dateUploaded":"2020-02-11T23:10:27Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"0fd34db3149330aed7866c757860b92e","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__f1%2Fc9%2F82%2Ff1c982cfff40a1cd1c99d4f91b245e6f81628403","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__f1%2Fc9%2F82%2Ff1c982cfff40a1cd1c99d4f91b245e6f81628403"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"NewMexico.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__79/83/f4/7983f4752e44828684298cdbe4256e26c1362515","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":73594544,"dateUploaded":"2020-02-11T23:10:41Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"12c8432d7dc498ce96506253da5531ee","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__79%2F83%2Ff4%2F7983f4752e44828684298cdbe4256e26c1362515","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__79%2F83%2Ff4%2F7983f4752e44828684298cdbe4256e26c1362515"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"WestVirginia.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__3e/e7/50/3ee750b0755f0193c41a333eb6cff634b67fbabc","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":78537646,"dateUploaded":"2020-02-11T23:10:56Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"355343048b274b2369c1f07e7f461925","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__3e%2Fe7%2F50%2F3ee750b0755f0193c41a333eb6cff634b67fbabc","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__3e%2Fe7%2F50%2F3ee750b0755f0193c41a333eb6cff634b67fbabc"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Connecticut.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__62/ac/0e/62ac0ee07103e36e0a31a746e8d7679b6a2e5701","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":79880971,"dateUploaded":"2020-02-11T23:10:59Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"820bb88869391090cbca91739d2c20db","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__62%2Fac%2F0e%2F62ac0ee07103e36e0a31a746e8d7679b6a2e5701","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__62%2Fac%2F0e%2F62ac0ee07103e36e0a31a746e8d7679b6a2e5701"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Nebraska.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__6b/8f/4e/6b8f4e11000e60d96fc22fab176c613ef7f224a4","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":81664701,"dateUploaded":"2020-02-11T23:11:07Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"dea5f3ccc8cafda74c5a8b91c1d40b2b","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__6b%2F8f%2F4e%2F6b8f4e11000e60d96fc22fab176c613ef7f224a4","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__6b%2F8f%2F4e%2F6b8f4e11000e60d96fc22fab176c613ef7f224a4"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Arkansas.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__e8/da/bc/e8dabcf428a0e0797002af179850ea8ec7d8f1bd","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":106720294,"dateUploaded":"2020-02-11T23:12:19Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"35de97a2eb606aa5b8466ecd97b25727","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e8%2Fda%2Fbc%2Fe8dabcf428a0e0797002af179850ea8ec7d8f1bd","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e8%2Fda%2Fbc%2Fe8dabcf428a0e0797002af179850ea8ec7d8f1bd"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Alabama.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__e9/2b/da/e92bda9e67f366d707c780c1820e36fe95e54c68","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":105868777,"dateUploaded":"2020-02-11T23:12:17Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"36febb18b754fc36177e50f9ce38562e","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e9%2F2b%2Fda%2Fe92bda9e67f366d707c780c1820e36fe95e54c68","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e9%2F2b%2Fda%2Fe92bda9e67f366d707c780c1820e36fe95e54c68"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Kansas.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__3b/4c/6f/3b4c6f519173caa15da2ee2cbe7c8cfae708eae4","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":113496834,"dateUploaded":"2020-02-11T23:12:32Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"3d2a1a91b504951a2bbea809f7e37463","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__3b%2F4c%2F6f%2F3b4c6f519173caa15da2ee2cbe7c8cfae708eae4","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__3b%2F4c%2F6f%2F3b4c6f519173caa15da2ee2cbe7c8cfae708eae4"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Oregon.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__b6/d6/0a/b6d60a88a221b0e6ae87da9ab260be3b888b622a","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":118448308,"dateUploaded":"2020-02-11T23:12:45Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"a202ba6c4c1d9a2312e36ce9b003fac0","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b6%2Fd6%2F0a%2Fb6d60a88a221b0e6ae87da9ab260be3b888b622a","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b6%2Fd6%2F0a%2Fb6d60a88a221b0e6ae87da9ab260be3b888b622a"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Massachusetts.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__21/6f/e9/216fe97c8ce5ca5d2a53e07a462f4fe351a4113e","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":126716009,"dateUploaded":"2020-02-11T23:13:06Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"19888804b4f75251212e17a9ea80fb31","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__21%2F6f%2Fe9%2F216fe97c8ce5ca5d2a53e07a462f4fe351a4113e","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__21%2F6f%2Fe9%2F216fe97c8ce5ca5d2a53e07a462f4fe351a4113e"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Oklahoma.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__c0/0a/a7/c00aa7b08dfcc0d75f280b9f4c11072e6634b733","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":128675964,"dateUploaded":"2020-02-11T23:13:10Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"fadc3c2d79c418d46274f28e852e5438","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__c0%2F0a%2Fa7%2Fc00aa7b08dfcc0d75f280b9f4c11072e6634b733","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__c0%2F0a%2Fa7%2Fc00aa7b08dfcc0d75f280b9f4c11072e6634b733"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Colorado.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__8b/dc/f9/8bdcf9300aa71392c7023562728643baa811f555","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":130950905,"dateUploaded":"2020-02-11T23:13:13Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"173b12c0cd20a53f1b3630f7941b6344","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__8b%2Fdc%2Ff9%2F8bdcf9300aa71392c7023562728643baa811f555","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__8b%2Fdc%2Ff9%2F8bdcf9300aa71392c7023562728643baa811f555"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Mississippi.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__dc/10/60/dc106083d59ff68e45a83adc0b27ed809898ab09","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":129653398,"dateUploaded":"2020-02-11T23:13:14Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"e02476f4818fd1a46c78698b86e1ad83","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__dc%2F10%2F60%2Fdc106083d59ff68e45a83adc0b27ed809898ab09","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__dc%2F10%2F60%2Fdc106083d59ff68e45a83adc0b27ed809898ab09"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Maryland.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__2f/ed/3b/2fed3b753d900bde2e7304ff626424ee73b5c991","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":137253837,"dateUploaded":"2020-02-11T23:13:27Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"d3e9292f95985091bb0c129d4bc8f93b","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__2f%2Fed%2F3b%2F2fed3b753d900bde2e7304ff626424ee73b5c991","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__2f%2Fed%2F3b%2F2fed3b753d900bde2e7304ff626424ee73b5c991"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Louisiana.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__e7/4c/43/e74c43f7fb1a7118f8f055caa3126d1364067983","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":144820967,"dateUploaded":"2020-02-11T23:13:39Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"b0bd98014c02cab0208ec8338387918a","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e7%2F4c%2F43%2Fe74c43f7fb1a7118f8f055caa3126d1364067983","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e7%2F4c%2F43%2Fe74c43f7fb1a7118f8f055caa3126d1364067983"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Iowa.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__e1/d4/a8/e1d4a8eec8ef2f21ac68db9a67211ae9c4b58423","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":143801765,"dateUploaded":"2020-02-11T23:13:39Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"e53625c7c0c9f4ad3bc13d8f4efaf312","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e1%2Fd4%2Fa8%2Fe1d4a8eec8ef2f21ac68db9a67211ae9c4b58423","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__e1%2Fd4%2Fa8%2Fe1d4a8eec8ef2f21ac68db9a67211ae9c4b58423"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Arizona.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__57/8f/46/578f464e065b48b8f24082ea9f95b3fa77a9eb7c","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":147197055,"dateUploaded":"2020-02-11T23:13:47Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"3b85aa58bf7ad386454aa4758e233699","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__57%2F8f%2F46%2F578f464e065b48b8f24082ea9f95b3fa77a9eb7c","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__57%2F8f%2F46%2F578f464e065b48b8f24082ea9f95b3fa77a9eb7c"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"SouthCarolina.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__6a/ef/8c/6aef8c46fc1c7182396271c956b44969cd6a617c","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":168738554,"dateUploaded":"2020-02-11T23:14:20Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"4ff303a1f168e6b1e33f0564abc9c34b","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__6a%2Fef%2F8c%2F6aef8c46fc1c7182396271c956b44969cd6a617c","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__6a%2Fef%2F8c%2F6aef8c46fc1c7182396271c956b44969cd6a617c"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"NewJersey.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__58/74/47/587447903424d4dbfdae64b2d120e08a72afefc2","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":179848013,"dateUploaded":"2020-02-11T23:14:39Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"37026f3a0227b532c5aa57f541b37ba8","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__58%2F74%2F47%2F587447903424d4dbfdae64b2d120e08a72afefc2","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__58%2F74%2F47%2F587447903424d4dbfdae64b2d120e08a72afefc2"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Washington.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__68/ff/97/68ff979672aae1dfa1f37db2c48dcf5d2e1fa604","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":185097683,"dateUploaded":"2020-02-11T23:14:45Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"00c4ec64f5fc788fc0f0b87a987954da","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__68%2Fff%2F97%2F68ff979672aae1dfa1f37db2c48dcf5d2e1fa604","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__68%2Fff%2F97%2F68ff979672aae1dfa1f37db2c48dcf5d2e1fa604"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Kentucky.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__73/2f/88/732f885b711805b247ed446352adae46a670dd44","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":184756090,"dateUploaded":"2020-02-11T23:14:49Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"5641526720910e8e89765cd170a11c7b","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__73%2F2f%2F88%2F732f885b711805b247ed446352adae46a670dd44","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__73%2F2f%2F88%2F732f885b711805b247ed446352adae46a670dd44"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Minnesota.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__d6/a1/eb/d6a1eb23e0ce74b536081b5c2af9d59253f716a6","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":198353354,"dateUploaded":"2020-02-11T23:15:07Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"83e1fdcd3ab4427436e0c3ac5cd6709c","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__d6%2Fa1%2Feb%2Fd6a1eb23e0ce74b536081b5c2af9d59253f716a6","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__d6%2Fa1%2Feb%2Fd6a1eb23e0ce74b536081b5c2af9d59253f716a6"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Wisconsin.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__3f/f3/ae/3ff3ae84ee8742cfc1b075492f5ccb9cc368e4e2","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":214862314,"dateUploaded":"2020-02-11T23:15:27Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"9a3b1b20480832d035ecf4f2306dd463","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__3f%2Ff3%2Fae%2F3ff3ae84ee8742cfc1b075492f5ccb9cc368e4e2","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__3f%2Ff3%2Fae%2F3ff3ae84ee8742cfc1b075492f5ccb9cc368e4e2"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Indiana.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__2b/3b/6f/2b3b6fff699e91965114422aaddb442d04effca6","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":219497169,"dateUploaded":"2020-02-11T23:15:38Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"82a268ec401379803d14479e8892b09f","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__2b%2F3b%2F6f%2F2b3b6fff699e91965114422aaddb442d04effca6","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__2b%2F3b%2F6f%2F2b3b6fff699e91965114422aaddb442d04effca6"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Missouri.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__fc/2d/7a/fc2d7a9499838db319e584519caffbdfa03c4b32","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":228264407,"dateUploaded":"2020-02-11T23:15:48Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"199d1fb4c93cdf773b70640bccd0d772","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__fc%2F2d%2F7a%2Ffc2d7a9499838db319e584519caffbdfa03c4b32","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__fc%2F2d%2F7a%2Ffc2d7a9499838db319e584519caffbdfa03c4b32"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Virginia.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__05/72/a9/0572a9d7762fa2afdd17862630a6663a007113da","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":229139158,"dateUploaded":"2020-02-11T23:15:49Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"f142648e142a49eed4ab108e2dc6bd48","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__05%2F72%2Fa9%2F0572a9d7762fa2afdd17862630a6663a007113da","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__05%2F72%2Fa9%2F0572a9d7762fa2afdd17862630a6663a007113da"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Tennessee.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__76/92/7e/76927e307e50e30211f54c6e0a1dd2f8468e57d3","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":234869838,"dateUploaded":"2020-02-11T23:15:51Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"68771f6f3919da1ff0be9dd067cc74fc","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__76%2F92%2F7e%2F76927e307e50e30211f54c6e0a1dd2f8468e57d3","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__76%2F92%2F7e%2F76927e307e50e30211f54c6e0a1dd2f8468e57d3"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Michigan.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__56/35/34/563534d99257420ff7b1b50125da8464a6086b95","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":264476718,"dateUploaded":"2020-02-11T23:16:21Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"d1115c280a2f7b8f06c54cc6fbe349a7","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__56%2F35%2F34%2F563534d99257420ff7b1b50125da8464a6086b95","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__56%2F35%2F34%2F563534d99257420ff7b1b50125da8464a6086b95"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Illinois.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__35/31/35/3531357e0edff3a59df3490668eacea622a3138d","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":282171965,"dateUploaded":"2020-02-11T23:16:32Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"61bd91642c38282c2b93ddaa888d4cd4","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__35%2F31%2F35%2F3531357e0edff3a59df3490668eacea622a3138d","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__35%2F31%2F35%2F3531357e0edff3a59df3490668eacea622a3138d"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Georgia.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__0d/5f/c5/0d5fc559dcd1ebd921289b4653721c48137db61e","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":304436964,"dateUploaded":"2020-02-11T23:16:51Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"a2a23bc83837d326c163c08060c05c38","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__0d%2F5f%2Fc5%2F0d5fc559dcd1ebd921289b4653721c48137db61e","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__0d%2F5f%2Fc5%2F0d5fc559dcd1ebd921289b4653721c48137db61e"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"NewYork.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__37/af/b9/37afb94342cecf3f79b59c3264355c83d72303f5","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":309476306,"dateUploaded":"2020-02-11T23:16:52Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"97a0f0266922c62abefda57c3424b00c","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__37%2Faf%2Fb9%2F37afb94342cecf3f79b59c3264355c83d72303f5","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__37%2Faf%2Fb9%2F37afb94342cecf3f79b59c3264355c83d72303f5"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Pennsylvania.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__6f/31/e9/6f31e9ce92a863ca88bb5a99268aa661178d031c","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":332567119,"dateUploaded":"2020-02-11T23:17:03Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"4ce034e28c760b0e920c0e84f8a0b86a","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__6f%2F31%2Fe9%2F6f31e9ce92a863ca88bb5a99268aa661178d031c","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__6f%2F31%2Fe9%2F6f31e9ce92a863ca88bb5a99268aa661178d031c"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"NorthCarolina.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__73/6f/b8/736fb845e1bc81d54978da0e36f829ff7d694eb6","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":350582803,"dateUploaded":"2020-02-11T23:17:13Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"f1ad7fb0d736fab70bacdbce7b707034","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__73%2F6f%2Fb8%2F736fb845e1bc81d54978da0e36f829ff7d694eb6","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__73%2F6f%2Fb8%2F736fb845e1bc81d54978da0e36f829ff7d694eb6"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Ohio.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__ac/eb/0d/aceb0d007d92f5116a9a2006a669fa02f9ed8f03","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":410843154,"dateUploaded":"2020-02-11T23:17:30Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"c6bd46e0c463ccaa22920cfc35289275","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__ac%2Feb%2F0d%2Faceb0d007d92f5116a9a2006a669fa02f9ed8f03","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__ac%2Feb%2F0d%2Faceb0d007d92f5116a9a2006a669fa02f9ed8f03"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Florida.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__2e/09/ad/2e09ad0b702be4ff542396c53d183cb2e2db164d","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":407921466,"dateUploaded":"2020-02-11T23:17:38Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"56ea3ec4142b2234f72816bef640e0e9","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__2e%2F09%2Fad%2F2e09ad0b702be4ff542396c53d183cb2e2db164d","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__2e%2F09%2Fad%2F2e09ad0b702be4ff542396c53d183cb2e2db164d"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"California.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__05/30/31/053031214f56bc7b8fcd3d4bcd861cfc0f984c9b","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":552118711,"dateUploaded":"2020-02-11T23:18:11Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"c1f95c387916fee125ff70c2fa9de452","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__05%2F30%2F31%2F053031214f56bc7b8fcd3d4bcd861cfc0f984c9b","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__05%2F30%2F31%2F053031214f56bc7b8fcd3d4bcd861cfc0f984c9b"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Texas.zip","title":"","contentType":"application/zip","contentEncoding":null,"pathOnDisk":"__disk__d5/4c/42/d54c428b72aabc96f28a07b03cc5df5245655dd8","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":646925139,"dateUploaded":"2020-02-11T23:18:28Z","originalMetadata":false,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"58aca03c78089c8c6da62e71d48767ec","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__d5%2F4c%2F42%2Fd54c428b72aabc96f28a07b03cc5df5245655dd8","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__d5%2F4c%2F42%2Fd54c428b72aabc96f28a07b03cc5df5245655dd8"},{"cuid":null,"key":null,"bucket":null,"published":null,"node":null,"name":"Metadata_Building_Dataset_State_Wide_Layers.xml","title":"","contentType":"application/fgdc+xml","contentEncoding":null,"pathOnDisk":"__disk__b7/43/79/b74379256059aabaa6346df8d75da5631018107b","processed":false,"processToken":null,"imageWidth":null,"imageHeight":null,"size":13156,"dateUploaded":"2022-08-28T21:14:37Z","originalMetadata":true,"useForPreview":false,"movedToS3":null,"s3Object":null,"checksum":{"value":"40e3ecd089b1d504a26135b8d0e0cea6","type":"MD5"},"url":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b7%2F43%2F79%2Fb74379256059aabaa6346df8d75da5631018107b","downloadUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b7%2F43%2F79%2Fb74379256059aabaa6346df8d75da5631018107b","metadataHtmlViewUri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657?f=__disk__b7%2F43%2F79%2Fb74379256059aabaa6346df8d75da5631018107b&transform=1"}],"distributionLinks":[{"uri":"https://www.sciencebase.gov/catalog/file/get/5e432067e4b0edb47be84657","title":"Download Attached Files","type":"downloadLink","typeLabel":"Download Link","rel":"alternate","name":"State_wideLayers.zip","files":[{"name":"DistrictofColumbia.zip","title":"","contentType":"application/zip","size":3413856,"checksum":{"value":"ea65377e5967904eec49c38934f4afca","type":"MD5"}},{"name":"RhodeIsland.zip","title":"","contentType":"application/zip","size":20232974,"checksum":{"value":"3d64e3627d7dbc095fd5bb77cc57d83c","type":"MD5"}},{"name":"Delaware.zip","title":"","contentType":"application/zip","size":22992871,"checksum":{"value":"84eae35374a2eb25e670d1d3b4dbf945","type":"MD5"}},{"name":"Vermont.zip","title":"","contentType":"application/zip","size":29878415,"checksum":{"value":"3e33629cb2009579a0ca4175fef37241","type":"MD5"}},{"name":"Wyoming.zip","title":"","contentType":"application/zip","size":31025768,"checksum":{"value":"34222e282e005be4b480e69f5f90168c","type":"MD5"}},{"name":"Utah.zip","title":"","contentType":"application/zip","size":34773757,"checksum":{"value":"a21404c85c374d8cdc9819c2ebc4c680","type":"MD5"}},{"name":"SouthDakota.zip","title":"","contentType":"application/zip","size":44655285,"checksum":{"value":"ca1e48ca289e6574fc209e62a62d9a39","type":"MD5"}},{"name":"NewHampshire.zip","title":"","contentType":"application/zip","size":44827838,"checksum":{"value":"8e17a957a36b2955b4f305e138af82a1","type":"MD5"}},{"name":"NorthDakota.zip","title":"","contentType":"application/zip","size":45632865,"checksum":{"value":"bc6ebe342bd36e2215ed56a66a906655","type":"MD5"}},{"name":"Nevada.zip","title":"","contentType":"application/zip","size":48203368,"checksum":{"value":"c64c6ba1d4623d7002933e73761ee7b8","type":"MD5"}},{"name":"Maine.zip","title":"","contentType":"application/zip","size":61782571,"checksum":{"value":"23e280844ac369cf651e3155a45c82b1","type":"MD5"}},{"name":"Montana.zip","title":"","contentType":"application/zip","size":62631678,"checksum":{"value":"c6913e8370cd65f35cf082dc5dd5ebd2","type":"MD5"}},{"name":"Idaho.zip","title":"","contentType":"application/zip","size":67336491,"checksum":{"value":"0fd34db3149330aed7866c757860b92e","type":"MD5"}},{"name":"NewMexico.zip","title":"","contentType":"application/zip","size":73594544,"checksum":{"value":"12c8432d7dc498ce96506253da5531ee","type":"MD5"}},{"name":"WestVirginia.zip","title":"","contentType":"application/zip","size":78537646,"checksum":{"value":"355343048b274b2369c1f07e7f461925","type":"MD5"}},{"name":"Connecticut.zip","title":"","contentType":"application/zip","size":79880971,"checksum":{"value":"820bb88869391090cbca91739d2c20db","type":"MD5"}},{"name":"Nebraska.zip","title":"","contentType":"application/zip","size":81664701,"checksum":{"value":"dea5f3ccc8cafda74c5a8b91c1d40b2b","type":"MD5"}},{"name":"Arkansas.zip","title":"","contentType":"application/zip","size":106720294,"checksum":{"value":"35de97a2eb606aa5b8466ecd97b25727","type":"MD5"}},{"name":"Alabama.zip","title":"","contentType":"application/zip","size":105868777,"checksum":{"value":"36febb18b754fc36177e50f9ce38562e","type":"MD5"}},{"name":"Kansas.zip","title":"","contentType":"application/zip","size":113496834,"checksum":{"value":"3d2a1a91b504951a2bbea809f7e37463","type":"MD5"}},{"name":"Oregon.zip","title":"","contentType":"application/zip","size":118448308,"checksum":{"value":"a202ba6c4c1d9a2312e36ce9b003fac0","type":"MD5"}},{"name":"Massachusetts.zip","title":"","contentType":"application/zip","size":126716009,"checksum":{"value":"19888804b4f75251212e17a9ea80fb31","type":"MD5"}},{"name":"Oklahoma.zip","title":"","contentType":"application/zip","size":128675964,"checksum":{"value":"fadc3c2d79c418d46274f28e852e5438","type":"MD5"}},{"name":"Colorado.zip","title":"","contentType":"application/zip","size":130950905,"checksum":{"value":"173b12c0cd20a53f1b3630f7941b6344","type":"MD5"}},{"name":"Mississippi.zip","title":"","contentType":"application/zip","size":129653398,"checksum":{"value":"e02476f4818fd1a46c78698b86e1ad83","type":"MD5"}},{"name":"Maryland.zip","title":"","contentType":"application/zip","size":137253837,"checksum":{"value":"d3e9292f95985091bb0c129d4bc8f93b","type":"MD5"}},{"name":"Louisiana.zip","title":"","contentType":"application/zip","size":144820967,"checksum":{"value":"b0bd98014c02cab0208ec8338387918a","type":"MD5"}},{"name":"Iowa.zip","title":"","contentType":"application/zip","size":143801765,"checksum":{"value":"e53625c7c0c9f4ad3bc13d8f4efaf312","type":"MD5"}},{"name":"Arizona.zip","title":"","contentType":"application/zip","size":147197055,"checksum":{"value":"3b85aa58bf7ad386454aa4758e233699","type":"MD5"}},{"name":"SouthCarolina.zip","title":"","contentType":"application/zip","size":168738554,"checksum":{"value":"4ff303a1f168e6b1e33f0564abc9c34b","type":"MD5"}},{"name":"NewJersey.zip","title":"","contentType":"application/zip","size":179848013,"checksum":{"value":"37026f3a0227b532c5aa57f541b37ba8","type":"MD5"}},{"name":"Washington.zip","title":"","contentType":"application/zip","size":185097683,"checksum":{"value":"00c4ec64f5fc788fc0f0b87a987954da","type":"MD5"}},{"name":"Kentucky.zip","title":"","contentType":"application/zip","size":184756090,"checksum":{"value":"5641526720910e8e89765cd170a11c7b","type":"MD5"}},{"name":"Minnesota.zip","title":"","contentType":"application/zip","size":198353354,"checksum":{"value":"83e1fdcd3ab4427436e0c3ac5cd6709c","type":"MD5"}},{"name":"Wisconsin.zip","title":"","contentType":"application/zip","size":214862314,"checksum":{"value":"9a3b1b20480832d035ecf4f2306dd463","type":"MD5"}},{"name":"Indiana.zip","title":"","contentType":"application/zip","size":219497169,"checksum":{"value":"82a268ec401379803d14479e8892b09f","type":"MD5"}},{"name":"Missouri.zip","title":"","contentType":"application/zip","size":228264407,"checksum":{"value":"199d1fb4c93cdf773b70640bccd0d772","type":"MD5"}},{"name":"Virginia.zip","title":"","contentType":"application/zip","size":229139158,"checksum":{"value":"f142648e142a49eed4ab108e2dc6bd48","type":"MD5"}},{"name":"Tennessee.zip","title":"","contentType":"application/zip","size":234869838,"checksum":{"value":"68771f6f3919da1ff0be9dd067cc74fc","type":"MD5"}},{"name":"Michigan.zip","title":"","contentType":"application/zip","size":264476718,"checksum":{"value":"d1115c280a2f7b8f06c54cc6fbe349a7","type":"MD5"}},{"name":"Illinois.zip","title":"","contentType":"application/zip","size":282171965,"checksum":{"value":"61bd91642c38282c2b93ddaa888d4cd4","type":"MD5"}},{"name":"Georgia.zip","title":"","contentType":"application/zip","size":304436964,"checksum":{"value":"a2a23bc83837d326c163c08060c05c38","type":"MD5"}},{"name":"NewYork.zip","title":"","contentType":"application/zip","size":309476306,"checksum":{"value":"97a0f0266922c62abefda57c3424b00c","type":"MD5"}},{"name":"Pennsylvania.zip","title":"","contentType":"application/zip","size":332567119,"checksum":{"value":"4ce034e28c760b0e920c0e84f8a0b86a","type":"MD5"}},{"name":"NorthCarolina.zip","title":"","contentType":"application/zip","size":350582803,"checksum":{"value":"f1ad7fb0d736fab70bacdbce7b707034","type":"MD5"}},{"name":"Ohio.zip","title":"","contentType":"application/zip","size":410843154,"checksum":{"value":"c6bd46e0c463ccaa22920cfc35289275","type":"MD5"}},{"name":"Florida.zip","title":"","contentType":"application/zip","size":407921466,"checksum":{"value":"56ea3ec4142b2234f72816bef640e0e9","type":"MD5"}},{"name":"California.zip","title":"","contentType":"application/zip","size":552118711,"checksum":{"value":"c1f95c387916fee125ff70c2fa9de452","type":"MD5"}},{"name":"Texas.zip","title":"","contentType":"application/zip","size":646925139,"checksum":{"value":"58aca03c78089c8c6da62e71d48767ec","type":"MD5"}},{"name":"Metadata_Building_Dataset_State_Wide_Layers.xml","title":"","contentType":"application/fgdc+xml","size":13156,"checksum":{"value":"40e3ecd089b1d504a26135b8d0e0cea6","type":"MD5"}}]}]}
function() {
  var counterKey = 'gtmPageViewCounter';
  var pageViewCount = sessionStorage.getItem(counterKey);
  if (pageViewCount === null) {
    pageViewCount = 1;
  } else {
    pageViewCount = parseInt(pageViewCount, 10) + 1;
  }
  sessionStorage.setItem(counterKey, pageViewCount);
  return pageViewCount;
}
list_of_dicts = [
    {'name': 'Alice', 'age': 30},
    {'name': 'Bob', 'age': 25},
    {'name': 'Charlie', 'age': 35}
]
person = next((item for item in list_of_dicts if item.get('name') == 'Bob'),  "person not found." )
print(f"Found: {person}")
add_action( 'woocommerce_proceed_to_checkout', 'add_custom_lines_above_checkout_button', 5 );

function add_custom_lines_above_checkout_button() {
    echo '<p class="custom-line-above-checkout">לא כולל דמי משלוח</p>';
    echo '<p class="second-custom-line-above-checkout" style="display:none;">דמי משלוח כלולים</p>';
}

add_action( 'wp_footer', 'custom_checkout_js' );
function custom_checkout_js() {
    ?>
    <script>
    jQuery(document).ready(function($) {
        // Check if the radio button is checked initially
        if ($('#shipping_method_0_flat_rate4').is(':checked')) {
            $('.custom-line-above-checkout').hide(); // Hide the first element initially
            $('.second-custom-line-above-checkout').show(); // Show the second element initially
        }

        // Add change event listener to the radio button
        $('input[type="radio"][name="shipping_method"]').change(function() {
            // Check if the radio button with ID shipping_method_0_flat_rate4 is checked
            if ($(this).attr('id') === 'shipping_method_0_flat_rate4' && $(this).is(':checked')) {
                $('.custom-line-above-checkout').hide(); // Hide the first element
                $('.second-custom-line-above-checkout').show(); // Show the second element
            } else {
                $('.custom-line-above-checkout').show(); // Show the first element
                $('.second-custom-line-above-checkout').hide(); // Hide the second element
            }
        });
    });
    </script>
    <?php
}
   <div class="storyline-col2">
                <div class="swiper timeSwiper section-wrap timeline-year-container flex-shrink-0 d-flex"
                    style="translate: none; rotate: none; scale: none; touch-action: pan-y;">
                    <ul class="timeline-primary-ul swiper-wrapper" style="touch-action: pan-y;">
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2016</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2017</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2018</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2019</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2020</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2021</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2022</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2023</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <li style="touch-action: pan-y;" class="swiper-slide">
                            <h3 style="touch-action: pan-y;"> <span style="touch-action: pan-y;">2024</span></h3>
                            <ul style="touch-action: pan-y;">
                                <li class="timeline-year-month" data-case-count="1" data-month="Nov"
                                    style="touch-action: pan-y;">
                                    <div class="label revealed" href="#" modal-target="timeline-modal-0"
                                        style="touch-action: pan-y;"> <span class="timeline-month"
                                            style="touch-action: pan-y;">June </span> <span class="dot"
                                            style="touch-action: pan-y;"></span>
                                        <div class="excerpt" style="touch-action: pan-y;">
                                            <p style="touch-action: pan-y;">Started as a bootstrapped venture in a
                                                small Noida basement office with 20 employees.</p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>






/* timeline-sect */

.timeline-year-container {
    align-items: center;
    position: relative;
    padding-left: 165px;
    padding-bottom: 60px;
    overflow-y: hidden;
    scroll-behavior: smooth;
}

.timeline-sect .swiper-slide {
    background-color: transparent !important;
}

.story-banner {
    padding: 130px 0px 0px 190px;
}

.timeline-year-container .timeline-primary-ul>li:first-child {
    position: relative
}

.timeline-sect {
    /* overflow: hidden; */
    position: relative;
    height: 770px;

}

.story-banner-cont {
    color: var(--white);
}

.storyline-wrapper {
    display: grid;
    grid-template-columns: 50% 50%;
    position: relative;
}

.storyline-wrapper:before {
    content: '';
    position: absolute;
    left: 0;
    top: -290px;
    width: 47%;
    height: 1040px;
    background-image: url(images/journey/story-img.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: left;
    border-radius: 16px;
    z-index: 999;
}

.timeline-year-container .timeline-primary-ul>li:first-child:after {
    content: "";
    left: -177px;
    position: absolute;
    display: block;
    height: 100%;
    width: 33%;
    background-image: url(images/journey/shape7.png);
    top: 9px;
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
}

.timeline-year-container .timeline-primary-ul>li:nth-child(3) {
    position: relative
}


.timeline-year-container .timeline-primary-ul>li:nth-child(5) {
    position: relative
}

.timeline-year-container .timeline-primary-ul>li:nth-child(5):before {
    content: "";
    display: block;
    position: absolute;
    width: min(47.2222222222vw, 85vh);
    height: min(47.2222222222vw, 85vh);
    background-image: url(images/journey/yearimg3);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    left: -67.3%;
    top: 0;
    bottom: 0;
    margin-block: auto;
    z-index: -1;
}

.timeline-year-container .timeline-primary-ul>li:nth-child(8) {
    position: relative;
    padding-right: 10px;
}

.timeline-year-container .timeline-primary-ul li ul {
    position: relative;
    display: flex;
    align-items: center;
}

.timeline-sect li.swiper-slide.swiper-slide-active {
    margin-right: 0 !important;
}

.timeline-year-container .timeline-primary-ul li ul:before {
    content: "";
    display: block;
    position: absolute;
    left: -25px;
    top: 56%;
    width: 608px;
    height: 100%;
    background-image: url(images/journey/shape3.png);
    background-position: top;
    background-repeat: no-repeat;
    background-size: 100%;
}

.timeline-year-container .timeline-primary-ul li ul li {
    top: 100%;
    position: relative;
    margin-inline: 216px;
}

.timeline-year-container .timeline-primary-ul li ul li:after,
.timeline-year-container .timeline-primary-ul li ul li:before {
    content: "";
    display: block;
    position: absolute;
}

.timeline-year-container .timeline-primary-ul li ul li:before {
    width: 1px;
    height: 100%;
    left: 0;
    background: rgba(255, 255, 255, .035);
    z-index: -1;
    transform: translate(0, -50%)
}

.timeline-sect .label.revealed {
    position: relative;
}

.timeline-year-container .timeline-primary-ul li ul li .label {
    transform: translate(-150%, 0);
    position: absolute;
    left: -60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: .7s ease-in-out
}

.timeline-year-container .timeline-primary-ul li ul li .label .timeline-month {
    font-size: 26px;
    color: #fff;
    font-weight: 600;
}



.timeline-year-container .timeline-primary-ul li ul li .label .dot:after {
    content: "";
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--pc);
    transform: translate(-50%, -50%)
}

.timeline-year-container .timeline-primary-ul li ul li .label .excerpt {
    top: min(4.8611111111vw, 8.75vh);
    width: min(20.1388888889vw, 36.25vh);
    position: absolute;
    left: min(2.7777777778vw, 5vh);
    opacity: 0
}

.timeline-year-container .timeline-primary-ul li ul li .label .excerpt p {
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    color: #fff;
    width: 100%;
    position: relative;
    top: 2px;
    left: -5px;
    margin: 0;
}

.story-banner-cont h2 {
    font-size: 90px;
    font-weight: 500;
    line-height: 104px;
    margin: 0;
}

.story-banner-cont h2 span {
    font-weight: 300;
}

.story-banner-cont h3 {
    font-size: 56px;
    font-weight: 500;
    margin: 10px 0 20px;
}

.timeline-year-container .timeline-primary-ul li ul li .label .excerpt p span {
    display: block;
    margin-top: min(.6944444444vw, 1.25vh);
    font-weight: var(--font-m);
}

.timeline-year-container .timeline-primary-ul li ul li .label:before {
    content: "";
    position: absolute;
    background-image: url(images/journey/shape9.png);
    background-repeat: no-repeat;
    background-size: 43px;
    width: 150px;
    height: 210px !important;
    bottom: -12px !important;
    left: -11px;
}

.timeline-sect li.timeline-year-month::marker {
    font-size: 0 !important;
}

.timeline-year-container .timeline-primary-ul li ul li .label.revealed {
    opacity: 1;
}

.timeline-year-container .timeline-primary-ul li ul li .label.revealed:before {
    height: min(9.375vw, 16.875vh);
}

.timeline-year-container .timeline-primary-ul li ul li .label.revealed .excerpt {
    opacity: 1;
}

.timeline-year-container .timeline-primary-ul li ul li .label:after {
    content: "";
    position: absolute;
    display: block;
    width: min(1.25vw, 2.25vh);
    height: min(1.25vw, 2.25vh);
    background: var(--pc);
    left: 50%;
    border-radius: 50%;
}

.timeline-year-container .timeline-primary-ul li:nth-child(odd) ul li .label {
    bottom: min(-.6944444444vw, -1.25vh);
    padding-bottom: 0;
}

.timeline-year-container .timeline-primary-ul li:nth-child(odd) ul li .label.revealed {
    padding-bottom: 220px;
}

.timeline-year-container .timeline-primary-ul li:nth-child(odd) ul li .label.revealed .excerpt {
    transition: opacity .7s ease-in-out .4s;
    top: 108px;
}

.timeline-year-container .timeline-primary-ul li:nth-child(odd) ul li .label:before {
    left: -8px;
}

.timeline-year-container .timeline-primary-ul li:nth-child(odd) ul li .label:after {
    bottom: min(-.4166666667vw, -.75vh);
    transform: translate(-50%, -50%);
}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label {
    flex-direction: column-reverse;
    top: -17px;
    left: -95px;
}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label.revealed {
    padding-top: 180px;
}

.timeline-year-container .timeline-primary-ul li:nth-child(odd) ul li .label.revealed span {
    left: -10px;
    top: 18px;
    position: relative;
}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label.revealed span {
    left: 10px;
    top: 26px;
    position: relative;
}

.storyline-col2 {
    position: relative;
}

.storyline-col2:before {
    content: "";
    display: block;
    position: absolute;
    width: 67%;
    height: 72%;
    background-image: url(images/journey/journy-circle.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    left: -19%;
    bottom: 13%;

}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label .dot {
    margin-top: 0;
    margin-bottom: min(.6944444444vw, 1.25vh);
}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label .excerpt {
    top: 55px;
    left: 70px;
    transition: top .7s ease-in-out, opacity .7s ease-in-out .3s;
}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label:before {
    top: 3px;
    left: -1px;
    transform: rotate(180deg);
    width: 54px;
    background-size: 43px;
    height: 210px !important;
}

.timeline-year-container .timeline-primary-ul li:nth-child(even) ul li .label:after {
    top: min(-.5555555556vw, -1vh);
    transform: translate(-50%, -50%);
}

.timeline-year-container h3 {
    position: relative;
    text-align: center;
}

.timeline-year-container h3 span {
    color: #fff;
    position: relative;
    top: 22px;
    font-size: 50px;
    font-weight: 800;
}

.timeline-year-container h3:before {
    top: 36px;
}

.timeline-year-container h3:after {
    bottom: 15px;
}

.timeline-year-container h3 span:after,
.timeline-year-container h3 span:before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pc)
}

.timeline-year-container h3 span:before {
    left: 0
}

.timeline-year-container h3 span:after {
    right: 0
}

.timeline-year-container h3:after,
.timeline-year-container h3:before {
    content: "";
    display: block;
    position: relative;
    width: min(10.7638888889vw, 19.375vh);
    height: min(7.4305555556vw, 13.375vh);
    background-image: url(images/journey/shape2.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-inline: auto;
    filter: brightness(0) saturate(100%) invert(100%) sepia(59%) saturate(248%) hue-rotate(258deg) brightness(118%) contrast(100%);

}

.timeline-year-container h3:after {
    margin-top: min(1.3888888889vw, 2.5vh);
    transform: rotate(180deg)
}

var swiper = new Swiper(".timeSwiper", {
  slidesPerView: 1.4,
  speed: 10000,
  direction: 'horizontal',
  zoom: true,
  keyboard:
  {
    enabled: true,
    onlyInViewport: false,
  },
  mousewheel:
  {
    invert: true,
  },
  autoplay:
  {
    delay: 0,
  },
  loop: true,
  freeMode: true,
});
import auth0 from 'auth0-js'
class Auth0JS {
  constructor(config) {
    this.config = config
    this.webAuth = new auth0.WebAuth({
      domain: config.auth0.domain,
      clientID: config.auth0.clientID,
      redirectUri: config.baseURL,
      responseType: 'id_token',
      scope: 'openid profile email',
    })
  }

  login(language) {
    if (language) {
      const uiLocales = language === 'zh' ? 'zh-CN' : language
      this.webAuth.authorize({ ui_locales: uiLocales, responseType: 'code', redirectUri: `${this.config.apiURL}/login/auth0` })
    } else this.webAuth.authorize()
  }
  
  signup(lang) {
    const uiLocales = lang === 'zh' ? 'zh-CN' : lang
    if (uiLocales)
      this.webAuth.authorize({
        ui_locales: uiLocales,
        screen_hint: 'signup',
        redirectUri: `${this.config.apiURL}/login/auth0`
      })
    else
      webAuth.authorize({
        screen_hint: 'signup',
        redirectUri: `${this.config.apiURL}/login/auth0`
      })
  }

  logout() {
    this.webAuth.logout({
      returnTo: this.config.baseURL, // Allowed logout URL listed in dashboard
      clientID: this.config.auth0.clientID, // Your client ID process.env.AUTH0_CLIENT_ID
    })
  }

  checkSession() {
    return new Promise((resolve, reject) => {
      this.webAuth.checkSession({}, async (err, authResult) => {
        if (authResult) {
          resolve(true)
        } else {
          resolve(false)
        }
      })
    })
  }
}

export default function (context, inject) {
  const runtimeConfig = context.$config
  const auth0JS = new Auth0JS(runtimeConfig)
  inject('auth0JS', auth0JS)
}
import config from 'config';
import ejwt from '../../../helper/encrypted-jwt';
import logger from '../../../helper/logger';
import * as Response from '../../../helper/responses';
import * as util from '../../../helper/util';
import { confirmRefreshToken } from '../../../helper/refresh';
import * as validate from '../../../helper/validate';
import { create as createLog } from '../../service/user/userlog.service';
import * as loginService from '../../service/user/userlogin.service';

// userType
const USER_TYPE = {
  DEMO: 15040,
  GUEST: 15030,
  USER: 15020,
  SUPPLIER: 15010,
  ADMIN: 15000
}

const USER_TYPE_NAV_MAPPER = {
  [USER_TYPE.ADMIN]: { path: '/admins' },
  [USER_TYPE.SUPPLIER]: { path: '/myyarns?page=1' },
  [USER_TYPE.DEMO]: { path: '/pr-supplier' },
  [USER_TYPE.USER]: { path: '/search' },
  [USER_TYPE.GUEST]: { path: '/pr-supplier' }
}

/**
 * login userlogin
 *
 * @param   {Object} req
 * @param   {Object} res
 * @returns {Object}
 */
export const login = async (req, res) => {
  const error = {};
  error.name = 'login';
  error.code = 10901;
  try {
    const sessionUserId = 'user_id';
    logger.debug(`controller.userlogin.login : ${sessionUserId}`);
    const { body } = req;
    const target = {};
    Object.assign(target, body);
    target.pwd = null;
    target.password = null;
    target.passwordConfirm = null;
    createLog(req, ['login', 'userlogin', JSON.stringify(target)]);
    if (!validate.isEmail(body.email)) {
      logger.error('Validation failed [email]');
      return Response.error(res, { code: 10901, message: 'Validation failed' }, 412);
    }
    if (!validate.isLocation(body.srcloc)) {
      logger.error('Validation failed [srcloc]');
      return Response.error(res, { code: 10901, message: 'Validation failed' }, 412);
    }

    const [err, vResult] = await util.to(loginService.loginUserApex(body, req, res));
    
    if (err) {
      error.code = err.code;
      error.message = err.message;
      logger.error(error);
      return Response.error(res, error, 500);
    }
    

    return Response.ok(res, vResult);
  } catch (e) {
    error.message = e.message;
    logger.error(error);
    return Response.error(res, error, 500);
  }
};

/**
 * login userlogin
 *
 * @param   {Object} req
 * @param   {Object} res
 * @returns {Object}
 */
export const loginAuth0 = async (req, res) => {
  const error = {};
  error.name = 'login';
  error.code = 10901;
  try {
    logger.debug(`controller.userlogin.loginAuth0 : ${JSON.stringify(req.query)}`);
    const {code} = req.query
    if (!code) {
      return Response.redirect(res, config.get('serverConfig.web'));
    }
    
    const [err, userAuth0] = await util.to(loginService.getUserByCodeAuth0(code, req, res));
    
    if (err) {
      error.code = err.code;
      error.message = err.message;
      logger.error(error);
      return Response.error(res, error, 500);
    }
    
    userAuth0.srcloc = 'W'
    
    const target = {};
    Object.assign(target, userAuth0);
    createLog(req, ['login', 'userlogin', JSON.stringify(target)]);

    const [err1, vResult1] = await util.to(loginService.loginUserAuth0(userAuth0, req, res));
    
    if (err1) {
      error.code = err.code;
      error.message = err.message;
      logger.error(error);
      return Response.error(res, error, 500);
    }
    
    if (util.isEmpty(vResult1.companyName) && vResult1.userType === 15010) {
      return Response.redirect(res, `https://${req.headers.host}/account/create?invited=true&manager=true`);
    }
    
    const lang = vResult1.basicLanguage === 'en' || vResult1.userType === '15000' ? '' : `/${vResult1.basicLanguage}`
    
    return Response.redirect(res, `https://${req.headers.host}${lang}${USER_TYPE_NAV_MAPPER[vResult1.userType].path}`);
  } catch (e) {
    error.message = e.message;
    logger.error(error);
    return Response.error(res, error, 500);
  }
};
/**
 * refresh userlogin
 *
 * @param   {Object} req
 * @param   {Object} res
 * @returns {Object}
 */
export const refresh = async (req, res) => {
  const sessionUserId = req.session.user ? req.session.user.userId : 'unknown';
  logger.debug(`controller.userlogin.refresh : ${req.hostname}, ${req.clientIp}, ${sessionUserId}`);

  await confirmRefreshToken(req, res);
  
  return 0;
};

/**
 * logout userlogin
 *
 * @param   {Object} req
 * @param   {Object} res
 * @returns {Object}
 */
export const logout = async (req, res) => {
  const error = {};
  error.name = 'logout';
  error.code = 10901;
  try {
    const { user } = req.session;
    if (user) {
      const sessionUserId = user.userId;
      logger.debug(`controller.userlogin.logout : ${sessionUserId}`);
      user.deleteMe = req.body.deleteMe;
      createLog(req, ['logout', 'userlogin', JSON.stringify(user)]);

      // req.logout();
      const deleteMe = (req.body.deleteMe !== undefined && req.body.deleteMe !== null) ? req.body.deleteMe : true;
      if (deleteMe) {
        util.deleteCookie(req, res, 'auth.remember-me', '');
        await util.to(loginService.logoutUser(user));
      } else {
        await util.to(loginService.logoutUserDeleteMe(user));
      }

      // req.logout();
      req.session.destroy((err) => {
        if (err) {
          const msg = 'Error destroying session';
          return Response.ok(res, {
            user: { status: 'logout', msg },
          });
        }
        return Response.ok(res, {
          user: { status: 'logout', msg: 'Please Log in again' },
        });
      });
    } else {
      const cookies = config.get('serverConfig.mode') !== 'test' ? req.signedCookies : req.cookies;
      let token = null;
      if (req && cookies) {
        token = cookies['auth.remember-me'];
      }
      if (token) {
        const decoded = ejwt.verify(config.get('jwt.secretkey'), token, config.get('jwt.encryption'));
        util.deleteCookie(req, res, 'auth.remember-me', '');
        await util.to(loginService.logoutUser(decoded));
      }
      return res.status(401).send('Access denied.');
    }

    // console.log('res ref', res.getHeaders()['set-cookie']);
    // return Response.ok(res, {
    //   user: { status: 'logout', msg: 'Please Log out again' },
    // });
    return null;
  } catch (e) {
    error.message = e.message;
    logger.error(error);
    return Response.error(res, error, 401);
  }
};
import config from 'config';
import fetch from 'node-fetch';
// import jwt from 'jsonwebtoken';
import moment from 'moment';
import bcrypt from 'bcrypt';
import ejwt from '../../../helper/encrypted-jwt';
import logger from '../../../helper/logger';
import db from '../../../server/database';
import * as util from '../../../helper/util';
import { modifyStatus } from '../../model/user/userinfo.model';
import * as UserLogin from '../../model/user/userlogin.model';
import * as userInfoService from '../../service/user/userinfo.service';
import * as codeInfoService from '../../service/code/codeinfo.service';
import * as userGroupService from '../../service/user/usergroup.service';
import * as companyService from '../../service/user/company.service';
import CustomError from '../../../helper/error';
import sendMail from './email.service';

const cacheOptions = {
  name: 'logininfo',
  time: 3600,
  force: false,
};

/**
 * get getRefreshJWT
 *
 * @param   {String} id
 * @param   {Boolean} rememberme
 * @returns {String}
 */
export const getRefreshJWT = (row, expirationTime) => {
  // cookie : milliseconds, jwt : seconds
  const defaultTime = parseInt(config.get('jwt.expiration'), 10) * 1000;
  const expirationTime1 = parseInt((expirationTime || defaultTime) / 1000, 10);
  // "Bearer "+
  const token = ejwt.sign(
    config.get('jwt.secretkey'),
    {
      userId: row.userId,
      email: row.email,
      srcloc: row.srcloc,
      userType: row.userType,
      rememberMe: row.rememberMe || false,
    },
    config.get('jwt.encryption'),
    { expiresIn: expirationTime1 },
  );
  // console.log('token', token);
  return token;
};

/**
 * set RefreshToken
 *
 * @param   {object} userInfo
 * @param   {object} req
 * @param   {object} res
 * @returns {String}
 */
const setRefreshToken = async (userInfo, req, res) => {
  // check remember me
  const rememberMe = userInfo.rememberMe || false;

  // calculate expire time
  let expirationTimeRefreshToken = parseInt(config.get('jwt.expiration1'), 10) * 1000;

  let expiresRefreshToken = new Date();
  expiresRefreshToken = new Date(Date.now() + expirationTimeRefreshToken);
  // set up for expire
  if (rememberMe) {
    expirationTimeRefreshToken = parseInt(config.get('jwt.expiration2'), 10) * 1000;
    expiresRefreshToken = new Date(Date.now() + expirationTimeRefreshToken);
  }
  // console.log('expiresRefreshToken', expiresRefreshToken);

  // get token
  const refreshToken = getRefreshJWT(userInfo, expirationTimeRefreshToken);

  const params = [];
  // update user login info
  params[0] = util.replaceUndefined(refreshToken);
  params[1] = util.replaceUndefined(expiresRefreshToken.toGMTString());
  params[2] = util.replaceUndefined(userInfo.userId);
  params[3] = util.replaceUndefined(userInfo.srcloc);
  await db.execute(UserLogin.refresh(), params, cacheOptions);

  // console.log('refreshToken', refreshToken);
  util.addCookie(req, res, 'auth.remember-me', refreshToken, '', expirationTimeRefreshToken);
  return { refreshToken, expires: expiresRefreshToken };
};

/**
 * login user
 *
 * @param   {Object} userInfo
 * @param   {Object} req
 * @param   {Object} res
 * @returns {Object}
 */
export const loginUser = async (userInfo, req, res) => {
  logger.debug(`userlogin.loginUser : ${userInfo.email}`);
  // createLog(req, ['loginUser', userInfo.srcloc, '', '', userInfo.userId]);

  const params = [];
  params[0] = util.replaceUndefined(userInfo.email);
  params[1] = util.replaceUndefined(userInfo.srcloc);

  const rowUser = await db.findOne(UserLogin.loginUser(), params, cacheOptions);
  if (util.isEmpty(rowUser)) {
    logger.error(`loginUser not found : ${userInfo.email}`);
    if (userInfo.srcloc === 'A') {
      throw new CustomError('not-found', 24);
    } else {
      throw new CustomError('login-error', 10924);
    }
    // throw new CustomError('not-found', userInfo.srcloc === 'A' ? 24 : 10910);
  }
  // is locked user ?
  if (parseInt(rowUser.userStatus, 10) === 17003) {
    logger.error(`loginUser locked : ${userInfo.email}, ${rowUser.userStatus}`);
    const rowFail = await db.findOne(UserLogin.getFailed(), [rowUser.userId], cacheOptions);
    if (!util.isEmpty(rowFail)) {
      const tdiff = parseInt(rowFail.tdiff, 10);
      if (tdiff === 0) {
        // vulerabliity No.9 rollback
        // if (userInfo.srcloc === 'A') {
        //   throw new CustomError('locked-account', 11);
        // } else {
        //   throw new CustomError('login-error', 10924);
        // }
        throw new CustomError('locked-account', userInfo.srcloc === 'A' ? 11 : 10921);
      } else {
        await util.to(db.execute(modifyStatus(), [17001, rowUser.userId], cacheOptions));
        rowUser.userStatus = 17001;
      }
    }
  }
  // compare password
  const pass = bcrypt.compareSync(userInfo.pwd, rowUser.pwd);
  // invalid password
  if (!pass) {
    // check previous failed history
    const rowFail = await db.findOne(UserLogin.getFailed(), [rowUser.userId], cacheOptions);
    if (util.isEmpty(rowFail)) {
      await db.execute(UserLogin.createFailed(), [rowUser.userId], cacheOptions);
    } else {
      const failCount = parseInt(rowFail.failed_count, 10);

      logger.error(`loginUser invalid password : ${userInfo.email}, ${failCount}`);
      // too many failed user
      if (failCount >= 5) {
        const [, vResult] = await util.to(db.execute(modifyStatus(), [17003, rowUser.userId], cacheOptions));
        if (vResult.affectedRows === 1 || vResult.changedRows === 1) {
          let locale = rowUser.basicLanguage || 'en';
          if ('en,ja,zh,it'.indexOf(locale) < 0) {
            locale = 'en';
          }
          // send email
          const templateId = 14;
          const row = {};
          row.userId = rowUser.userId;
          row.receiver_email = rowUser.email;
          row.receiver_name = rowUser.nickname;
          row.basicLanguage = locale;
          row.locale = locale;
          const [, returnValue] = await util.to(sendMail(req, row, templateId));
          if (returnValue.code !== 0) {
            logger.error(`modify ${rowUser.email} : failed to send email`);
            vResult.info = 'locked but failed to send email';
          }
        }
         //set field count = 0
         await db.execute(UserLogin.updateFailCount(),[rowUser.userId], cacheOptions);
        if (userInfo.srcloc === 'A') {
          throw new CustomError('not-found', 24);
        } else {
          throw new CustomError('locked-account', 10921);
        }
        // throw new CustomError('invalid-password', userInfo.srcloc === 'A' ? 13 : 10924);

      } else {
        await db.execute(UserLogin.updateFailed(), [rowUser.userId], cacheOptions);
      }
    }
    if (userInfo.srcloc === 'A') {
      throw new CustomError('not-found', 24);
    } else {
      throw new CustomError('login-error', 10924);
    }
    // throw new CustomError('invalid-password', userInfo.srcloc === 'A' ? 13 : 10924);
  }
  // is not active ?
  if (parseInt(rowUser.userStatus, 10) !== 17001) {
    logger.error(`loginUser not active : ${userInfo.email}, ${rowUser.userStatus}`);
    if (userInfo.srcloc === 'A') {
      throw new CustomError('not-found', 24);
    } else {
      throw new CustomError('login-error', 10924);
    }
    // throw new CustomError('not-active', userInfo.srcloc === 'A' ? 12 : 10916);
  }

  // is not plan ?
  // if (rowUser.srcloc === 'A' && (rowUser.validPlan === 'N' || parseInt(rowUser.planId, 10) > 30001)) {
  // After the Expire Date, I will not be able to log in from APEX.
  if (config.get('serverConfig.mode') !== 'staging') {
    if (rowUser.srcloc === 'A' && parseInt(rowUser.planId, 10) > 30001) {
      logger.error(`loginUser not plan : ${userInfo.email}, ${rowUser.planId}, ${rowUser.validPlan}`);
      if (userInfo.srcloc === 'A') {
        throw new CustomError('not-found', 24);
      } else {
        throw new CustomError('login-error', 10924);
      }
      // throw new CustomError('invalid-plan', userInfo.srcloc === 'A' ? 14 : 10927);
    }
  }
  req.session.save();
  const isForce = userInfo.force || false;
  // if (config.get('serverConfig.mode') === 'production') {
  // compare cookie expire date
  // user may be not logout or do not access during long time.
  // if expires date is later than current, user is already login except user is super admin.
  const sessUser = await db.findOne(UserLogin.selectSession(), [userInfo.userId, userInfo.srcloc, rowUser.userType], cacheOptions);
  if (!util.isEmpty(sessUser)) {
    // console.log('moment().unix()', moment().unix(), sessUser.expires);
    // console.log('moment().unix()', sessUser.session_id, req.sessionID);
    if (sessUser.session_id !== req.sessionID) {
    //   throw new CustomError('multiple-logins (same session)', 10);
    // }
      if (moment().unix() < sessUser.expires) {
        // user is not super admin and user's token is not empty
        if ((sessUser.session_id !== req.sessionID)) { // parseInt(rowUser.userType, 10) !== 15000 &&
          logger.info(`loginUser already : ${userInfo.email}`);
          if (isForce) {
            await db.execute(UserLogin.deleteSessionByUserId(), [userInfo.userId, userInfo.srcloc, rowUser.userType], cacheOptions);
            req.session.save();
          } else {
            res.status(500).send({
              status: false,
              name: 'login',
              code: userInfo.srcloc === 'A' ? 10 : 10410,
              message: 'multiple-logins',
              // stack: err.stack,
            });
            return;
            // throw new CustomError('multiple-logins', userInfo.srcloc === 'A' ? 10 : 10410);
          }
        }
      }
    }
  }
  // }

  // clear failed history
  await db.execute(UserLogin.deleteFailed(), [rowUser.userId], cacheOptions);

  const params2 = [];
  // update user login info
  params2[0] = util.replaceUndefined(rowUser.userId);
  params2[1] = util.replaceUndefined(rowUser.srcloc);
  await db.execute(UserLogin.login(), params2, cacheOptions);

  // get latest user login info
  const returnUser = await db.findOne(UserLogin.loginUser(), [rowUser.userId, rowUser.srcloc], cacheOptions);
  returnUser.pwd = undefined;
  if (config.get('serverConfig.mode') !== 'test') {
    returnUser.accessToken = undefined;
    returnUser.expires = undefined;
    returnUser.refreshToken = undefined;
  }

  returnUser.rememberMe = userInfo.rememberMe || false;
  req.session.isAdmin = userInfo.isAdmin || 'N';
  req.session.user = returnUser;
  // set remember-me to cookie
  const [, refresh] = await util.to(setRefreshToken(returnUser, req, res));

  if (config.get('serverConfig.mode') === 'test') {
    returnUser.refreshToken = refresh.refreshToken;
  }
  // update email of user_session
  req.session.save();
  await db.execute(UserLogin.modifySession(), [rowUser.userId, rowUser.srcloc, rowUser.userType, req.sessionID], cacheOptions);

  if (rowUser.srcloc === 'A') {
    returnUser.userType = parseInt((parseInt(returnUser.userType, 10) - 15000) / 10, 10);
    returnUser.userRole = parseInt(returnUser.userRole, 10) - 16000;
    returnUser.userStatus = parseInt(returnUser.userStatus, 10) - 17000;
  }
  // eslint-disable-next-line consistent-return
  return returnUser;
};

/**
* login user infor by Auth0
 *
 * @param   {Object} userInfo
 * @param   {Object} req
 * @param   {Object} res
 * @returns {Object}
 */
export const loginUserApex = async (userInfo, req, res) => {
  logger.debug(`userlogin.loginUser : ${userInfo.email}`);
  const body = new URLSearchParams();
  body.append("client_id", config.get('auth0Apex.AUTH0_CLIENT_ID'));
  body.append("client_secret", config.get('auth0Apex.AUTH0_CLIENT_SECRET'));
  body.append("audience", `${config.get('auth0Apex.AUTH0_DOMAIN')}/api/v2/`);
  body.append("grant_type", config.get('auth0Apex.GRANT_TYPE'));
  body.append("realm", config.get('auth0Apex.REALM'));
  body.append("scope", config.get('auth0Apex.SCOPE'));
  body.append("username", userInfo.email);
  body.append("password", userInfo.pwd);
  let responseAuth0 = false;
  let userInfoAuth0 = {};
  try {
    const response = await fetch(`${config.get('auth0.AUTH0_DOMAIN')}/oauth/token`, {
      method: "POST",
      body,
      headers: {
        "Cache-Control": "no-cache",
        "Content-Type": "application/x-www-form-urlencoded",
      },
    });
    responseAuth0 = response.status === 200;
    const data = await response.json();
    if (!responseAuth0) {
      throw new CustomError("not-found", 24);
    } else {
      // data user in Auth0
      const { id_token } = data;
      userInfoAuth0 = JSON.parse(
        Buffer.from(id_token.split(".")[1], "base64").toString()
      );
    }
  } catch (err) {
    throw new CustomError("not-found", 24);
  }
  let rowUser = await db.findOne(
    UserLogin.loginUserAuth0(),
    [userInfoAuth0.sub, userInfo.srcloc],
    cacheOptions
  );
  if (util.isEmpty(rowUser)) {
    logger.error(`loginUser not found : ${userInfo.email}`);
    if (userInfo.srcloc === "A") {
      throw new CustomError("not-found", 24);
    } else {
      throw new CustomError("login-error", 10924);
    }
  }
  rowUser = {
    ...rowUser,
    email: userInfoAuth0.email,
    userName: userInfoAuth0.family_name.concat(' ', userInfoAuth0.given_name),
    basicLanguage: userInfoAuth0.lang.code || 'en',
    srcloc: userInfo.srcloc,
  };
  // is not active ?
  if (parseInt(rowUser.userStatus, 10) !== 17001) {
    logger.error(
      `loginUser not active : ${userInfo.email}, ${rowUser.userStatus}`
    );
    if (userInfo.srcloc === "A") {
      throw new CustomError("not-found", 24);
    } else {
      throw new CustomError("login-error", 10924);
    }
    // throw new CustomError('not-active', userInfo.srcloc === 'A' ? 12 : 10916);
  }
  // is not plan ?
  // if (rowUser.srcloc === 'A' && (rowUser.validPlan === 'N' || parseInt(rowUser.planId, 10) > 30001)) {
  // After the Expire Date, I will not be able to log in from APEX.
  if (rowUser.srcloc === "A" && parseInt(rowUser.planId, 10) > 30001) {
    logger.error(
      `loginUser not plan : ${userInfo.email}, ${rowUser.planId}, ${rowUser.validPlan}`
    );
    if (userInfo.srcloc === "A") {
      throw new CustomError("not-found", 24);
    } else {
      throw new CustomError("login-error", 10924);
    }
    // throw new CustomError('invalid-plan', userInfo.srcloc === 'A' ? 14 : 10927);
  }
  req.session.save();
  const isForce = userInfo.force || false;

  const sessUser = await db.findOne(
    UserLogin.selectSession(),
    [rowUser.userId, rowUser.srcloc, rowUser.userType],
    cacheOptions
  );
  if (!util.isEmpty(sessUser)) {
    if (sessUser.session_id !== req.sessionID) {
      if (moment().unix() < sessUser.expires) {
        // user is not super admin and user's token is not empty
        if (sessUser.session_id !== req.sessionID) {
          logger.info(`loginUser already : ${userInfo.email}`);
          if (isForce) {
            await db.execute(
              UserLogin.deleteSessionByUserId(),
              [rowUser.userId, userInfo.srcloc, rowUser.userType],
              cacheOptions
            );
            req.session.save();
          } else {
            res.status(500).send({
              status: false,
              name: "login",
              code: userInfo.srcloc === "A" ? 10 : 10410,
              message: "multiple-logins",
              // stack: err.stack,
            });
            return;
          }
        }
      }
    }
  }

  const params2 = [];
  // update user login info
  params2[0] = util.replaceUndefined(rowUser.userId);
  params2[1] = util.replaceUndefined(rowUser.srcloc);
  await db.execute(UserLogin.login(), params2, cacheOptions);

  if (config.get("serverConfig.mode") !== "test") {
    rowUser.accessToken = undefined;
    rowUser.expires = undefined;
    rowUser.refreshToken = undefined;
  }
  rowUser.rememberMe = userInfo.rememberMe || false;
  req.session.isAdmin = userInfo.isAdmin || "N";
  req.session.user = rowUser;
  // set remember-me to cookie
  const [, refresh] = await util.to(setRefreshToken(rowUser, req, res));
  if (config.get("serverConfig.mode") === "test") {
    rowUser.refreshToken = refresh.refreshToken;
  }
  // update email of user_session
  req.session.save();
  await db.execute(
    UserLogin.modifySession(),
    [rowUser.userId, rowUser.srcloc, rowUser.userType, req.sessionID],
    cacheOptions
  );
  if (rowUser.srcloc === "A") {
    rowUser.userType = parseInt(
      (parseInt(rowUser.userType, 10) - 15000) / 10,
      10
    );
    rowUser.userRole = parseInt(rowUser.userRole, 10) - 16000;
    rowUser.userStatus = parseInt(rowUser.userStatus, 10) - 17000;
  }
  // eslint-disable-next-line consistent-return
  return rowUser;
};

export const getUserByCodeAuth0 = async (code, req, res) => {
  const body = new URLSearchParams();
  body.append("client_id", config.get('auth0.AUTH0_CLIENT_ID'));
  body.append("client_secret", config.get('auth0.AUTH0_CLIENT_SECRET'));
  body.append("audience", config.get('auth0.AUDIENCE'));
  body.append("grant_type", config.get('auth0.GRANT_TYPE'));
  body.append("redirect_uri", `https://${req.headers.host}/api/v1/login/auth0`);
  body.append("scope", config.get('auth0.SCOPE'));
  body.append("code", code);
  let userAuth0 = {};
  try {
    const response = await fetch(`${config.get('auth0.AUTH0_DOMAIN')}/oauth/token`, {
      method: "POST",
      body,
      headers: {
        "Cache-Control": "no-cache",
        "Content-Type": "application/x-www-form-urlencoded",
      },
    });
    const responseAuth0 = response.status === 200;
    const data = await response.json();
    if (!responseAuth0) {
      throw new CustomError("not-found", 24);
    } else {
      // data user in Auth0
      const { id_token } = data;
      userAuth0 = JSON.parse(
        Buffer.from(id_token.split(".")[1], "base64").toString()
      );
    }
    return userAuth0
  } catch (err) {
    throw new CustomError("not-found", 24);
  }
};

export const loginUserAuth0 = async (userInfo, req, res) => {
  logger.debug(`userlogin.loginUserAuth0 : ${userInfo.email}`);

  const rowUser = userInfo;
  req.session.save();

  // check user exist
  let user = await db.findOne(UserLogin.checkUserExist(), [userInfo.sub], cacheOptions);
  if (util.isEmpty(user)) {
    // register Account
    const guest = {}
    guest.firstName = userInfo.family_name
    guest.lastName = userInfo.given_name
    guest.userStatus = 17001
    guest.basicLanguage = userInfo.lang.code
    if (userInfo.user_type.code === 'Shima') {
      guest.userType = 15040
      guest.userRole = 16040
    } else {
      guest.userType = 15030
      guest.userRole = 16030
    }

    guest.auth0Id = userInfo.sub
    const [err, vResult] = await util.to(userInfoService.create(guest));
    if (err) {
      throw new CustomError('Register Guest is error', 24);
    }
    const [, groupId] = await util.to(codeInfoService.getSeqId('COMPANY'));
    await util.to(userGroupService.create({
      groupId, email: null, userType: guest.userType, userRole: guest.userRole, mailId: '', userId: vResult.insertId
    }));
    if (userInfo.user_type.code === 'Shima') {
      const company = {}
      company.companyName = userInfo.company_en
      company.companyId = groupId
      const [err1] = await util.to(companyService.create(company));
      if (err1) {
        error.message = err1.message;
        logger.error(error);
        return Response.error(res, error, 500);
      }
      await util.to(companyService.createPlan(req, { companyId: groupId, planId: 30001 }));
    }
    user = await db.findOne(UserLogin.checkUserExist(), [userInfo.sub], cacheOptions);
  }

  const sessUser = await db.findOne(UserLogin.selectSession(), [user.userId, userInfo.srcloc, user.userType], cacheOptions);
  if (!util.isEmpty(sessUser)) {
    if (sessUser.session_id !== req.sessionID) {
      if (moment().unix() < sessUser.expires) {
        // user is not super admin and user's token is not empty
        if ((sessUser.session_id !== req.sessionID)) { // parseInt(rowUser.userType, 10) !== 15000 &&
          logger.info(`loginUser already : ${userInfo.email}`);
          await db.execute(UserLogin.deleteSessionByUserId(), [user.userId, userInfo.srcloc, user.userType], cacheOptions);
          req.session.save();
        }
      }
    }
  }

  let returnUser = {}
  // check company
  const company = await db.findOne(UserLogin.checkCompanyExist(), [user.userId], cacheOptions);
  if (util.isEmpty(company)) {
    returnUser = await db.findOne(UserLogin.loginUserAuth0WithoutCompany(), [userInfo.sub, userInfo.srcloc], cacheOptions);
  } else {
    returnUser = await db.findOne(UserLogin.loginUserAuth0(), [userInfo.sub, userInfo.srcloc], cacheOptions);
  }

  // modify information
  returnUser.userName = rowUser.family_name.concat(' ', rowUser.given_name)
  returnUser.basicLanguage = rowUser.lang.code || 'en'
  returnUser.email = rowUser.email
  returnUser.srcloc = userInfo.srcloc
  returnUser.address1 = rowUser.direction
  returnUser.tel = rowUser.tel

  if (returnUser.userType === 15030) {
    returnUser.countryCode = rowUser.country.code
  }

  if (config.get('serverConfig.mode') !== 'test') {
    returnUser.accessToken = undefined;
    returnUser.expires = undefined;
    returnUser.refreshToken = undefined;
  }

  returnUser.rememberMe = userInfo.rememberMe || false;
  req.session.isAdmin = userInfo.isAdmin || 'N';
  req.session.user = returnUser;

  // set remember-me to cookie
  const [, refresh] = await util.to(setRefreshToken(returnUser, req, res));

  if (config.get('serverConfig.mode') === 'test') {
    returnUser.refreshToken = refresh.refreshToken;
  }
  // update information of user_session
  req.session.save();
  await db.execute(UserLogin.modifySession(), [returnUser.userId, userInfo.srcloc, returnUser.userType, req.sessionID], cacheOptions);
  return returnUser;
};

/**
 * logout user
 *
 * @param   {Object} userInfo
 * @returns {Object}
 */
export const logoutUser = async (userInfo) => {
  logger.debug(`userlogin.logoutUser : ${userInfo.userId}`);
  // createLog(req, ['logoutUser', userInfo.srcloc, '', '', userInfo.userId]);
  await db.execute(UserLogin.deleteSessionByUserId(), [userInfo.userId, userInfo.srcloc, userInfo.userType], cacheOptions);

  const params2 = [];
  params2[0] = util.replaceUndefined(userInfo.userId);
  params2[1] = util.replaceUndefined(userInfo.srcloc);

  const rows = await db.execute(UserLogin.logout(), params2, cacheOptions);
  return rows;
};

/**
 * logout user
 *
 * @param   {Object} userInfo
 * @returns {Object}
 */
export const logoutUserDeleteMe = async (userInfo) => {
  logger.debug(`userlogin.logoutUserDeleteMe : ${userInfo.userId}`);
  // createLog(req, ['logoutUser', userInfo.srcloc, '', '', userInfo.userId]);
  await db.execute(UserLogin.deleteSessionByUserId(), [userInfo.userId, userInfo.srcloc, userInfo.userType], cacheOptions);

  const params2 = [];
  params2[0] = util.replaceUndefined(userInfo.userId);
  params2[1] = util.replaceUndefined(userInfo.srcloc);

  const rows = await db.execute(UserLogin.logoutOnly(), params2, cacheOptions);
  return rows;
};

/**
 * refresh user
 *
 * @param   {Object} userInfo
 * @returns {Object}
 */
export const refresh = async (userInfo, req, res) => {
  logger.debug(`userlogin.refresh : ${userInfo.userId}`);

  const params = [];
  params[0] = util.replaceUndefined(userInfo.userId);
  params[1] = util.replaceUndefined(userInfo.srcloc);
  const rowUser = await db.findOne(UserLogin.loginUserById(), params, cacheOptions);
  if (util.isEmpty(rowUser)) {
    logger.error(`user not found : ${userInfo.userId}`);
    throw new CustomError('not-found', 24);
  }
  await db.execute(UserLogin.deleteSessionByUserId(), [rowUser.userId, rowUser.srcloc, rowUser.userType], cacheOptions);
  req.session.save();

  // get latest user login info
  const returnUser = await db.findOne(UserLogin.loginUser(), [rowUser.userId, rowUser.srcloc], cacheOptions);
  returnUser.pwd = undefined;
  // returnUser.refreshToken = refreshToken.refreshToken;
  if (config.get('serverConfig.mode') !== 'test') {
    returnUser.accessToken = undefined;
    returnUser.expires = undefined;
    returnUser.refreshToken = undefined;
  }

  // modify information
  returnUser.userName = userInfo.family_name.concat(' ', rowUser.given_name)
  returnUser.basicLanguage = userInfo.lang.code || 'en'
  returnUser.email = userInfo.email
  returnUser.srcloc = userInfo.srcloc

  returnUser.rememberMe = userInfo.rememberMe || false;
  req.session.user = returnUser;
  await util.to(setRefreshToken(returnUser, req, res));

  req.session.save();
  await db.execute(UserLogin.modifySession(), [rowUser.userId, rowUser.srcloc, rowUser.userType, req.sessionID], cacheOptions);

  if (rowUser.srcloc === 'A') {
    returnUser.userType = parseInt((parseInt(returnUser.userType, 10) - 15000) / 10, 10);
    returnUser.userRole = parseInt(returnUser.userRole, 10) - 16000;
    returnUser.userStatus = parseInt(returnUser.userStatus, 10) - 17000;
  }

  const params2 = [];
  // update user login info
  params2[0] = util.replaceUndefined(rowUser.userId);
  params2[1] = util.replaceUndefined(rowUser.srcloc);
  await db.execute(UserLogin.login(), params2, cacheOptions);

  return returnUser;
};

/**
 * reload user
 *
 * @param   {Object} sessionId
 * @returns {Object}
 */
export const reload = async (sessionId) => {
  // logger.debug(`userlogin.reload : ${sessionId}`);

  const returnUser = await db.findOne(UserLogin.selectSessionById(), [sessionId], cacheOptions);
  if (util.isEmpty(returnUser)) {
    return false;
  }
  return true;
};

/**
 * getSession
 *
 * @param   {Object} sessionId
 * @returns {Object}
 */
export const getSession = async (sessionId) => {
  // logger.debug(`userlogin.reload : ${sessionId}`);

  const returnUser = await db.findOne(UserLogin.selectSessionById(), [sessionId], cacheOptions);
  return returnUser;
};

/**
 * get refreshtoken
 *
 * @param   {Object} sessionId
 * @returns {Object}
 */
export const getRefreshToken = async (pInfo) => {
  // logger.debug(`userlogin.reload : ${sessionId}`);

  const returnUser = await db.findOne(UserLogin.loginUser(), [pInfo.userId, pInfo.srcloc], cacheOptions);
  return returnUser;
};
 const countries = [...new Set(cities)].map(elem => (
  {
    country: elem.country,
    emoji: elem.emoji
  } 
));
(unless (package-installed-p 'clojure-mode)
  (package-install 'clojure-mode))
star

Fri Mar 01 2024 03:46:07 GMT+0000 (Coordinated Universal Time)

@Ria

star

Thu Feb 29 2024 22:30:27 GMT+0000 (Coordinated Universal Time)

@juanc99 #sql

star

Thu Feb 29 2024 21:38:18 GMT+0000 (Coordinated Universal Time)

@juanc99 #sql

star

Thu Feb 29 2024 20:41:45 GMT+0000 (Coordinated Universal Time)

@Starblster

star

Thu Feb 29 2024 10:53:47 GMT+0000 (Coordinated Universal Time)

@Alihaan #php

star

Thu Feb 29 2024 10:46:26 GMT+0000 (Coordinated Universal Time)

@merol007

star

Thu Feb 29 2024 10:39:48 GMT+0000 (Coordinated Universal Time)

@merol007

star

Thu Feb 29 2024 08:39:45 GMT+0000 (Coordinated Universal Time) https://help.ubuntu.com/community/mkusb

@jrray

star

Thu Feb 29 2024 08:39:21 GMT+0000 (Coordinated Universal Time) https://help.ubuntu.com/community/mkusb

@jrray

star

Thu Feb 29 2024 07:19:38 GMT+0000 (Coordinated Universal Time)

@2018331055

star

Thu Feb 29 2024 06:52:15 GMT+0000 (Coordinated Universal Time) https://www.pythontutorial.net/python-oop/python-readonly-property/

@viperthapa #python

star

Thu Feb 29 2024 06:15:39 GMT+0000 (Coordinated Universal Time) https://www.pythontutorial.net/python-basics/python-unpacking-tuple/

@viperthapa #python

star

Thu Feb 29 2024 06:15:14 GMT+0000 (Coordinated Universal Time) https://www.pythontutorial.net/python-basics/python-unpacking-tuple/

@viperthapa #python

star

Thu Feb 29 2024 06:14:54 GMT+0000 (Coordinated Universal Time) https://www.pythontutorial.net/python-basics/python-unpacking-tuple/

@viperthapa #python

star

Thu Feb 29 2024 04:17:54 GMT+0000 (Coordinated Universal Time) https://onedd.co.za/staging/wp-admin/admin.php?page

@Pulak

star

Thu Feb 29 2024 02:48:20 GMT+0000 (Coordinated Universal Time) https://www.freecodecamp.org/news/modules-in-javascript/

@prakhar #javascript

star

Wed Feb 28 2024 20:56:08 GMT+0000 (Coordinated Universal Time)

@mastaklance

star

Wed Feb 28 2024 19:24:55 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/

@abcabcabc

star

Wed Feb 28 2024 18:54:30 GMT+0000 (Coordinated Universal Time) <!-- wp:social-links --><ul class="wp-block-social-links"><!-- wp:social-link {"url":"https://gravatar.com/will1234565a758999c15","service":"chain","label":"test","rel":"me"} /--></ul><!-- /wp:social-links -->

@MasterJoker94

star

Wed Feb 28 2024 18:22:22 GMT+0000 (Coordinated Universal Time) https://id.twitch.tv/oauth2/authorize

@MasterJoker94

star

Wed Feb 28 2024 17:31:23 GMT+0000 (Coordinated Universal Time) https://www.reddit.com/r/vscode/comments/z85pdi/how_can_i_make_vscode_correcly_locate_c_libraries/

@Hack3rmAn

star

Wed Feb 28 2024 16:05:18 GMT+0000 (Coordinated Universal Time) https://docs.pieces.app/installation-getting-started/macos

@lorikeetnetwork

star

Wed Feb 28 2024 14:27:24 GMT+0000 (Coordinated Universal Time)

@karreem

star

Wed Feb 28 2024 13:35:52 GMT+0000 (Coordinated Universal Time) https://outlook.office.com/owa/auth/errorfe.aspx?redirectType

@Laxmanteja23

star

Wed Feb 28 2024 10:22:57 GMT+0000 (Coordinated Universal Time)

@roshan1995 #html #php #javascript

star

Wed Feb 28 2024 10:01:33 GMT+0000 (Coordinated Universal Time)

@k_vaghasiya

star

Wed Feb 28 2024 09:58:01 GMT+0000 (Coordinated Universal Time)

@k_vaghasiya

star

Wed Feb 28 2024 09:29:22 GMT+0000 (Coordinated Universal Time)

@2018331055

star

Wed Feb 28 2024 09:25:21 GMT+0000 (Coordinated Universal Time)

@rigidon #google #apps #script #javascript

star

Wed Feb 28 2024 09:23:13 GMT+0000 (Coordinated Universal Time)

@shirish

star

Wed Feb 28 2024 08:13:05 GMT+0000 (Coordinated Universal Time)

@froiden ##tailwindcss ##css

star

Wed Feb 28 2024 07:51:24 GMT+0000 (Coordinated Universal Time) https://www.pythontutorial.net/python-basics/python-dictionary-comprehension/

@viperthapa #python

star

Wed Feb 28 2024 07:16:18 GMT+0000 (Coordinated Universal Time)

@Alihaan #php

star

Wed Feb 28 2024 07:01:09 GMT+0000 (Coordinated Universal Time)

@2018331055

star

Wed Feb 28 2024 06:57:25 GMT+0000 (Coordinated Universal Time) https://www.pythontutorial.net/python-basics/python-for-loop-list/

@viperthapa #python

star

Wed Feb 28 2024 00:55:39 GMT+0000 (Coordinated Universal Time)

@Sliderk21

star

Tue Feb 27 2024 21:07:04 GMT+0000 (Coordinated Universal Time) https://codepen.io/RajRajeshDn/pen/abVXzqZ

@Y@sir #social-share-icons #share-icons #social-share-buttons

star

Tue Feb 27 2024 19:49:01 GMT+0000 (Coordinated Universal Time) https://www.sciencebase.gov/catalog/item/5e432067e4b0edb47be84657?format

@skatzy

star

Tue Feb 27 2024 16:12:59 GMT+0000 (Coordinated Universal Time) https://www.reddit.com/r/GoogleTagManager/comments/1b0roz5/trigger_for_sessiontime_or_number_of_pages_visited/

@Sliderk21

star

Tue Feb 27 2024 13:56:58 GMT+0000 (Coordinated Universal Time) https://freedium.cfd/https://python.plainenglish.io/dont-use-anymore-for-in-python-225586f1b0c4

@viperthapa #python

star

Tue Feb 27 2024 13:49:51 GMT+0000 (Coordinated Universal Time) https://gruponacion.lightning.force.com/lightning/setup/ApexPages/page?address

@rcrespochoque

star

Tue Feb 27 2024 08:56:12 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Tue Feb 27 2024 04:47:47 GMT+0000 (Coordinated Universal Time)

@minhgiau998

star

Tue Feb 27 2024 04:46:09 GMT+0000 (Coordinated Universal Time)

@minhgiau998

star

Tue Feb 27 2024 04:43:34 GMT+0000 (Coordinated Universal Time)

@minhgiau998

star

Tue Feb 27 2024 03:03:42 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript #duplicates #map #newset

star

Tue Feb 27 2024 00:51:10 GMT+0000 (Coordinated Universal Time) https://github.com/clojure-emacs/clojure-mode

@esengie

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension