BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
www
/
wp-content
/
plugins
/
porto-functionality
/
shortcodes
/
assets
/
blocks
📤 Upload
📝 New File
📁 New Folder
Close
Editing: blocks.min.js
!function(){"use strict";var t=[,function(t,e,o){o.r(e);e.default=function({label:t,options:e,value:o,onChange:n}){const a=wp.element.createElement;return a("div",{className:"components-base-control porto-image-choose"},a("label",{className:"components-input-control__label css-1wgusda-Text-BaseLabel"},t),e.map((function(t,e){let i="";return""!=t.alt||o?isNaN(t.alt)?t.alt==o&&(i="active"):parseInt(t.alt)===parseInt(o)&&(i="active"):i="active",a("img",{src:t.src,alt:t.alt,key:e,className:i,onClick:function(t){if(t.target){const e=t.target.parentNode.getElementsByClassName("active");e.length&&e[0].classList.remove("active"),t.target.classList.add("active");const o=t.target.getAttribute("alt");return n(o)}}})})))}},function(t,e,o){o.r(e),o.d(e,{portoGenerateTypographyCSS:function(){return n}});e.default=function({label:t,value:e,options:o,onChange:n,removeHoverLinkClr:a=!1,removeFontSetting:i=!1}){const l=wp.i18n.__,r=wp.components.TextControl,s=wp.components.SelectControl,c=wp.components.RangeControl,u=wp.blockEditor.PanelColorSettings,p=wp.element.createElement;e||(e={});let d=[{label:l("Default","porto-functionality"),value:""}];return porto_block_vars.googlefonts&&porto_block_vars.googlefonts.map((function(t,e){d.push({label:t,value:t})})),p("div",{className:"porto-typography-control"},p("h3",{className:"components-base-control",style:{marginBottom:15}},t),(!o||!1!==o.fontFamily)&&"swatch"!=i&&p(s,{label:l("Font Family","porto-functionality"),value:e.fontFamily,options:d,help:l("If you want to use other font, please add it in Theme Options -> Skin -> Typography -> Custom Font.","porto-functionality"),onChange:t=>{e.fontFamily=t,n(e)}}),"swatch"!=i&&p(r,{label:l("Font Size","porto-functionality"),value:e.fontSize,help:l("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:t=>{e.fontSize=t,n(e)}}),"swatch"!=i&&p(c,{label:l("Font Weight","porto-functionality"),value:e.fontWeight,min:100,max:900,step:100,allowReset:!0,onChange:t=>{e.fontWeight=t,n(e)}}),"swatch"!=i&&(!o||!1!==o.textTransform)&&p(s,{label:l("Text Transform","porto-functionality"),value:e.textTransform,options:[{label:l("Default","porto-functionality"),value:""},{label:l("Inherit","porto-functionality"),value:"inherit"},{label:l("Uppercase","porto-functionality"),value:"uppercase"},{label:l("Lowercase","porto-functionality"),value:"lowercase"},{label:l("Capitalize","porto-functionality"),value:"capitalize"},{label:l("None","porto-functionality"),value:"none"}],onChange:t=>{e.textTransform=t,n(e)}}),"swatch"!=i&&(!o||!1!==o.lineHeight)&&p(r,{label:l("Line Height","porto-functionality"),value:e.lineHeight,help:l("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:t=>{e.lineHeight=t,n(e)}}),"swatch"!=i&&(!o||!1!==o.letterSpacing)&&p(r,{label:l("Letter Spacing","porto-functionality"),value:e.letterSpacing,help:l("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:t=>{e.letterSpacing=t,n(e)}}),(!o||!1!==o.textAlign)&&p(s,{label:l("Text Align","porto-functionality"),value:e.textAlign,options:[{label:l("Default","porto-functionality"),value:""},{label:l("Inherit","porto-functionality"),value:"inherit"},{label:l("Left","porto-functionality"),value:"left"},{label:l("Center","porto-functionality"),value:"center"},{label:l("Right","porto-functionality"),value:"right"},{label:l("Justify","porto-functionality"),value:"justify"}],onChange:t=>{e.textAlign=t,n(e)}}),p(u,{title:l("Color Settings","porto-functionality"),initialOpen:!1,colorSettings:a?[{label:l("Font Color","porto-functionality"),value:e.color,onChange:t=>{e.color=t,n(e)}}]:[{label:o&&o.isRating?l("Rating Color","porto-functionality"):l("Font Color","porto-functionality"),value:e.color,onChange:t=>{e.color=t,n(e)}},{label:o&&o.isRating?l("Unmarked Color","porto-functionality"):l("Link Hover Color","porto-functionality"),value:e.h_color,onChange:t=>{e.h_color=t,n(e)}}]}))};const n=function(t,e,o=""){var n="";if(!t||!e)return"";if(t.alignment||t.textAlign||t.fontFamily||t.fontSize||t.fontWeight||t.textTransform||t.lineHeight||t.letterSpacing||t.color){if(n+="."+e+"{","woo-rating"==o){let e="left";t.alignment?e=t.alignment:t.textAlign&&(e=t.textAlign),"center"==e?n+="margin-left: auto; margin-right: auto;":"right"==e&&(n+="margin-left: auto;")}else t.alignment?n+="text-align:"+t.alignment+";":t.textAlign&&(n+="text-align:"+t.textAlign+";");if(t.fontFamily&&(n+="font-family:"+t.fontFamily+";"),t.fontSize){let e=t.fontSize;e.trim().replace(/[0-9.]/g,"")||(e+="px"),n+="font-size:"+e+";",n+="--porto-fs:"+e+";"}if(t.fontWeight&&(n+="font-weight:"+t.fontWeight+";"),t.textTransform&&(n+="text-transform:"+t.textTransform+";"),t.lineHeight){let e=t.lineHeight;!e.trim().replace(/[0-9.]/g,"")&&Number(e)>3&&(e+="px"),n+="line-height:"+e+";",n+="--porto-lh:"+e+";"}if(t.letterSpacing){let e=t.letterSpacing;e.trim().replace(/[0-9.-]/g,"")||(e+="px"),n+="letter-spacing:"+e+";"}"woo-rating"!=o&&t.color&&(n+="color:"+t.color),n+="}"}return"woo-rating"!=o&&t.h_color&&(n+="."+e+" a:hover{",n+="color:"+t.h_color,n+="}"),"woo-rating"==o&&(t.color&&(n+="."+e+" span:before {",n+="color:"+t.color,n+="}"),t.h_color&&(n+="."+e+":before {",n+="color:"+t.h_color,n+="}")),n}},function(t,e,o){function n(){return n=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},n.apply(null,arguments)}o.r(e);e.default=function(t){const e=wp.element.useEffect,o=wp.element.findDOMNode;let a=null;e((()=>{const e=t.option,o=t.value,n=jQuery(a),i=void 0!==n.attr("multiple"),l=porto_block_vars.site_url+"/wp-json/ajaxselect2/v1/"+e+"/";return n.select2({ajax:{url:l,dataType:"json",data:function(t){var e={s:t.term};return i||(e.add_default="1"),e}},cache:!0}).on("change",(function(e){if(i){var o=jQuery(e.target);t.onChange(o.val().join(","))}else t.onChange(e.target.value)})),jQuery.ajax({url:l,dataType:"json",data:{ids:o||""}}).then((function(t){null!==t&&t.results.length>0&&(t.results.map(((t,e)=>{n.append(new Option(t.text,t.id,!0,!0)).trigger("change")})),n.trigger({type:"select2:select",params:{data:t}}))})),()=>{n.data("select2")&&n.select2("destroy")}}),[]);const{label:i,multiple:l}=t,r={};return l&&(r.multiple=1),React.createElement("div",{className:"components-base-control porto-ajaxselect2"},React.createElement("label",{className:"components-input-control__label css-1wgusda-Text-BaseLabel"},i),React.createElement("select",n({ref:t=>a=o(t)},r)),t.help&&React.createElement("p",{className:"css-1wm1a55-StyledHelp"},t.help))}},function(t,e,o){o.r(e);e.default=function({label:t,value:e,options:o,onChange:n,isHoverFull:a=!1}){const i=wp.i18n.__,l=wp.components.TextControl,r=wp.components.SelectControl,s=wp.element.useState,c=(wp.element.useEffect,wp.element.useMemo),u=wp.element.createElement;e||(e={}),o.field_type||(o.field_type="field");let p=[{label:i("Please select...","porto-functionality"),value:""}];porto_block_vars.acf&&porto_block_vars.acf[o.field_type]&&porto_block_vars.acf[o.field_type].forEach((function(t,e){_.forEach(t.options,(function(e,o){p.push({label:t.label+" - "+e,value:o})}))}));const[d,y]=s(p);c((()=>{p=[{label:i("Please select...","porto-functionality"),value:""}],porto_block_vars.acf&&porto_block_vars.acf[o.field_type]&&porto_block_vars.acf[o.field_type].forEach((function(t,e){_.forEach(t.options,(function(e,o){p.push({label:t.label+" - "+e,value:o})}))})),d!==p&&y(p)}),[porto_block_vars.acf]);let f=[{label:i("Please select...","porto-functionality"),value:""}];porto_block_vars.toolset&&porto_block_vars.toolset[o.field_type]&&porto_block_vars.toolset[o.field_type].forEach((function(t,e){_.forEach(t.options,(function(e,o){f.push({label:t.label+" - "+e,value:o})}))}));const[m,g]=s(f);c((()=>{f=[{label:i("Please select...","porto-functionality"),value:""}],porto_block_vars.toolset&&porto_block_vars.toolset[o.field_type]&&porto_block_vars.toolset[o.field_type].forEach((function(t,e){_.forEach(t.options,(function(e,o){f.push({label:t.label+" - "+e,value:o})}))})),m!==f&&g(f)}),[porto_block_vars.toolset]);let b=[{label:i("Please select...","porto-functionality"),value:""}];porto_block_vars.meta_fields&&_.forEach(porto_block_vars.meta_fields,(function(t,e){"global"!==e&&e!==o.content_type&&e!==o.content_type_value||_.forEach(t,(function(t,e){"image"==o.field_type?"upload"!=t[1]&&"attach"!=t[1]||b.push({label:t[0],value:e}):"upload"!=t[1]&&"attach"!=t[1]&&b.push({label:t[0],value:e})}))}));let h=[],v=[],w=[];"image"===o.field_type?(h=[{label:i("Please select...","porto-functionality"),value:""},{label:i("Featured Image","porto-functionality"),value:"thumbnail"},{label:i("Author Picture on Gravatar","porto-functionality"),value:"author_img"}],v=[]):"link"===o.field_type?(h=[{label:i("Please select...","porto-functionality"),value:""},{label:i("Permalink","porto-functionality"),value:"permalink"},{label:i("Author Posts Url","porto-functionality"),value:"author_posts_url"},{label:i("Featured Image Url","porto-functionality"),value:"thumbnail"}],v=[{label:i("Please select...","porto-functionality"),value:""},{label:i("Term Link","porto-functionality"),value:"term_link"}]):"field"===o.field_type&&(h=[{label:i("Please select...","porto-functionality"),value:""},{label:i("ID","porto-functionality"),value:"id"},{label:i("Title","porto-functionality"),value:"title"},{label:i("Content","porto-functionality"),value:"content"},{label:i("Excerpt","porto-functionality"),value:"excerpt"},{label:i("Date","porto-functionality"),value:"date"},{label:i("Post Status","porto-functionality"),value:"status"},{label:i("Like Count","porto-functionality"),value:"like_count"}],v=[{label:i("Please select...","porto-functionality"),value:""},{label:i("ID","porto-functionality"),value:"id"},{label:i("Title","porto-functionality"),value:"title"},{label:i("Description","porto-functionality"),value:"desc"},{label:i("Post Count","porto-functionality"),value:"count"}],w=[{label:i("Please select...","porto-functionality"),value:""},{label:i("Sale End Date","porto-functionality"),value:"sale_date"}]);let C=[{label:i("Please select...","porto-functionality"),value:""},{label:i("Page or Post Info","porto-functionality"),value:"post"},{label:i("Porto Meta Box Field","porto-functionality"),value:"metabox"},{label:i("Advanced Custom Field","porto-functionality"),value:"acf"},{label:i("Toolset","porto-functionality"),value:"toolset"},{label:i("Meta Field","porto-functionality"),value:"meta"},{label:i("Taxonomy","porto-functionality"),value:"tax"}];return!porto_block_vars.woo_exist||"product"!=o.content_type&&o.content_type||C.push({label:i("WooCommerce","porto-functionality"),value:"woo"}),u("div",{className:"porto-dynamic-content-control porto-typography-control"},a?u("a",{className:"components-base-control",style:{marginBottom:15,marginTop:"-0.6rem",width:"fit-content",background:"#fff",marginLeft:15,display:"block"},target:"_blank",href:"https://www.portotheme.com/wordpress/porto/business-consulting5/#hover-full-type"},t):u("h3",{className:"components-base-control",style:{marginBottom:15}},t),u(r,{label:i("Source","porto-functionality"),help:i("Page or Post Info is used in posts list and Taxonomy is used in terms list.","porto-functionality"),value:e.source,options:C,onChange:t=>{e.source=t,n(e)}}),"post"==e.source&&u(r,{label:i("Page or Post Info","porto-functionality"),value:e.post_info,options:h,onChange:t=>{e.post_info=t,n(e)}}),"metabox"==e.source&&u(r,{label:i("Porto Meta Box Field","porto-functionality"),value:e.metabox,options:b,onChange:t=>{e.metabox=t,n(e)}}),"acf"==e.source&&u(r,{label:i("Advanced Custom Field","porto-functionality"),value:e.acf,options:d,onChange:t=>{e.acf=t,n(e)}}),"toolset"==e.source&&u(r,{label:i("Toolset","porto-functionality"),value:e.toolset,options:m,onChange:t=>{e.toolset=t,n(e)}}),"meta"==e.source&&u(l,{label:i("Custom Meta key","porto-functionality"),value:e.meta,onChange:t=>{e.meta=t,n(e)}}),"tax"==e.source&&u(r,{label:i("Taxonomy Field","porto-functionality"),value:e.tax,options:v,onChange:t=>{e.tax=t,n(e)}}),"woo"==e.source&&u(r,{label:i("WooCommerce Field","porto-functionality"),value:e.woo,options:w,onChange:t=>{e.woo=t,n(e)}}),"field"===o.field_type&&u(l,{label:i("Before Text","porto-functionality"),value:e.before,onChange:t=>{e.before=t,n(e)}}),"field"===o.field_type&&u(l,{label:i("After Text","porto-functionality"),value:e.after,onChange:t=>{e.after=t,n(e)}}),"image"!==o.field_type&&u(l,{label:i("Fallback","porto-functionality"),value:e.fallback,onChange:t=>{e.fallback=t,n(e)}}))}},function(t,e,o){o.r(e),o.d(e,{portoGenerateStyleOptionsCSS:function(){return n}});e.default=function({label:t,value:e,options:o,onChange:n}){const a=wp.i18n.__,i=(wp.components.TextControl,wp.components.SelectControl),l=wp.components.__experimentalUnitControl,r=wp.components.RangeControl,s=wp.components.PanelBody,c=wp.components.IconButton,u=wp.components.ToggleControl,p=wp.components.TabPanel,d=wp.blockEditor.PanelColorSettings,_=wp.blockEditor.MediaUpload;e||(e={});const y=!o||!1!==o.margin,f=!o||!1!==o.padding,m=!o||!1!==o.position,g=!o||!1!==o.border,b=!o||!1!==o.bg,h=!o||!1!==o.visibility,v=!o||!1!==o.boxShadow,w=!o||!1!==o.transform,C={normal:React.createElement(React.Fragment,null,b&&React.createElement(s,{initialOpen:!1,title:a("Background","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement(d,{title:a("Background","porto-functionality"),enableAlpha:!0,colorSettings:[{label:a("Color","porto-functionality"),value:e.bg&&e.bg.color,onChange:t=>{e.bg||(e.bg={}),e.bg.color=t,n(e)}}]}),React.createElement(_,{allowedTypes:["image"],value:e.bg&&e.bg.img_id,onSelect:t=>{e.bg||(e.bg={}),e.bg.img_url=t.url,e.bg.img_id=t.id,n(e)},render:t=>{var o=t.open;return React.createElement("div",null,React.createElement(c,{className:"components-toolbar__control",label:a("Change image","porto-functionality"),icon:"edit",onClick:o}),e.bg&&e.bg.img_id&&React.createElement(c,{className:"components-toolbar__control",label:a("Remove image","porto-functionality"),icon:"no",onClick:()=>{e.bg||(e.bg={}),e.bg.img_url=void 0,e.bg.img_id=void 0,n(e)}}),e.bg&&e.bg.img_id&&React.createElement("img",{src:e.bg.img_url,className:"components-upload-show-img"}))}}),e.bg&&e.bg.img_id&&React.createElement(i,{label:a("Position","porto-functionality"),value:e.bg&&e.bg.position,options:[{label:a("Default","porto-functionality"),value:""},{label:a("Center Center","porto-functionality"),value:"center center"},{label:a("Center Left","porto-functionality"),value:"center left"},{label:a("Center Right","porto-functionality"),value:"center right"},{label:a("Top Center","porto-functionality"),value:"top center"},{label:a("Top Left","porto-functionality"),value:"top left"},{label:a("Top Right","porto-functionality"),value:"top right"},{label:a("Bottom Center","porto-functionality"),value:"bottom center"},{label:a("Bottom Left","porto-functionality"),value:"bottom left"},{label:a("Bottom Right","porto-functionality"),value:"bottom right"}],onChange:t=>{e.bg||(e.bg={}),e.bg.position=t,n(e)}}),e.bg&&e.bg.img_id&&React.createElement(i,{label:a("Attachment","porto-functionality"),value:e.bg&&e.bg.attachment,options:[{label:a("Default","porto-functionality"),value:""},{label:a("Scroll","porto-functionality"),value:"scroll"},{label:a("Fixed"),value:"fixed"}],onChange:t=>{e.bg||(e.bg={}),e.bg.attachment=t,n(e)}}),e.bg&&e.bg.img_id&&React.createElement(i,{label:a("Repeat","porto-functionality"),value:e.bg&&e.bg.repeat,options:[{label:a("Default","porto-functionality"),value:""},{label:a("No-repeat","porto-functionality"),value:"no-repeat"},{label:a("Repeat","porto-functionality"),value:"repeat"},{label:a("Repeat-x","porto-functionality"),value:"repeat-x"},{label:a("Repeat-y","porto-functionality"),value:"repeat-y"}],onChange:t=>{e.bg||(e.bg={}),e.bg.repeat=t,n(e)}}),e.bg&&e.bg.img_id&&React.createElement(i,{label:a("Size","porto-functionality"),value:e.bg&&e.bg.size,options:[{label:a("Default","porto-functionality"),value:""},{label:a("Auto","porto-functionality"),value:"auto"},{label:a("Cover","porto-functionality"),value:"cover"},{label:a("Contain","porto-functionality"),value:"contain"}],onChange:t=>{e.bg||(e.bg={}),e.bg.size=t,n(e)}}))),g&&React.createElement(s,{initialOpen:!1,title:a("Border","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Border","porto-functionality")),React.createElement(i,{label:a("Style","porto-functionality"),value:e.border&&e.border.style,options:[{label:a("None","porto-functionality"),value:""},{label:a("Solid","porto-functionality"),value:"solid"},{label:a("Double","porto-functionality"),value:"double"},{label:a("Dotted","porto-functionality"),value:"dotted"},{label:a("Dashed","porto-functionality"),value:"dashed"},{label:a("Groove","porto-functionality"),value:"groove"}],onChange:t=>{e.border||(e.border={}),e.border.style=t,n(e)}}),React.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},React.createElement("label",{style:{width:"100%",marginBottom:5}},a("Width","porto-functionality")),React.createElement(l,{label:a("Top","porto-functionality"),value:e.border&&e.border.top,onChange:t=>{e.border||(e.border={}),e.border.top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.border&&e.border.right,onChange:t=>{e.border||(e.border={}),e.border.right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.border&&e.border.bottom,onChange:t=>{e.border||(e.border={}),e.border.bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.border&&e.border.left,onChange:t=>{e.border||(e.border={}),e.border.left=t,n(e)}})),React.createElement(d,{title:a("Border","porto-functionality"),enableAlpha:!0,colorSettings:[{label:a("Color","porto-functionality"),value:e.border&&e.border.color,onChange:t=>{e.border||(e.border={}),e.border.color=t,n(e)}}]}),React.createElement("label",{style:{width:"100%",marginBottom:5}},a("Border Radius","porto-functionality")),React.createElement(l,{label:a("Top","porto-functionality"),value:e.borderRadius&&e.borderRadius.top,onChange:t=>{e.borderRadius||(e.borderRadius={}),e.borderRadius.top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.borderRadius&&e.borderRadius.right,onChange:t=>{e.borderRadius||(e.borderRadius={}),e.borderRadius.right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.borderRadius&&e.borderRadius.bottom,onChange:t=>{e.borderRadius||(e.borderRadius={}),e.borderRadius.bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.borderRadius&&e.borderRadius.left,onChange:t=>{e.borderRadius||(e.borderRadius={}),e.borderRadius.left=t,n(e)}}))),y&&React.createElement(s,{initialOpen:!1,title:a("Margin","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Margin","porto-functionality")),React.createElement("div",null),React.createElement(l,{label:a("Top","porto-functionality"),value:e.margin&&e.margin.top,onChange:t=>{e.margin||(e.margin={}),e.margin.top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.margin&&e.margin.right,onChange:t=>{e.margin||(e.margin={}),e.margin.right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.margin&&e.margin.bottom,onChange:t=>{e.margin||(e.margin={}),e.margin.bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.margin&&e.margin.left,onChange:t=>{e.margin||(e.margin={}),e.margin.left=t,n(e)}}))),f&&React.createElement(s,{initialOpen:!1,title:a("Padding","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Padding","porto-functionality")),React.createElement("div",null),React.createElement(l,{label:a("Top","porto-functionality"),value:e.padding&&e.padding.top,onChange:t=>{e.padding||(e.padding={}),e.padding.top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.padding&&e.padding.right,onChange:t=>{e.padding||(e.padding={}),e.padding.right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.padding&&e.padding.bottom,onChange:t=>{e.padding||(e.padding={}),e.padding.bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.padding&&e.padding.left,onChange:t=>{e.padding||(e.padding={}),e.padding.left=t,n(e)}}))),m&&React.createElement(s,{initialOpen:!1,title:a("Position","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Position","porto-functionality")),React.createElement(i,{label:a("Style","porto-functionality"),value:e.position&&e.position.style,options:[{label:a("Default","porto-functionality"),value:""},{label:a("Static","porto-functionality"),value:"static"},{label:a("Relative","porto-functionality"),value:"relative"},{label:a("Absolute","porto-functionality"),value:"absolute"},{label:a("Fixed","porto-functionality"),value:"fixed"},{label:a("Sticky","porto-functionality"),value:"sticky"}],onChange:t=>{e.position||(e.position={}),e.position.style=t,n(e)}}),React.createElement(r,{label:a("Z-index","porto-functionality"),value:e.position&&void 0!==e.position.zindex&&e.position.zindex,min:"-10",max:"100",allowReset:!0,onChange:t=>{e.position||(e.position={}),e.position.zindex=t,n(e)}}),React.createElement(l,{label:a("Top","porto-functionality"),value:e.position&&e.position.top,onChange:t=>{e.position||(e.position={}),e.position.top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.position&&e.position.right,onChange:t=>{e.position||(e.position={}),e.position.right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.position&&e.position.bottom,onChange:t=>{e.position||(e.position={}),e.position.bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.position&&e.position.left,onChange:t=>{e.position||(e.position={}),e.position.left=t,n(e)}}),React.createElement("div",{className:"mb-3"}),React.createElement(i,{label:a("Width","porto-functionality"),value:e.position&&e.position.width,options:[{label:a("Default","porto-functionality"),value:""},{label:a("Full Width (100%)","porto-functionality"),value:"100%"},{label:a("Inline (auto)","porto-functionality"),value:"auto"},{label:a("Fit Content","porto-functionality"),value:"fit-content"},{label:a("Custom","porto-functionality"),value:"custom"}],onChange:t=>{e.position||(e.position={}),e.position.width=t,n(e)}}),e.position&&"custom"===e.position.width&&React.createElement(l,{label:a("Width","porto-functionality"),value:e.position&&e.position.width_val,onChange:t=>{e.position||(e.position={}),e.position.width_val=t,n(e)}}),React.createElement(l,{label:a("Height","porto-functionality"),value:e.position&&e.position.height_val,onChange:t=>{e.position||(e.position={}),e.position.height_val=t,n(e)}}),e.position&&"custom"===e.position.width&&React.createElement("div",{className:"mb-3"}),React.createElement(i,{label:a("Horizontal Align","porto-functionality"),help:a("This only works in flex container.","porto-functionality"),value:e.position&&e.position.halign,options:[{label:a("Default","porto-functionality"),value:""},{label:a("Center","porto-functionality"),value:"x"},{label:a("Left","porto-functionality"),value:"r"},{label:a("Right","porto-functionality"),value:"l"}],onChange:t=>{e.position||(e.position={}),e.position.halign=t,n(e)}}),React.createElement(r,{label:a("Opacity","porto-functionality"),value:e.position&&void 0!==e.position.opacity&&e.position.opacity,min:"0",max:"1",step:"0.01",allowReset:!0,onChange:t=>{e.position||(e.position={}),e.position.opacity=t,n(e)}}))),w&&React.createElement(s,{initialOpen:!1,title:a("Transform","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Transform","porto-functionality")),React.createElement(u,{label:a("Translate","porto-functionality"),checked:e.transform&&e.transform.translate,onChange:t=>{e.transform||(e.transform={}),e.transform.translate=t,n(e)}}),e.transform&&e.transform.translate&&React.createElement("div",{className:"mb-3",style:{display:"flex",flexWrap:"wrap",marginTop:-10}},React.createElement(l,{label:a("X","porto-functionality"),value:e.transform&&e.transform.translatex,onChange:t=>{e.transform||(e.transform={}),e.transform.translatex=t,n(e)}}),React.createElement(l,{label:a("Y","porto-functionality"),value:e.transform&&e.transform.translatey,onChange:t=>{e.transform||(e.transform={}),e.transform.translatey=t,n(e)}})),React.createElement(u,{label:a("Rotate","porto-functionality"),checked:e.transform&&e.transform.rotate,onChange:t=>{e.transform||(e.transform={}),e.transform.rotate=t,n(e)}}),e.transform&&e.transform.rotate&&React.createElement("div",{className:"mb-3",style:{marginTop:-10}},React.createElement(r,{label:a("Degree","porto-functionality"),value:e.transform&&e.transform.rotatedeg,min:"-360",max:"360",allowReset:"true",onChange:t=>{e.transform||(e.transform={}),e.transform.rotatedeg=t,n(e)}})),React.createElement(u,{label:a("Scale","porto-functionality"),checked:e.transform&&e.transform.scale,onChange:t=>{e.transform||(e.transform={}),e.transform.scale=t,n(e)}}),e.transform&&e.transform.scale&&React.createElement("div",{className:"mb-3",style:{marginTop:-10}},React.createElement(r,{label:a("X","porto-functionality"),value:e.transform&&e.transform.scalex,min:"0",max:"2",step:"0.1",allowReset:"true",onChange:t=>{e.transform||(e.transform={}),e.transform.scalex=t,n(e)}}),React.createElement(r,{label:a("Y","porto-functionality"),value:e.transform&&e.transform.scaley,min:"0",max:"2",step:"0.1",allowReset:"true",onChange:t=>{e.transform||(e.transform={}),e.transform.scaley=t,n(e)}})),React.createElement(u,{label:a("Skew","porto-functionality"),checked:e.transform&&e.transform.skew,onChange:t=>{e.transform||(e.transform={}),e.transform.skew=t,n(e)}}),e.transform&&e.transform.skew&&React.createElement("div",{className:"mb-3",style:{marginTop:-10}},React.createElement(r,{label:a("X","porto-functionality"),value:e.transform&&e.transform.skewx,min:"-360",max:"360",allowReset:"true",onChange:t=>{e.transform||(e.transform={}),e.transform.skewx=t,n(e)}}),React.createElement(r,{label:a("Y","porto-functionality"),value:e.transform&&e.transform.skewy,min:"-360",max:"360",allowReset:"true",onChange:t=>{e.transform||(e.transform={}),e.transform.skewy=t,n(e)}})),React.createElement(u,{label:a("Flip Horizontal","porto-functionality"),checked:e.transform&&e.transform.flipx,onChange:t=>{e.transform||(e.transform={}),e.transform.flipx=t,n(e)}}),React.createElement(u,{label:a("Flip Vertical","porto-functionality"),checked:e.transform&&e.transform.flipy,onChange:t=>{e.transform||(e.transform={}),e.transform.flipy=t,n(e)}}))),v&&React.createElement(s,{initialOpen:!1,title:a("Box Shadow","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Box Shadow","porto-functionality")),React.createElement(i,{label:a("Type","porto-functionality"),value:e.boxshadow&&e.boxshadow.type,options:[{label:a("Outset","porto-functionality"),value:""},{label:a("Inset","porto-functionality"),value:"inset"},{label:a("None","porto-functionality"),value:"none"},{label:a("Inherit","porto-functionality"),value:"inherit"}],onChange:t=>{e.boxshadow||(e.boxshadow={}),e.boxshadow.type=t,n(e)}}),React.createElement("div",{className:"mb-3",style:{display:"flex",flexWrap:"wrap"}},React.createElement(l,{label:a("X","porto-functionality"),value:e.boxshadow&&e.boxshadow.x,onChange:t=>{e.boxshadow||(e.boxshadow={}),e.boxshadow.x=t,n(e)}}),React.createElement(l,{label:a("Y","porto-functionality"),value:e.boxshadow&&e.boxshadow.y,onChange:t=>{e.boxshadow||(e.boxshadow={}),e.boxshadow.y=t,n(e)}}),React.createElement(l,{label:a("Blur","porto-functionality"),value:e.boxshadow&&e.boxshadow.blur,onChange:t=>{e.boxshadow||(e.boxshadow={}),e.boxshadow.blur=t,n(e)}}),React.createElement(l,{label:a("Spread","porto-functionality"),value:e.boxshadow&&e.boxshadow.spread,onChange:t=>{e.boxshadow||(e.boxshadow={}),e.boxshadow.spread=t,n(e)}})),React.createElement(d,{title:a("Box Shadow","porto-functionality"),enableAlpha:!0,colorSettings:[{label:a("Color","porto-functionality"),value:e.boxshadow&&e.boxshadow.color,onChange:t=>{e.boxshadow||(e.boxshadow={}),e.boxshadow.color=t,n(e)}}]}))),h&&React.createElement(s,{initialOpen:!1,title:a("Visibility","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Visibility","porto-functionality")),React.createElement("p",{className:"help"},a("Visibility will take effect only on live page.","porto-functionality")),React.createElement(u,{label:a("Hide On Large Desktop","porto-functionality"),checked:!!e.hideXl&&e.hideXl,onChange:t=>{e.hideXl=t,n(e)}}),React.createElement(u,{label:a("Hide On Desktop","porto-functionality"),checked:!!e.hideLg&&e.hideLg,onChange:t=>{e.hideLg=t,n(e)}}),React.createElement(u,{label:a("Hide On Tablet","porto-functionality"),checked:!!e.hideMd&&e.hideMd,onChange:t=>{e.hideMd=t,n(e)}}),React.createElement(u,{label:a("Hide On Mobile","porto-functionality"),checked:!!e.hideSm&&e.hideSm,onChange:t=>{e.hideSm=t,n(e)}}))))};return o&&o.hoverOptions&&(C.hover=React.createElement(React.Fragment,null,React.createElement(s,{initialOpen:!1,title:a("Text, Background & Border","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement(d,{title:a("Color Settings","porto-functionality"),enableAlpha:!0,colorSettings:[{label:a("Background Color","porto-functionality"),value:e.hover&&e.hover.bg,onChange:t=>{e.hover||(e.hover={}),e.hover.bg=t,n(e)}},{label:a("Text Color","porto-functionality"),value:e.hover&&e.hover.color,onChange:t=>{e.hover||(e.hover={}),e.hover.color=t,n(e)}},{label:a("Border Color","porto-functionality"),value:e.hover&&e.hover.border_color,onChange:t=>{e.hover||(e.hover={}),e.hover.border_color=t,n(e)}}]}),React.createElement(i,{label:a("Border Style","porto-functionality"),value:e.hover&&e.hover.border_style,options:[{label:a("None","porto-functionality"),value:""},{label:a("Solid","porto-functionality"),value:"solid"},{label:a("Double","porto-functionality"),value:"double"},{label:a("Dotted","porto-functionality"),value:"dotted"},{label:a("Dashed","porto-functionality"),value:"dashed"},{label:a("Groove","porto-functionality"),value:"groove"}],onChange:t=>{e.hover||(e.hover={}),e.hover.border_style=t,n(e)}}),React.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},React.createElement("label",{style:{width:"100%",marginBottom:5}},a("Border Width","porto-functionality")),React.createElement(l,{label:a("Top","porto-functionality"),value:e.hover&&e.hover.border_top,onChange:t=>{e.hover||(e.hover={}),e.hover.border_top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.hover&&e.hover.border_right,onChange:t=>{e.hover||(e.hover={}),e.hover.border_right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.hover&&e.hover.border_bottom,onChange:t=>{e.hover||(e.hover={}),e.hover.border_bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.hover&&e.hover.border_left,onChange:t=>{e.hover||(e.hover={}),e.hover.border_left=t,n(e)}})),React.createElement("div",{className:"mb-3",style:{display:"flex",flexWrap:"wrap"}},React.createElement("label",{style:{width:"100%",marginBottom:5}},a("Position","porto-functionality")),React.createElement(l,{label:a("Top","porto-functionality"),value:e.hover&&e.hover.top,onChange:t=>{e.hover||(e.hover={}),e.hover.top=t,n(e)}}),React.createElement(l,{label:a("Right","porto-functionality"),value:e.hover&&e.hover.right,onChange:t=>{e.hover||(e.hover={}),e.hover.right=t,n(e)}}),React.createElement(l,{label:a("Bottom","porto-functionality"),value:e.hover&&e.hover.bottom,onChange:t=>{e.hover||(e.hover={}),e.hover.bottom=t,n(e)}}),React.createElement(l,{label:a("Left","porto-functionality"),value:e.hover&&e.hover.left,onChange:t=>{e.hover||(e.hover={}),e.hover.left=t,n(e)}})),React.createElement(r,{label:a("Opacity","porto-functionality"),value:e.hover&&void 0!==e.hover.opacity&&e.hover.opacity,min:"0",max:"1",step:"0.01",allowReset:!0,onChange:t=>{e.hover||(e.hover={}),e.hover.opacity=t,n(e)}}))),w&&React.createElement(s,{initialOpen:!1,title:a("Transform","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Transform","porto-functionality")),React.createElement(u,{label:a("Translate","porto-functionality"),checked:e.hover&&e.hover.transform&&e.hover.transform.translate,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.translate=t,n(e)}}),e.hover&&e.hover.transform&&e.hover.transform.translate&&React.createElement("div",{className:"mb-3",style:{display:"flex",flexWrap:"wrap",marginTop:-10}},React.createElement(l,{label:a("X","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.translatex,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.translatex=t,n(e)}}),React.createElement(l,{label:a("Y","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.translatey,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.translatey=t,n(e)}})),React.createElement(u,{label:a("Rotate","porto-functionality"),checked:e.hover&&e.hover.transform&&e.hover.transform.rotate,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.rotate=t,n(e)}}),e.hover&&e.hover.transform&&e.hover.transform.rotate&&React.createElement("div",{className:"mb-3",style:{marginTop:-10}},React.createElement(r,{label:a("Degree","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.rotatedeg,min:"-360",max:"360",allowReset:"true",onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.rotatedeg=t,n(e)}})),React.createElement(u,{label:a("Scale","porto-functionality"),checked:e.hover&&e.hover.transform&&e.hover.transform.scale,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.scale=t,n(e)}}),e.hover&&e.hover.transform&&e.hover.transform.scale&&React.createElement("div",{className:"mb-3",style:{marginTop:-10}},React.createElement(r,{label:a("X","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.scalex,min:"0",max:"2",step:"0.1",allowReset:"true",onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.scalex=t,n(e)}}),React.createElement(r,{label:a("Y","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.scaley,min:"0",max:"2",step:"0.1",allowReset:"true",onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.scaley=t,n(e)}})),React.createElement(u,{label:a("Skew","porto-functionality"),checked:e.hover&&e.hover.transform&&e.hover.transform.skew,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.skew=t,n(e)}}),e.hover&&e.hover.transform&&e.hover.transform.skew&&React.createElement("div",{className:"mb-3",style:{marginTop:-10}},React.createElement(r,{label:a("X","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.skewx,min:"-360",max:"360",allowReset:"true",onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.skewx=t,n(e)}}),React.createElement(r,{label:a("Y","porto-functionality"),value:e.hover&&e.hover.transform&&e.hover.transform.skewy,min:"-360",max:"360",allowReset:"true",onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.skewy=t,n(e)}})),React.createElement(u,{label:a("Flip Horizontal","porto-functionality"),checked:e.hover&&e.hover.transform&&e.hover.transform.flipx,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.flipx=t,n(e)}}),React.createElement(u,{label:a("Flip Vertical","porto-functionality"),checked:e.hover&&e.hover.transform&&e.hover.transform.flipy,onChange:t=>{e.hover||(e.hover={}),e.hover.transform||(e.hover.transform={}),e.hover.transform.flipy=t,n(e)}}),React.createElement(r,{label:a("Transition Duration (ms)","porto-functionality"),value:e.transform&&e.transform.duration,min:"0",max:"2000",step:"10",allowReset:"true",onChange:t=>{e.transform||(e.transform={}),e.transform.duration=t,n(e)}}))),v&&React.createElement(s,{initialOpen:!1,title:a("Box Shadow","porto-functionality")},React.createElement("div",{className:"porto-typography-control porto-dimension-control"},React.createElement("h3",{className:"components-base-control",style:{marginBottom:15}},a("Box Shadow","porto-functionality")),React.createElement(i,{label:a("Type","porto-functionality"),value:e.hover&&e.hover.boxshadow&&e.hover.boxshadow.type,options:[{label:a("Outset","porto-functionality"),value:""},{label:a("Inset","porto-functionality"),value:"inset"},{label:a("None","porto-functionality"),value:"none"},{label:a("Inherit","porto-functionality"),value:"inherit"}],onChange:t=>{e.hover||(e.hover={}),e.hover.boxshadow||(e.hover.boxshadow={}),e.hover.boxshadow.type=t,n(e)}}),React.createElement("div",{className:"mb-3",style:{display:"flex",flexWrap:"wrap"}},React.createElement(l,{label:a("X","porto-functionality"),value:e.hover&&e.hover.boxshadow&&e.hover.boxshadow.x,onChange:t=>{e.hover||(e.hover={}),e.hover.boxshadow||(e.hover.boxshadow={}),e.hover.boxshadow.x=t,n(e)}}),React.createElement(l,{label:a("Y","porto-functionality"),value:e.hover&&e.hover.boxshadow&&e.hover.boxshadow.y,onChange:t=>{e.hover||(e.hover={}),e.hover.boxshadow||(e.hover.boxshadow={}),e.hover.boxshadow.y=t,n(e)}}),React.createElement(l,{label:a("Blur","porto-functionality"),value:e.hover&&e.hover.boxshadow&&e.hover.boxshadow.blur,onChange:t=>{e.hover||(e.hover={}),e.hover.boxshadow||(e.hover.boxshadow={}),e.hover.boxshadow.blur=t,n(e)}}),React.createElement(l,{label:a("Spread","porto-functionality"),value:e.hover&&e.hover.boxshadow&&e.hover.boxshadow.spread,onChange:t=>{e.hover||(e.hover={}),e.hover.boxshadow||(e.hover.boxshadow={}),e.hover.boxshadow.spread=t,n(e)}})),React.createElement(d,{title:a("Box Shadow","porto-functionality"),enableAlpha:!0,colorSettings:[{label:a("Color","porto-functionality"),value:e.hover&&e.hover.boxshadow&&e.hover.boxshadow.color,onChange:t=>{e.hover||(e.hover={}),e.hover.boxshadow||(e.hover.boxshadow={}),e.hover.boxshadow.color=t,n(e)}}]}))))),o&&o.hoverOptions?React.createElement(p,{className:"tab-panel-full-width",tabs:[{name:"normal",title:a("Normal","porto-functionality")},{name:"hover",title:a("Hover","porto-functionality")}]},(t=>C[t.name])):C.normal};const n=function(t,e,o=-1){var n="";if(!t||!e)return"";const a={bg:"background-color",color:"color",border_style:"border-style",border_top:"border-top-width",border_right:"border-right-width",border_bottom:"border-bottom-width",border_left:"border-left-width",border_color:"border-color",opacity:"opacity"};if(n+="html ."+e+"{",_.each({bg:{color:"background-color",img_url:"background-image",position:"background-position",attachment:"background-attachment",repeat:"background-repeat",size:"background-size"},border:{color:"border-color",style:"border-style",top:"border-top-width",right:"border-right-width",bottom:"border-bottom-width",left:"border-left-width"},borderRadius:{top:"border-top-left-radius",right:"border-top-right-radius",bottom:"border-bottom-right-radius",left:"border-bottom-left-radius"},padding:{top:"padding-top",right:"padding-right",bottom:"padding-bottom",left:"padding-left"},position:{opacity:"opacity"}},(function(e,o){void 0!==t[o]&&t[o]&&_.each(e,(function(e,a){if(void 0!==t[o][a]&&(""+t[o][a]).length){var i=t[o][a];"background-image"==e&&(i="url("+i+")"),n+=e+":"+i+";"}}))})),t.position&&(t.position.translatex||t.position.translatey)&&(n+="transform:",t.position.translatex&&(n+=" translateX("+t.position.translatex+")"),t.position.translatey&&(n+=" translateY("+t.position.translatey+")"),n+=";"),t.transform){let e="";if(t.transform.translate&&(t.transform.translatex&&t.transform.translatey?e+=" translate("+t.transform.translatex+", "+t.transform.translatey+")":t.transform.translatex?e+=" translateX("+t.transform.translatex+")":t.transform.translatey&&(e+=" translateY("+t.transform.translatey+")")),t.transform.rotate&&t.transform.rotatedeg&&(e+=" rotate("+t.transform.rotatedeg+"deg)"),t.transform.scale||t.transform.flipx||t.transform.flipy){let o=t.transform.scalex,n=t.transform.scaley;t.transform.flipx&&(o?o*=-1:o=-1),t.transform.flipy&&(n?n*=-1:n=-1),o&&n?e+=" scale("+o+", "+n+")":o?e+=" scaleX("+o+")":n&&(e+=" scaleY("+n+")")}t.transform.skew&&(t.transform.skewx&&t.transform.skewy?e+=" skew("+t.transform.skewx+"deg, "+t.transform.skewy+"deg)":t.transform.skewx?e+=" skewX("+t.transform.skewx+"deg)":t.transform.skewy&&(e+=" skewY("+t.transform.skewy+"deg)")),e&&(n+="transform:"+e+";"),t&&t.transform&&t.transform.duration&&(n+="transition:"+t.transform.duration+"ms;")}if(t.boxshadow&&(t.boxshadow.type||t.boxshadow.color)&&(n+="box-shadow:",t.boxshadow.type&&"inset"!=t.boxshadow.type?n+=t.boxshadow.type:(t.boxshadow.type&&(n+=t.boxshadow.type),t.boxshadow.x?n+=" "+t.boxshadow.x:n+=" 0",t.boxshadow.y?n+=" "+t.boxshadow.y:n+=" 0",t.boxshadow.blur&&(n+=" "+t.boxshadow.blur),t.boxshadow.spread&&(n+=" "+t.boxshadow.spread),t.boxshadow.color&&(n+=" "+t.boxshadow.color)),n+=";"),n+="}",t.margin){var i="";const a={top:"margin-top",right:"margin-right",bottom:"margin-bottom",left:"margin-left"};_.each(a,(function(e,o){if(void 0!==t.margin[o]&&(""+t.margin[o]).length){var n=t.margin[o];i+=e+":"+n+";"}})),i&&(n+=-1==o?"html ."+e+"{":"html #block-"+o+"{",n+=i,n+="}")}if(t.position){var l="";const a={style:"position",zindex:"z-index",top:"top",right:"right",bottom:"bottom",left:"left",width:"width",width_val:"width",height_val:"height"};""==t.position.width?(delete a.width,delete a.width_val):"custom"==t.position.width?delete a.width:delete a.width_val,_.each(a,(function(e,o){if(void 0!==t.position[o]&&(""+t.position[o]).length){var n=t.position[o];l+=e+":"+n+";","height_val"==o&&(l+="--porto-height:"+n+";")}})),t.position.halign&&("x"===t.position.halign?l+="margin-left:auto;margin-right:auto;":"l"===t.position.halign?l+="margin-left:auto;":"r"===t.position.halign&&(l+="margin-right:auto;")),l&&(n+=-1==o?"html ."+e+"{":"html #block-"+o+"{",n+=l,n+="}",-1!=o&&(n+="html ."+e+"{display: block}"))}if(t.hover){if(n+="html ."+e+":hover{",_.each(a,(function(e,o){void 0!==t.hover[o]&&(""+t.hover[o]).length&&(n+=e+":"+t.hover[o]+";")})),(t.hover.translatex||t.hover.translatey)&&(n+="transform:",t.hover.translatex&&(n+=" translateX("+t.hover.translatex+")"),t.hover.translatey&&(n+=" translateY("+t.hover.translatey+")"),n+=";"),t.hover.transform){let e="";if(t.hover.transform.translate&&(t.hover.transform.translatex&&t.hover.transform.translatey?e+=" translate("+t.hover.transform.translatex+", "+t.hover.transform.translatey+")":t.hover.transform.translatex?e+=" translateX("+t.hover.transform.translatex+")":t.hover.transform.translatey&&(e+=" translateY("+t.hover.transform.translatey+")")),t.hover.transform.rotate&&t.hover.transform.rotatedeg&&(e+=" rotate("+t.hover.transform.rotatedeg+"deg)"),t.hover.transform.scale||t.hover.transform.flipx||t.hover.transform.flipy){let o=t.hover.transform.scalex,n=t.hover.transform.scaley;t.hover.transform.flipx&&(o?o*=-1:o=-1),t.hover.transform.flipy&&(n?n*=-1:n=-1),o&&n?e+=" scale("+o+", "+n+")":o?e+=" scaleX("+o+")":n&&(e+=" scaleY("+n+")")}t.hover.transform.skew&&(t.hover.transform.skewx&&t.hover.transform.skewy?e+=" skew("+t.hover.transform.skewx+"deg, "+t.hover.transform.skewy+"deg)":t.hover.transform.skewx?e+=" skewX("+t.hover.transform.skewx+"deg)":t.hover.transform.skewy&&(e+=" skewY("+t.hover.transform.skewy+"deg)")),e&&(n+="transform:"+e+";")}t.hover.boxshadow&&(t.hover.boxshadow.type||t.hover.boxshadow.color)&&(n+="box-shadow:",t.hover.boxshadow.type&&"inset"!=t.hover.boxshadow.type?n+=t.hover.boxshadow.type:(t.hover.boxshadow.type&&(n+=t.hover.boxshadow.type),t.hover.boxshadow.x?n+=" "+t.hover.boxshadow.x:n+=" 0",t.hover.boxshadow.y?n+=" "+t.hover.boxshadow.y:n+=" 0",t.hover.boxshadow.blur&&(n+=" "+t.hover.boxshadow.blur),t.hover.boxshadow.spread&&(n+=" "+t.hover.boxshadow.spread),t.hover.boxshadow.color&&(n+=" "+t.hover.boxshadow.color)),n+=";"),n+="}"}if(t.hover){n+=-1==o?"html ."+e+":hover{":"html #block-"+o+":hover{";const a={top:"top",right:"right",bottom:"bottom",left:"left"};_.each(a,(function(e,o){void 0!==t.hover[o]&&(""+t.hover[o]).length&&(n+=e+":"+t.hover[o]+";")})),n+="}"}return n}},function(t,e,o){o.r(e),o.d(e,{portoAddHelperClasses:function(){return n}});const n=function(t,e){if(void 0===t)return t;if(!(t=t.trim())||!e)return t;const o=["d-inline-block","d-sm-inline-block","d-md-inline-block","d-lg-inline-block","d-xl-inline-block","d-none","d-sm-none","d-md-none","d-lg-none","d-xl-none","d-block","d-sm-block","d-md-block","d-lg-block","d-xl-block","d-sm-flex","d-md-flex","d-lg-flex","d-xl-flex","col-auto","col-md-auto","col-lg-auto","col-xl-auto","flex-1","flex-none","flex-grow-1","flex-sm-grow-1","flex-md-grow-1","flex-lg-grow-1","flex-xl-grow-1","swatch-left","swatch-center","swatch-right"],n=["ml-auto","ms-auto","mr-auto","me-auto","mx-auto","ml-sm-auto","ms-sm-auto","mr-sm-auto","me-sm-auto","mx-sm-auto","ml-md-auto","ms-md-auto","mr-md-auto","me-md-auto","mx-md-auto","ml-lg-auto","ms-lg-auto","mr-lg-auto","me-lg-auto","mx-lg-auto","ml-xl-auto","ms-xl-auto","mr-xl-auto","me-xl-auto","mx-xl-auto","h-100","h-50","w-100","float-start","float-end","pull-left","pull-right","float-left","float-right","me-lg-4","pe-lg-1"];var a=null,i=document.querySelector('[name="editor-canvas"]');return(a=i&&i.contentDocument?i.contentDocument.getElementById("block-"+e):document.getElementById("block-"+e))&&(a.setAttribute("data-class",""),t.split(" ").forEach((function(t){!(t=t.trim())||-1===o.indexOf(t)&&-1===n.indexOf(t)||a.setAttribute("data-class",a.getAttribute("data-class")+t+" ")}))),t}}],e={};function o(n){var a=e[n];if(void 0!==a)return a.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,o),i.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};!function(){o.r(n);var t=o(1),e=o(2),a=o(3),i=o(4),l=o(5),r=o(6);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},s.apply(null,arguments)}window.portoImageControl=t.default,window.portoTypographyControl=e.default,window.portoAjaxSelect2Control=a.default,window.portoDynamicContentControl=i.default,window.portoStyleOptionsControl=l.default,window.portoBlockDocument=function(){var t=document.querySelector('[name="editor-canvas"]');return t&&t.contentDocument?t.contentDocument:document};const c=function(t){t.find(".owl-stage").css({transform:"",width:"",height:"","max-height":""}).off(".owl.core"),jQuery(document).off(".owl.core"),t.off(".owl.core"),t.children(".owl-dots, .owl-nav").remove(),t.removeClass("owl-drag owl-grab"),t.removeData("owl.carousel")};if("header"===porto_block_vars.builder_type||"footer"===porto_block_vars.builder_type)try{var u=window.portoBlockDocument().getElementById("editor");new MutationObserver((function(t,e){for(var o of t)if("childList"==o.type){var n=jQuery(".editor-styles-wrapper");n.attr("id",porto_block_vars.builder_type),n.addClass(porto_block_vars.builder_type),"header"===porto_block_vars.builder_type&&n.addClass("gutenberg-hb"),e.disconnect();break}})).observe(u,{attributes:!1,childList:!0,subtree:!0})}catch(t){}var p,d,_,y,f,m,g,b,h,v,w,C,x,k,A,S,R;function E(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}return Array.from(t)}!function(t,e,o,n,a,i,l,r){if("1"==porto_block_vars.legacy_mode){var s=t.__,c=e.registerBlockType,u=l.withSelect,p=a.InspectorControls,d=o.createElement,_=(wp.serverSideRender,i.QueryControls),y=i.TextControl,f=i.SelectControl,m=i.RangeControl,g=i.ToggleControl,b=i.Placeholder,h=i.Spinner,v=r.pickBy,w=r.isUndefined,C=o.useEffect;c("porto/porto-recent-posts",{title:"Porto Recent Posts",icon:"porto",category:"porto",keywords:["blog","posts","slider"],attributes:{title:{type:"string"},view:{type:"string"},author:{type:"string"},btn_style:{type:"string"},btn_size:{type:"string"},btn_color:{type:"string"},image_size:{type:"string"},number:{type:"int",default:8},cats:{type:"string"},show_image:{type:"boolean",default:!0},show_metas:{type:"boolean",default:!0},excerpt_length:{type:"int",default:20},items_desktop:{type:"int",default:4},items_tablets:{type:"int",default:3},items_mobile:{type:"int",default:2},items_row:{type:"int",default:1},slider_config:{type:"boolean",default:!1},show_nav:{type:"boolean",default:!1},show_nav_hover:{type:"boolean",default:!1},nav_pos:{type:"string"},nav_type:{type:"string"},show_dots:{type:"boolean",default:!1},dots_pos:{type:"string"},animation_type:{type:"string"},animation_duration:{type:"string",default:"1000"},animation_delay:{type:"string",default:"0"}},edit:u((function(t,e){var o=t("core").getEntityRecords,n=e.attributes,a=n.cats,i=n.number;return{recentPosts:o("postType","post",v({categories:a,per_page:i},(function(t){return!w(t)}))),categoriesList:o("taxonomy","category",{per_page:99})}}))((function(t){C((()=>{const o=t.clientId,n=jQuery("#block-"+o+" .owl-carousel");n.length&&(n.find(".owl-stage").css({transform:"",width:"",height:"","max-height":""}).off(".owl.core"),jQuery(document).off(".owl.core"),n.off(".owl.core"),n.children(".owl-dots, .owl-nav").remove(),n.removeClass("owl-drag owl-grab"),n.removeData("owl.carousel"),n.owlCarousel({items:e.items_desktop,navText:["",""]}))}),[t.recentPosts,t.categoriesList,t.attributes.number,t.attributes.items_desktop,t.attributes.cats,t.attributes.view]);var e=t.attributes,o=(e.author,e.view),n=e.show_image,a=e.show_metas,i=(t.clientId,e.title),l=d(p,{},d(y,{label:s("Title","porto-functionality"),value:e.title,onChange:e=>{t.setAttributes({title:e})}}),d(f,{label:s("View","porto-functionality"),value:e.view,options:[{label:s("Standard","porto-functionality"),value:""},{label:s("Read More Link","porto-functionality"),value:"style-1"},{label:s("Post Meta","porto-functionality"),value:"style-2"},{label:s("Read More Button","porto-functionality"),value:"style-3"},{label:s("Side Image","porto-functionality"),value:"style-4"},{label:s("Post Cats","porto-functionality"),value:"style-5"}],onChange:e=>{t.setAttributes({view:e})}}),("style-1"==o||"style-3"==o)&&d(f,{label:s("Author Name","porto-functionality"),value:e.author,options:[{label:s("Standard","porto-functionality"),value:""},{label:s("Show","porto-functionality"),value:"show"},{label:s("Hide","porto-functionality"),value:"hide"}],onChange:e=>{t.setAttributes({author:e})}}),"style-3"==o&&d(f,{label:s("Button Style","porto-functionality"),value:e.btn_style,options:[{label:s("Standard","porto-functionality"),value:""},{label:s("Normal","porto-functionality"),value:"btn-normal"},{label:s("Borders","porto-functionality"),value:"btn-borders"}],onChange:e=>{t.setAttributes({btn_style:e})}}),"style-3"==o&&d(f,{label:s("Button Size","porto-functionality"),value:e.btn_size,options:[{label:s("Standard","porto-functionality"),value:""},{label:s("Normal","porto-functionality"),value:"btn-normal"},{label:s("Small","porto-functionality"),value:"btn-sm"},{label:s("Extra Small","porto-functionality"),value:"btn-xs"}],onChange:e=>{t.setAttributes({btn_size:e})}}),"style-3"==o&&d(f,{label:s("Button Color","porto-functionality"),value:e.btn_color,options:[{label:s("Standard","porto-functionality"),value:""},{label:s("Default","porto-functionality"),value:"btn-default"},{label:s("Primary","porto-functionality"),value:"btn-primary"},{label:s("Secondary","porto-functionality"),value:"btn-secondary"},{label:s("Tertiary","porto-functionality"),value:"btn-tertiary"},{label:s("Quaternary","porto-functionality"),value:"btn-quaternary"},{label:s("Dark","porto-functionality"),value:"btn-dark"},{label:s("Light","porto-functionality"),value:"btn-light"}],onChange:e=>{t.setAttributes({btn_color:e})}}),d(f,{label:s("Image Size","porto-functionality"),value:e.image_size,options:porto_block_vars.image_sizes,onChange:e=>{t.setAttributes({image_size:e})}}),d(_,{numberOfItems:e.number,categoriesList:t.categoriesList||[],selectedCategoryId:e.cats,onCategoryChange:function(e){return t.setAttributes({cats:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return t.setAttributes({number:e})}}),d(g,{label:s("Show Image","porto-functionality"),checked:e.show_image,onChange:e=>{t.setAttributes({show_image:e})}}),d(g,{label:s("Show Post Metas","porto-functionality"),checked:e.show_metas,onChange:e=>{t.setAttributes({show_metas:e})}}),d(m,{label:s("Excerpt Length","porto-functionality"),value:e.excerpt_length,min:1,max:100,onChange:e=>{t.setAttributes({excerpt_length:e})}}),d(m,{label:s("Items to show on Desktop","porto-functionality"),value:e.items_desktop,min:1,max:8,onChange:e=>{t.setAttributes({items_desktop:e})}}),d(m,{label:s("Items to show on Tablets","porto-functionality"),value:e.items_tablets,min:1,max:5,onChange:e=>{t.setAttributes({items_tablets:e})}}),d(m,{label:s("Items to show on Mobile","porto-functionality"),value:e.items_mobile,min:1,max:3,onChange:e=>{t.setAttributes({items_mobile:e})}}),d(m,{label:s("Items Row","porto-functionality"),value:e.items_row,min:1,max:3,onChange:e=>{t.setAttributes({items_row:e})}}),d(g,{label:s("Change Slider Config","porto-functionality"),checked:!!e.slider_config&&e.slider_config,onChange:e=>{t.setAttributes({slider_config:e})}}),e.slider_config&&d(g,{label:s("Show Nav","porto-functionality"),checked:!!e.show_nav&&e.show_nav,onChange:e=>{t.setAttributes({show_nav:e})}}),e.slider_config&&e.show_nav&&d(f,{label:s("Nav Position","porto-functionality"),value:e.nav_pos,options:[{label:s("Middle","porto-functionality"),value:""},{label:s("Top","porto-functionality"),value:"show-nav-title"},{label:s("Bottom","porto-functionality"),value:"nav-bottom"}],onChange:e=>{t.setAttributes({nav_pos:e})}}),e.slider_config&&e.show_nav&&(""==e.nav_pos||"nav-bottom"==e.nav_pos)&&d(f,{label:s("Nav Type","porto-functionality"),value:e.nav_type,options:[{label:s("Default","porto-functionality"),value:""},{label:s("Rounded","porto-functionality"),value:"rounded-nav"},{label:s("Big & Full Width","porto-functionality"),value:"big-nav"}],onChange:e=>{t.setAttributes({nav_type:e})}}),e.slider_config&&e.show_nav&&d(g,{label:s("Show Nav on Hover","porto-functionality"),checked:!!e.show_nav_hover&&e.show_nav_hover,onChange:e=>{t.setAttributes({show_nav_hover:e})}}),e.slider_config&&d(g,{label:s("Show Dots","porto-functionality"),checked:!!e.show_dots&&e.show_dots,onChange:e=>{t.setAttributes({show_dots:e})}}),e.slider_config&&e.show_dots&&d(f,{label:s("Dots Position","porto-functionality"),value:e.dots_pos,options:[{label:s("Outside","porto-functionality"),value:""},{label:s("Besides Title","porto-functionality"),value:"show-dots-title"},{label:s("Top right","porto-functionality"),value:"show-dots-title-right"}],onChange:e=>{t.setAttributes({dots_pos:e})}}),d(y,{label:s("Animation Type","porto-functionality"),value:e.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:s("Please check this url to see animation types.","porto-functionality")}),d("p",{style:{marginTop:-20}},d("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),d(y,{label:s("Animation Delay (ms)","porto-functionality"),value:e.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),d(y,{label:s("Animation Duration (ms)","porto-functionality"),value:e.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}}));return Array.isArray(t.recentPosts)&&t.recentPosts.length?[l,d("div",{className:"porto-recent-posts"+(e.className?" "+e.className:"")},i&&d("h4",{},i),d("div",{className:"post-carousel porto-carousel owl-carousel owl-loaded"},d("div",{className:"owl-stage-outer"},d("div",{className:"owl-stage"},t.recentPosts.map((function(t,e){var o=t.featured_image_src.list[0];return d("div",{className:"owl-item"},d("div",{className:"post-item"},n&&o&&d("span",{className:"post-image thumb-info thumb-info-hide-wrapper-bg mb-3"},d("span",{className:"thumb-info-wrapper"},d("img",{src:o,alt:s("Post Image","porto-functionality")}))),a&&d("span",{className:"meta-date"},d("i",{className:"far fa-calendar-alt"})," "+moment(t.date_gmt).local().format("DD MMMM, Y")),d("h3",{},t.title.rendered),d("div",{className:"post-excerpt",dangerouslySetInnerHTML:{__html:t.excerpt.rendered}}),d("span",{className:"read-more"},d("span",{},s("Read More","porto-functionality")+" "),d("i",{className:"fas fa-angle-right"}))))}))))))]:[l,d(b,{label:s("Porto Recent Posts Block","porto-functionality")},Array.isArray(t.recentPosts)?s("No posts found!","porto-functionality"):d(h,null))]})),save:function(){return null}})}}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,l,r){var s=t.__,c=e.registerBlockType,u=a.InnerBlocks,p=a.InspectorControls,d=o.createElement,_=(i.QueryControls,i.TextControl),y=i.SelectControl,f=i.RangeControl,m=i.ToggleControl,g=(i.Placeholder,i.Spinner,r.pickBy,r.isUndefined,o.useEffect);c("porto/porto-carousel",{title:"Porto Carousel",icon:"porto",category:"porto",keywords:["slider"],supports:{align:["wide","full"]},attributes:{stage_padding:{type:"int",default:40},margin:{type:"int",default:10},autoplay:{type:"boolean",default:!1},autoplay_timeout:{type:"int",default:5e3},autoplay_hover_pause:{type:"boolean",default:!1},items:{type:"int",default:6},items_lg:{type:"int",default:4},items_md:{type:"int",default:3},items_sm:{type:"int",default:2},items_xs:{type:"int",default:1},show_nav:{type:"boolean",default:!1},show_nav_hover:{type:"boolean",default:!1},nav_pos:{type:"string",default:""},nav_pos2:{type:"string"},nav_type:{type:"string"},show_dots:{type:"boolean",default:!1},dots_pos:{type:"string"},dots_style:{type:"string"},dots_align:{type:"string"},animate_in:{type:"string"},animate_out:{type:"string"},loop:{type:"boolean",default:!1},center:{type:"boolean",default:!1},video:{type:"boolean",default:!1},lazyload:{type:"boolean",default:!1},fullscreen:{type:"boolean",default:!1},merge:{type:"boolean",default:!1},mergeFit:{type:"boolean",default:!0},mergeFit_lg:{type:"boolean",default:!0},mergeFit_md:{type:"boolean",default:!0},mergeFit_sm:{type:"boolean",default:!0},mergeFit_xs:{type:"boolean",default:!0},animation_type:{type:"string"},animation_duration:{type:"int",default:1e3},animation_delay:{type:"int",default:0}},edit:function(t){g((()=>{let e=t.attributes;const o=t.clientId,n=jQuery("#block-"+o).find(".block-editor-block-list__layout").eq(0);if(!n.length)return;void 0!==n.data("owl.carousel")&&n.trigger("destroy.owl.carousel");let a=e.items_lg?e.items_lg:e.items,i=e.items_md?e.items_md:e.items,l=e.items_sm?e.items_sm:e.items,r=e.items_xs?e.items_xs:e.items,s=e.items?e.items:a||1,c=n.find("> *").length,u={};u[1200]={items:s,loop:!!(e.loop&&c>s),mergeFit:e.mergeFit},a&&(u[992]={items:a,loop:!!(e.loop&&c>a),mergeFit:e.mergeFit_lg}),i&&(u[768]={items:i,loop:!!(e.loop&&c>i),mergeFit:e.mergeFit_md}),l&&(u[481]={items:l,loop:!!(e.loop&&c>l),mergeFit:e.mergeFit_sm}),r&&(u[0]={items:r,loop:!!(e.loop&&c>r),mergeFit:e.mergeFit_xs});let p="porto-carousel owl-carousel";e.stage_padding&&(p+=" stage-margin"),e.show_nav&&(e.nav_pos&&(p+=" "+e.nav_pos),e.nav_type&&(p+=" "+e.nav_type),e.show_nav_hover&&(p+=" show-nav-hover")),p+=" has-ccols",p+=" ccols-"+parseInt(e.items,10),e.className&&(p+=" "+e.className),e.show_dots&&e.dots_pos&&(p+=" "+e.dots_pos+" "+e.dots_align),"undefined"!=typeof prevProps&&prevProps.attributes&&n.removeClass("ccols-"+prevProps.attributes.items);const d=n.get(0);for(var _=0;_<d.classList.length;_++)0===d.classList.item(_).indexOf("ccols-")&&d.classList.remove(d.classList.item(_));n.addClass(p)}));t.clientId;var e=t.attributes;return[d(p,{},d(f,{label:s("Stage Padding","porto-functionality"),value:e.stage_padding,min:0,max:100,onChange:e=>{t.setAttributes({stage_padding:e})}}),d(f,{label:s("Item Margin","porto-functionality"),value:e.margin,min:0,max:40,onChange:e=>{t.setAttributes({margin:e})}}),d(m,{label:s("Auto Play","porto-functionality"),checked:!!e.autoplay&&e.autoplay,onChange:e=>{t.setAttributes({autoplay:e})}}),e.autoplay&&d(_,{label:s("Auto Play Timeout","porto-functionality"),value:e.autoplay_timeout,onChange:e=>{t.setAttributes({autoplay_timeout:e})}}),e.autoplay&&d(m,{label:s("Pause on Mouse Hover","porto-functionality"),checked:!!e.autoplay_hover_pause&&e.autoplay_hover_pause,onChange:e=>{t.setAttributes({autoplay_hover_pause:e})}}),d(f,{label:s("Items","porto-functionality"),value:e.items,min:1,max:10,onChange:e=>{t.setAttributes({items:e})}}),d(f,{label:s("Items on Desktop","porto-functionality"),value:e.items_lg,min:1,max:10,onChange:e=>{t.setAttributes({items_lg:e})}}),d(f,{label:s("Items on Tablet","porto-functionality"),value:e.items_md,min:1,max:8,onChange:e=>{t.setAttributes({items_md:e})}}),d(f,{label:s("Items on Mobile","porto-functionality"),value:e.items_sm,min:1,max:5,onChange:e=>{t.setAttributes({items_sm:e})}}),d(f,{label:s("Items on Mini","porto-functionality"),value:e.items_xs,min:1,max:3,onChange:e=>{t.setAttributes({items_xs:e})}}),d(m,{label:s("Show Nav","porto-functionality"),checked:!!e.show_nav&&e.show_nav,onChange:e=>{t.setAttributes({show_nav:e})}}),e.show_nav&&d(y,{label:s("Nav Position","porto-functionality"),value:e.nav_pos,options:[{label:s("Middle","porto-functionality"),value:""},{label:s("Middle of Images","porto-functionality"),value:"nav-center-images-only"},{label:s("Top","porto-functionality"),value:"show-nav-title"},{label:s("Bottom","porto-functionality"),value:"nav-bottom"}],onChange:e=>{t.setAttributes({nav_pos:e})}}),e.show_nav&&""==e.nav_pos&&d(y,{label:s("Nav Inside?","porto-functionality"),value:e.nav_pos2,options:[{label:s("Default","porto-functionality"),value:""},{label:s("Inside","porto-functionality"),value:"nav-pos-inside"},{label:s("Outside","porto-functionality"),value:"nav-pos-outside"}],onChange:e=>{t.setAttributes({nav_pos2:e})}}),e.show_nav&&(""==e.nav_pos||"nav-bottom"==e.nav_pos||"nav-center-images-only"==e.nav_pos)&&d(y,{label:s("Nav Type","porto-functionality"),value:e.nav_type,options:porto_block_vars.carousel_nav_types,onChange:e=>{t.setAttributes({nav_type:e})}}),e.show_nav&&d(m,{label:s("Show Nav on Hover","porto-functionality"),checked:!!e.show_nav_hover&&e.show_nav_hover,onChange:e=>{t.setAttributes({show_nav_hover:e})}}),d(m,{label:s("Show Dots","porto-functionality"),checked:!!e.show_dots&&e.show_dots,onChange:e=>{t.setAttributes({show_dots:e})}}),e.show_dots&&d(y,{label:s("Dots Position","porto-functionality"),value:e.dots_pos,options:[{label:s("Outside","porto-functionality"),value:""},{label:s("Inside","porto-functionality"),value:"nav-inside"},{label:s("Besides Title","porto-functionality"),value:"show-dots-title"},{label:s("Top right","porto-functionality"),value:"show-dots-title-right"}],onChange:e=>{t.setAttributes({dots_pos:e})}}),e.show_dots&&"nav-inside"==e.dots_pos&&d(y,{label:s("Dots Align","porto-functionality"),value:e.dots_align,options:[{label:s("Right","porto-functionality"),value:""},{label:s("Center","porto-functionality"),value:"nav-inside-center"},{label:s("Left","porto-functionality"),value:"nav-inside-left"}],onChange:e=>{t.setAttributes({dots_align:e})}}),e.show_dots&&d(y,{label:s("Dots Style","porto-functionality"),value:e.dots_style,options:[{label:s("Default","porto-functionality"),value:""},{label:s("Circle inner dot","porto-functionality"),value:"dots-style-1"}],onChange:e=>{t.setAttributes({dots_style:e})}}),d(_,{label:s("Item Animation In","porto-functionality"),value:e.animate_in,onChange:e=>{t.setAttributes({animate_in:e})},help:s("Please check this url to see animation types.","porto-functionality")}),d("p",{style:{marginTop:-20}},d("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),d(_,{label:s("Item Animation Out","porto-functionality"),value:e.animate_out,onChange:e=>{t.setAttributes({animate_out:e})}}),d("p",{},s("Please check this url to see animation types.","porto-functionality"),d("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),d(m,{label:s("Infinite loop","porto-functionality"),checked:e.loop,onChange:e=>{t.setAttributes({loop:e})}}),d(m,{label:s("Full Screen","porto-functionality"),checked:e.fullscreen,onChange:e=>{t.setAttributes({fullscreen:e})}}),d(m,{label:s("Center Item","porto-functionality"),checked:e.center,onChange:e=>{t.setAttributes({center:e})}}),d(m,{label:s("Fetch Videos","porto-functionality"),checked:e.video,onChange:e=>{t.setAttributes({video:e})}}),d(m,{label:s("Lazy Load","porto-functionality"),checked:e.lazyload,onChange:e=>{t.setAttributes({lazyload:e})}}),d(m,{label:s("Merge Items","porto-functionality"),checked:e.merge,onChange:e=>{t.setAttributes({merge:e})}}),e.merge&&d(m,{label:s("Merge Fit","porto-functionality"),checked:e.mergeFit,onChange:e=>{t.setAttributes({mergeFit:e})}}),e.merge&&d(m,{label:s("Merge Fit on Desktop","porto-functionality"),checked:e.mergeFit_lg,onChange:e=>{t.setAttributes({mergeFit_lg:e})}}),e.merge&&d(m,{label:s("Merge Fit on Tablet","porto-functionality"),checked:e.mergeFit_md,onChange:e=>{t.setAttributes({mergeFit_md:e})}}),e.merge&&d(m,{label:s("Merge Fit on Mobile","porto-functionality"),checked:e.mergeFit_sm,onChange:e=>{t.setAttributes({mergeFit_sm:e})}}),e.merge&&d(m,{label:s("Merge Fit on Mini","porto-functionality"),checked:e.mergeFit_xs,onChange:e=>{t.setAttributes({mergeFit_xs:e})}}),d(_,{label:s("Animation Type","porto-functionality"),value:e.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:s("Please check this url to see animation types.","porto-functionality")}),d("p",{style:{marginTop:-20}},d("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),d(_,{label:s("Animation Delay (ms)","porto-functionality"),value:e.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),d(_,{label:s("Animation Duration (ms)","porto-functionality"),value:e.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}})),d("div",{className:e.fullscreen?"fullscreen-carousel":""},d(u))]},save:function(t){return d(u.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,l,r){if("1"==porto_block_vars.legacy_mode){var s=t.__,c=e.registerBlockType,u=l.withSelect,p=a.InspectorControls,d=o.createElement,_=i.QueryControls,y=i.TextControl,f=i.SelectControl,m=i.RangeControl,g=(i.ToggleControl,i.Placeholder),b=i.Spinner,h=r.pickBy,v=r.isUndefined;c("porto/porto-blog",{title:"Porto Blog",icon:"porto",category:"porto",keywords:["posts"],attributes:{title:{type:"string"},post_layout:{type:"string",default:"timeline"},post_style:{type:"string",default:"default"},columns:{type:"number",default:3},cats:{type:"string"},post_in:{type:"string"},number:{type:"int",default:8},view_more:{type:"boolean"},view_more_class:{type:"string"},image_size:{type:"string"},animation_type:{type:"string"},animation_duration:{type:"int",default:1e3},animation_delay:{type:"int",default:0}},edit:u((function(t,e){var o=t("core").getEntityRecords,n=e.attributes,a=n.cats,i=n.number;return{recentPosts:o("postType","post",h({categories:a,per_page:i},(function(t){return!v(t)}))),categoriesList:o("taxonomy","category",{per_page:99})}}))((function(t){var e=t.attributes.post_layout,n=t.attributes.title,a=t.attributes,i=d(p,{},d(y,{label:s("Title","porto-functionality"),value:a.title,onChange:e=>{t.setAttributes({title:e})}}),d(f,{label:s("Blog Layout","porto-functionality"),value:a.post_layout,options:[{label:s("Full","porto-functionality"),value:"full"},{label:s("Large","porto-functionality"),value:"large"},{label:s("Large Alt","porto-functionality"),value:"large-alt"},{label:s("Medium","porto-functionality"),value:"medium"},{label:s("Medium Alt","porto-functionality"),value:"medium-alt"},{label:s("Grid","porto-functionality"),value:"grid"},{label:s("Timeline","porto-functionality"),value:"timeline"},{label:s("Slider","porto-functionality"),value:"slider"}],onChange:e=>{t.setAttributes({post_layout:e})}}),("grid"==e||"masonry"==e||"timeline"==e)&&d(f,{label:s("Post Style","porto-functionality"),value:a.post_style,options:[{label:s("Default","porto-functionality"),value:"default"},{label:s("Default - Date on Image","porto-functionality"),value:"date"},{label:s("Default - Author Picture","porto-functionality"),value:"author"},{label:s("Post Carousel Style","porto-functionality"),value:"related"},{label:s("Hover Info","porto-functionality"),value:"hover_info"},{label:s("No Margin & Hover Info","porto-functionality"),value:"no_margin"},{label:s("With Borders","porto-functionality"),value:"padding"},{label:s("Modern","porto-functionality"),value:"modern"}],onChange:e=>{t.setAttributes({post_style:e})}}),("grid"==e||"masonry"==e)&&d(m,{label:s("Columns","porto-functionality"),value:a.columns,min:1,max:6,onChange:e=>{t.setAttributes({columns:e})}}),d(_,{categoriesList:t.categoriesList||[],selectedCategoryId:a.cats,numberOfItems:a.number,onCategoryChange:function(e){return t.setAttributes({cats:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return t.setAttributes({number:e})}}),d(y,{label:s("Post IDs","porto-functionality"),value:a.post_in,onChange:e=>{t.setAttributes({post_in:e})}}),d(f,{label:s("Pagination Style","porto-functionality"),value:a.view_more,options:[{label:s("No Pagination","porto-functionality"),value:""},{label:s("Show Pagination","porto-functionality"),value:"show"},{label:s("Show Blog Page Link","porto-functionality"),value:"link"}],onChange:e=>{t.setAttributes({view_more:e})}}),"link"==a.view_more&&d(y,{label:s("Extra class name for Archive Link","porto-functionality"),value:a.view_more_class,onChange:e=>{t.setAttributes({view_more_class:e})}}),("grid"===e||"masonry"===e||"timeline"===e||"slider"===e)&&d(f,{label:s("Image Size","porto-functionality"),value:a.image_size,options:porto_block_vars.image_sizes,onChange:e=>{t.setAttributes({image_size:e})}}),d(y,{label:s("Animation Type","porto-functionality"),value:a.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:s("Please check this url to see animation types.","porto-functionality")}),d("p",{style:{marginTop:-20}},d("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),d(y,{label:s("Animation Delay (ms)","porto-functionality"),value:a.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),d(y,{label:s("Animation Duration (ms)","porto-functionality"),value:a.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}}));if(!(Array.isArray(t.recentPosts)&&t.recentPosts.length))return[i,d(g,{label:s("Porto Blog Block","porto-functionality")},Array.isArray(t.recentPosts)?s("No posts found!","porto-functionality"):d(b,null))];var l,r,c="medium",u=a.columns,h={};let v="post post-"+a.post_layout;return"full"==a.post_layout||"large"==a.post_layout||"large-alt"==a.post_layout?(c="landsacpe",u=1):"medium"==a.post_layout?(c="list",u=1,h.clear="both"):"medium-alt"==a.post_layout?(c="list",u=1):"timeline"===a.post_layout&&(c="landsacpe",v+=" timeline-box"),r=t.recentPosts.map((function(t,e){var o=t.featured_image_src[c][0];return d("article",{className:v+("timeline"===a.post_layout?e%2?" right":" left":"")},"large-alt"===a.post_layout&&d("div",{className:"post-date"},d("span",{className:"day"},moment(t.date_gmt).local().format("DD")),d("span",{className:"month"},moment(t.date_gmt).local().format("MMM"))),o&&d("div",{className:"post-image"},d("div",{className:"img-thumbnail"},d("img",{src:o,alt:s("Post Image","porto-functionality")})),"medium-alt"===a.post_layout&&d("div",{className:"blog-post-date background-color-primary text-color-light font-weight-bold"},moment(t.date_gmt).local().format("DD"),d("span",{className:"month-year font-weight-light"},moment(t.date_gmt).local().format("MMM-DD")))),("full"===a.post_layout||"large"===a.post_layout)&&d("div",{className:"post-date"},d("span",{className:"day"},moment(t.date_gmt).local().format("DD")),d("span",{className:"month"},moment(t.date_gmt).local().format("MMM"))),d("div",{className:"post-content"},d("h4",{className:"entry-title"},t.title.rendered),d("p",{className:"post-excerpt",dangerouslySetInnerHTML:{__html:t.excerpt.rendered}})),"medium-alt"===a.post_layout&&d("hr",{className:"solid"}),d("div",{className:"post-meta",style:h},d("span",{className:"meta-date"},d("i",{className:"far fa-calendar-alt"})," "+moment(t.date_gmt).local().format("DD MMMM, Y")),"medium"===a.post_layout&&d("a",{className:"btn read-more d-block float-sm-end",href:t.link},d("span",null,s("Read More","porto-functionality")))),"medium"!==a.post_layout&&"medium-alt"!==a.post_layout&&d("a",{className:"btn read-more"+("full"===a.post_layout||"large"===a.post_layout||"large-alt"===a.post_layout?" float-sm-end":""),href:t.link},d("span",null,s("Read More","porto-functionality"))),"medium-alt"===a.post_layout&&d("a",{className:"btn btn-lg d-inline-block btn-borders btn-primary custom-border-radius font-weight-semibold text-uppercase m-t-md"},d("span",null,s("Read More","porto-functionality"))))})),l="timeline"==a.post_layout?d("div",{className:"porto-blog"+(a.className?" "+a.className:"")},n&&d("h4",{},n),d("div",{className:"blog-posts posts-"+a.post_layout+(a.post_style?" blog-posts-"+a.post_style:"")},d("section",{className:"timeline"},d("div",{className:"timeline-body"},r))),""):"grid"==a.post_layout||"masonry"==a.post_layout?d("div",{className:"porto-blog"+(a.className?" "+a.className:"")},n&&d("h4",{},n),d("div",{className:"blog-posts posts-"+a.post_layout+(a.post_style?" blog-posts-"+a.post_style:"")},d("div",{className:"posts-container columns-"+u},r)),""):d("div",{className:"porto-blog"+(a.className?" "+a.className:"")},n&&d("h4",{},n),d("div",{className:"blog-posts posts-"+a.post_layout+(u>1?" posts-container columns-"+u:"")},r),""),d(o.Fragment,{},i,l)})),save:function(){return null}})}}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,l,r){var s=t.__,c=e.registerBlockType,u=a.InspectorControls,p=a.MediaUpload,d=o.createElement,_=o.Component,y=i.TextControl,f=i.TextareaControl,m=i.SelectControl,g=i.RangeControl,b=i.ToggleControl,h=(i.Placeholder,i.IconButton);let v=null;c("porto/porto-google-map",{title:"Porto Google Map",icon:"porto",category:"porto",attributes:{width:{type:"string",default:"100%"},height:{type:"string",default:"300px"},map_type:{type:"string",default:"ROADMAP"},lat:{type:"string",default:"51.5074"},lng:{type:"string",default:"0.1278"},zoom:{type:"int",default:14},scrollwheel:{type:"boolean"},streetviewcontrol:{type:"string",default:"false"},maptypecontrol:{type:"string",default:"false"},pancontrol:{type:"string",default:"false"},zoomcontrol:{type:"string",default:"false"},zoomcontrolposition:{type:"string",default:"RIGHT_BOTTOM"},dragging:{type:"string",default:"true"},marker_icon:{type:"string",default:"default"},icon_img:{type:"int"},icon_img_url:{type:"string"},top_margin:{type:"string",default:"page_margin_top"},map_override:{type:"string",default:"0"},map_style:{type:"string"},infowindow_open:{type:"string",default:"on"},content:{type:"string"}},edit:class extends _{constructor(){super(...arguments),this.state={currentMap:null,currentMarker:null,currentInfo:null},this.initMap=this.initMap.bind(this)}componentDidMount(){this.initMap()}componentDidUpdate(t,e){t.attributes.lat,t.attributes.lng;var o=this.props.attributes;if(e!==this.state)return null;t.attributes!==o&&(clearTimeout(v),v=setTimeout(this.initMap,1e3))}portoURLDecode(t){return decodeURIComponent((t+"").replace(/%(?![\da-f]{2})/gi,(function(){return"%25"})))}initMap(){if("undefined"==typeof google)return null;var t,e=this.props.attributes,o="map_"+this.props.clientId,n=new google.maps.LatLng(e.lat,e.lng),a={scaleControl:!0,streetViewControl:"true"===e.streetviewcontrol,mapTypeControl:"true"===e.maptypecontrol,panControl:"true"===e.pancontrol,zoomControl:"true"===e.zoomcontrol,scrollwheel:!e.scrollwheel,draggable:"true"===e.dragging,zoomControlOptions:{position:google.maps.ControlPosition[e.zoomcontrolposition]}},i=this.state.currentMap,l=this.state.currentMarker,r=this.state.currentInfo;if(e.map_style){a.mapTypeControlOptions={mapTypeIds:[google.maps.MapTypeId[e.map_type],"map_style"]};var s=this.portoURLDecode(jQuery.base64.decode(e.map_style));t=new google.maps.StyledMapType(s,{name:"Styled Map"})}else a.mapTypeId=google.maps.MapTypeId[e.map_type];i=new google.maps.Map(window.portoBlockDocument().getElementById(o),a),this.setState({currentMap:i}),i.setCenter(n),i.setZoom(e.zoom),e.map_style&&(i.mapTypes.set("map_style",t),i.setMapTypeId("map_style")),e.lat&&e.lng&&(l||(l=new google.maps.Marker({position:new google.maps.LatLng(e.lat,e.lng),animation:google.maps.Animation.DROP,map:i,icon:e.icon_img_url}),this.setState({currentMarker:l})),void 0!==e.icon_img_url&&l.setIcon(e.icon_img_url),google.maps.event.addListener(l,"click",(function(){null!=l.getAnimation()?l.setAnimation(null):l.setAnimation(google.maps.Animation.BOUNCE)})),""!==e.content.trim()&&(r||(r=new google.maps.InfoWindow,this.setState({currentInfo:r})),r.setContent('<div class="map_info_text" style="color:#000;">'+e.content.trim().replace("/s+/"," ")+"</div>"),"off"==e.infowindow_open&&r.open(i,l),google.maps.event.addListener(l,"click",(function(){r.open(i,l)})))),google.maps.event.trigger(i,"resize")}render(){var t=this.props,e=(t.attributes.title,t.attributes),n=t.clientId,a=d(u,{},d(y,{label:s("Width (in %)","porto-functionality"),value:e.width,onChange:e=>{t.setAttributes({width:e})}}),d(y,{label:s("Height (in px)","porto-functionality"),value:e.height,onChange:e=>{t.setAttributes({height:e})}}),d(m,{label:s("Map type","porto-functionality"),value:e.map_type,options:[{label:s("Roadmap","porto-functionality"),value:"ROADMAP"},{label:s("Satellite","porto-functionality"),value:"SATELLITE"},{label:s("Hybrid","porto-functionality"),value:"HYBRID"},{label:s("Terrain","porto-functionality"),value:"TERRAIN"}],onChange:e=>{t.setAttributes({map_type:e})}}),d(y,{label:s("Latitude","porto-functionality"),value:e.lat,onChange:e=>{t.setAttributes({lat:e})}}),d(y,{label:s("Longitude","porto-functionality"),value:e.lng,onChange:e=>{t.setAttributes({lng:e})}}),d("p",null,d("a",{href:"http://universimmedia.pagesperso-orange.fr/geo/loc.htm",target:"_blank"},s("Here is a tool","porto-functionality"))," "+s("where you can find Latitude & Longitude of your location","porto-functionality")),d(g,{label:s("Map Zoom","porto-functionality"),value:e.zoom,min:1,max:20,onChange:e=>{t.setAttributes({zoom:e})}}),d(b,{label:s("Disable map zoom on mouse wheel scroll","porto-functionality"),checked:e.scrollwheel,onChange:e=>{t.setAttributes({scrollwheel:e})}}),d(y,{label:s("Info Window Text","porto-functionality"),value:e.content,onChange:e=>{t.setAttributes({content:e})}}),d(m,{label:s("Open on Marker Click","porto-functionality"),value:e.infowindow_open,options:[{label:s("Yes","porto-functionality"),value:"on"},{label:s("No","porto-functionality"),value:"off"}],onChange:e=>{t.setAttributes({infowindow_open:e})}}),d(m,{label:s("Marker/Point icon","porto-functionality"),value:e.marker_icon,options:[{label:s("Use Google Default","porto-functionality"),value:"default"},{label:s("Upload Custom","porto-functionality"),value:"custom"}],onChange:e=>{t.setAttributes({marker_icon:e})}}),"custom"==e.marker_icon&&d(p,{allowedTypes:["image"],value:e.icon_img,onSelect:function(e){return t.setAttributes({icon_img_url:e.url,icon_img:e.id})},render:function(t){var e=t.open;return d(h,{className:"components-toolbar__control",label:s("Change image","porto-functionality"),icon:"edit",onClick:e})}}),"custom"==e.marker_icon&&d(h,{className:"components-toolbar__control",label:s("Remove image","porto-functionality"),icon:"no",onClick:function(){return t.setAttributes({icon_img_url:void 0,icon_img:void 0})}}),d(m,{label:s("Street view control","porto-functionality"),value:e.streetviewcontrol,options:[{label:s("Disable","porto-functionality"),value:"false"},{label:s("Enable","porto-functionality"),value:"true"}],onChange:e=>{t.setAttributes({streetviewcontrol:e})}}),d(m,{label:s("Map type control","porto-functionality"),value:e.maptypecontrol,options:[{label:s("Disable","porto-functionality"),value:"false"},{label:s("Enable","porto-functionality"),value:"true"}],onChange:e=>{t.setAttributes({maptypecontrol:e})}}),d(m,{label:s("Zoom control","porto-functionality"),value:e.zoomcontrol,options:[{label:s("Disable","porto-functionality"),value:"false"},{label:s("Enable","porto-functionality"),value:"true"}],onChange:e=>{t.setAttributes({zoomcontrol:e})}}),"true"==e.zoomcontrol&&d(m,{label:s("Zoom Control Position","porto-functionality"),value:e.zoomcontrolposition,options:[{label:s("Right Bottom","porto-functionality"),value:"RIGHT_BOTTOM"},{label:s("Right Top","porto-functionality"),value:"RIGHT_TOP"},{label:s("Right Center","porto-functionality"),value:"RIGHT_CENTER"},{label:s("Left Top","porto-functionality"),value:"LEFT_TOP"},{label:s("Left Center","porto-functionality"),value:"LEFT_CENTER"},{label:s("Left Bottom","porto-functionality"),value:"LEFT_BOTTOM"}],onChange:e=>{t.setAttributes({zoomcontrolposition:e})}}),d(m,{label:s("Dragging on Mobile","porto-functionality"),value:e.dragging,options:[{label:s("Enable","porto-functionality"),value:"true"},{label:s("Disable","porto-functionality"),value:"false"}],onChange:e=>{t.setAttributes({dragging:e})}}),d(m,{label:s("Top margin","porto-functionality"),value:e.top_margin,options:[{label:s("Page (small)","porto-functionality"),value:"page_margin_top"},{label:s("Section (large)","porto-functionality"),value:"page_margin_top_section"},{label:s("None","porto-functionality"),value:"none"}],onChange:e=>{t.setAttributes({top_margin:e})}}),d(m,{label:s("Map Width Override","porto-functionality"),value:e.map_override,options:[{label:s("Default Width","porto-functionality"),value:"0"},{label:s("Apply 1st parent element's width"),value:"1"},{label:s("Apply 2nd parent element's width"),value:"2"},{label:s("Apply 3rd parent element's width"),value:"3"},{label:s("Apply 4th parent element's width"),value:"4"},{label:s("Apply 5th parent element's width"),value:"5"},{label:s("Apply 6th parent element's width"),value:"6"},{label:s("Apply 7th parent element's width"),value:"7"},{label:s("Apply 8th parent element's width"),value:"8"},{label:s("Apply 9th parent element's width"),value:"9"},{label:s("Full Width","porto-functionality"),value:"full"},{label:s("Maximum Full Width","porto-functionality"),value:"ex-full"}],onChange:e=>{t.setAttributes({map_override:e})}}),d("p",{style:{fontStyle:"italic"}},s("By default, the map will be given to the Visual Composer row. However, in some cases depending on your theme's CSS - it may not fit well to the container you are wishing it would. In that case you will have to select the appropriate value here that gets you desired output.")),d(f,{label:s("Google Styled Map JSON","porto-functionality"),value:e.map_style,onChange:e=>{t.setAttributes({map_style:e})}}),d("p",{style:{fontStyle:"italic"}},d("a",{target:"_blank",href:"http://googlemaps.github.io/js-samples/styledmaps/wizard/index.html"},s("Click here","porto-functionality"))," "+s("to get the style JSON code for styling your map.","porto-functionality"))),i={};if(e.width){let t=e.width;t.replace(/[0-9.]/g,"")||(t+="%"),i.width=t}if(e.height){let t=e.height;t.replace(/[0-9.]/g,"")||(t+="px"),i.height=t}var l=d("div",{id:"wrap_"+n,className:"porto-map-wrapper"+(e.className?" "+e.className:"")},d("div",{id:"map_"+n,className:"porto_google_map",style:i}));return d(o.Fragment,{},a,l)}},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,o,n,a,i,l,r,s){var c=t.__,u=o.registerBlockType,p=i.InspectorControls,d=i.PanelColorSettings,_=i.RichText,y=i.BlockControls,f=i.BlockAlignmentToolbar,m=n.createElement,g=(n.Component,l.PanelBody),b=l.TextControl,h=l.TextareaControl,v=l.SelectControl,w=l.RangeControl;l.ToggleControl,l.Placeholder;u("porto/porto-ultimate-heading",{title:"Porto Ultimate Heading",icon:"porto",category:"porto",keywords:["title","sub title","heading separator"],description:c("Display the heading with description.","porto-functionality"),attributes:{main_heading:{type:"string"},main_heading_use_theme_fonts:{type:"boolean",default:!0},main_heading_font_family:{type:"string"},main_heading_font_size:{type:"string"},main_heading_font_weight:{type:"int"},main_heading_text_transform:{type:"string"},main_heading_line_height:{type:"string"},main_heading_letter_spacing:{type:"string"},main_heading_color:{type:"string"},main_heading_margin_bottom:{type:"int"},content:{type:"string"},sub_heading_use_theme_fonts:{type:"boolean",default:!0},sub_heading_font_family:{type:"string"},sub_heading_font_size:{type:"string"},sub_heading_font_weight:{type:"int"},sub_heading_line_height:{type:"string"},sub_heading_letter_spacing:{type:"string"},sub_heading_color:{type:"string"},sub_heading_margin_bottom:{type:"int"},spacer:{type:"string",default:"no_spacer"},spacer_position:{type:"string",default:"top"},line_style:{type:"string",default:"solid"},line_width:{type:"string",default:"auto"},line_height:{type:"string",default:"1"},line_color:{type:"string",default:"#ccc"},alignment:{type:"string",default:"center"},spacer_margin_bottom:{type:"int"},heading_tag:{type:"string",default:"h2"},animation_type:{type:"string"},animation_duration:{type:"int",default:1e3},animation_delay:{type:"int",default:0}},edit:function(t){t.attributes.title;var o=t.attributes,a=(t.clientId,m(p,{},m(g,{title:c("Layout","porto-functionality"),initialOpen:!0},m(h,{label:c("Sub Heading (Optional)","porto-functionality"),value:o.content,onChange:e=>{t.setAttributes({content:e})}}),m(v,{label:c("Heading Tag","porto-functionality"),value:o.heading_tag,options:[{label:c("H1","porto-functionality"),value:"h1"},{label:c("H2","porto-functionality"),value:"h2"},{label:c("H3","porto-functionality"),value:"h3"},{label:c("H4","porto-functionality"),value:"h4"},{label:c("H5","porto-functionality"),value:"h5"},{label:c("H6","porto-functionality"),value:"h6"}],onChange:e=>{t.setAttributes({heading_tag:e})}}),m(v,{label:c("Separator","porto-functionality"),value:o.spacer,options:[{label:c("No Separator","porto-functionality"),value:"no_spacer"},{label:c("Line","porto-functionality"),value:"line_only"}],onChange:e=>{t.setAttributes({spacer:e})}}),m("p",{style:{fontStyle:"italic"}},c("Horizontal line, icon or image to divide sections","porto-functionality")),"line_only"==o.spacer&&m(v,{label:c("Separator Position","porto-functionality"),value:o.spacer_position,options:[{label:c("Top","porto-functionality"),value:"top"},{label:c("Between Heading & Sub-Heading","porto-functionality"),value:"middle"},{label:c("Bottom","porto-functionality"),value:"bottom"}],onChange:e=>{t.setAttributes({spacer_position:e})}}),"line_only"==o.spacer&&m(w,{label:c("Line Width (optional)","porto-functionality"),value:o.line_width,min:0,max:500,onChange:e=>{t.setAttributes({line_width:e})}}),"line_only"==o.spacer&&m(w,{label:c("Line Height","porto-functionality"),value:o.line_height,min:1,max:100,onChange:e=>{t.setAttributes({line_height:e})}}),"line_only"==o.spacer&&m(d,{title:c("Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:c("Line Color","porto-functionality"),value:o.line_color,onChange:function(e){return t.setAttributes({line_color:e})}}]})),m(g,{title:c("Style","porto-functionality"),initialOpen:!1},m(e.default,{label:c("Main Heading Font","porto-functionality"),value:{fontFamily:o.main_heading_font_family,fontSize:o.main_heading_font_size,fontWeight:o.main_heading_font_weight,textTransform:o.main_heading_text_transform,lineHeight:o.main_heading_line_height,letterSpacing:o.main_heading_letter_spacing,color:o.main_heading_color},options:{textAlign:!1},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({main_heading_font_family:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({main_heading_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({main_heading_font_weight:e.fontWeight}),void 0!==e.textTransform&&t.setAttributes({main_heading_text_transform:e.textTransform}),void 0!==e.lineHeight&&t.setAttributes({main_heading_line_height:e.lineHeight}),void 0!==e.letterSpacing&&t.setAttributes({main_heading_letter_spacing:e.letterSpacing}),void 0!==e.color?t.setAttributes({main_heading_color:e.color}):t.setAttributes({main_heading_color:""})}}),m(w,{label:c("Heading Margin Bottom","porto-functionality"),value:o.main_heading_margin_bottom,min:0,max:100,onChange:e=>{t.setAttributes({main_heading_margin_bottom:e})}}),m(e.default,{label:c("Sub Heading Font","porto-functionality"),value:{fontFamily:o.sub_heading_font_family,fontSize:o.sub_heading_font_size,fontWeight:o.sub_heading_font_weight,lineHeight:o.sub_heading_line_height,letterSpacing:o.sub_heading_letter_spacing,color:o.sub_heading_color},options:{textTransform:!1,textAlign:!1},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({sub_heading_font_family:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({sub_heading_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({sub_heading_font_weight:e.fontWeight}),void 0!==e.lineHeight&&t.setAttributes({sub_heading_line_height:e.lineHeight}),void 0!==e.letterSpacing&&t.setAttributes({sub_heading_letter_spacing:e.letterSpacing}),void 0!==e.color?t.setAttributes({sub_heading_color:e.color}):t.setAttributes({sub_heading_color:""})}}),m(w,{label:c("Sub Heading Margin Bottom","porto-functionality"),value:o.sub_heading_margin_bottom,min:0,max:100,onChange:e=>{t.setAttributes({sub_heading_margin_bottom:e})}}),m(v,{label:c("Text Align","porto-functionality"),value:o.alignment,options:[{label:c("Default","porto-functionality"),value:""},{label:c("Inherit","porto-functionality"),value:"inherit"},{label:c("Left","porto-functionality"),value:"left"},{label:c("Center","porto-functionality"),value:"center"},{label:c("Right","porto-functionality"),value:"right"},{label:c("Justify","porto-functionality"),value:"justify"}],onChange:e=>{t.setAttributes({alignment:e})}}),"line_only"==o.spacer&&m(w,{label:c("Separator Margin Bottom","porto-functionality"),value:o.spacer_margin_bottom,min:0,max:50,onChange:e=>{t.setAttributes({spacer_margin_bottom:e})}}),m(b,{label:c("Animation Type","porto-functionality"),value:t.attributes.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:c("Please check this url to see animation types.","porto-functionality")}),m("p",{style:{marginTop:-20}},m("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),m(b,{label:c("Animation Delay (ms)","porto-functionality"),value:t.attributes.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),m(b,{label:c("Animation Duration (ms)","porto-functionality"),value:t.attributes.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}})))),i={},l={},r="",s={},u={};if(o.main_heading_font_family&&(s.fontFamily=o.main_heading_font_family),o.main_heading_font_weight&&(s.fontWeight=o.main_heading_font_weight),o.main_heading_color&&(s.color=o.main_heading_color),o.main_heading_margin_bottom&&(s.marginBottom=o.main_heading_margin_bottom+"px"),o.main_heading_font_size){o.main_heading_font_size.replace(/[0-9.]/g,"")||(o.main_heading_font_size+="px"),s.fontSize=o.main_heading_font_size}if(o.main_heading_line_height){!o.main_heading_line_height.replace(/[0-9.]/g,"")&&o.main_heading_line_height>3&&(o.main_heading_line_height+="px"),s.lineHeight=o.main_heading_line_height}if(o.main_heading_letter_spacing){o.main_heading_letter_spacing.replace(/[0-9.]/g,"")||(o.main_heading_letter_spacing+="px"),s.letterSpacing=o.main_heading_letter_spacing}if(o.main_heading_text_transform&&(s.textTransform=o.main_heading_text_transform),o.sub_heading_font_family&&(u.fontFamily=o.sub_heading_font_family),o.sub_heading_font_weight&&(u.fontWeight=o.sub_heading_font_weight),o.sub_heading_color&&(u.color=o.sub_heading_color),o.sub_heading_margin_bottom&&(u.marginBottom=o.sub_heading_margin_bottom+"px"),o.sub_heading_font_size){o.sub_heading_font_size.replace(/[0-9.]/g,"")||(o.sub_heading_font_size+="px"),u.fontSize=o.sub_heading_font_size}if(o.sub_heading_line_height){!o.sub_heading_line_height.replace(/[0-9.]/g,"")&&o.sub_heading_line_height>3&&(o.sub_heading_line_height+="px"),u.lineHeight=o.sub_heading_line_height}if(o.sub_heading_letter_spacing){o.sub_heading_letter_spacing.replace(/[0-9.]/g,"")||(o.sub_heading_letter_spacing+="px"),u.letterSpacing=o.sub_heading_letter_spacing}o.spacer&&o.spacer_margin_bottom&&(i={marginBottom:o.spacer_margin_bottom+"px"}),"line_only"==o.spacer&&(l.borderStyle=o.line_style,l.borderBottomWidth=o.line_height+"px",l.borderColor=o.line_color,l.width=o.line_width+("auto"==o.line_width?"":"px"),l.float=o.alignment,i.height=o.line_height+"px",r=m("span",{className:"porto-u-headings-line",style:l})),s.textAlign=o.alignment;var C="";o.spacer&&(C=m("div",{className:"porto-u-heading-spacer "+o.spacer,style:i},r));var x=m("div",{className:"porto-u-heading"+(o.className?" "+o.className:""),style:{textAlign:o.alignment}},"top"==o.spacer_position&&C,m(_,{tagName:o.heading_tag,className:"porto-u-main-heading",style:s,onChange:function(e){return t.setAttributes({main_heading:e})},value:o.main_heading}),"middle"==o.spacer_position&&C,o.content&&m("div",{className:"porto-u-sub-heading",style:u,dangerouslySetInnerHTML:{__html:o.content.replace(/<script.*?\/script>/g,"")}}),"bottom"==o.spacer_position&&C);return m(n.Fragment,{},m(y,null,m(f,{value:o.alignment,onChange:function(e){return t.setAttributes({alignment:e})}})),a,x)},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),p=wp.i18n,d=wp.blocks,_=wp.element,wp.editor,y=wp.blockEditor,f=wp.components,wp.data,lodash,m=p.__,g=d.registerBlockType,b=y.InspectorControls,h=y.PanelColorSettings,v=y.MediaUpload,w=_.createElement,_.Component,C=f.PanelBody,x=f.TextControl,k=f.TextareaControl,A=f.SelectControl,S=f.RangeControl,f.ToggleControl,f.Placeholder,R=f.IconButton,g("porto/porto-info-box",{title:"Porto Info Box",icon:"porto",category:"porto",keywords:["icon","text","title","sub title","description"],attributes:{icon_type:{type:"string"},icon:{type:"string"},icon_img:{type:"int"},icon_img_url:{type:"string"},img_width:{type:"int",default:48},icon_size:{type:"int",default:32},icon_color:{type:"string"},icon_style:{type:"string",default:"none"},icon_color_bg:{type:"string"},icon_color_border:{type:"string",default:"#333"},icon_border_style:{type:"string"},icon_border_size:{type:"int",default:1},icon_border_radius:{type:"int",default:500},icon_border_spacing:{type:"int",default:50},icon_animation:{type:"string"},title:{type:"string",default:"Porto Icon Title"},subtitle:{type:"string"},content:{type:"string"},link:{type:"string"},hover_effect:{type:"string",default:"style_1"},pos:{type:"string",default:"default"},h_align:{type:"string",default:"center"},read_more:{type:"string",default:"none"},read_text:{type:"string",default:"Read More"},heading_tag:{type:"string",default:"h3"},title_font:{type:"string"},title_font_style:{type:"int"},title_font_size:{type:"string"},title_text_transform:{type:"string"},title_font_line_height:{},title_font_letter_spacing:{type:"string"},title_font_color:{type:"string"},subtitle_font_style:{type:"int"},subtitle_font_size:{type:"string"},subtitle_font_line_height:{},subtitle_font_letter_spacing:{type:"string"},subtitle_font_color:{type:"string"},desc_font:{type:"string"},desc_font_style:{type:"int"},desc_font_size:{type:"string"},desc_font_color:{type:"string"},desc_font_line_height:{},desc_font_letter_spacing:{type:"string"},icon_margin_right:{type:"string"},icon_margin_bottom:{type:"string"},title_margin_bottom:{type:"string"},sub_title_margin_bottom:{type:"string"},animation_type:{type:"string"}},edit:function(t){var o=t.attributes,n=t.clientId,a=w(b,{},w(C,{title:m("Layout","porto-functionality"),initialOpen:!0},w(A,{label:m("Box Style","porto-functionality"),value:o.pos,options:[{label:m("Icon at Left with heading","porto-functionality"),value:"default"},{label:m("Icon at Right with heading","porto-functionality"),value:"heading-right"},{label:m("Icon at Left","porto-functionality"),value:"left"},{label:m("Icon at Right","porto-functionality"),value:"right"},{label:m("Icon at Top","porto-functionality"),value:"top"}],onChange:e=>{t.setAttributes({pos:e})}}),"top"===o.pos&&w(A,{label:m("Horizontal Alignment","porto-functionality"),value:o.h_align,options:[{label:m("Left","porto-functionality"),value:"left"},{label:m("Center","porto-functionality"),value:"center"},{label:m("Right","porto-functionality"),value:"right"}],onChange:e=>{t.setAttributes({h_align:e})}}),w(A,{label:m("Icon to display","porto-functionality"),value:o.icon_type,options:[{label:m("Icon Font","porto-functionality"),value:""},{label:m("Custom Image Icon","porto-functionality"),value:"custom"}],onChange:e=>{t.setAttributes({icon_type:e})}}),!o.icon_type&&w(x,{label:m("Icon Class","porto-functionality"),value:o.icon,onChange:e=>{t.setAttributes({icon:e})},help:m("Please check this url to see icons which Porto supports. ","porto-functionality")}),!o.icon_type&&w("p",{style:{marginTop:-14}},w("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/icons/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/icons/")),"custom"==o.icon_type&&w(v,{allowedTypes:["image"],value:o.icon_img,onSelect:function(e){return t.setAttributes({icon_img_url:e.url,icon_img:e.id})},render:function(t){var e=t.open;return w(R,{className:"components-toolbar__control",label:m("Change image","porto-functionality"),icon:"edit",onClick:e})}}),"custom"==o.icon_type&&w(R,{className:"components-toolbar__control",label:m("Remove image","porto-functionality"),icon:"no",onClick:function(){return t.setAttributes({icon_img_url:void 0,icon_img:void 0})}}),"custom"==o.icon_type&&w(S,{label:m("Image Width","porto-functionality"),value:o.img_width,min:16,max:512,onChange:e=>{t.setAttributes({img_width:e})}}),"custom"!=o.icon_type&&w(S,{label:m("Icon Size","porto-functionality"),value:o.icon_size,min:12,max:72,onChange:e=>{t.setAttributes({icon_size:e})}}),"custom"!=o.icon_type&&w(h,{title:m("Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:m("Color","porto-functionality"),value:o.icon_color,onChange:function(e){return t.setAttributes({icon_color:e})}}]}),w(A,{label:m("Icon Style","porto-functionality"),value:o.icon_style,options:[{label:m("Simple","porto-functionality"),value:"none"},{label:m("Circle Background","porto-functionality"),value:"circle"},{label:m("Circle Image","porto-functionality"),value:"circle_img"},{label:m("Square Background","porto-functionality"),value:"square"},{label:m("Design your own","porto-functionality"),value:"advanced"}],onChange:e=>{t.setAttributes({icon_style:e})}}),"none"!=o.icon_style&&w(h,{title:m("Background Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:m("Background Color","porto-functionality"),value:o.icon_color_bg,onChange:function(e){return t.setAttributes({icon_color_bg:e})}}]}),("circle_img"==o.icon_style||"advanced"==o.icon_style)&&w(A,{label:m("Icon Border Style","porto-functionality"),value:o.icon_border_style,options:[{label:m("None","porto-functionality"),value:""},{label:m("Solid","porto-functionality"),value:"solid"},{label:m("Dashed","porto-functionality"),value:"dashed"},{label:m("Dotted","porto-functionality"),value:"dotted"},{label:m("Double","porto-functionality"),value:"double"},{label:m("Inset","porto-functionality"),value:"inset"},{label:m("Outset","porto-functionality"),value:"outset"}],onChange:e=>{t.setAttributes({icon_border_style:e})}}),o.icon_border_style&&w(h,{title:m("Border Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:m("Border Color","porto-functionality"),value:o.icon_color_border,onChange:function(e){return t.setAttributes({icon_color_border:e})}}]}),o.icon_border_style&&w(S,{label:m("Border Width","porto-functionality"),value:o.icon_border_size,min:1,max:10,onChange:e=>{t.setAttributes({icon_border_size:e})}}),o.icon_border_style&&w(S,{label:m("Border Radius","porto-functionality"),value:o.icon_border_radius,min:1,max:500,onChange:e=>{t.setAttributes({icon_border_radius:e})}}),("circle_img"==o.icon_style||"advanced"==o.icon_style)&&w(S,{label:m("Background Size","porto-functionality"),value:o.icon_border_spacing,min:0,max:500,onChange:e=>{t.setAttributes({icon_border_spacing:e})}}),("circle_img"==o.icon_style||"advanced"==o.icon_style)&&w("p",{style:{fontStyle:"italic"}},m("Spacing from center of the icon till the boundary of border / background","porto-functionality")),w(x,{label:m("Icon Animation Type","porto-functionality"),value:t.attributes.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:m("Please check this url to see animation types. ","porto-functionality")}),w("p",{style:{marginTop:-20}},w("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),w(x,{label:m("Title","porto-functionality"),value:o.title,onChange:e=>{t.setAttributes({title:e})}}),w(x,{label:m("Sub title","porto-functionality"),value:o.subtitle,onChange:e=>{t.setAttributes({subtitle:e})}}),w(k,{label:m("Description","porto-functionality"),value:o.content,onChange:e=>{t.setAttributes({content:e})}}),w(A,{label:m("Apply link to:","porto-functionality"),value:o.read_more,options:[{label:m("No Link","porto-functionality"),value:"none"},{label:m("Complete Box","porto-functionality"),value:"box"},{label:m("Box Title","porto-functionality"),value:"title"},{label:m("Display Read More","porto-functionality"),value:"more"}],onChange:e=>{t.setAttributes({read_more:e})}}),"none"!=o.read_more&&w(x,{label:m("Add Link","porto-functionality"),value:o.link,onChange:e=>{t.setAttributes({link:e})}}),"more"==o.read_more&&w(x,{label:m("Read More Text","porto-functionality"),value:o.read_text,onChange:e=>{t.setAttributes({read_text:e})}}),w(A,{label:m("Select Hover Effect type","porto-functionality"),value:o.hover_effect,options:[{label:m("No Effect","porto-functionality"),value:"style_1"},{label:m("Icon Zoom","porto-functionality"),value:"style_2"},{label:m("Icon Bounce Up","porto-functionality"),value:"style_3"}],onChange:e=>{t.setAttributes({hover_effect:e})}}),w("h3",null,m("Title settings","porto-functionality")),w(A,{label:m("Tag","porto-functionality"),value:o.heading_tag,options:[{label:m("H1","porto-functionality"),value:"h1"},{label:m("H2","porto-functionality"),value:"h2"},{label:m("H3","porto-functionality"),value:"h3"},{label:m("H4","porto-functionality"),value:"h4"},{label:m("H5","porto-functionality"),value:"h5"},{label:m("H6","porto-functionality"),value:"h6"},{label:m("div","porto-functionality"),value:"div"},{label:m("p","porto-functionality"),value:"p"}],onChange:e=>{t.setAttributes({heading_tag:e})}})),w(C,{title:m("Style","porto-functionality"),initialOpen:!1},w(x,{label:m("Icon Margin Right","porto-functionality"),value:o.icon_margin_right,help:m("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({icon_margin_right:e})}}),w(x,{label:m("Icon Margin Bottom","porto-functionality"),value:o.icon_margin_bottom,help:m("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({icon_margin_bottom:e})}}),w(x,{label:m("Title Margin Bottom","porto-functionality"),value:o.title_margin_bottom,help:m("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({title_margin_bottom:e})}}),w(x,{label:m("Sub Title Margin Bottom","porto-functionality"),value:o.sub_title_margin_bottom,help:m("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({sub_title_margin_bottom:e})}}),w(e.default,{label:m("Title Font","porto-functionality"),value:{fontFamily:o.title_font,fontSize:o.title_font_size,fontWeight:o.title_font_style,textTransform:o.title_text_transform,lineHeight:o.title_font_line_height,letterSpacing:o.title_font_letter_spacing,color:o.title_font_color},options:{},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({title_font:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({title_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({title_font_style:e.fontWeight}),void 0!==e.textTransform&&t.setAttributes({title_text_transform:e.textTransform}),void 0!==e.lineHeight&&t.setAttributes({title_font_line_height:e.lineHeight}),void 0!==e.letterSpacing&&t.setAttributes({title_font_letter_spacing:e.letterSpacing}),void 0!==e.color?t.setAttributes({title_font_color:e.color}):t.setAttributes({title_font_color:""})}}),w(e.default,{label:m("Sub Title Font","porto-functionality"),value:{fontSize:o.subtitle_font_size,fontWeight:o.subtitle_font_style,lineHeight:o.subtitle_font_line_height,letterSpacing:o.subtitle_font_letter_spacing,color:o.subtitle_font_color},options:{fontFamily:!1,textTransform:!1},onChange:e=>{void 0!==e.fontSize&&t.setAttributes({subtitle_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({subtitle_font_style:e.fontWeight}),void 0!==e.lineHeight&&t.setAttributes({subtitle_font_line_height:e.lineHeight}),void 0!==e.letterSpacing&&t.setAttributes({subtitle_font_letter_spacing:e.letterSpacing}),void 0!==e.color?t.setAttributes({subtitle_font_color:e.color}):t.setAttributes({subtitle_font_color:""})}}),w(e.default,{label:m("Description Font","porto-functionality"),value:{fontFamily:o.desc_font,fontSize:o.desc_font_size,fontWeight:o.desc_font_style,lineHeight:o.desc_font_line_height,letterSpacing:o.desc_font_letter_spacing,color:o.desc_font_color},options:{textTransform:!1},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({desc_font:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({desc_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({desc_font_style:e.fontWeight}),void 0!==e.lineHeight&&t.setAttributes({desc_font_line_height:e.lineHeight}),void 0!==e.letterSpacing&&t.setAttributes({desc_font_letter_spacing:e.letterSpacing}),void 0!==e.color?t.setAttributes({desc_font_color:e.color}):t.setAttributes({desc_font_color:""})}}))),i="",l=o.className,s="",c={},u={},p={};o.pos&&(i=o.pos+"-icon",s="porto-sicon-"+o.pos,"default"===o.pos&&o.content?i+=" flex-wrap":"top"===o.pos&&o.h_align&&"center"!=o.h_align&&(i+=" text-"+o.h_align)),l&&((0,r.portoAddHelperClasses)(l,n),i+=" "+l),o.title_font&&(c.fontFamily=o.title_font),o.title_font_style&&(c.fontWeight=Number(o.title_font_style)),o.title_font_size&&(o.title_font_size.replace(/[0-9.]/g,"")||(o.title_font_size+="px"),c.fontSize=o.title_font_size),o.title_text_transform&&(c.textTransform=o.title_text_transform),o.title_font_line_height&&(!(""+o.title_font_line_height).replace(/[0-9.]/g,"")&&o.title_font_line_height>3&&(o.title_font_line_height+="px"),c.lineHeight=o.title_font_line_height),o.title_font_letter_spacing&&(o.title_font_letter_spacing.replace(/[0-9.]/g,"")||(o.title_font_letter_spacing+="px"),c.letterSpacing=o.title_font_letter_spacing),o.title_font_color&&(c.color=o.title_font_color),(o.title_margin_bottom||"0"===o.title_margin_bottom)&&(o.title_margin_bottom.trim().replace(/[0-9.-]/g,"")||(o.title_margin_bottom+="px"),c.marginBottom=o.title_margin_bottom),o.subtitle_font_style&&(u.fontWeight=Number(o.subtitle_font_style)),o.subtitle_font_size&&(o.subtitle_font_size.replace(/[0-9.]/g,"")||(o.subtitle_font_size+="px"),u.fontSize=o.subtitle_font_size),o.subtitle_font_line_height&&(!(""+o.subtitle_font_line_height).replace(/[0-9.]/g,"")&&o.subtitle_font_line_height>3&&(o.subtitle_font_line_height+="px"),u.lineHeight=o.subtitle_font_line_height),o.subtitle_font_letter_spacing&&(o.subtitle_font_letter_spacing.replace(/[0-9.]/g,"")||(o.subtitle_font_letter_spacing+="px"),u.letterSpacing=o.subtitle_font_letter_spacing),o.subtitle_font_color&&(u.color=o.subtitle_font_color),(o.sub_title_margin_bottom||"0"===o.sub_title_margin_bottom)&&(o.sub_title_margin_bottom.trim().replace(/[0-9.-]/g,"")||(o.sub_title_margin_bottom+="px"),u.marginBottom=o.sub_title_margin_bottom),o.desc_font&&(p.fontFamily=o.desc_font),o.desc_font_style&&(p.fontWeight=o.desc_font_style),o.desc_font_size&&(o.desc_font_size.replace(/[0-9.]/g,"")||(o.desc_font_size+="px"),p.fontSize=o.desc_font_size),o.desc_font_line_height&&(!(""+o.desc_font_line_height).replace(/[0-9.]/g,"")&&o.desc_font_line_height>3&&(o.desc_font_line_height+="px"),p.lineHeight=o.desc_font_line_height),o.desc_font_letter_spacing&&(o.desc_font_letter_spacing.replace(/[0-9.]/g,"")||(o.desc_font_letter_spacing+="px"),p.fontSize=o.desc_font_letter_spacing),o.desc_font_color&&(p.color=o.desc_font_color);var d,y,f=null,g={},E={},N="";o.icon_margin_bottom&&(o.icon_margin_bottom.replace(/[0-9.]/g,"")||(o.icon_margin_bottom+="px"),g.marginBottom=o.icon_margin_bottom),"custom"==o.icon_type?("none"!==o.icon_style&&o.icon_color_bg&&(E.backgroundColor=o.icon_color_bg),"circle"==o.icon_style&&(N+=" porto-u-circle "),"circle_img"==o.icon_style&&(N+=" porto-u-circle-img "),"square"==o.icon_style&&(N+=" porto-u-square "),"advanced"!=o.icon_style&&"circle_img"!=o.icon_style||!o.icon_border_style||(E.borderStyle=o.icon_border_style,o.icon_color_border&&(E.borderColor=o.icon_color_border),o.icon_border_size&&(E.borderWidth=o.icon_border_size+"px"),o.icon_border_spacing&&(E.padding=o.icon_border_spacing+"px"),o.icon_border_radius&&(E.borderRadius=o.icon_border_radius+"px")),o.icon_img_url&&(E.display="inline-block",E.fontSize=o.img_width+"px",o.icon_margin_right&&(o.icon_margin_right.replace(/[0-9.]/g,"")||(o.icon_margin_right+="px"),porto_block_vars.is_rtl?E.marginLeft=o.icon_margin_right:E.marginRight=o.icon_margin_right),y=w("div",{className:"porto-sicon-img"+N,style:E},w("img",{src:o.icon_img_url,alt:""})))):(o.icon_color&&(E.color=o.icon_color),"none"!==o.icon_style&&""!==o.icon_color_bg&&(E.backgroundColor=o.icon_color_bg),"advanced"==o.icon_style&&(o.icon_border_style&&(E.borderStyle=o.icon_border_style,o.icon_color_border&&(E.borderColor=o.icon_color_border),o.icon_border_size&&(E.borderWidth=o.icon_border_size+"px")),E.width=o.icon_border_spacing+"px",E.height=o.icon_border_spacing+"px",E.lineHeight=o.icon_border_spacing+"px",E.borderRadius=o.icon_border_radius+"px"),o.icon_size&&(E.fontSize=o.icon_size+"px"),E.display="inline-block",o.icon&&(o.icon_margin_right&&(o.icon_margin_right.replace(/[0-9.]/g,"")||(o.icon_margin_right+="px"),porto_block_vars.is_rtl?E.marginLeft=o.icon_margin_right:E.marginRight=o.icon_margin_right),y=w("div",{className:"porto-icon "+o.icon_style+" "+N,style:E},w("i",{className:o.icon})))),y=w("div",{className:"align-icon",style:g},y);var T="";if("circle_img"==o.icon_style&&"custom"==o.icon_type&&o.icon_border_spacing&&(T+="#porto-icon-"+n+" .porto-sicon-img.porto-u-circle-img:before {",T+="border-width: "+(o.icon_border_spacing+1)+"px",o.icon_color_bg&&(T+="border-color: "+o.icon_color_bg),T=w("style",null,T+="}")),y=w("div",{id:"porto-icon-"+n,className:"porto-just-icon-wrapper"},T,y),"heading-right"==o.pos||"right"==o.pos){if(o.title){var I=w(o.heading_tag,{className:"porto-sicon-title",style:c,dangerouslySetInnerHTML:{__html:o.title.replace(/<script.*?\/script>/g,"")}});f=w("div",{className:"porto-sicon-header"},o.link&&"title"==o.read_more&&w("a",{className:"porto-sicon-box-link",href:o.link},I),(!o.link||"title"!=o.read_more)&&I,o.subtitle&&w("p",{style:u},o.subtitle))}f=w("div",{className:"right"==o.pos?"porto-sicon-body":"porto-sicon-box"+(i?" "+i:"")},f,"right"!=o.pos&&(o.icon||o.icon_img_url)&&w("div",{className:s},y),o.content&&w("div",{className:"porto-sicon-description",style:p,dangerouslySetInnerHTML:{__html:o.content.replace(/<script.*?\/script>/g,"")}},o.link&&"more"==o.read_more&&w("a",{className:"porto-sicon-read",href:o.link},o.read_text))),"right"==o.pos&&(f=w("div",{className:"porto-sicon-box"+(i?" "+i:"")},f,w("div",{className:s},y)))}else{I="";var z="";o.title&&(I=w(o.heading_tag,{className:"porto-sicon-title",style:c,dangerouslySetInnerHTML:{__html:o.title.replace(/<script.*?\/script>/g,"")}}),I=w("div",{className:"porto-sicon-header"},o.link&&"title"==o.read_more&&w("a",{className:"porto-sicon-box-link",href:o.link},I),(!o.link||"title"!=o.read_more)&&I,o.subtitle&&w("p",{style:u},o.subtitle))),o.content&&(z=w("div",{className:"porto-sicon-description",style:p,dangerouslySetInnerHTML:{__html:o.content.replace(/<script.*?\/script>/g,"")}},o.link&&"more"==o.read_more&&w("a",{className:"porto-sicon-read xx",href:o.link},o.read_text))),f="left"==o.pos?w("div",{className:"porto-sicon-box"+(i?" "+i:"")},(o.icon||o.icon_img_url)&&w("div",{className:s},y),w("div",{className:"porto-sicon-body"},I,z)):w("div",{className:"porto-sicon-box"+(i?" "+i:"")},(o.icon||o.icon_img_url)&&w("div",{className:s},y),I,z)}return d=o.link&&"box"==o.read_more?w("a",{className:"porto-sicon-box-link",href:o.link},f):f,w(_.Fragment,{},a,d)},save:function(){return null}}),function(t,o,n,a,i,l,r,s){var c=t.__,u=o.registerBlockType,p=i.InspectorControls,d=i.PanelColorSettings,_=i.MediaUpload,y=n.createElement,f=(n.Component,l.PanelBody),m=l.TextControl,g=(l.TextareaControl,l.SelectControl),b=l.RangeControl,h=(l.ToggleControl,l.Placeholder,l.IconButton),v=n.useEffect;let w=null,C=!0;u("porto/porto-stat-counter",{title:"Porto Stat Counter",icon:"porto",category:"porto",keywords:["icon","title"],attributes:{icon_type:{type:"string"},icon:{type:"string"},icon_img:{type:"int"},icon_img_url:{type:"string"},img_width:{type:"int",default:48},icon_size:{type:"int",default:32},icon_color:{type:"string",default:"#333"},icon_style:{type:"string",default:"none"},icon_color_bg:{type:"string",default:"#fff"},icon_color_border:{type:"string",default:"#333"},icon_border_style:{type:"string"},icon_border_size:{type:"int",default:1},icon_border_radius:{type:"int",default:500},icon_border_spacing:{type:"int",default:50},icon_animation:{type:"string"},icon_link:{type:"string"},animation_type:{type:"string"},counter_title:{type:"string"},counter_value:{type:"string",default:"1250"},counter_sep:{type:"string",default:","},counter_suffix:{type:"string"},counter_prefix:{type:"string"},counter_decimal:{type:"string",default:"."},icon_position:{type:"string",default:"top"},speed:{type:"int",default:3},counter_color_txt:{type:"string"},title_font:{type:"string"},title_font_style:{type:"int"},title_font_size:{type:"string"},title_font_line_height:{},desc_font:{type:"string"},desc_font_style:{type:"int"},desc_font_size:{type:"string"},desc_font_color:{type:"string"},desc_font_line_height:{},suf_pref_font:{type:"string"},suf_pref_font_style:{type:"int"},suf_pref_font_size:{type:"string"},suf_pref_line_height:{},suf_pref_font_color:{type:"string"}},edit:function(t){if(v((()=>{const e=t.clientId;clearTimeout(w),w=setTimeout((function(){jQuery(window.portoBlockDocument().body).trigger("porto_refresh_vc_content",[jQuery('[data-block="'+e+'"]')])}),1e3)}),[t.attributes.counter_title,t.attributes.counter_value,t.attributes.counter_sep,t.attributes.counter_suffix,t.attributes.counter_prefix,t.attributes.counter_decimal,t.attributes.speed]),C&&"undefined"==typeof countUp){C=!1;var o=window.portoBlockDocument().createElement("script");o.src=ajaxurl.replace("/wp-admin/admin-ajax.php","/wp-content/plugins/porto-functionality/shortcodes/assets/js/countup.min.js"),jQuery('script[src="'+o.src+'"]').length||window.portoBlockDocument().getElementsByTagName("body")[0].appendChild(o),jQuery(o).on("load",(function(){(o=window.portoBlockDocument().createElement("script")).src=ajaxurl.replace("/wp-admin/admin-ajax.php","/wp-content/plugins/porto-functionality/shortcodes/assets/js/countup-loader.min.js"),jQuery('script[src="'+o.src+'"]').length||window.portoBlockDocument().getElementsByTagName("body")[0].appendChild(o)}))}var a,i=t.attributes,l=t.clientId,r=y(p,{},y(f,{title:c("Stat Counter","porto-functionality"),initialOpen:!0},y(g,{label:c("Icon to display","porto-functionality"),value:i.icon_type,options:[{label:c("Icon Font","porto-functionality"),value:""},{label:c("Custom Image Icon","porto-functionality"),value:"custom"}],onChange:e=>{t.setAttributes({icon_type:e})}}),!i.icon_type&&y(m,{label:c("Icon Class","porto-functionality"),value:i.icon,onChange:e=>{t.setAttributes({icon:e})}}),"custom"==i.icon_type&&y(_,{allowedTypes:["image"],value:i.icon_img,onSelect:function(e){return t.setAttributes({icon_img_url:e.url,icon_img:e.id})},render:function(t){var e=t.open;return y(h,{className:"components-toolbar__control",label:c("Change image","porto-functionality"),icon:"edit",onClick:e})}}),"custom"==i.icon_type&&y(h,{className:"components-toolbar__control",label:c("Remove image","porto-functionality"),icon:"no",onClick:function(){return t.setAttributes({icon_img_url:void 0,icon_img:void 0})}}),"custom"==i.icon_type&&y(b,{label:c("Image Width","porto-functionality"),value:i.img_width,min:16,max:512,onChange:e=>{t.setAttributes({img_width:e})}}),"custom"!=i.icon_type&&y(b,{label:c("Icon Size","porto-functionality"),value:i.icon_size,min:12,max:72,onChange:e=>{t.setAttributes({icon_size:e})}}),"custom"!=i.icon_type&&y(d,{title:c("Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:c("Color","porto-functionality"),value:i.icon_color,onChange:function(e){return t.setAttributes({icon_color:e})}}]}),y(g,{label:c("Icon Style","porto-functionality"),value:i.icon_style,options:[{label:c("Simple","porto-functionality"),value:"none"},{label:c("Circle Background","porto-functionality"),value:"circle"},{label:c("Square Background","porto-functionality"),value:"square"},{label:c("Design your own","porto-functionality"),value:"advanced"}],onChange:e=>{t.setAttributes({icon_style:e})}}),"none"!=i.icon_style&&y(d,{title:c("Background Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:c("Background Color","porto-functionality"),value:i.icon_color_bg,onChange:function(e){return t.setAttributes({icon_color_bg:e})}}]}),"advanced"==i.icon_style&&y(g,{label:c("Icon Border Style","porto-functionality"),value:i.icon_border_style,options:[{label:c("None","porto-functionality"),value:""},{label:c("Solid","porto-functionality"),value:"solid"},{label:c("Dashed","porto-functionality"),value:"dashed"},{label:c("Dotted","porto-functionality"),value:"dotted"},{label:c("Double","porto-functionality"),value:"double"},{label:c("Inset","porto-functionality"),value:"inset"},{label:c("Outset","porto-functionality"),value:"outset"}],onChange:e=>{t.setAttributes({icon_border_style:e})}}),i.icon_border_style&&y(d,{title:c("Border Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:c("Border Color","porto-functionality"),value:i.icon_color_border,onChange:function(e){return t.setAttributes({icon_color_border:e})}}]}),i.icon_border_style&&y(b,{label:c("Border Width","porto-functionality"),value:i.icon_border_size,min:1,max:10,onChange:e=>{t.setAttributes({icon_border_size:e})}}),i.icon_border_style&&y(b,{label:c("Border Radius","porto-functionality"),value:i.icon_border_radius,min:1,max:500,onChange:e=>{t.setAttributes({icon_border_radius:e})}}),"advanced"==i.icon_style&&y(b,{label:c("Background Size","porto-functionality"),value:i.icon_border_spacing,min:0,max:500,onChange:e=>{t.setAttributes({icon_border_spacing:e})}}),"advanced"==i.icon_style&&y("p",{style:{fontStyle:"italic"}},c("Spacing from center of the icon till the boundary of border / background","porto-functionality")),y(m,{label:c("Icon Animation Type","porto-functionality"),value:t.attributes.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:c("Please check this url to see animation types.","porto-functionality")}),y("p",{style:{marginTop:-20}},y("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),y(g,{label:c("Icon Position","porto-functionality"),value:i.icon_position,options:[{label:c("Top","porto-functionality"),value:"top"},{label:c("Right","porto-functionality"),value:"right"},{label:c("Left","porto-functionality"),value:"left"}],onChange:e=>{t.setAttributes({icon_position:e})}}),y(m,{label:c("Counter Title","porto-functionality"),value:i.counter_title,onChange:e=>{t.setAttributes({counter_title:e})}}),y(m,{label:c("Counter Value","porto-functionality"),value:i.counter_value,onChange:e=>{t.setAttributes({counter_value:e})}}),y(m,{label:c("Thousands Separator","porto-functionality"),value:i.counter_sep,onChange:e=>{t.setAttributes({counter_sep:e})}}),y(m,{label:c("Replace Decimal Point With","porto-functionality"),value:i.counter_decimal,onChange:e=>{t.setAttributes({counter_decimal:e})}}),y(m,{label:c("Counter Value Prefix","porto-functionality"),value:i.counter_prefix,onChange:e=>{t.setAttributes({counter_prefix:e})}}),y(m,{label:c("Counter Value Suffix","porto-functionality"),value:i.counter_suffix,onChange:e=>{t.setAttributes({counter_suffix:e})}}),y(b,{label:c("Counter rolling time","porto-functionality"),value:i.speed,min:1,max:10,onChange:e=>{t.setAttributes({speed:e})}})),y(f,{title:c("Typography","porto-functionality"),initialOpen:!1},y(e.default,{label:c("Counter Title Font","porto-functionality"),value:{fontFamily:i.title_font,fontSize:i.title_font_size,fontWeight:i.title_font_style,lineHeight:i.title_font_line_height,color:i.counter_color_txt},options:{textTransform:!1,letterSpacing:!1},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({title_font:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({title_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({title_font_style:e.fontWeight}),void 0!==e.lineHeight&&t.setAttributes({title_font_line_height:e.lineHeight}),void 0!==e.color?t.setAttributes({counter_color_txt:e.color}):t.setAttributes({counter_color_txt:""})}}),y(e.default,{label:c("Counter Value Font","porto-functionality"),value:{fontFamily:i.desc_font,fontSize:i.desc_font_size,fontWeight:i.desc_font_style,lineHeight:i.desc_font_line_height,color:i.desc_font_color},options:{textTransform:!1,letterSpacing:!1},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({desc_font:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({desc_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({desc_font_style:e.fontWeight}),void 0!==e.lineHeight&&t.setAttributes({desc_font_line_height:e.lineHeight}),void 0!==e.color?t.setAttributes({desc_font_color:e.color}):t.setAttributes({desc_font_color:""})}}),y(e.default,{label:c("Counter suffix-prefix Value Font","porto-functionality"),value:{fontFamily:i.suf_pref_font,fontSize:i.suf_pref_font_size,fontWeight:i.suf_pref_font_style,lineHeight:i.suf_pref_line_height,color:i.suf_pref_font_color},options:{textTransform:!1,letterSpacing:!1},onChange:e=>{void 0!==e.fontFamily&&t.setAttributes({suf_pref_font:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({suf_pref_font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({suf_pref_font_style:e.fontWeight}),void 0!==e.lineHeight&&t.setAttributes({suf_pref_line_height:e.lineHeight}),void 0!==e.color?t.setAttributes({suf_pref_font_color:e.color}):t.setAttributes({suf_pref_font_color:""})}}))),s={},u="";"custom"==i.icon_type?("none"!==i.icon_style&&i.icon_color_bg&&(s.backgroundColor=i.icon_color_bg),"circle"==i.icon_style&&(u+=" porto-u-circle "),"circle_img"==i.icon_style&&(u+=" porto-u-circle-img "),"square"==i.icon_style&&(u+=" porto-u-square "),"advanced"!=i.icon_style&&"circle_img"!=i.icon_style||!i.icon_border_style||(s.borderStyle=i.icon_border_style,i.icon_color_border&&(s.borderColor=i.icon_color_border),i.icon_border_size&&(s.borderWidth=i.icon_border_size+"px"),i.icon_border_spacing&&(s.padding=i.icon_border_spacing+"px"),i.icon_border_radius&&(s.borderRadius=i.icon_border_radius+"px")),i.icon_img_url&&(s.display="inline-block",s.fontSize=i.img_width+"px",a=y("div",{className:"porto-sicon-img"+u,style:s},y("img",{src:i.icon_img_url,alt:""})))):(i.icon_color&&(s.color=i.icon_color),"none"!==i.icon_style&&""!==i.icon_color_bg&&(s.backgroundColor=i.icon_color_bg),"advanced"==i.icon_style&&(i.icon_border_style&&(s.borderStyle=i.icon_border_style,i.icon_color_border&&(s.borderColor=i.icon_color_border),i.icon_border_size&&(s.borderWidth=i.icon_border_size+"px")),s.width=i.icon_border_spacing+"px",s.height=i.icon_border_spacing+"px",s.lineHeight=i.icon_border_spacing+"px",s.borderRadius=i.icon_border_radius+"px"),i.icon_size&&(s.fontSize=i.icon_size+"px"),s.display="inline-block",i.icon&&(a=y("div",{className:"porto-icon "+i.icon_style+" "+u,style:s},y("i",{className:i.icon})))),a=y("div",{className:"align-icon",style:{}},a);var x="";"circle_img"==i.icon_style&&"custom"==i.icon_type&&i.icon_border_spacing&&(x+="#porto-icon-"+l+" .porto-sicon-img.porto-u-circle-img:before {",x+="border-width: "+(i.icon_border_spacing+1)+"px",i.icon_color_bg&&(x+="border-color: "+i.icon_color_bg),x=y("style",null,x+="}")),a=y("div",{id:"porto-icon-"+l,className:"porto-just-icon-wrapper"},x,a);var k={},A={},S={};if(i.title_font&&(k.fontFamily=i.title_font),i.title_font_style&&(k.fontWeight=i.title_font_style),i.title_font_size){i.title_font_size.replace(/[0-9.]/g,"")||(i.title_font_size+="px"),k.fontSize=i.title_font_size}if(i.title_font_line_height){!(""+i.title_font_line_height).replace(/[0-9.]/g,"")&&i.title_font_line_height>3&&(i.title_font_line_height+="px"),k.lineHeight=i.title_font_line_height}if(i.desc_font&&(A.fontFamily=i.desc_font),i.desc_font_style&&(A.fontWeight=i.desc_font_style),i.desc_font_size){i.desc_font_size.replace(/[0-9.]/g,"")||(i.desc_font_size+="px"),A.fontSize=i.desc_font_size}if(i.desc_font_line_height){!(""+i.desc_font_line_height).replace(/[0-9.]/g,"")&&i.desc_font_line_height>3&&(i.desc_font_line_height+="px"),A.lineHeight=i.desc_font_line_height}if((i.desc_font_color||i.counter_color_txt)&&(A.color=i.desc_font_color?i.desc_font_color:i.counter_color_txt),i.counter_color_txt&&(k.color=i.counter_color_txt),i.suf_pref_font&&(S.fontFamily=i.suf_pref_font),i.suf_pref_font_style&&(S.fontWeight=i.suf_pref_font_style),i.suf_pref_font_size){i.suf_pref_font_size.replace(/[0-9.]/g,"")||(i.suf_pref_font_size+="px"),S.fontSize=i.suf_pref_font_size}if(i.suf_pref_line_height){!(""+i.suf_pref_line_height).replace(/[0-9.]/g,"")&&i.suf_pref_line_height>3&&(i.suf_pref_line_height+="px"),S.lineHeight=i.suf_pref_line_height}i.suf_pref_font_color&&(S.color=i.suf_pref_font_color),""==i.counter_sep&&(i.counter_sep="none"),""==i.counter_decimal&&(i.counter_decimal="none");var R=y("div",{className:"stats-block stats-"+i.icon_position+(i.className?" "+i.className:"")},"right"!=i.icon_position&&y("div",{className:"porto-sicon-"+i.icon_position},a),y("div",{className:"stats-desc"},i.counter_prefix&&y("div",{className:"counter_prefix mycust",style:S},i.counter_prefix),y("div",{id:"counter_"+l,"data-id":"counter_"+l,className:"stats-number",style:A,"data-speed":i.speed,"data-counter-value":i.counter_value,"data-separator":i.counter_sep,"data-decimal":i.counter_decimal},"0"),i.counter_suffix&&y("div",{className:"counter_suffix mycust",style:S},i.counter_suffix),y("div",{className:"stats-text",style:k},i.counter_title)),"right"==i.icon_position&&y("div",{className:"porto-sicon-"+i.icon_position},a));return y(n.Fragment,{},r,R)},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,l,r){var s=t.__,c=e.registerBlockType,u=a.InnerBlocks,p=a.InspectorControls,d=a.BlockControls,_=a.BlockAlignmentToolbar,y=o.createElement,f=(o.Component,i.SelectControl);c("porto/porto-icons",{title:"Porto Icons",icon:"porto",category:"porto",description:s("Add a set of multiple icons and give some custom style.","porto-functionality"),attributes:{align:{type:"string"},hover_effect:{type:"string"}},edit:function(t){var e=t.attributes,n=(t.clientId,y(p,{},y(f,{label:s("Select Hover Icon Effect","porto-functionality"),help:s("Select the type of effct you want on hover","porto-functionality"),value:e.hover_effect,options:[{label:s("No Effect","porto-functionality"),value:""},{label:s("Icon Zoom","porto-functionality"),value:"hover-icon-zoom"},{label:s("Icon Slide Up","porto-functionality"),value:"hover-icon-up"},{label:s("Icon Slide Left","porto-functionality"),value:"hover-icon-left"},{label:s("Icon Slide Right","porto-functionality"),value:"hover-icon-right"},{label:s("Icon Slide Right & Left","porto-functionality"),value:"hover-icon-pulse-left-right"},{label:s("Icon Slide Infinite","porto-functionality"),value:"hover-icon-pulse-infnite"}],onChange:e=>{t.setAttributes({hover_effect:e})}}))),a=y("div",{className:"porto-u-icons"+(e.align?" "+e.align:"")+(e.className?" "+e.className:"")},y(u,{placeholder:React.createElement("h3",null,s("Click plus to add","porto-functionality")),allowedBlocks:["porto/porto-single-icon"]}));return y(o.Fragment,{},y(d,null,y(_,{value:e.align?e.align.replace("porto-icons-",""):e.align,onChange:function(e){return t.setAttributes({align:"porto-icons-"+e})}})),n,a)},save:function(t){return y(u.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,r,s,c){var u=t.__,p=e.registerBlockType,d=a.InspectorControls,_=(a.BlockControls,a.BlockAlignmentToolbar,a.PanelColorSettings),y=o.createElement,f=o.Fragment,m=r.PanelBody,g=(o.Component,r.SelectControl),b=r.TextControl,h=r.RangeControl;p("porto/porto-single-icon",{title:"Porto Single Icon",icon:"porto",category:"porto",description:u("Add a individual single icon with dynamic link for member or portfolio share links.","porto-functionality"),attributes:{icon:{type:"string"},icon_size:{type:"int"},icon_margin:{type:"int"},icon_color:{type:"string"},icon_style:{type:"string"},icon_color_bg:{type:"string"},icon_border_style:{type:"string"},icon_color_border:{type:"string"},icon_border_size:{type:"int"},icon_border_radius:{type:"int"},icon_border_spacing:{type:"int"},link_source:{type:"string"},link_dynamic_content:{type:"object"},icon_link:{type:"string"},animation_type:{type:"string"},style_options:{type:"object"}},edit:function(t){var e=t.attributes;t.clientId;const n=Object.assign({},e.link_dynamic_content),a=Object.assign({},e.style_options);var r=y(f,{},y(d,null,y(m,{title:u("General","porto-functionality")},y(b,{label:u("Icon Class (fas fa-user)","porto-functionality"),value:e.icon,onChange:e=>{t.setAttributes({icon:e})}}),y("p",{style:{marginTop:-20}},y("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/icons/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/icons/")),y(h,{label:u("Icon Size","porto-functionality"),value:e.icon_size,min:12,max:72,onChange:e=>{t.setAttributes({icon_size:e})}}),y(h,{label:u("Space after Icon","porto-functionality"),value:e.icon_margin,min:0,max:100,onChange:e=>{t.setAttributes({icon_margin:e})}}),y(_,{title:u("Icon Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Color","porto-functionality"),value:e.icon_color,onChange:function(e){return t.setAttributes({icon_color:e})}}]}),y(g,{label:u("Icon Style","porto-functionality"),value:e.icon_style,options:[{label:u("Simple","porto-functionality"),value:"none"},{label:u("Circle Background","porto-functionality"),value:"circle"},{label:u("Square Background","porto-functionality"),value:"square"},{label:u("Design your own","porto-functionality"),value:"advanced"}],onChange:e=>{t.setAttributes({icon_style:e})}}),"none"!=e.icon_style&&y(_,{title:u("Background Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Background Color","porto-functionality"),value:e.icon_color_bg,onChange:function(e){return t.setAttributes({icon_color_bg:e})}}]}),"advanced"==e.icon_style&&y(g,{label:u("Icon Border Style","porto-functionality"),value:e.icon_border_style,options:[{label:u("None","porto-functionality"),value:""},{label:u("Solid","porto-functionality"),value:"solid"},{label:u("Dashed","porto-functionality"),value:"dashed"},{label:u("Dotted","porto-functionality"),value:"dotted"},{label:u("Double","porto-functionality"),value:"double"},{label:u("Inset","porto-functionality"),value:"inset"},{label:u("Outset","porto-functionality"),value:"outset"}],onChange:e=>{t.setAttributes({icon_border_style:e})}}),"advanced"==e.icon_style&&e.icon_border_style&&y(_,{title:u("Border Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Border Color","porto-functionality"),value:e.icon_color_border,onChange:function(e){return t.setAttributes({icon_color_border:e})}}]}),"advanced"==e.icon_style&&e.icon_border_style&&y(h,{label:u("Border Width","porto-functionality"),value:e.icon_border_size,min:1,max:10,allowReset:!0,onChange:e=>{t.setAttributes({icon_border_size:e})}}),"advanced"==e.icon_style&&y(h,{label:u("Border Radius","porto-functionality"),value:e.icon_border_radius,min:1,max:500,allowReset:!0,onChange:e=>{t.setAttributes({icon_border_radius:e})}}),"advanced"==e.icon_style&&y(h,{label:u("Background Size","porto-functionality"),value:e.icon_border_spacing,min:10,max:500,onChange:e=>{t.setAttributes({icon_border_spacing:e})}}),"advanced"==e.icon_style&&y("p",{style:{fontStyle:"italic"}},u("Spacing from center of the icon till the boundary of border / background","porto-functionality")),y(g,{label:u("Link Source","porto-functionality"),value:e.link_source,options:[{label:u("Custom Link","porto-functionality"),value:""},{label:u("Dynamic Link","porto-functionality"),value:"dynamic"}],onChange:e=>{t.setAttributes({link_source:e})}}),"dynamic"===e.link_source&&y(i.default,{label:u("Dynamic Content","porto-functionality"),value:n,options:{field_type:"link",content_type:"undefined"!=typeof porto_content_type&&porto_content_type,content_type_value:"undefined"==typeof porto_content_type_value?"":porto_content_type_value},onChange:e=>{t.setAttributes({link_dynamic_content:e})}}),!e.link_source&&y(b,{label:u("Link","porto-functionality"),value:t.attributes.icon_link,onChange:e=>{t.setAttributes({icon_link:e})}}),y(b,{label:u("Animation Type","porto-functionality"),value:t.attributes.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:u("Please check this url to see animation types.","porto-functionality")}),y("p",{style:{marginTop:-20}},y("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")))),y(d,{group:"styles"},y(l.default,{label:u("Style Options","porto-functionality"),value:a,options:{},onChange:e=>{t.setAttributes({style_options:e})}}))),s={};e.icon_color&&(s.color=e.icon_color),e.icon_style&&"none"!=e.icon_style&&e.icon_color_bg&&(s.backgroundColor=e.icon_color_bg),"advanced"==e.icon_style&&(e.icon_border_style&&(s.borderStyle=e.icon_border_style,s.borderColor=e.icon_color_border,e.icon_border_size&&(s.borderWidth=e.icon_border_size+"px")),e.icon_border_spacing&&(s.width=e.icon_border_spacing+"px",s.height=e.icon_border_spacing+"px",s.lineHeight=e.icon_border_spacing+"px"),e.icon_border_radius&&(s.borderRadius=e.icon_border_radius+"px")),e.icon_size&&(s.fontSize=e.icon_size+"px"),s.marginRight=e.icon_margin+"px";const c="porto-icon-"+Math.ceil(1e4*Math.random());var p=y("div",{className:"porto-icon "+c+(e.icon_style?" "+e.icon_style:"")+(e.className?" "+e.className:""),style:s},y("style",null,(0,l.portoGenerateStyleOptionsCSS)(a,c)),e.icon?y("i",{className:e.icon}):React.createElement("i",{className:"fas fa-arrow-right"}));return e.icon_link&&(p=y("a",{href:e.icon_link},p)),y(o.Fragment,{},r,p)},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,r,s,c){var u=t.__,p=e.registerBlockType,d=a.InspectorControls,_=a.InnerBlocks,y=(a.BlockControls,a.BlockAlignmentToolbar,a.PanelColorSettings),f=a.MediaUpload,m=o.createElement,g=(o.Component,o.useEffect),b=(o.useState,r.SelectControl),h=r.TextControl,v=r.TextareaControl,w=r.RangeControl,C=r.ToggleControl,x=r.IconButton,k=o.Fragment,A=r.PanelBody;p("porto/porto-interactive-banner",{title:"Dynamic Image with Content",icon:"porto",category:"porto",description:u("Show the content with image including dynamic image like taxonomy, product or post image.","porto-functionality"),keywords:["featured image","dynamic image","acf image","toolset","author avatar","category image","product image","interactive banner"],attributes:{banner_title:{type:"string"},banner_desc:{type:"string"},img_source:{type:"string"},dynamic_content:{type:"object"},banner_image:{type:"int"},banner_image_url:{type:"string"},lazyload:{type:"boolean"},add_container:{type:"boolean"},min_height:{type:"string"},parallax:{type:"string"},banner_effect:{type:"string",default:""},effect_duration:{type:"int",default:30},particle_effect:{type:"string",default:""},image_opacity:{type:"float",default:1},image_opacity_on_hover:{type:"float",default:1},banner_style:{type:"string"},banner_title_font_size:{type:"int"},banner_color_bg:{type:"string"},banner_color_title:{type:"string"},banner_color_desc:{type:"string"},link_source:{type:"string"},link_dynamic_content:{type:"object"},banner_link:{type:"string"},style_options:{type:"object"}},supports:{align:["wide","full"]},edit:function(t){var e=t.attributes;t.clientId;g((()=>{let o="";e.dynamic_content&&e.dynamic_content.source&&(o="post"==e.dynamic_content.source?e.dynamic_content.post_info:e.dynamic_content[e.dynamic_content.source],o&&jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_dynamic_tags_get_value",nonce:porto_block_vars.nonce,content_type:"undefined"!=typeof porto_content_type&&porto_content_type?porto_content_type:"post",content_type_value:"undefined"!=typeof porto_content_type_value?porto_content_type_value:porto_block_vars.edit_post_id,source:e.dynamic_content.source,field_name:o,is_img:"1"},type:"post",dataType:"json",success:function(e){e&&e.success?t.setAttributes({banner_image:e.data,banner_image_url:e.data}):t.setAttributes({banner_image:void 0,banner_image_url:void 0})}}))}),[e.img_source,e.dynamic_content&&e.dynamic_content.source,e.dynamic_content&&e.dynamic_content.post_info,e.dynamic_content&&e.dynamic_content.metabox,e.dynamic_content&&e.dynamic_content.acf,e.dynamic_content&&e.dynamic_content.toolset,e.dynamic_content&&e.dynamic_content.meta,e.dynamic_content&&e.dynamic_content.tax,e.dynamic_content&&e.dynamic_content.woo]);let n=Object.assign({},e.dynamic_content),a=Object.assign({},e.link_dynamic_content),r=Object.assign({},e.style_options);var s=m(k,{},m(d,null,m(A,{title:u("Deprecated","porto-functionality"),initialOpen:!1},m(h,{label:u("Title","porto-functionality"),value:e.banner_title,onChange:e=>{t.setAttributes({banner_title:e})}}),m(v,{label:u("Description","porto-functionality"),value:e.content,onChange:e=>{t.setAttributes({content:e})}})),m(A,{title:u("Banner Settings","porto-functionality"),initialOpen:!0},m("div",{className:"components-base-control"},m(b,{label:u("Image Source","porto-functionality"),value:e.img_source,options:[{label:u("Custom Image","porto-functionality"),value:""},{label:u("Dynamic Content","porto-functionality"),value:"dynamic"}],onChange:e=>{t.setAttributes({img_source:e})}}),"dynamic"==e.img_source&&m(i.default,{label:u("Dynamic Content","porto-functionality"),value:n,options:{field_type:"image",content_type:"undefined"!=typeof porto_content_type&&porto_content_type,content_type_value:"undefined"==typeof porto_content_type_value?"":porto_content_type_value},onChange:e=>{t.setAttributes({dynamic_content:e})}}),!e.img_source&&m("p",{className:"mb-0"},u("Banner Image","porto-functionality")),!e.img_source&&m(f,{allowedTypes:["image"],label:"Banner Image",value:e.banner_image,onSelect:function(e){return t.setAttributes({banner_image_url:e.url,banner_image:e.id})},render:function(t){var e=t.open;return m(x,{className:"components-toolbar__control",label:u("Banner Image","porto-functionality"),icon:"edit",onClick:e})}}),!e.img_source&&e.banner_image&&m(x,{className:"components-toolbar__control",label:u("Remove image","porto-functionality"),icon:"no",onClick:function(){return t.setAttributes({banner_image_url:void 0,banner_image:void 0})}}),!e.img_source&&e.banner_image&&m("img",{src:e.banner_image_url,className:"components-upload-show-img"})),e.banner_image&&m(C,{label:u("Lazy Load Image","porto-functionality"),checked:!!e.lazyload&&e.lazyload,onChange:e=>{t.setAttributes({lazyload:e})},help:u('If you have this element in Porto Carousel, please check "Lazy Load" option in Porto Carousel element.',"porto-functionality")}),m(C,{label:u("Add Container","porto-functionality"),checked:!!e.add_container&&e.add_container,onChange:e=>{t.setAttributes({add_container:e})}}),m(h,{label:u("Min Height (e.g: 450px)","porto-functionality"),value:e.min_height,onChange:e=>{t.setAttributes({min_height:e})}}),m(h,{label:u("Parallax","porto-functionality"),help:u("Enter parallax speed ratio if you want to use parallax effect. (Note: Default value is 1.5, min value is 1. Leave empty if you don't want.)","porto-functionality"),value:e.parallax,onChange:e=>{t.setAttributes({parallax:e})}}),m(b,{label:u("Banner Effect","porto-functionality"),value:e.banner_effect,options:[{label:u("None","porto-functionality"),value:""},{label:u("kenBurnsToRight","porto-functionality"),value:"kenBurnsToRight"},{label:u("kenBurnsToLeft","porto-functionality"),value:"kenBurnsToLeft"},{label:u("kenBurnsToLeftTop","porto-functionality"),value:"kenBurnsToLeftTop"},{label:u("kenBurnsToRightTop","porto-functionality"),value:"kenBurnsToRightTop"}],onChange:e=>{t.setAttributes({banner_effect:e})}}),""!=e.banner_effect&&m(w,{label:u("Banner Effect Duration (s)","porto-functionality"),value:e.effect_duration,min:0,max:1e3,onChange:e=>{t.setAttributes({effect_duration:e})}}),("dynamic"==e.img_source||e.banner_image)&&m(b,{label:u("Particle Effect","porto-functionality"),value:e.particle_effect,options:[{label:u("None","porto-functionality"),value:""},{label:u("Snowfall","porto-functionality"),value:"snowfall"},{label:u("Sparkle","porto-functionality"),value:"sparkle"}],onChange:e=>{t.setAttributes({particle_effect:e})}}),m(b,{label:u("Link Source","porto-functionality"),value:e.link_source,options:[{label:u("Custom Link","porto-functionality"),value:""},{label:u("Dynamic Link","porto-functionality"),value:"dynamic"}],onChange:e=>{t.setAttributes({link_source:e})}}),"dynamic"===e.link_source&&m(i.default,{label:u("Dynamic Content","porto-functionality"),value:a,options:{field_type:"link",content_type:"undefined"!=typeof porto_content_type&&porto_content_type,content_type_value:"undefined"==typeof porto_content_type_value?"":porto_content_type_value},onChange:e=>{t.setAttributes({link_dynamic_content:e})}}),!e.link_source&&m(h,{label:u("Link","porto-functionality"),value:e.banner_link,onChange:e=>{t.setAttributes({banner_link:e})}}),e.banner_title&&m(w,{label:u("Title Font Size","porto-functionality"),value:e.banner_title_font_size,min:12,max:80,onChange:e=>{t.setAttributes({banner_title_font_size:e})}}),m(b,{label:u("Hover Effect","porto-functionality"),value:e.banner_style,options:[{label:u("None","porto-functionality"),value:""},{label:u("Zoom","porto-functionality"),value:"zoom"},{label:u("Effect 1","porto-functionality"),value:"effect-1"},{label:u("Effect 2","porto-functionality"),value:"effect-2"},{label:u("Effect 3","porto-functionality"),value:"effect-3"},{label:u("Effect 4","porto-functionality"),value:"effect-4"}],onChange:e=>{t.setAttributes({banner_style:e})}}),e.banner_title&&m(y,{title:u("Title Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Color","porto-functionality"),value:e.banner_color_title,onChange:function(e){return t.setAttributes({banner_color_title:e})}}]}),e.banner_desc&&m(y,{title:u("Description Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Color","porto-functionality"),value:e.banner_color_desc,onChange:function(e){return t.setAttributes({banner_color_desc:e})}}]}),m(y,{title:u("Background Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Color","porto-functionality"),value:e.banner_color_bg,onChange:function(e){return t.setAttributes({banner_color_bg:e})}}]}),m(w,{label:u("Image Opacity","porto-functionality"),value:e.image_opacity,min:0,max:1,step:.1,onChange:e=>{t.setAttributes({image_opacity:e})}}),m(w,{label:u("Image Opacity on Hover","porto-functionality"),value:e.image_opacity_on_hover,min:0,max:1,step:.1,onChange:e=>{t.setAttributes({image_opacity_on_hover:e})}}))),m(d,{group:"styles"},m(l.default,{label:u("Style Options","porto-functionality"),value:r,options:{},onChange:e=>{t.setAttributes({style_options:e})}}))),c={},p={},S={},R={};if(e.banner_title_font_size&&(S.fontSize=e.banner_title_font_size),e.banner_color_bg&&(c.backgroundColor=e.banner_color_bg),e.min_height){e.min_height.replace(/[0-9.]/g,"")||(e.min_height+="px"),c.minHeight=e.min_height}e.banner_color_title&&(S.color=e.banner_color_title),e.banner_color_desc&&(R.color=e.banner_color_desc),e.image_opacity&&e.image_opacity!=e.image_opacity_on_hover&&1!==e.image_opacity&&(p.opacity=e.image_opacity);const E={style:{}};(""!=e.banner_effect||""==e.particle_effect&&e.banner_image_url)&&(E.style.backgroundImage=`url(${e.banner_image_url})`,E.style.backgroundSize="cover",E.style.animationDuration=`${e.effect_duration}s`);const N="porto-banner-"+Math.ceil(1e4*Math.random());var T={className:"porto-ibanner "+N+(e.banner_style?" porto-ibe-"+e.banner_style:"")+(e.className?" "+e.className:""),style:c},I=m("div",T,m("style",null,(0,l.portoGenerateStyleOptionsCSS)(r,N)),(e.banner_effect||e.particle_effect)&&e.banner_image_url&&m("div",{className:"banner-effect-wrapper"},m("div",{className:"banner-effect"+(e.banner_effect?" "+e.banner_effect:""),...E},e.particle_effect&&m("div",{className:"particle-effect"+(e.particle_effect?" "+e.particle_effect:"")}))),e.banner_image_url&&m("img",{className:"porto-ibanner-img",src:e.banner_image_url,style:p}),m("div",{className:"porto-ibanner-desc",style:{}},e.banner_title&&m("h2",{className:"porto-ibanner-title",style:S},e.banner_title),e.content&&m("div",{className:"porto-ibanner-content",style:R},e.content),m(_,{allowedBlocks:["porto/porto-interactive-banner-layer"]})),e.banner_link&&m("a",{className:"porto-ibanner-link",href:e.banner_link}));return m(o.Fragment,{},s,I)},save:function(){return m(_.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,l,r){var s=t.__,c=e.registerBlockType,u=a.InspectorControls,p=a.InnerBlocks,d=o.createElement,_=(o.Component,o.useEffect),y=i.TextControl,f=i.RangeControl;c("porto/porto-interactive-banner-layer",{title:"Porto Interactive Banner Layer",icon:"porto",category:"porto",parent:["porto/porto-interactive-banner"],attributes:{width:{type:"string"},height:{type:"string"},horizontal:{type:"int",default:50},vertical:{type:"int",default:50},animation_type:{type:"string"},animation_duration:{type:"string"},animation_delay:{type:"string"}},edit:function(t){_((()=>{const e=t.clientId,o=window.portoBlockDocument().getElementById("block-"+e).getElementsByClassName("block-editor-inner-blocks");o.length&&(o[0].style.width="100%")}),[t.attributes.width,t.attributes.height,t.attributes.horizontal,t.attributes.vertical]);var e=t.attributes,n=d(u,null,d(y,{label:s("Width","porto-functionality"),value:e.width,onChange:e=>{t.setAttributes({width:e})}}),d("p",{},s("For example: 50%, 100px, 100rem, 50vw, etc.","porto-functionality")),d(y,{label:s("Height","porto-functionality"),value:e.height,onChange:e=>{t.setAttributes({height:e})}}),d("p",{},s("For example: 50%, 100px, 100rem, 50vw, etc.","porto-functionality")),d(f,{label:s("Horizontal Position","porto-functionality"),value:e.horizontal,min:-50,max:150,step:1,onChange:e=>{t.setAttributes({horizontal:e})}}),d("p",{},s("50 is center, 0 is left and 100 is right.","porto-functionality")),d(f,{label:s("vertical Position","porto-functionality"),value:e.vertical,min:-50,max:150,step:1,onChange:e=>{t.setAttributes({vertical:e})}}),d("p",{},s("50 is middle, 0 is top and 100 is bottom.","porto-functionality")),d(y,{label:s("Animation Type","porto-functionality"),value:e.animation_type,onChange:e=>{t.setAttributes({animation_type:e})},help:s("Please check this url to see animation types.","porto-functionality")}),d("p",{style:{marginTop:-20}},d("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),d(y,{label:s("Animation Delay (ms)","porto-functionality"),value:e.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),d(y,{label:s("Animation Duration (ms)","porto-functionality"),value:e.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}}));let a={};50==Number(e.horizontal)?(a.left="50%",a.right="unset",a.transform="translateX(-50%)",50==Number(e.vertical)&&(a.left="50%",a.top="50%",a.right="unset",a.bottom="unset",a.transform="translate(-50%, -50%)")):50>Number(e.horizontal)?(a.left=Number(e.horizontal)+"%",a.right=""):(a.right=100-Number(e.horizontal)+"%",a.left=""),50==Number(e.vertical)?50!=Number(e.horizontal)&&(a.transform="translateY(-50%)",a.top="50%",a.bottom="unset"):50>Number(e.vertical)?a.top=Number(e.vertical)+"%":a.bottom=100-Number(e.vertical)+"%",e.width?a.width=e.width:a.width||(a.width="auto"),e.height?a.height=e.height:a.height="";var i=d("div",{className:"porto-ibanner-layer"+(e.className?" "+e.className:""),style:a},d(p));return d(o.Fragment,{},n,i)},save:function(){return d(p.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(e,o,n,i,l,r,s,u,p){if("1"==porto_block_vars.legacy_mode){var d=e.__,_=o.registerBlockType,y=l.InspectorControls,f=l.BlockControls,m=(l.PanelColorSettings,n.createElement),g=n.Component,b=r.SelectControl,h=r.TextControl,v=(r.TextareaControl,r.RangeControl),w=r.ToggleControl,C=r.Toolbar,x=r.CheckboxControl,k=r.PanelBody;_("porto/porto-products",{title:"Porto Products",icon:"porto",category:"porto",keywords:["shop","woocommerce"],attributes:{title:{type:"string"},title_border_style:{type:"string"},view:{type:"string",default:"grid"},category_type:{type:"string"},category:{type:"string"},categories:{type:"array",default:[]},ids:{type:"string"},status:{type:"string"},count:{type:"int"},orderby:{type:"string",default:"title"},order:{type:"string",default:"asc"},columns:{type:"int",default:4},columns_mobile:{type:"string"},column_width:{type:"string"},grid_layout:{type:"int",default:1},grid_height:{type:"string",default:"600px"},spacing:{type:"int"},addlinks_pos:{type:"string"},image_size:{type:"string"},navigation:{type:"boolean",default:!0},show_nav_hover:{type:"boolean",default:!1},pagination:{type:"boolean",default:!1},nav_pos:{type:"string",default:""},nav_pos2:{type:"string"},nav_type:{type:"string"},dots_pos:{type:"string"},dots_style:{type:"string"},category_filter:{type:"boolean"},pagination_style:{type:"string"},animation_type:{type:"string"},animation_duration:{type:"int"},animation_delay:{type:"int"},show_sort:{type:"array",default:[]},show_sales_title:{type:"string"},show_new_title:{type:"string"},show_rating_title:{type:"string"},show_onsale_title:{type:"string"},filter_style:{type:"string"}},edit:class extends g{constructor(){super(...arguments),this.state={categoriesList:[],products:[],query:""},this.initSlider=this.initSlider.bind(this),this.fetchProducts=this.fetchProducts.bind(this),this.getQuery=this.getQuery.bind(this)}componentDidMount(){this.fetchProducts()}componentDidUpdate(t,e){const o=this,n=o.state.categoriesList,a=o.props.attributes,i=o.props.clientId,l=jQuery("#block-"+i+" .products-container");"selected"===a.category_type&&0===n.length&&wp.apiFetch({path:"/wc/v2/products/categories?per_page=99"}).then((function(t){o.setState({categoriesList:t})})),!l.data("owl.carousel")||"products-slider"==a.view&&o.getQuery()===o.state.query?!l.data("isotope")||"creative"==a.view&&o.getQuery()===o.state.query||l.isotope("destroy"):c(l),"products-slider"!=a.view||!o.state.products.length||"products-slider"===t.attributes.view&&e.products===o.state.products&&a.columns===t.attributes.columns&&a.navigation===t.attributes.navigation&&a.pagination===t.attributes.pagination&&a.dots_pos===t.attributes.dots_pos&&a.nav_pos===t.attributes.nav_pos&&a.nav_pos2===t.attributes.nav_pos2&&a.nav_type===t.attributes.nav_type&&a.count===t.attributes.count?"creative"!=a.view||!o.state.products.length||"creative"===t.attributes.view&&e.products===o.state.products&&a.grid_layout===t.attributes.grid_layout&&a.grid_height===t.grid_height&&a.spacing===t.attributes.spacing||(l.data("isotope")&&l.isotope("destroy"),l.children().each((function(t){this instanceof HTMLElement||Object.setPrototypeOf(this,HTMLElement.prototype)})),l.isotope({itemSelector:".product-col",masonry:{columnWidth:".grid-col-sizer"}}),jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_load_creative_layout_style",nonce:porto_block_vars.nonce,layout:a.grid_layout,grid_height:a.grid_height,spacing:a.spacing,selector:"#block-"+i},type:"post",success:function(t){l.prev("style").remove(),jQuery(t).insertBefore(l),l.isotope("layout")}})):(l.data("owl.carousel")&&c(l),o.initSlider()),o.getQuery()!==o.state.query&&o.fetchProducts()}initSlider(){const t=this.props.attributes,e=this.props.clientId;jQuery("#block-"+e+" .products-container").owlCarousel({items:Number(t.columns),nav:t.navigation,dots:t.pagination,navText:["",""]})}getQuery(){var t=this.props.attributes,e=(t.columns,t.status),o={};t.count?o.per_page=t.count:"creative"==t.view&&porto_block_vars.creative_layouts[Number(t.grid_layout)]&&(o.per_page=porto_block_vars.creative_layouts[Number(t.grid_layout)].length),"selected"===t.category_type&&(o.category=t.categories.join(",")),"featured"===e?o.featured=1:"on_sale"===e?o.on_sale=1:"pre_order"===e&&(o.pre_order=1),t.ids?(o.include=t.ids.trim(),o.orderby="include"):("total_sales"==t.orderby?o.orderby="popularity":o.orderby=t.orderby,o.order=t.order);var n="?",a=!0,i=!1,l=void 0;try{for(var r,s=Object.keys(o)[Symbol.iterator]();!(a=(r=s.next()).done);a=!0){var c=r.value;n+=c+"="+o[c]+"&"}}catch(t){i=!0,l=t}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return"/portowc/v1/products"+n}setCategories(t,e){var o=this.props,n=o.attributes,a=o.setAttributes,i=n.categories;a({category:(i=e?[].concat(E(i),[t]):i.filter((function(e){return e!==t}))).join(","),categories:i})}fetchProducts(){var t=this,e=this.getQuery();t.setState({query:e}),p({path:e}).then((function(e){t.setState({products:e})}))}render(){var e=this,o=this.props,i=o.attributes,l=(o.clientId,this.state.categoriesList),r=o.setAttributes,s=[{icon:"grid-view",title:d("Grid","porto-functionality"),onClick:function(){return r({view:"grid"})},isActive:"grid"===i.view},{icon:"list-view",title:d("List","porto-functionality"),onClick:function(){return r({view:"list"})},isActive:"list"===i.view},{icon:"slides",title:d("Slider","porto-functionality"),onClick:function(){return r({view:"products-slider"})},isActive:"products-slider"===i.view},{icon:"media-spreadsheet",title:d("Creative Grid","porto-functionality"),onClick:function(){return r({view:"creative"})},isActive:"creative"===i.view}];const c=[];for(var u=1;u<=14;u++)c.push({alt:u,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+u+".jpg"});var p=m(y,null,m(k,{title:d("Selector","porto-functionality"),initialOpen:!0},m(h,{label:d("Title","porto-functionality"),value:i.title,onChange:function(t){r({title:t})}}),i.title&&m(b,{label:d("Title Border Style","porto-functionality"),value:i.title_border_style,options:[{label:d("No Border","porto-functionality"),value:""},{label:d("Bottom Border","porto-functionality"),value:"border-bottom"},{label:d("Middle Border","porto-functionality"),value:"border-middle"}],onChange:t=>{r({title_border_style:t})}}),m(b,{label:d("Product Status","porto-functionality"),value:i.status,options:porto_block_vars.status_values,onChange:function(t){return r({status:t})}}),m(b,{label:d("Category","porto-functionality"),value:i.category_type,options:[{label:d("All","porto-functionality"),value:""},{label:d("Selected","porto-functionality"),value:"selected"}],onChange:function(t){return r({category_type:t})}}),m(a.default,{label:d("Product IDs","porto-functionality"),value:i.ids,option:"product",multiple:"1",onChange:function(t){return r({ids:t})}}),"selected"===i.category_type&&m("div",{className:"porto-categories-list"},l.map((function(t,o){return m(x,{key:o,label:[t.name,m("span",{key:o,style:{fontSize:"small",color:"#888",marginLeft:5}},"(",t.count,")")],checked:i.categories.indexOf(t.id)>-1,onChange:function(o){return e.setCategories(t.id,o)}})}))),m(v,{label:d("Per page","porto-functionality"),value:i.count,min:1,max:100,onChange:t=>{r({count:t})}}),m(b,{label:d("Order by","porto-functionality"),value:i.orderby,options:porto_block_vars.orderby_values,onChange:t=>{r({orderby:t})}}),"rating"!=i.orderby&&m(b,{label:d("Order","porto-functionality"),value:i.order,options:[{label:d("Descending","porto-functionality"),value:"desc"},{label:d("Ascending","porto-functionality"),value:"asc"}],onChange:t=>{r({order:t})}})),m(k,{title:d("Layout","porto-functionality"),initialOpen:!1},m(b,{label:d("Show Sort by","porto-functionality"),value:i.show_sort,multiple:!0,options:[{label:d("All","porto-functionality"),value:"all"},{label:d("Popular","porto-functionality"),value:"popular"},{label:d("Date","porto-functionality"),value:"date"},{label:d("Rating","porto-functionality"),value:"rating"},{label:d("On Sale","porto-functionality"),value:"onsale"}],onChange:t=>{r({show_sort:t})}}),-1!==i.show_sort.indexOf("popular")&&m(h,{label:d('Title for "Sort by Popular"',"porto-functionality"),value:i.show_sales_title,onChange:function(t){r({show_sales_title:t})}}),-1!==i.show_sort.indexOf("date")&&m(h,{label:d('Title for "Sort by Date"',"porto-functionality"),value:i.show_new_title,onChange:function(t){r({show_new_title:t})}}),-1!==i.show_sort.indexOf("rating")&&m(h,{label:d('Title for "Sort by Rating"',"porto-functionality"),value:i.show_rating_title,onChange:function(t){r({show_rating_title:t})}}),-1!==i.show_sort.indexOf("onsale")&&m(h,{label:d('Title for "On Sale"',"porto-functionality"),value:i.show_onsale_title,onChange:function(t){r({show_onsale_title:t})}}),m(w,{label:d("Show category filter","porto-functionality"),checked:i.category_filter,onChange:t=>{r({category_filter:t})}}),(i.category_filter||i.show_sort.length>0)&&m(b,{label:d("Filter Style","porto-functionality"),value:i.filter_style,options:[{label:d("Vertical","porto-functionality"),value:""},{label:d("Horizontal","porto-functionality"),value:"horizontal"}],onChange:t=>{r({filter_style:t})}}),"products-slider"!=i.view&&m(b,{label:d("Pagination Style","porto-functionality"),value:i.pagination_style,options:[{label:d("No pagination","porto-functionality"),value:""},{label:d("Default","porto-functionality"),value:"default"},{label:d("Load more","porto-functionality"),value:"load_more"}],onChange:t=>{r({pagination_style:t})}}),("grid"==i.view||"products-slider"==i.view)&&m(v,{label:d("Columns","porto-functionality"),value:i.columns,min:1,max:8,onChange:t=>{r({columns:t})}}),("grid"==i.view||"products-slider"==i.view)&&m(b,{label:d("Columns on mobile ( <= 575px )","porto-functionality"),value:i.columns_mobile,options:[{label:d("Default","porto-functionality"),value:""},{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"}],onChange:t=>{r({columns_mobile:t})}}),("grid"==i.view||"products-slider"==i.view)&&m(b,{label:d("Column Width","porto-functionality"),value:i.column_width,options:[{label:d("Default","porto-functionality"),value:""},{label:d("1/1 of content width","porto-functionality"),value:"1"},{label:d("1/2 of content width","porto-functionality"),value:"2"},{label:d("1/3 of content width","porto-functionality"),value:"3"},{label:d("1/4 of content width","porto-functionality"),value:"4"},{label:d("1/5 of content width","porto-functionality"),value:"5"},{label:d("1/6 of content width","porto-functionality"),value:"6"},{label:d("1/7 of content width","porto-functionality"),value:"7"},{label:d("1/8 of content width","porto-functionality"),value:"8"}],onChange:t=>{r({column_width:t})}}),"creative"==i.view&&m(t.default,{label:d("Creative Grid Layout","porto-functionality"),options:c,value:i.grid_layout,onChange:t=>{r({grid_layout:t})}}),"creative"==i.view&&m(h,{label:d("Grid Height","porto-functionality"),value:i.grid_height,onChange:t=>{r({grid_height:t})}}),("creative"==i.view||"grid"==i.view||"products-slider"==i.view)&&m(v,{label:d("Column Spacing (px)","porto-functionality"),value:i.spacing,min:0,max:100,onChange:t=>{r({spacing:t})}}),"list"!=i.view&&m(b,{label:d("Add Links Position","porto-functionality"),value:"creative"==i.view&&"onimage"!=i.addlinks_pos&&"onimage2"!=i.addlinks_pos&&"onimage3"!=i.addlinks_pos?"onimage":i.addlinks_pos,options:"creative"==i.view?[{label:d("On Image","porto-functionality"),value:"onimage"},{label:d("On Image with Overlay 1","porto-functionality"),value:"onimage2"},{label:d("On Image with Overlay 2","porto-functionality"),value:"onimage3"}]:porto_block_vars.product_layouts,onChange:t=>{r({addlinks_pos:t})}}),("divider"==i.view||"grid"==i.view||"products-slider"==i.view||"list"===i.view)&&m(b,{label:d("Image Size","porto-functionality"),value:i.image_size,options:porto_block_vars.image_sizes,onChange:t=>{r({image_size:t})}}),"products-slider"==i.view&&m(w,{label:d("Show Slider Navigation","porto-functionality"),checked:i.navigation,onChange:t=>{r({navigation:t})}}),"products-slider"==i.view&&i.navigation&&m(b,{label:d("Nav Position","porto-functionality"),value:i.nav_pos,options:[{label:d("Middle","porto-functionality"),value:""},{label:d("Middle of Images","porto-functionality"),value:"nav-center-images-only"},{label:d("Top","porto-functionality"),value:"show-nav-title"},{label:d("Bottom","porto-functionality"),value:"nav-bottom"}],onChange:t=>{r({nav_pos:t})}}),"products-slider"==i.view&&i.navigation&&m(b,{label:d("Nav Inside?","porto-functionality"),value:i.nav_pos2,options:[{label:d("Default","porto-functionality"),value:""},{label:d("Inside","porto-functionality"),value:"nav-pos-inside"},{label:d("Outside","porto-functionality"),value:"nav-pos-outside"}],onChange:t=>{r({nav_pos2:t})}}),"products-slider"==i.view&&i.navigation&&(""==i.nav_pos||"nav-bottom"==i.nav_pos||"nav-center-images-only"==i.nav_pos)&&m(b,{label:d("Nav Type","porto-functionality"),value:i.nav_type,options:porto_block_vars.carousel_nav_types,onChange:t=>{r({nav_type:t})}}),"products-slider"==i.view&&i.navigation&&m(w,{label:d("Show Nav on Hover","porto-functionality"),checked:i.show_nav_hover,onChange:t=>{r({show_nav_hover:t})}}),"products-slider"==i.view&&m(w,{label:d("Show Slider Pagination","porto-functionality"),checked:i.pagination,onChange:t=>{r({pagination:t})}}),"products-slider"==i.view&&i.pagination&&m(b,{label:d("Dots Position","porto-functionality"),value:i.dots_pos,options:[{label:d("Bottom","porto-functionality"),value:""},{label:d("Top right","porto-functionality"),value:"show-dots-title-right"}],onChange:t=>{r({dots_pos:t})}}),"products-slider"==i.view&&i.pagination&&m(b,{label:d("Dots Style","porto-functionality"),value:i.dots_style,options:[{label:d("Default","porto-functionality"),value:""},{label:d("Circle inner dot","porto-functionality"),value:"dots-style-1"}],onChange:t=>{r({dots_style:t})}}),m(h,{label:d("Animation Type","porto-functionality"),value:i.animation_type,onChange:t=>{r({animation_type:t})},help:d("Please check this url to see animation types.","porto-functionality")}),m("p",{style:{marginTop:-20}},m("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),m(h,{label:d("Animation Delay (ms)","porto-functionality"),value:i.animation_delay,onChange:t=>{r({animation_delay:t})}}),m(h,{label:d("Animation Duration (ms)","porto-functionality"),value:i.animation_duration,onChange:t=>{r({animation_duration:t})}})));const _=i.addlinks_pos?i.addlinks_pos:porto_block_vars.product_type;let g="";"list"!=i.view&&(g="creative"==i.view&&"onimage"!=_&&"onimage2"!=_&&"onimage3"!=_?"onimage":"onhover"==_?"default show-links-hover":"outimage_aq_onimage2"==_?"outimage_aq_onimage with-padding":"quantity"==_?"wq_onimage":_);let A="",S={};"grid"==i.view?A+=" columns-"+i.columns+" "+i.view:"products-slider"==i.view?(A+=" products-slider owl-carousel owl-loaded",i.navigation&&(i.nav_pos&&(A+=" "+i.nav_pos),i.nav_type&&(A+=" "+i.nav_type)),i.pagination&&(i.dots_pos&&(A+=" "+i.dots_pos),i.dots_style&&(A+=" "+i.dots_style)),i.navigation&&i.nav_pos2&&(A+=" "+i.nav_pos2),i.show_nav_hover&&(A+=" show-nav-hover")):"creative"==i.view?A+=" grid-creative":A+=" "+i.view,"list"!=i.view&&(A+=" pcols-ls-2 pcols-xs-"+Math.min(3,i.columns)+" pcols-lg-"+i.columns),i.className&&(A+=" "+i.className),S.className="products products-container "+A;let R=porto_block_vars.creative_layouts[Number(i.grid_layout)];const E=this.state.products.map((function(t,e){let o=null,n="";t.images.length?o=m("img",{src:t.images[0].src}):"undefined"!=typeof porto_swatches_params&&porto_swatches_params.placeholder_src&&(o=m("img",{src:porto_swatches_params.placeholder_src})),"creative"==i.view&&void 0!==R[e%R.length]&&(n+=" "+R[e%R.length]),"products-slider"==i.view&&(n+=" owl-item");const a=m("div",{className:"add-links-wrap"},m("div",{className:"add-links clearfix"},m("span",{className:"add_to_cart_button button"},d("Add to cart","porto-functionality")),porto_block_vars.product_show_wl&&m("div",{className:"yith-wcwl-add-to-wishlist"},m("div",{},m("span",{className:"add_to_wishlist"}))),("list"==i.view||"onimage2"!=i.addlinks_pos)&&m("span",{className:"quickview"},d("Quick View","porto-functionality"))),"list"!=i.view&&"onimage2"==i.addlinks_pos&&m("span",{className:"quickview"},d("Quick View","porto-functionality")));return m("li",{className:"product-col product product-"+g+n},m("div",{className:"product-inner"},m("div",{className:"product-image"},m("div",{className:"inner"},o),"list"!=i.view&&("outimage_aq_onimage"==_||"outimage_aq_onimage2"==_||"awq_onimage"==_||"onimage2"==_||"onimage3"==_||"quantity"==_)&&m("div",{className:"links-on-image"},a)),m("div",{className:"product-content"},"list"!=i.view&&porto_block_vars.product_show_wl&&("outimage_aq_onimage"===_||"outimage_aq_onimage2"==_)&&m("div",{className:"yith-wcwl-add-to-wishlist"},m("span",{className:"add_to_wishlist"})),porto_block_vars.product_show_cats&&m("div",{className:"category-list"},t.categories.map((function(t,e){return m("span",{dangerouslySetInnerHTML:{__html:(e?", ":"")+t.name}})}))),m("h3",{className:"product-title"},t.name),m("div",{className:"rating-wrap"},m("div",{className:"star-rating",title:parseFloat(t.average_rating)},m("span",{style:{width:20*parseFloat(t.average_rating)+"%"}}))),"list"==i.view&&m("div",{className:"description",dangerouslySetInnerHTML:{__html:t.short_description}}),m("div",{className:"price",dangerouslySetInnerHTML:{__html:t.price_html}}),("list"==i.view||"default"==_||"onhover"==_||"outimage"==_||"onimage"==_||"quantity"==_)&&a)))}));let N="porto-products";i.title_border_style&&(N+=" title-"+i.title_border_style),(i.show_sort.length||i.category_filter)&&(N+=" show-category",i.filter_style?N+=" filter-"+i.filter_style:N+=" filter-vertical");var T=m("div",{className:N},i.title&&m("h2",{className:"products-title section-title",dangerouslySetInnerHTML:{__html:i.title.replace(/<script.*?\/script>/g,"")}}),(i.show_sort.length||i.category_filter)&&m("div",{className:"products-filter"},m("h4",{className:"section-title"},d("Sort By","porto-functionality")),i.show_sort.length&&m("ul",{className:"product-categories"},-1!==i.show_sort.indexOf("all")&&m("li",{className:"current"},m("a",{},d("All","porto-functionality"))),-1!==i.show_sort.indexOf("popular")&&m("li",{},m("a",{},i.show_sales_title?i.show_sales_title:d("Best Seller","porto-functionality"))),-1!==i.show_sort.indexOf("date")&&m("li",{},m("a",{},i.show_new_title?i.show_new_title:d("New Arrivals","porto-functionality"))),-1!==i.show_sort.indexOf("rating")&&m("li",{},m("a",{},i.show_rating_title?i.show_rating_title:d("Best Rating","porto-functionality"))),-1!==i.show_sort.indexOf("onsale")&&m("li",{},m("a",{},i.show_onsale_title?i.show_onsale_title:d("Best Rating","porto-functionality"))))),m("div",{className:"woocommerce"},m("ul",S,"products-slider"===i.view&&m("div",{className:"owl-stage-outer"},m("div",{className:"owl-stage"},E)),"products-slider"!==i.view&&E,"creative"==i.view&&m("li",{className:"grid-col-sizer"}))));return m(n.Fragment,{},m(f,null,m(C,{controls:s})),p,T)}},save:function(){return null}})}}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash,wp.apiFetch),function(t,o,n,a,s,c,u,p){var d=t.__,_=o.registerBlockType,y=s.InspectorControls,f=(s.PanelColorSettings,s.RichText),m=s.BlockControls,g=s.BlockAlignmentToolbar,b=n.createElement,h=n.Fragment,v=c.PanelBody,w=(n.Component,n.useEffect),C=n.useState,x=c.TextControl,k=c.TextareaControl,A=(c.RangeControl,c.ToggleControl),S=c.SelectControl;let R={text_source:{type:"string"},title:{type:"string"},dynamic_content:{type:"object"},nofollow:{type:"boolean"},line_clamp:{type:"int"},enable_typewriter:{type:"boolean"},typewriter_animation:{type:"string",default:"fadeIn"},typewriter_delay:{type:"string"},typewriter_width:{type:"string"},font_family:{type:"string"},font_size:{type:"string"},font_weight:{type:"int"},text_transform:{type:"string"},line_height:{type:"string"},letter_spacing:{type:"string"},color:{type:"string"},tag:{type:"string",default:"h2"},link:{type:"string"},alignment:{type:"string"},animation_type:{type:"string"},animation_duration:{type:"int",default:1e3},animation_delay:{type:"int",default:0},style_options:{type:"object"}};"undefined"==typeof porto_content_type||!porto_content_type&&""!==porto_content_type||(R.font_settings={type:"object"}),_("porto/porto-heading",{title:"Porto Heading",icon:"porto",category:"porto",keywords:["product title","dynamic meta","tag","text","post title","blog title","taxonomy title","sale count","taxonomy count","category product count"],description:d("Display the heading including product or post title with dynamic field function.","porto-functionality"),attributes:R,edit:function(t){var o=t.attributes;t.clientId;const[a,s]=C(o.title);w((()=>{let t="";o.dynamic_content&&o.dynamic_content.source&&(t="post"==o.dynamic_content.source?o.dynamic_content.post_info:o.dynamic_content[o.dynamic_content.source],jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_dynamic_tags_get_value",nonce:porto_block_vars.nonce,content_type:"undefined"!=typeof porto_content_type&&porto_content_type?porto_content_type:"post",content_type_value:"undefined"!=typeof porto_content_type_value?porto_content_type_value:porto_block_vars.edit_post_id,source:o.dynamic_content.source,field_name:t},type:"post",dataType:"json",success:function(t){let e;e=t&&t.success?""+t.data:o.dynamic_content.fallback,s(e)}}))}),[o.text_source,o.dynamic_content&&o.dynamic_content.source,o.dynamic_content&&o.dynamic_content.post_info,o.dynamic_content&&o.dynamic_content.metabox,o.dynamic_content&&o.dynamic_content.acf,o.dynamic_content&&o.dynamic_content.toolset,o.dynamic_content&&o.dynamic_content.meta,o.dynamic_content&&o.dynamic_content.tax]);let c,u="porto-heading-"+Math.ceil(1e4*Math.random());void 0!==o.font_settings&&(c=Object.assign({},o.font_settings));let p=Object.assign({},o.dynamic_content),_=Object.assign({},o.style_options);var R=b(h,{},b(y,{},b(v,{title:d("General","porto-functionality")},b(S,{label:d("Text Source","porto-functionality"),value:o.text_source,options:[{label:d("Custom Text","porto-functionality"),value:""},{label:d("Dynamic Content","porto-functionality"),value:"dynamic"}],onChange:e=>{t.setAttributes({text_source:e})}}),!o.text_source&&b(k,{label:d("Title","porto-functionality"),help:d("Please input the title.","porto-functionality"),value:o.title,onChange:e=>{t.setAttributes({title:e})}}),b(S,{label:d("Tag","porto-functionality"),value:o.tag,options:[{label:d("H1","porto-functionality"),value:"h1"},{label:d("H2","porto-functionality"),value:"h2"},{label:d("H3","porto-functionality"),value:"h3"},{label:d("H4","porto-functionality"),value:"h4"},{label:d("H5","porto-functionality"),value:"h5"},{label:d("H6","porto-functionality"),value:"h6"},{label:d("div","porto-functionality"),value:"div"},{label:d("p","porto-functionality"),value:"p"},{label:d("span","porto-functionality"),value:"span"}],onChange:e=>{t.setAttributes({tag:e})}}),b(S,{label:d("Line Clamp","porto-functionality"),value:o.line_clamp,options:[{label:d("Select","porto-functionality"),value:""},{label:d("1","porto-functionality"),value:"1"},{label:d("2","porto-functionality"),value:"2"},{label:d("3","porto-functionality"),value:"3"},{label:d("4","porto-functionality"),value:"4"},{label:d("5","porto-functionality"),value:"5"},{label:d("6","porto-functionality"),value:"6"},{label:d("7","porto-functionality"),value:"7"},{label:d("8","porto-functionality"),value:"8"}],onChange:e=>{t.setAttributes({line_clamp:e})}}),b(x,{label:d("Link","porto-functionality"),help:d("Please leave empty, if text source is dynamic, so you want to add link automatically.","porto-functionality"),value:o.link,onChange:e=>{t.setAttributes({link:e})}}),b(A,{label:d("Add nofollow","porto-functionality"),checked:!!o.nofollow&&o.nofollow,onChange:e=>{t.setAttributes({nofollow:e})}})),"dynamic"==o.text_source&&b(v,{title:d("Dynamic","porto-functionality"),initialOpen:!1},b(i.default,{label:d("Dynamic Content","porto-functionality"),value:p,options:{field_type:"field",content_type:"undefined"!=typeof porto_content_type&&porto_content_type,content_type_value:"undefined"==typeof porto_content_type_value?"":porto_content_type_value},onChange:e=>{t.setAttributes({dynamic_content:e})}})),b(v,{title:d("TypeWriter Effect","porto-functionality"),initialOpen:!1},b(A,{label:d("Enable typewriter effect","porto-functionality"),checked:!!o.enable_typewriter&&o.enable_typewriter,onChange:e=>{t.setAttributes({enable_typewriter:e})}}),o.enable_typewriter&&b(x,{label:d("Animation Name e.g: fadeInUp, fadeIn and so on.","porto-functionality"),value:o.typewriter_animation,onChange:e=>{t.setAttributes({typewriter_animation:e})}}),o.enable_typewriter&&b(x,{label:d("Start Delay(ms)","porto-functionality"),value:o.typewriter_delay,onChange:e=>{t.setAttributes({typewriter_delay:e})}}),o.enable_typewriter&&b(x,{label:d("Input min width that can work. (px)","porto-functionality"),value:o.typewriter_width,onChange:e=>{t.setAttributes({typewriter_width:e})}})),b(v,{title:d("Animation","porto-functionality"),initialOpen:!1},b(x,{label:d("Animation Type","porto-functionality"),value:o.animation_type,help:d("Please check this url to see animation types.","porto-functionality"),onChange:e=>{t.setAttributes({animation_type:e})}}),b("p",{style:{marginTop:-20}},b("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),b(x,{label:d("Animation Delay (ms)","porto-functionality"),value:o.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),b(x,{label:d("Animation Duration (ms)","porto-functionality"),value:o.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}}))),b(y,{group:"styles"},b(v,{title:d("Font Settings","porto-functionality")},b(e.default,{label:d("Typography","porto-functionality"),value:"undefined"!=typeof porto_content_type?c:{fontFamily:o.font_family,fontSize:o.font_size,fontWeight:o.font_weight,textTransform:o.text_transform,lineHeight:o.line_height,letterSpacing:o.letter_spacing,color:o.color,textAlign:o.alignment},options:{},onChange:e=>{"undefined"!=typeof porto_content_type?t.setAttributes({font_settings:e}):(void 0!==e.fontFamily&&t.setAttributes({font_family:e.fontFamily}),void 0!==e.fontSize&&t.setAttributes({font_size:e.fontSize}),void 0!==e.fontWeight&&t.setAttributes({font_weight:e.fontWeight}),void 0!==e.textTransform&&t.setAttributes({text_transform:e.textTransform}),void 0!==e.lineHeight&&t.setAttributes({line_height:e.lineHeight}),void 0!==e.letterSpacing&&t.setAttributes({letter_spacing:e.letterSpacing}),void 0!==e.color?t.setAttributes({color:e.color}):t.setAttributes({color:""}))}})),b(l.default,{label:d("Style Options","porto-functionality"),value:_,options:{},onChange:e=>{t.setAttributes({style_options:e})}})));let E={};if(c){if(c.fontFamily&&(E.fontFamily=c.fontFamily),c.fontSize){let t=c.fontSize;t.replace(/[0-9.]/g,"")||(t+="px"),E.fontSize=t}if(c.fontWeight&&(E.fontWeight=Number(c.fontWeight)),c.textTransform&&(E.textTransform=c.textTransform),c.lineHeight){let t=c.lineHeight;!t.replace(/[0-9.]/g,"")&&t>3&&(t+="px"),E.lineHeight=t}c.letterSpacing&&(E.letterSpacing=c.letterSpacing),c.color&&(E.color=c.color),c.textAlign?E.textAlign=c.textAlign:o.alignment&&(E.textAlign=o.alignment)}else{if(o.font_family&&(E.fontFamily=o.font_family),o.font_size){o.font_size.replace(/[0-9.]/g,"")||(o.font_size+="px"),E.fontSize=o.font_size}if(o.font_weight&&(E.fontWeight=Number(o.font_weight)),o.text_transform&&(E.textTransform=o.text_transform),o.line_height){!o.line_height.replace(/[0-9.]/g,"")&&o.line_height>3&&(o.line_height+="px"),E.lineHeight=o.line_height}o.letter_spacing&&(E.letterSpacing=o.letter_spacing),o.color&&(E.color=o.color),E.textAlign=o.alignment}var N={};o.enable_typewriter&&(N={"data-plugin-animated-letters":"","data-plugin-options":{startDelay:0,minWindowWidth:0}},o.typewriter_delay&&(N["data-plugin-options"].startDelay=parseInt(o.typewriter_delay)),o.typewriter_width&&(N["data-plugin-options"].minWindowWidth=parseInt(o.typewriter_width)),o.typewriter_animation&&(N["data-plugin-options"].animationName=parseInt(o.typewriter_animation)));let T=a;o.text_source?(T||(T=""),o.dynamic_content&&o.dynamic_content.before&&(T=o.dynamic_content.before+T),o.dynamic_content&&o.dynamic_content.after&&(T+=o.dynamic_content.after)):T=o.title;let I=o.className;"span"==o.tag&&(I+=" d-inline-block"),I&&(0,r.portoAddHelperClasses)(I,t.clientId),o.line_clamp&&(E.display="-webkit-box",E.WebkitLineClamp=o.line_clamp,E.WebkitBoxOrient="vertical",E.overflow="hidden");let z=!1;o.link&&(z=!0);let B=!1;o.nofollow&&(B=!0),o.text_source&&o.dynamic_content&&o.dynamic_content.source&&("post"==o.dynamic_content.source&&"title"==o.dynamic_content.post_info||"tax"==o.dynamic_content.source&&"title"==o.dynamic_content.tax)&&(z=!0);var P=b("div",{},b("style",null,(0,l.portoGenerateStyleOptionsCSS)(_,u),(0,e.portoGenerateTypographyCSS)(c,u)),o.text_source&&!z?b(o.tag,{className:"porto-heading "+u+(o.className?" "+o.className:""),style:E,...N},wp.element.RawHTML({children:T})):z?b(o.tag,{className:"porto-heading "+u+(o.className?" "+o.className:""),style:E,...N},b("a",{href:o.link?o.link:"#",rel:B?"nofollow":""},wp.element.RawHTML({children:T}))):b(f,{tagName:o.tag,className:"porto-heading "+u+(o.className?" "+o.className:""),style:E,...N,onChange:function(e){return t.setAttributes({title:e})},value:T}));return b(n.Fragment,{},b(m,null,b(g,{value:o.alignment,onChange:function(e){return t.setAttributes({alignment:e})}})),R,P)},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,o,n,a,c,u,p,d){var _=t.__,y=o.registerBlockType,f=c.InspectorControls,m=(c.PanelColorSettings,c.RichText,c.BlockControls),g=c.BlockAlignmentToolbar,b=n.createElement,h=(n.Component,n.Fragment),v=n.useState,w=n.useEffect,C=u.TextControl,x=u.ColorPicker,k=u.ToggleControl,A=u.SelectControl,S=u.PanelBody;const{createHigherOrderComponent:R}=wp.compose,E=R((t=>e=>e.attributes.is_block?React.createElement(t,s({key:"b-"+e.clientId},e,{className:"porto-gb-btn-block"})):React.createElement(t,s({key:"b-"+e.clientId},e))),"withClientIdClassName");wp.hooks.addFilter("editor.BlockListBlock","porto/porto-button",E);y("porto/porto-button",{title:"Porto Button",description:_("Create a beautiful layout action with dynamic feature.","porto-functionality"),icon:"porto",category:"porto",keywords:["dynamic","type","link","url"],attributes:{title:{type:"string",default:"Click Here"},link_source:{type:"string"},dynamic_content:{type:"object"},nofollow:{type:"boolean"},link:{type:"string"},layout:{type:"string"},size:{type:"string",default:"md"},is_block:{type:"boolean"},skin:{type:"string",default:"primary"},icon_cls:{type:"string"},icon_pos:{type:"string",default:"left"},hover_effect:{type:"string"},hover_text_effect:{type:"string"},spacing:{type:"string"},align:{type:"string"},animation_type:{type:"string"},animation_duration:{type:"int"},animation_delay:{type:"int"},animation_reveal_clr:{type:"string"},font_settings:{type:"object",default:{}},style_options:{type:"object"}},edit:function(t){var o=t.attributes;const[a,s]=v(o.link);w((()=>{let t="";"dynamic"==o.link_source&&o.dynamic_content&&o.dynamic_content.source&&(t="post"==o.dynamic_content.source?o.dynamic_content.post_info:o.dynamic_content[o.dynamic_content.source],jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_dynamic_tags_get_value",nonce:porto_block_vars.nonce,content_type:"undefined"!=typeof porto_content_type&&porto_content_type?porto_content_type:"post",content_type_value:"undefined"!=typeof porto_content_type_value?porto_content_type_value:porto_block_vars.edit_post_id,source:o.dynamic_content.source,field_name:t},type:"post",dataType:"json",success:function(t){t&&t.success&&(t.data?s(t.data):o.dynamic_content&&o.dynamic_content.fallback&&s(o.dynamic_content.fallback))}}))}),[o.link_source,o.dynamic_content&&o.dynamic_content.source,o.dynamic_content&&o.dynamic_content.post_info,o.dynamic_content&&o.dynamic_content.metabox,o.dynamic_content&&o.dynamic_content.acf,o.dynamic_content&&o.dynamic_content.toolset,o.dynamic_content&&o.dynamic_content.meta,o.dynamic_content&&o.dynamic_content.tax,o.dynamic_content&&o.dynamic_content.woo]);let c=Object.assign({},o.dynamic_content),u=Object.assign({},o.style_options),p=Object.assign({},o.font_settings);var d=b(h,{},b(f,{},b(S,{title:_("Layout","porto-functionality")},b(A,{label:_("Link Source","porto-functionality"),value:o.link_source,options:[{label:_("Custom Link","porto-functionality"),value:""},{label:_("Dynamic Link","porto-functionality"),value:"dynamic"}],onChange:e=>{t.setAttributes({link_source:e})}}),"dynamic"===o.link_source&&b(i.default,{label:_("Dynamic Content","porto-functionality"),value:c,options:{field_type:"link",content_type:"undefined"!=typeof porto_content_type&&porto_content_type,content_type_value:"undefined"==typeof porto_content_type_value?"":porto_content_type_value},onChange:e=>{t.setAttributes({dynamic_content:e})}}),b(C,{label:_("Title","porto-functionality"),value:o.title,onChange:e=>{t.setAttributes({title:e})}}),!o.link_source&&b(C,{label:_("Link","porto-functionality"),value:a,onChange:e=>{t.setAttributes({link:e}),s(e)}}),b(k,{label:_("Add nofollow","porto-functionality"),checked:!!o.nofollow&&o.nofollow,onChange:e=>{t.setAttributes({nofollow:e})}}),b(A,{label:_("Layout","porto-functionality"),value:o.layout,options:[{label:_("Default","porto-functionality"),value:""},{label:_("Modern","porto-functionality"),value:"modern"},{label:_("Outline","porto-functionality"),value:"borders"}],onChange:e=>{t.setAttributes({layout:e})}}),b(A,{label:_("Size","porto-functionality"),value:o.size,options:[{label:_("Extra Small","porto-functionality"),value:"xs"},{label:_("Small","porto-functionality"),value:"sm"},{label:_("Medium","porto-functionality"),value:"md"},{label:_("Large","porto-functionality"),value:"lg"},{label:_("Extra Large","porto-functionality"),value:"xl"}],onChange:e=>{t.setAttributes({size:e})}}),b(k,{label:_("Is Full Width?","porto-functionality"),checked:!!o.is_block&&o.is_block,onChange:e=>{t.setAttributes({is_block:e})}}),b(A,{label:_("Skin","porto-functionality"),value:o.skin,options:[{label:_("Default","porto-functionality"),value:"default"},{label:_("Primary","porto-functionality"),value:"primary"},{label:_("Secondary","porto-functionality"),value:"secondary"},{label:_("Tertiary","porto-functionality"),value:"tertiary"},{label:_("Quaternary","porto-functionality"),value:"quaternary"},{label:_("Dark","porto-functionality"),value:"dark"},{label:_("Light","porto-functionality"),value:"light"}],onChange:e=>{t.setAttributes({skin:e})}}),o.title&&b(A,{label:_("Select Hover Text Effect","porto-functionality"),help:_("Select the type of effct you want on hover","porto-functionality"),value:o.hover_text_effect,options:[{label:_("No Effect","porto-functionality"),value:""},{label:_("Switch Left","porto-functionality"),value:"hover-text-switch-left"},{label:_("Switch Up","porto-functionality"),value:"hover-text-switch-up"},{label:_("Marquee Left","porto-functionality"),value:"hover-text-marquee-left"},{label:_("Marquee Up","porto-functionality"),value:"hover-text-marquee-up"},{label:_("Marquee Down","porto-functionality"),value:"hover-text-marquee-down"}],onChange:e=>{t.setAttributes({hover_text_effect:e})}})),b(S,{title:_("Icon","porto-functionality"),initialOpen:!1},b(C,{label:_("Icon Class (ex: fas fa-pencil-alt)","porto-functionality"),value:o.icon_cls,onChange:e=>{t.setAttributes({icon_cls:e})}}),o.icon_cls&&b(A,{label:_("Icon Position","porto-functionality"),value:o.icon_pos,options:[{label:_("Left","porto-functionality"),value:"left"},{label:_("Right","porto-functionality"),value:"right"}],onChange:e=>{t.setAttributes({icon_pos:e})}}),o.icon_cls&&b(A,{label:_("Select Hover Icon Effect","porto-functionality"),help:_("Select the type of effct you want on hover","porto-functionality"),value:o.hover_effect,options:[{label:_("No Effect","porto-functionality"),value:""},{label:_("Icon Zoom","porto-functionality"),value:"hover-icon-zoom"},{label:_("Icon Slide Up","porto-functionality"),value:"hover-icon-up"},{label:_("Icon Slide Left","porto-functionality"),value:"hover-icon-left"},{label:_("Icon Slide Right","porto-functionality"),value:"hover-icon-right"},{label:_("Icon Slide Right & Left","porto-functionality"),value:"hover-icon-pulse-left-right"},{label:_("Icon Slide Infinite","porto-functionality"),value:"hover-icon-pulse-infnite"}],onChange:e=>{t.setAttributes({hover_effect:e})}}),o.icon_cls&&b(C,{label:_("Spacing Between Text and Icon","porto-functionality"),value:o.spacing,help:_("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({spacing:e})}})),b(S,{title:_("Animation","porto-functionality"),initialOpen:!1},b(C,{label:_("Animation Type","porto-functionality"),help:_("Please check this url to see animation types.","porto-functionality"),value:o.animation_type,onChange:e=>{t.setAttributes({animation_type:e})}}),b("p",{style:{marginTop:-20}},b("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),b(C,{label:_("Animation Delay (ms)","porto-functionality"),value:o.animation_delay,onChange:e=>{t.setAttributes({animation_delay:e})}}),b(C,{label:_("Animation Duration (ms)","porto-functionality"),value:o.animation_duration,onChange:e=>{t.setAttributes({animation_duration:e})}}),o.animation_type&&-1!==o.animation_type.indexOf("revealDir")&&b("span",{className:"d-block pb-3"},_("Reveal Color","porto-functionality")),o.animation_type&&-1!==o.animation_type.indexOf("revealDir")&&b(x,{label:_("Reveal Color","porto-functionality"),value:o.animation_reveal_clr,onChange:function(e){return t.setAttributes({animation_reveal_clr:e})}}))),b(f,{group:"styles"},b(S,{title:_("Font Settings","porto-functionality")},b(e.default,{label:"",value:p,options:{},onChange:e=>{t.setAttributes({font_settings:e})},removeHoverLinkClr:!0})),b(l.default,{label:_("Style Options","porto-functionality"),value:u,options:{hoverOptions:!0},onChange:e=>{t.setAttributes({style_options:e})}})));o.className&&(0,r.portoAddHelperClasses)(o.className,t.clientId);let y={},R=" btn-"+escape(o.size);"custom"!=o.skin&&(R+=" btn-"+escape(o.skin)),o.layout&&(R+=" btn-"+escape(o.layout)),o.className&&(R+=" "+o.className),o.is_block&&(R+=" btn-block"),o.icon_cls&&(R+=" btn-icon","right"==o.icon_pos&&(R+=" btn-icon-right"),o.title||(R+=" btn-icon-only")),o.hover_text_effect&&o.title&&(R+=" btn-hover-text-effect "+o.hover_text_effect),o.hover_effect&&(R+=" "+o.hover_effect),y.textAlign=o.align;const E="porto-button-"+Math.ceil(1e4*Math.random());let N=o.title;var T=b("div",{className:"porto-button",style:y},b("style",null,o.icon_cls&&o.spacing?".editor-styles-wrapper ."+E+" i { margin-"+("right"==o.icon_pos?"left":"right")+": "+o.spacing+"}":"",(0,l.portoGenerateStyleOptionsCSS)(u,"editor-styles-wrapper ."+E),(0,e.portoGenerateTypographyCSS)(p,"editor-styles-wrapper ."+E)),b("button",{className:"btn "+E+R},o.icon_cls&&"left"==o.icon_pos&&b("i",{className:o.icon_cls}),b("span",{className:"btn-text","data-text":N},N),o.icon_cls&&"right"==o.icon_pos&&b("i",{className:o.icon_cls})));return b(n.Fragment,{},b(m,null,b(g,{value:o.align,onChange:function(e){return t.setAttributes({align:e})}})),d,T)},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,s,c){var u=t.__,p=e.registerBlockType,d=a.InnerBlocks,_=a.InspectorControls,y=a.PanelColorSettings,f=a.MediaUpload,m=i.Button,g=o.createElement,b=(o.Component,o.Fragment),h=i.RangeControl,v=i.TextControl,w=i.TextareaControl,C=i.ToggleControl,x=i.PanelBody,k=o.useEffect,A=i.SelectControl;p("porto/porto-section",{title:"Porto Section",icon:"porto",category:"porto",description:u("Place content elements with shape divider, section separator, flexbox container.","porto-functionality"),keywords:["background","video","image","container","shape divider","section separator","flexbox container"],attributes:{add_container:{type:"boolean"},flex_container:{type:"boolean"},flex_wrap:{type:"boolean"},valign:{type:"string"},halign:{type:"string"},bg_color:{type:"string"},bg_img:{type:"int"},bg_img_url:{type:"string"},bg_repeat:{type:"string"},bg_pos:{type:"string"},bg_size:{type:"string"},parallax_speed:{type:"float"},bg_video:{type:"string"},tag:{type:"string",default:"section"},align:{type:"string"},top_bottom:{type:"string",default:"top"},top_divider_type:{type:"string",default:"none"},top_divider_custom:{type:"string"},top_divider_color:{type:"string"},top_divider_height:{type:"string"},top_divider_flip:{type:"boolean"},top_divider_invert:{type:"boolean"},top_divider_class:{type:"string"},bottom_divider_type:{type:"string",default:"none"},bottom_divider_custom:{type:"string"},bottom_divider_color:{type:"string"},bottom_divider_height:{type:"string"},bottom_divider_flip:{type:"boolean"},bottom_divider_invert:{type:"boolean"},bottom_divider_class:{type:"string"},style_options:{type:"object"}},supports:{align:["full"]},edit:function(t){var e=t.attributes;const n=Object.assign({},e.style_options);k((()=>{var e=t.clientId,o=jQuery("#block-"+e);jQuery.fn.themePluginVideoBackground&&o.find("[data-plugin-video-background]:not(.manual)").each((function(){var t,e=jQuery(this),o=e.data("plugin-options");o&&(t=o),e.find(".video-overlay").length&&(e.find(".video-overlay").prev().remove(),e.find(".video-overlay").remove(),e.removeData("__videobackground")),e.themePluginVideoBackground(t)}))}),[e.bg_video]);var a=g(b,{},g(_,{},g(x,{title:u("General","porto-functionality")},g(A,{label:u("Tag","porto-functionality"),value:e.tag,options:[{label:u("section","porto-functionality"),value:"section"},{label:u("div","porto-functionality"),value:"div"},{label:u("article","porto-functionality"),value:"article"}],onChange:e=>{t.setAttributes({tag:e})}}),g(C,{label:u("Add Container?","porto-functionality"),checked:!!e.add_container&&e.add_container,onChange:e=>{t.setAttributes({add_container:e})}}),g(C,{label:u("Make flexbox container?","porto-functionality"),checked:!!e.flex_container&&e.flex_container,onChange:e=>{t.setAttributes({flex_container:e})}}),e.flex_container&&g(C,{label:u("Is Flex wrap?","porto-functionality"),help:u("If check this option, direct child items break into multiple lines."),checked:!!e.flex_wrap&&e.flex_wrap,onChange:e=>{t.setAttributes({flex_wrap:e})}}),e.flex_container&&g(A,{label:u("Vertical Align","porto-functionality"),value:e.valign,options:[{label:u("Default","porto-functionality"),value:""},{label:u("Top","porto-functionality"),value:"start"},{label:u("Middle","porto-functionality"),value:"center"},{label:u("Bottom","porto-functionality"),value:"end"}],onChange:e=>{t.setAttributes({valign:e})}}),e.flex_container&&g(A,{label:u("Horizontal Align","porto-functionality"),value:e.halign,options:[{label:u("Default","porto-functionality"),value:""},{label:u("Left","porto-functionality"),value:"start"},{label:u("Center","porto-functionality"),value:"center"},{label:u("Right","porto-functionality"),value:"end"},{label:u("Space Between","porto-functionality"),value:"between"},{label:u("Space Around","porto-functionality"),value:"around"}],onChange:e=>{t.setAttributes({halign:e})}})),g(x,{title:u("Background","porto-functionality"),initialOpen:!1},g(y,{title:u("Background Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Background Color","porto-functionality"),value:e.bg_color,onChange:function(e){return t.setAttributes({bg_color:e})}}]}),g(f,{allowedTypes:["image"],value:e.bg_img,onSelect:function(e){return t.setAttributes({bg_img_url:e.url,bg_img:e.id})},render:function(t){var e=t.open;return g(m,{className:"components-toolbar__control",label:u("Background Image","porto-functionality"),icon:"edit",onClick:e})}}),e.bg_img&&g(m,{className:"components-toolbar__control",label:u("Remove image","porto-functionality"),icon:"no",onClick:function(){return t.setAttributes({bg_img_url:void 0,bg_img:void 0})}}),e.bg_img&&g("img",{className:"components-upload-show-img",src:e.bg_img_url}),e.bg_img_url&&g(A,{label:u("Background Repeat","porto-functionality"),value:e.bg_repeat,options:[{label:u("Default","porto-functionality"),value:""},{label:u("No Repeat","porto-functionality"),value:"no-repeat"},{label:u("Repeat","porto-functionality"),value:"repeat"},{label:u("Repeat X","porto-functionality"),value:"repeat-x"},{label:u("Repeat Y","porto-functionality"),value:"repeat-y"}],onChange:e=>{t.setAttributes({bg_repeat:e})}}),e.bg_img_url&&g(A,{label:u("Background Position","porto-functionality"),value:e.bg_pos,options:[{label:u("Default","porto-functionality"),value:""},{label:u("Center Center","porto-functionality"),value:"center center"},{label:u("Center Left","porto-functionality"),value:"center left"},{label:u("Center Right","porto-functionality"),value:"center right"},{label:u("Top Center","porto-functionality"),value:"top center"},{label:u("Top Left","porto-functionality"),value:"top left"},{label:u("Top Right","porto-functionality"),value:"top right"},{label:u("Bottom Center","porto-functionality"),value:"bottom center"},{label:u("Bottom Left","porto-functionality"),value:"bottom left"},{label:u("Bottom Right","porto-functionality"),value:"bottom right"}],onChange:e=>{t.setAttributes({bg_pos:e})}}),e.bg_img_url&&g(A,{label:u("Background Size","porto-functionality"),value:e.bg_size,options:[{label:u("Default","porto-functionality"),value:""},{label:u("Cover","porto-functionality"),value:"cover"},{label:u("Contain","porto-functionality"),value:"contain"},{label:u("Auto","porto-functionality"),value:"auto"},{label:u("100% auto","porto-functionality"),value:"100% auto"},{label:u("auto 100%","porto-functionality"),value:"auto 100%"}],onChange:e=>{t.setAttributes({bg_size:e})}}),e.bg_img_url&&g(h,{label:u("Parallax Speed","porto-functionality"),value:e.parallax_speed,min:1,max:3,step:.1,onChange:e=>{t.setAttributes({parallax_speed:e})}}),e.bg_img_url&&g("p",{},u("Enter parallax speed ratio if you want to use parallax effect. (Note: Standard value is 1.5, min value is 1. Leave empty if you don't want.)")),g(v,{label:u("Background Video URL (mp4)","porto-functionality"),value:e.bg_video,onChange:e=>{t.setAttributes({bg_video:e})}})),g(x,{title:u("Shape Divider","porto-functionality"),initialOpen:!1},g(A,{label:u("Shape Divider Position","porto-functionality"),value:e.top_bottom,options:[{label:u("Top","porto-functionality"),value:"top"},{label:u("Bottom","porto-functionality"),value:"bottom"}],onChange:e=>{t.setAttributes({top_bottom:e})}}),"top"==e.top_bottom&&g(A,{label:u("Top Divider Type","porto-functionality"),value:e.top_divider_type,options:porto_block_vars.divider_type,onChange:e=>{t.setAttributes({top_divider_type:e})}}),"top"==e.top_bottom&&"custom"==e.top_divider_type&&g(w,{label:u("Please writer your svg code.","porto-functionality"),value:e.top_divider_custom,onChange:e=>{t.setAttributes({top_divider_custom:e})}}),"top"==e.top_bottom&&"none"!=e.top_divider_type&&g(y,{title:u("Divider Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Color","porto-functionality"),value:e.top_divider_color,onChange:function(e){return t.setAttributes({top_divider_color:e})}}]}),"top"==e.top_bottom&&"none"!=e.top_divider_type&&g(v,{label:u("Top Divider Height","porto-functionality"),value:e.top_divider_height,help:u("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({top_divider_height:e})}}),"top"==e.top_bottom&&"none"!=e.top_divider_type&&g(C,{label:u("Top Divider Flip","porto-functionality"),checked:!!e.top_divider_flip&&e.top_divider_flip,onChange:e=>{t.setAttributes({top_divider_flip:e})}}),"top"==e.top_bottom&&"none"!=e.top_divider_type&&g(C,{label:u("Top Divider Invert","porto-functionality"),checked:!!e.top_divider_invert&&e.top_divider_invert,onChange:e=>{t.setAttributes({top_divider_invert:e})}}),"top"==e.top_bottom&&"none"!=e.top_divider_type&&g(v,{label:u("Top Shape Divder Class","porto-functionality"),value:e.top_divider_class,onChange:e=>{t.setAttributes({top_divider_class:e})}}),"bottom"==e.top_bottom&&g(A,{label:u("Bottom Divider Type","porto-functionality"),value:e.bottom_divider_type,options:porto_block_vars.divider_type,onChange:e=>{t.setAttributes({bottom_divider_type:e})}}),"bottom"==e.top_bottom&&"custom"==e.bottom_divider_type&&g(w,{label:u("Please writer your svg code.","porto-functionality"),value:e.bottom_divider_custom,onChange:e=>{t.setAttributes({bottom_divider_custom:e})}}),"bottom"==e.top_bottom&&"none"!=e.bottom_divider_type&&g(y,{title:u("Divider Color","porto-functionality"),initialOpen:!1,colorSettings:[{label:u("Color","porto-functionality"),value:e.bottom_divider_color,onChange:function(e){return t.setAttributes({bottom_divider_color:e})}}]}),"bottom"==e.top_bottom&&"none"!=e.bottom_divider_type&&g(v,{label:u("Bottom Divider Height","porto-functionality"),value:e.bottom_divider_height,help:u("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({bottom_divider_height:e})}}),"bottom"==e.top_bottom&&"none"!=e.bottom_divider_type&&g(C,{label:u("Bottom Divider Flip","porto-functionality"),checked:!!e.bottom_divider_flip&&e.bottom_divider_flip,onChange:e=>{t.setAttributes({bottom_divider_flip:e})}}),"bottom"==e.top_bottom&&"none"!=e.bottom_divider_type&&g(C,{label:u("Bottom Divider Invert","porto-functionality"),checked:!!e.bottom_divider_invert&&e.bottom_divider_invert,onChange:e=>{t.setAttributes({bottom_divider_invert:e})}}),"bottom"==e.top_bottom&&"none"!=e.bottom_divider_type&&g(v,{label:u("Bottom Shape Divder Class","porto-functionality"),value:e.bottom_divider_class,onChange:e=>{t.setAttributes({bottom_divider_class:e})}}))),g(_,{group:"styles"},g(l.default,{label:u("Style Options","porto-functionality"),value:n,options:{},onChange:e=>{t.setAttributes({style_options:e})}})));let i={};e.bg_color&&(i.backgroundColor=e.bg_color),e.bg_img_url&&(i.backgroundImage="url("+e.bg_img_url+")"),e.bg_repeat&&(i.backgroundRepeat=e.bg_repeat),e.bg_pos&&(i.backgroundPosition=e.bg_pos),e.bg_size&&(i.backgroundSize=e.bg_size),i.textAlign=e.align;const s={style:{},className:"shape-divider"};if(""!=e.top_divider_type&&"none"!=e.top_divider_type){if(e.top_divider_class&&(s.className+=` ${e.top_divider_class}`),e.top_divider_invert&&e.top_divider_flip?s.className+=" shape-divider-reverse-xy":e.top_divider_invert?s.className+=" shape-divider-reverse-x":e.top_divider_flip&&(s.className+=" shape-divider-reverse-y"),e.top_divider_height){e.top_divider_height.replace(/[0-9.]/g,"")||(e.top_divider_height+="px"),s.style.height=e.top_divider_height}e.top_divider_color&&(s.style.fill=e.top_divider_color),"custom"==e.top_divider_type?e.top_divider_custom&&(s.dangerouslySetInnerHTML={__html:e.top_divider_custom}):s.dangerouslySetInnerHTML={__html:porto_block_vars.shape_divider[e.top_divider_type]}}const c={style:{},className:"shape-divider shape-divider-bottom"};if(""!=e.bottom_divider_type&&"none"!=e.bottom_divider_type){if(e.bottom_divider_class&&(c.className+=` ${e.bottom_divider_class}`),e.bottom_divider_invert&&e.bottom_divider_flip?c.className+=" shape-divider-reverse-xy":e.bottom_divider_invert?c.className+=" shape-divider-reverse-x":e.bottom_divider_flip&&(c.className+=" shape-divider-reverse-y"),e.bottom_divider_height){e.bottom_divider_height.replace(/[0-9.]/g,"")||(e.bottom_divider_height+="px"),c.style.height=e.bottom_divider_height}e.bottom_divider_color&&(c.style.fill=e.bottom_divider_color),"custom"==e.bottom_divider_type?e.bottom_divider_custom&&(c.dangerouslySetInnerHTML={__html:e.bottom_divider_custom}):c.dangerouslySetInnerHTML={__html:porto_block_vars.shape_divider[e.bottom_divider_type]}}const p="porto-section-"+Math.ceil(1e4*Math.random());let S="porto-section "+p;"undefined"==typeof porto_content_type&&(S+=" vc_section"),"none"==e.top_divider_type&&"none"==e.bottom_divider_type||(S+=" section-with-shape-divider"),e.add_container||(e.flex_container&&(S+=" flex-container"),e.flex_wrap&&(S+=" flex-wrap"),e.valign&&(S+=" align-items-"+e.valign),e.halign&&(S+=" justify-content-"+e.halign));let R="container";e.add_container&&(e.flex_container&&(R+=" flex-container"),e.flex_wrap&&(R+=" flex-wrap"),e.valign&&(R+=" align-items-"+e.valign));(0,r.portoAddHelperClasses)(e.className,t.clientId)&&(S+=" "+e.className);let E={className:S,style:i};e.bg_video&&(E.className+=" section-video",E["data-video-path"]=e.bg_video.replace(".mp4",""),E["data-plugin-video-background"]="",E["data-plugin-options"]=JSON.stringify({posterType:"jpg",position:"50% 50%",overlay:!0}));const N=g(e.tag,E,g("style",null,(0,l.portoGenerateStyleOptionsCSS)(n,p)),""!=e.top_divider_type&&"none"!=e.top_divider_type&&g("div",s),!e.add_container&&g(d),e.add_container&&g("div",{className:R},g(d)),""!=e.bottom_divider_type&&"none"!=e.bottom_divider_type&&g("div",c));return g(o.Fragment,{},a,N)},save:function(){return g(d.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(e,o,n,a,i,l,r,s,u){if("1"==porto_block_vars.legacy_mode){var p=e.__,d=o.registerBlockType,_=i.InspectorControls,y=i.BlockControls,f=(i.PanelColorSettings,n.createElement),m=n.Component,g=l.PanelBody,b=l.SelectControl,h=l.TextControl,v=(l.TextareaControl,l.RangeControl),w=l.ToggleControl,C=l.Toolbar,x=l.CheckboxControl;d("porto/porto-product-categories",{title:"Porto Product Categories",icon:"porto",category:"porto",attributes:{title:{type:"string"},view:{type:"string",default:"grid"},number:{type:"int"},columns:{type:"int",default:4},columns_mobile:{type:"string"},column_width:{type:"string"},grid_layout:{type:"int",default:1},grid_height:{type:"string",default:"600px"},spacing:{type:"int"},text_position:{type:"string",default:"middle-center"},overlay_bg_opacity:{type:"int",default:15},text_color:{type:"string",default:"light"},orderby:{type:"string",default:"name"},order:{type:"string",default:"asc"},hide_empty:{type:"boolean"},parent:{type:"string"},ids:{type:"string"},media_type:{type:"string"},show_sub_cats:{type:"boolean"},show_featured:{type:"string"},hide_count:{type:"boolean"},hover_effect:{type:"string",default:""},image_size:{type:"string"},navigation:{type:"boolean",default:!0},nav_pos:{type:"string",default:""},nav_pos2:{type:"string"},nav_type:{type:"string"},show_nav_hover:{type:"boolean"},pagination:{type:"boolean",default:!1},dots_pos:{type:"string"},dots_style:{type:"string"},animation_type:{type:"string"},animation_duration:{type:"int"},animation_delay:{type:"int"}},edit:class extends m{constructor(){super(...arguments),this.state={categoriesList:[],query:""},this.initSlider=this.initSlider.bind(this),this.fetchCategories=this.fetchCategories.bind(this),this.getQuery=this.getQuery.bind(this)}fetchCategories(){let t=this,e=t.getQuery();wp.apiFetch({path:e}).then((function(o){t.setState({categoriesList:o,query:e})}))}componentDidMount(){this.fetchCategories();const t=this;wp.apiFetch({path:"/wc/v2/products/categories?per_page=99"}).then((function(e){t.setState({allcategories:e})}))}componentDidUpdate(t,e){const o=this,n=o.state.categoriesList,a=o.props.attributes,i=o.props.clientId,l=jQuery("#block-"+i+" .products-container");!l.data("owl.carousel")||"products-slider"==a.view&&o.getQuery()===o.state.query?!l.data("isotope")||"creative"==a.view&&o.getQuery()===o.state.query||l.isotope("destroy"):c(l),"products-slider"!=a.view||!n.length||"products-slider"===t.attributes.view&&e.categoriesList===n&&a.columns===t.attributes.columns&&a.navigation===t.attributes.navigation&&a.pagination===t.attributes.pagination&&a.dots_pos===t.attributes.dots_pos&&a.nav_pos===t.attributes.nav_pos&&a.nav_pos2===t.attributes.nav_pos2&&a.nav_type===t.attributes.nav_type&&a.number===t.attributes.number?"creative"!=a.view||!n.length||"creative"===t.attributes.view&&e.categoriesList===n&&a.grid_layout===t.attributes.grid_layout&&a.grid_height===t.grid_height&&a.spacing===t.attributes.spacing||(l.data("isotope")&&l.isotope("destroy"),l.children().each((function(t){this instanceof HTMLElement||Object.setPrototypeOf(this,HTMLElement.prototype)})),l.isotope({itemSelector:".product-col",masonry:{columnWidth:".grid-col-sizer"}}),jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_load_creative_layout_style",nonce:porto_block_vars.nonce,layout:a.grid_layout,grid_height:a.grid_height,spacing:a.spacing,selector:"#block-"+i,item_selector:".product-col"},type:"post",success:function(t){l.prev("style").remove(),jQuery(t).insertBefore(l),l.isotope("layout")}})):(l.data("owl.carousel")&&c(l),o.initSlider()),o.getQuery()!==o.state.query&&o.fetchCategories()}initSlider(){const t=this.props.attributes,e=this.props.clientId;jQuery("#block-"+e+" .products-container").owlCarousel({items:Number(t.columns),nav:t.navigation,dots:t.pagination,navText:["",""]})}getQuery(){let t=this.props.attributes,e=(t.columns,t.status,"porto=1");return t.number?e+="&per_page="+t.number:"creative"==t.view&&porto_block_vars.creative_layouts[Number(t.grid_layout)]&&(e+="&per_page="+porto_block_vars.creative_layouts[Number(t.grid_layout)].length),t.parent&&(e+="&parent="+t.parent),t.ids?e+="&include="+t.ids+"&orderby=include&order=asc":(t.orderby&&(e+="&orderby="+t.orderby),e+="&order="+t.order),t.image_size&&(e+="&image_size="+t.image_size),t.hide_empty&&(e+="&hide_empty=1"),"/wc/v3/products/categories?"+e}render(){var e=this.props,o=e.attributes,a=(e.clientId,this.state.categoriesList,e.setAttributes),i=[{icon:"grid-view",title:p("Grid","porto-functionality"),onClick:function(){return a({view:"grid"})},isActive:"grid"===o.view},{icon:"slides",title:p("Slider","porto-functionality"),onClick:function(){return a({view:"products-slider"})},isActive:"products-slider"===o.view},{icon:"media-spreadsheet",title:p("Creative Grid","porto-functionality"),onClick:function(){return a({view:"creative"})},isActive:"creative"===o.view}];const l=[];for(var r=1;r<=14;r++)l.push({alt:r,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+r+".jpg"});const s=this.state.allcategories,c=[{label:p("None","porto-functionality"),value:""},{label:p("Display Top Level categories","porto-functionality"),value:"0"}];s&&s.map((function(t,e){c.push({label:t.name+" ("+t.count+")",value:t.id})}));var u=f(_,null,f(g,{title:p("Categories Selector","porto-functionality"),initialOpen:!0},f(h,{label:p("Title","porto-functionality"),value:o.title,onChange:function(t){a({title:t})}}),f(b,{label:p("Parent Category","porto-functionality"),value:o.parent,options:c,onChange:t=>{a({parent:t})}}),f("p",{className:""},p("Categories","porto-functionality")),f("div",{className:"porto-categories-list"},s&&s.map((function(t,e){if(!o.parent||parseInt(o.parent)===parseInt(t.parent))return f(x,{key:e,label:[t.name,f("span",{style:{fontSize:"small",color:"#888",marginLeft:5}},"(",t.count,")")],checked:o.ids&&o.ids.split(",").indexOf(""+t.id)>-1,onChange:e=>{let n=o.ids?o.ids.split(","):[];return n=e?[].concat(E(n),[t.id]):n.filter((function(e){return parseInt(e)!==parseInt(t.id)})),a({ids:n.join(",")})}})}))),f(v,{label:p("Number","porto-functionality"),value:o.number,min:1,max:1e3,onChange:t=>{a({number:t})}}),f(w,{label:p("Hide empty","porto-functionality"),checked:o.hide_empty,onChange:t=>{a({hide_empty:t})}}),f(b,{label:p("Order by","porto-functionality"),value:o.orderby,options:[{label:p("Title","porto-functionality"),value:"name"},{label:p("ID","porto-functionality"),value:"id"},{label:p("Product Count","porto-functionality"),value:"count"},{label:p("Description","porto-functionality"),value:"description"},{label:p("Term Group","porto-functionality"),value:"term_group"}],onChange:t=>{a({orderby:t})}}),"rating"!=o.orderby&&f(b,{label:p("Order","porto-functionality"),value:o.order,options:[{label:p("Descending","porto-functionality"),value:"desc"},{label:p("Ascending","porto-functionality"),value:"asc"}],onChange:t=>{a({order:t})}})),f(g,{title:p("Categories Layout","porto-functionality"),initialOpen:!1},"creative"==o.view&&f(t.default,{label:p("Creative Grid Layout","porto-functionality"),options:l,value:o.grid_layout,onChange:t=>{a({grid_layout:t})}}),"creative"==o.view&&f(h,{label:p("Grid Height","porto-functionality"),value:o.grid_height,onChange:t=>{a({grid_height:t})}}),"creative"==o.view&&f(v,{label:p("Column Spacing (px)","porto-functionality"),value:o.spacing,min:0,max:100,onChange:t=>{a({spacing:t})}}),("grid"==o.view||"products-slider"==o.view)&&f(v,{label:p("Columns","porto-functionality"),value:o.columns,min:1,max:8,onChange:t=>{a({columns:t})}}),("grid"==o.view||"products-slider"==o.view)&&f(b,{label:p("Columns on mobile ( <= 575px )","porto-functionality"),value:o.columns_mobile,options:[{label:p("Default","porto-functionality"),value:""},{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"}],onChange:t=>{a({columns_mobile:t})}}),("grid"==o.view||"products-slider"==o.view)&&f(b,{label:p("Column Width","porto-functionality"),value:o.column_width,options:[{label:p("Default","porto-functionality"),value:""},{label:p("1/1 of content width","porto-functionality"),value:"1"},{label:p("1/1 of content width","porto-functionality"),value:"2"},{label:p("1/3 of content width","porto-functionality"),value:"3"},{label:p("1/4 of content width","porto-functionality"),value:"4"},{label:p("1/5 of content width","porto-functionality"),value:"5"},{label:p("1/6 of content width","porto-functionality"),value:"6"},{label:p("1/7 of content width","porto-functionality"),value:"7"},{label:p("1/8 of content width","porto-functionality"),value:"8"}],onChange:t=>{a({column_width:t})}}),f(b,{label:p("Text Position","porto-functionality"),value:o.text_position,options:[{label:p("Inner Middle Left","porto-functionality"),value:"middle-left"},{label:p("Inner Middle Center","porto-functionality"),value:"middle-center"},{label:p("Inner Middle Right","porto-functionality"),value:"middle-right"},{label:p("Inner Bottom Left","porto-functionality"),value:"bottom-left"},{label:p("Inner Bottom Center","porto-functionality"),value:"bottom-center"},{label:p("Inner Bottom Right","porto-functionality"),value:"bottom-right"},{label:p("Outside","porto-functionality"),value:"outside-center"}],onChange:t=>{a({text_position:t})}}),f(v,{label:p("Overlay Background Opacity (%)","porto-functionality"),value:o.overlay_bg_opacity,min:0,max:100,onChange:t=>{e.setAttributes({overlay_bg_opacity:t})}}),f(b,{label:p("Text Color","porto-functionality"),value:o.text_color,options:[{label:p("Dark","porto-functionality"),value:"dark"},{label:p("Light","porto-functionality"),value:"light"}],onChange:t=>{a({text_color:t})}}),f(b,{label:p("Media Type","porto-functionality"),value:o.media_type,options:[{label:p("Image","porto-functionality"),value:""},{label:p("Icon","porto-functionality"),value:"icon"}],onChange:t=>{a({media_type:t})}}),f(w,{label:p("Display sub categories","porto-functionality"),checked:o.show_sub_cats,onChange:t=>{e.setAttributes({show_sub_cats:t})}}),f(w,{label:p("Display a featured product","porto-functionality"),checked:o.show_featured,onChange:t=>{e.setAttributes({show_featured:t})},help:p("If you check this option, a featured product in each category will be displayed under the product category.","porto-functionality")}),f(w,{label:p("Hide products count","porto-functionality"),checked:o.hide_count,onChange:t=>{e.setAttributes({hide_count:t})}}),f(b,{label:p("Hover Effect","porto-functionality"),value:o.hover_effect,options:[{label:p("Normal","porto-functionality"),value:""},{label:p("Display product count on hover","porto-functionality"),value:"show-count-on-hover"}],onChange:t=>{a({hover_effect:t})}}),"icon"!=o.media_type&&f(b,{label:p("Image Size","porto-functionality"),value:o.image_size,options:porto_block_vars.image_sizes,onChange:t=>{e.setAttributes({image_size:t})}}),f(h,{label:p("Animation Type","porto-functionality"),value:o.animation_type,onChange:t=>{a({animation_type:t})},help:p("Please check this url to see animation types.","porto-functionality")}),f("p",{style:{marginTop:-20}},f("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),f(h,{label:p("Animation Delay (ms)","porto-functionality"),value:o.animation_delay,onChange:t=>{a({animation_delay:t})}}),f(h,{label:p("Animation Duration (ms)","porto-functionality"),value:o.animation_duration,onChange:t=>{a({animation_duration:t})}})),"products-slider"==o.view&&f(g,{title:p("Slider Options","porto-functionality"),initialOpen:!1},f(w,{label:p("Show Slider Navigation","porto-functionality"),checked:o.navigation,onChange:t=>{a({navigation:t})}}),o.navigation&&f(b,{label:p("Nav Position","porto-functionality"),value:o.nav_pos,options:[{label:p("Middle","porto-functionality"),value:""},{label:p("Middle of Images","porto-functionality"),value:"nav-center-images-only"},{label:p("Top","porto-functionality"),value:"show-nav-title"},{label:p("Bottom","porto-functionality"),value:"nav-bottom"}],onChange:t=>{a({nav_pos:t})}}),o.navigation&&f(b,{label:p("Nav Inside?","porto-functionality"),value:o.nav_pos2,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Inside","porto-functionality"),value:"nav-pos-inside"},{label:p("Outside","porto-functionality"),value:"nav-pos-outside"}],onChange:t=>{a({nav_pos2:t})}}),o.navigation&&(""==o.nav_pos||"nav-bottom"==o.nav_pos||"nav-center-images-only"==o.nav_pos)&&f(b,{label:p("Nav Type","porto-functionality"),value:o.nav_type,options:porto_block_vars.carousel_nav_types,onChange:t=>{a({nav_type:t})}}),o.navigation&&f(w,{label:p("Show Nav on Hover","porto-functionality"),checked:o.show_nav_hover,onChange:t=>{a({show_nav_hover:t})}}),f(w,{label:p("Show Slider Pagination","porto-functionality"),checked:o.pagination,onChange:t=>{a({pagination:t})}}),o.pagination&&f(b,{label:p("Dots Position","porto-functionality"),value:o.dots_pos,options:[{label:p("Bottom","porto-functionality"),value:""},{label:p("Top right","porto-functionality"),value:"show-dots-title-right"}],onChange:t=>{a({dots_pos:t})}}),o.pagination&&f(b,{label:p("Dots Style","porto-functionality"),value:o.dots_style,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Circle inner dot","porto-functionality"),value:"dots-style-1"}],onChange:t=>{a({dots_style:t})}})));let d="";"grid"==o.view?(d+=" columns-"+o.columns+" "+o.view,d+=" pcols-ls-2 pcols-xs-"+Math.min(3,o.columns)+" pcols-lg-"+o.columns):"products-slider"==o.view?(d+=" products-slider owl-carousel owl-loaded pcols-lg-"+o.columns,o.navigation&&(o.nav_pos&&(d+=" "+o.nav_pos),o.nav_pos&&"nav-center-images-only"!=o.nav_pos||!o.nav_pos2||(d+=" "+o.nav_pos2),o.nav_type?d+=" "+o.nav_type:d+=" show-nav-middle"),o.pagination&&(o.dots_pos&&(d+=" "+o.dots_pos),o.dots_style&&(d+=" "+o.dots_style))):"creative"==o.view?d+=" grid-creative":d+=" "+o.view,o.className&&(d+=" "+o.className);let m="category-pos-"+o.text_position.split("-")[0]+(o.text_position.split("-").length>=2?" category-text-"+o.text_position.split("-")[1]:"")+("light"!=o.text_color?" category-color-"+o.text_color:""),k=porto_block_vars.creative_layouts[Number(o.grid_layout)];const A=this.state.categoriesList.map((function(t,e){let n=null,a="";return t.image&&t.image.catalog_src?n=f("img",{src:t.image.catalog_src}):"undefined"!=typeof porto_swatches_params&&porto_swatches_params.placeholder_src&&(n=f("img",{src:porto_swatches_params.placeholder_src})),"creative"==o.view&&void 0!==k[e%k.length]&&(a+=" "+k[e%k.length]),"icon"==o.media_type&&t.cat_icon&&(a+=" cat-has-icon"),"products-slider"===o.view&&(a+=" owl-item"),f("li",{className:"product-col product-category"+a},f("span",{className:"thumb-info align-center"},"icon"==o.media_type&&t.cat_icon&&f("i",{className:t.cat_icon}),("icon"!=o.media_type||!t.cat_icon)&&f("span",{className:"thumb-info-wrapper tf-none"},n),"category-pos-outside"!=m&&f("span",{className:"thumb-info-wrap"},f("span",{className:"thumb-info-title"},f("h3",{className:"sub-title thumb-info-inner",dangerouslySetInnerHTML:{__html:t.name}}),!o.hide_count&&t.count>0&&f("span",{className:"thumb-info-type"},f("mark",{},Number(t.count))," Products")))))}));var S=f("div",{className:"porto-products"+(o.hover_effect?" "+o.hover_effect:"")+(o.className?" "+o.className.trim():"")},o.title&&f("h2",{className:"products-title section-title",dangerouslySetInnerHTML:{__html:o.title.replace(/<script.*?\/script>/g,"")}}),f("ul",{className:"products products-container"+d+" "+m},"products-slider"===o.view&&f("div",{className:"owl-stage-outer"},f("div",{className:"owl-stage"},A)),"products-slider"!==o.view&&A,"creative"==o.view&&f("li",{className:"grid-col-sizer"})));return f(n.Fragment,{},f(y,null,f(C,{controls:i})),u,S)}},save:function(){return null}})}}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash,wp.apiFetch),function(e,o,n,a,i,l,r,s){var c=e.__,u=o.registerBlockType,p=i.InnerBlocks,d=i.InspectorControls,_=n.createElement,y=n.Component,f=(l.RangeControl,l.TextControl),m=l.SelectControl;let g=null;u("porto/porto-grid-container",{title:"Porto Masonry Container",icon:"porto",category:"porto",keywords:["isotope","grid"],attributes:{layout:{type:"string",default:""},grid_layout:{type:"int",default:1},grid_height:{type:"string",default:"600px"},gutter_size:{type:"string"}},edit:class extends y{constructor(){super(...arguments),this.initMasonry=this.initMasonry.bind(this)}initMasonry(){const t=this.props,e=t.attributes,o=t.clientId,n=jQuery("#block-"+o).find(".block-editor-block-list__layout").eq(0);if(n.children(".grid-col-sizer").length||n.append('<div class="grid-col-sizer"></div>'),n.isotope({masonry:{columnWidth:".grid-col-sizer"}}),"preset"==e.layout){const t=porto_block_vars.creative_layouts[Number(e.grid_layout)];n.data("grid_layout",e.grid_layout);const a=n.get(0);a.hasChildNodes&&jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_load_creative_layout_style",nonce:porto_block_vars.nonce,layout:e.grid_layout,grid_height:e.grid_height,spacing:e.gutter_size,selector:"#block-"+o},type:"post",success:function(e){const o=a.childNodes;for(var i=0;i<o.length;i++){const e=o[i];if(e.classList.contains("grid-col-sizer")||e.classList.contains("block-list-appender"))continue;e.style.width="",e.style.height="";const n=t[i%t.length].split(" ");for(var l=0;l<e.classList.length;l++)0!==e.classList.item(l).indexOf("grid-col-")&&0!==e.classList.item(l).indexOf("grid-height-")||e.classList.remove(e.classList.item(l));n.map((function(t){e.classList.add(t)}))}n.prev("style").remove(),jQuery(e).insertBefore(n),n.isotope("layout"),g&&clearTimeout(g),g=setTimeout((function(){for(var t=0;t<o.length;t++){const e=o[t];e.classList.contains("grid-col-sizer")||e.classList.contains("block-list-appender")||(e.style.width=(e.offsetWidth/e.parentNode.offsetWidth*100).toFixed(4)+"%",e.style.height=e.offsetHeight+"px")}}),500)}})}}componentDidMount(){this.initMasonry();const t=this.props.clientId;setTimeout((()=>{jQuery("#block-"+t).find(".block-editor-block-list__layout").eq(0).isotope("layout")}),100)}componentDidUpdate(t,e){const o=this.props,n=o.attributes,a=o.clientId,i=jQuery("#block-"+a).find(".block-editor-block-list__layout").eq(0);if("preset"!=n.layout||n.layout==t.attributes.layout&&n.grid_layout==t.attributes.grid_layout&&n.grid_height==t.attributes.grid_height){if("preset"!=n.layout){const t=i.get(0);if(t.previousSibling&&"alt"===t.previousSibling.tagName.toLowerCase()&&t.parentNode.removeChild(t.previousSibling),t.hasChildNodes()){const e=t.childNodes;for(var l=0;l<e.length;l++){const t=e[l];if(!t.classList.contains("grid-col-sizer")&&!t.classList.contains("block-list-appender")){var r=t.getAttribute("data-width");r?t.style.width=r:this.style.width="",t.style.height=""}}}}}else this.initMasonry();i.data("isotope")&&i.isotope("layout")}render(){var e=this.props,o=e.attributes;const a=[];for(var i=1;i<=14;i++)a.push({alt:i,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+i+".jpg"});var l=_(d,{},_(m,{label:c("Layout","porto-functionality"),value:o.layout,options:[{label:c("Custom Masonry Layout","porto-functionality"),value:""},{label:c("Predefined Grid Layout","porto-functionality"),value:"preset"}],onChange:t=>{e.setAttributes({layout:t})}}),"preset"==o.layout&&_(t.default,{label:c("Creative Grid Layout","porto-functionality"),options:a,value:o.grid_layout,onChange:t=>{e.setAttributes({grid_layout:t})}}),"preset"==o.layout&&_(f,{label:c("Grid Height","porto-functionality"),value:o.grid_height,onChange:t=>{e.setAttributes({grid_height:t})}}),_(f,{label:c("Column Spacing","porto-functionality"),value:o.gutter_size,onChange:t=>{e.setAttributes({gutter_size:t})},help:c("Enter value including any valid CSS unit, ex: 30px.","porto-functionality")}));const r="porto-grid-"+Math.ceil(1e4*Math.random());let s="";if(o.gutter_size){const t=o.gutter_size.replace(/[^.0-9]/g,""),e=o.gutter_size.replace(t,""+parseFloat(t)/2).replace(/<script.*?\/script>/g,"");s="."+r+" > .block-editor-inner-blocks > .block-editor-block-list__layout > div { padding: "+e+"}",s+="."+r+" > .block-editor-inner-blocks > .block-editor-block-list__layout{margin:-"+e+" -"+e+" "+e+"}"}var u=_("div",{className:"porto-grid-container "+r+("preset"==o.layout?" porto-preset-layout":"")+(o.className?" "+o.className:""),style:{minHeight:"200px"}},o.gutter_size&&_("style",{},s),_(p,{allowedBlocks:["porto/porto-grid-item"],initMasonry:this.initMasonry}));return _(n.Fragment,{},l,u)}},save:function(){return _(p.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(t,e,o,n,a,i,l,r){var s=t.__,c=e.registerBlockType,u=a.InnerBlocks,p=a.InspectorControls,d=o.createElement,_=o.Component,y=i.TextControl;c("porto/porto-grid-item",{title:"Porto Masonry Item",icon:"porto",category:"porto",parent:["porto/porto-grid-container"],attributes:{width:{type:"string"},initMasonry:{type:"function"}},edit:class extends _{constructor(){super(...arguments)}componentDidMount(){const t=this.props.attributes,e=this.props.clientId,o=window.portoBlockDocument().getElementById("block-"+e),n=jQuery(o);if(o.classList.add("porto-grid-item"),t.width){t.width.replace(/[0-9.]/g,"")||(t.width+="px"),n.closest(".porto-preset-layout").length||(o.style.width=t.width),o.setAttribute("data-width",t.width)}o.style.float="left";const a=n.closest(".block-editor-block-list__layout");if(n.closest(".porto-preset-layout").length&&a.length&&a.data("isotope")){const t=porto_block_vars.creative_layouts[Number(a.data("grid_layout"))];t[n.index()%t.length].split(" ").map((function(t){o.classList.add(t)})),o.style.width=(o.offsetWidth/o.parentNode.offsetWidth*100).toFixed(4)+"%",o.style.height=o.offsetHeight+"px"}a.data("isotope")&&(a.isotope("destroy"),a.isotope({masonry:{columnWidth:".grid-col-sizer"}}))}componentWillUnmount(){const t=this.props.clientId,e=jQuery("#block-"+t).closest(".block-editor-block-list__layout");e.data("isotope")&&setTimeout((function(){e.isotope("destroy"),e.isotope({masonry:{columnWidth:".grid-col-sizer"}})}),200)}componentDidUpdate(t,e){const o=this.props.attributes,n=this.props.clientId,a=window.portoBlockDocument().getElementById("block-"+n),i=jQuery(a).closest(".porto-grid-container").find(".block-editor-block-list__layout").eq(0);if(o.width!=t.attributes.width){if(o.width){o.width.replace(/[0-9.]/g,"")||(o.width+="px"),a.style.width=o.width}i.data("isotope")&&i.isotope("layout"),a.setAttribute("data-width",o.width)}a.classList.remove("porto-grid-item"),a.classList.add("porto-grid-item"),a.style.float="left"}render(){var t=this.props,e=t.attributes,n=d(p,{},d(y,{label:s("Width","porto-functionality"),value:e.width,onChange:e=>{t.setAttributes({width:e})},help:s("Enter value including any valid CSS unit, ex: 25%.","porto-functionality")}));var a=d("div",{className:e.className?" "+e.className:"",style:{}},d(u));return d(o.Fragment,{},n,a)}},save:function(){return d(u.Content)}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),function(e,o,n,l,r,s,c,u){const p=e.__,d=o.registerBlockType,_=r.InspectorControls,y=r.PanelColorSettings,f=s.PanelBody,m=n.createElement,g=n.useEffect,b=n.useState,h=s.TextControl,v=s.TextareaControl,w=s.SelectControl,C=s.RangeControl,x=s.ToggleControl,k=s.Disabled,A=wp.serverSideRender;if("1"==porto_block_vars.legacy_mode){d("porto/porto-products-widget",{title:"Porto Products Widget",icon:"porto",category:"porto",keywords:["list"],attributes:{title:{type:"string"},show:{type:"string",default:""},number:{type:"int",default:5},orderby:{type:"string",default:"date"},order:{type:"string",default:"desc"},hide_free:{type:"boolean",default:!1},show_hidden:{type:"boolean",default:!1}},edit:function(t){const e=t.attributes,o=t.name;var a=m(_,{},m(h,{label:p("Title","porto-functionality"),value:e.title,onChange:e=>{t.setAttributes({title:e})}}),m(w,{label:p("Show","porto-functionality"),value:e.show,options:porto_block_vars.status_values,onChange:e=>{t.setAttributes({show:e})}}),m(C,{label:p("Number","porto-functionality"),value:e.number,min:1,max:10,onChange:e=>{t.setAttributes({number:e})}}),"top_rated"!==e.show&&"recent_view"!==e.show&&m(w,{label:p("Order by","porto-functionality"),value:e.orderby,options:[{label:p("Date","porto-functionality"),value:"date"},{label:p("Price","porto-functionality"),value:"price"},{label:p("Total Sales","porto-functionality"),value:"sales"},{label:p("Random","porto-functionality"),value:"rand"}],onChange:e=>{t.setAttributes({orderby:e})}}),"top_rated"!==e.show&&"recent_view"!==e.show&&m(w,{label:p("Order","porto-functionality"),value:e.order,options:[{label:p("Descending","porto-functionality"),value:"desc"},{label:p("Ascending","porto-functionality"),value:"asc"}],onChange:e=>{t.setAttributes({order:e})}}),m(x,{label:p("Hide free products","porto-functionality"),checked:e.hide_free,onChange:e=>{t.setAttributes({hide_free:e})}}),m(x,{label:p("Show hidden products","porto-functionality"),checked:e.show_hidden,onChange:e=>{t.setAttributes({show_hidden:e})}})),i=m(k,{},m(A,{block:o,attributes:e}));return m(n.Fragment,{},a,i)},save:function(){return null}});const e=e=>{const o=e.attributes,i=e.name;g((()=>{const t=e.clientId,n=jQuery("#block-"+t+" .portfolio-row"),a=n.parent();if("timeline"!==o.portfolio_layout){let t;n.data("isotope")&&n.isotope("destroy"),n.children().each((function(t){this instanceof HTMLElement||Object.setPrototypeOf(this,HTMLElement.prototype)})),t="creative"===o.portfolio_layout?".grid-col-sizer":a.find(".portfolio:not(.w2)").length?".portfolio:not(.w2)":".portfolio",n.isotope({itemSelector:".portfolio",masonry:{columnWidth:t}}),n.isotope("layout"),n.isotope("on","layoutComplete",(function(){a.addClass("portfolio-iso-active")}))}}));const l=[];for(var r=1;r<=14;r++)l.push({alt:r,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+r+".jpg"});const s=[];"grid"!==o.portfolio_layout&&"masonry"!==o.portfolio_layout&&"timeline"!==o.portfolio_layout&&"creative"!==o.portfolio_layout&&"masonry-creative"!==o.portfolio_layout||"left-info-no-bg"!==o.info_view||(s.push({label:p("Info Color","porto-functionality"),value:o.info_color,onChange:function(t){return e.setAttributes({info_color:t})}}),o.custom_portfolios&&s.push({label:p("Info Color for custom portfolios","porto-functionality"),value:o.info_color2,onChange:function(t){return e.setAttributes({info_color2:t})}}));const c=React.createElement(_,null,React.createElement(f,{title:p("Portfolio Layout","porto-functionality"),initialOpen:!0},React.createElement(h,{label:p("Title","porto-functionality"),value:o.title,onChange:t=>{e.setAttributes({title:t})}}),React.createElement(w,{label:p("Portfolio Layout","porto-functionality"),value:o.portfolio_layout,options:porto_block_vars.portfolio_layouts,onChange:t=>{e.setAttributes({portfolio_layout:t})}}),"creative"==o.portfolio_layout&&React.createElement(t.default,{label:p("Creative Grid Layout","porto-functionality"),options:l,value:o.grid_layout,onChange:t=>{e.setAttributes({grid_layout:t})}}),"creative"==o.portfolio_layout&&React.createElement(h,{label:p("Grid Height","porto-functionality"),value:o.grid_height,onChange:t=>{e.setAttributes({grid_height:t})}}),("creative"==o.portfolio_layout||"masonry-creative"==o.portfolio_layout)&&React.createElement(C,{label:p("Column Spacing (px)","porto-functionality"),value:o.spacing,min:"0",max:"100",onChange:t=>{e.setAttributes({spacing:t})}}),"masonry-creative"===o.portfolio_layout&&React.createElement(w,{label:p("Masonry Layout","porto-functionality"),value:o.masonry_layout,options:[{label:"1",value:"1"}],onChange:t=>{e.setAttributes({masonry_layout:t})}}),("large"==o.portfolio_layout||"fullscreen"==o.portfolio_layout)&&React.createElement(h,{label:p("Content Animation","porto-functionality"),value:o.content_animation,onChange:t=>{e.setAttributes({content_animation:t})},help:p("Please check this url to see animation types.","porto-functionality")}),("large"==o.portfolio_layout||"fullscreen"==o.portfolio_layout)&&React.createElement("p",{style:{marginTop:-20}},React.createElement("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/animations/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/animations/")),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout)&&React.createElement(C,{label:p("Columns","porto-functionality"),value:o.columns,min:"1",max:"6",onChange:t=>{e.setAttributes({columns:t})}}),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout||"timeline"===o.portfolio_layout||"creative"===o.portfolio_layout||"masonry-creative"===o.portfolio_layout)&&React.createElement(w,{label:p("View Type","porto-functionality"),value:o.view,options:[{label:p("Standard","porto-functionality"),value:"classic"},{label:p("Default","porto-functionality"),value:"default"},{label:p("No Margin","porto-functionality"),value:"full"},{label:p("Out of Image","porto-functionality"),value:"outimage"}],onChange:t=>{e.setAttributes({view:t})}}),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout||"timeline"===o.portfolio_layout||"creative"===o.portfolio_layout||"masonry-creative"===o.portfolio_layout)&&React.createElement(w,{label:p("Info View Type","porto-functionality"),value:o.info_view,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Left Info","porto-functionality"),value:"left-info"},{label:p("Left Info & No bg","porto-functionality"),value:"left-info-no-bg"},{label:p("Centered Info","porto-functionality"),value:"centered-info"},{label:p("Bottom Info","porto-functionality"),value:"bottom-info"},{label:p("Bottom Info Dark","porto-functionality"),value:"bottom-info-dark"},{label:p("Hide Info Hover","porto-functionality"),value:"hide-info-hover"},{label:p("Plus Icon","porto-functionality"),value:"plus-icon"}],onChange:t=>{e.setAttributes({info_view:t})}}),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout||"timeline"===o.portfolio_layout||"creative"===o.portfolio_layout||"masonry-creative"===o.portfolio_layout)&&"left-info-no-bg"===o.info_view&&React.createElement(h,{label:p("Portfolio Indexes to use custom info color","porto-functionality"),value:o.custom_portfolios,onChange:t=>{e.setAttributes({custom_portfolios:t})},help:p("comma separated list of portfolio indexes","porto-functionality")}),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout||"timeline"===o.portfolio_layout||"creative"===o.portfolio_layout||"masonry-creative"===o.portfolio_layout)&&"left-info-no-bg"===o.info_view&&React.createElement(y,{title:p("Color Settings","porto-functionality"),initialOpen:!1,colorSettings:s}),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout||"timeline"===o.portfolio_layout||"creative"===o.portfolio_layout||"masonry-creative"===o.portfolio_layout)&&React.createElement(w,{label:p("Info View Type Style","porto-functionality"),value:o.info_view_type_style,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Alternate","porto-functionality"),value:"alternate-info"},{label:p("Alternate with Plus","porto-functionality"),value:"alternate-with-plus"},{label:p("No Style","porto-functionality"),value:"no-style"}],onChange:t=>{e.setAttributes({info_view_type_style:t})}}),React.createElement(w,{label:p("Image Size","porto-functionality"),value:o.image_size,options:porto_block_vars.image_sizes,onChange:t=>{e.setAttributes({image_size:t})}}),React.createElement(w,{label:p("Image Overlay Background","porto-functionality"),value:o.thumb_bg,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Darken","porto-functionality"),darken:"alternate-info"},{label:p("Lighten","porto-functionality"),value:"lighten"},{label:p("Transparent","porto-functionality"),value:"hide-wrapper-bg"}],onChange:t=>{e.setAttributes({thumb_bg:t})}}),React.createElement(w,{label:p("Hover Image Effect","porto-functionality"),value:o.thumb_image,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Zoom","porto-functionality"),darken:"zoom"},{label:p("Slow Zoom","porto-functionality"),value:"slow-zoom"},{label:p("No Zoom","porto-functionality"),value:"no-zoom"}],onChange:t=>{e.setAttributes({thumb_image:t})}}),("grid"===o.portfolio_layout||"masonry"===o.portfolio_layout||"timeline"===o.portfolio_layout)&&React.createElement(w,{label:p("Image Counter","porto-functionality"),value:o.image_counter,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Show","porto-functionality"),value:"show"},{label:p("Hide","porto-functionality"),value:"hide"}],onChange:t=>{e.setAttributes({image_counter:t})}}),React.createElement(w,{label:p("Show Image Lightbox Icon","porto-functionality"),value:o.show_lightbox_icon,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Show","porto-functionality"),value:"show"},{label:p("Hide","porto-functionality"),value:"hide"}],onChange:t=>{e.setAttributes({show_lightbox_icon:t})}})),React.createElement(f,{title:p("Portfolio Selector","porto-functionality"),initialOpen:!1},React.createElement(a.default,{label:p("Categories","porto-functionality"),value:o.cats,option:"portfolio_cat",multiple:"1",onChange:t=>{e.setAttributes({cats:t})}}),React.createElement(a.default,{label:p("Portfolios","porto-functionality"),value:o.post_in,option:"portfolio",multiple:"1",onChange:t=>{e.setAttributes({post_in:t})}}),React.createElement(w,{label:p("Order by","porto-functionality"),value:o.orderby,options:[{label:"",value:""},{label:p("Date","porto-functionality"),value:"date"},{label:p("ID","porto-functionality"),value:"ID"},{label:p("Author","porto-functionality"),value:"author"},{label:p("Title","porto-functionality"),value:"title"},{label:p("Modified","porto-functionality"),value:"modified"},{label:p("Random","porto-functionality"),value:"rand"},{label:p("Comment count","porto-functionality"),value:"comment_count"},{label:p("Menu order","porto-functionality"),value:"menu_order"}],onChange:t=>{e.setAttributes({orderby:t})}}),React.createElement(w,{label:p("Order way","porto-functionality"),value:o.order,options:[{label:"",value:""},{label:p("Descending","porto-functionality"),value:"desc"},{label:p("Ascending","porto-functionality"),value:"asc"}],onChange:t=>{e.setAttributes({order:t})}}),React.createElement(a.default,{label:p("Slider on Portfolio","porto-functionality"),value:o.slider,option:"portfolio",multiple:"1",help:p("Will Only work with ajax on page settings","porto-functionality"),onChange:t=>{e.setAttributes({slider:t})}}),React.createElement(C,{label:p("Portfolio Count","porto-functionality"),value:o.number,min:"0",max:"32",onChange:t=>{e.setAttributes({number:t})}}),React.createElement(C,{label:p("Excerpt Length","porto-functionality"),value:o.excerpt_length,min:"1",max:"100",onChange:t=>{e.setAttributes({excerpt_length:t})}}),React.createElement(w,{label:p("Load More Posts","porto-functionality"),value:o.load_more_posts,options:[{label:p("Select","porto-functionality"),value:""},{label:p("Pagination","porto-functionality"),value:"pagination"},{label:p("Load More (Button)","porto-functionality"),value:"load-more-btn"}],onChange:t=>{e.setAttributes({load_more_posts:t})}}),React.createElement(x,{label:p("Show Archive Link","porto-functionality"),checked:o.view_more,onChange:t=>{e.setAttributes({view_more:t})}}),o.view_more&&React.createElement(h,{label:p("Extra class name for Archive Link","porto-functionality"),value:o.view_more_class,onChange:t=>{e.setAttributes({view_more_class:t})}}),React.createElement(x,{label:p("Show Filter","porto-functionality"),checked:o.filter,onChange:t=>{e.setAttributes({filter:t})}}),o.filter&&React.createElement(w,{label:p("Filter Style","porto-functionality"),value:o.filter_style,options:[{label:p("Style 1","porto-functionality"),value:""},{label:p("Style 2","porto-functionality"),value:"style-2"},{label:p("Style 3","porto-functionality"),value:"style-3"}],onChange:t=>{e.setAttributes({filter_style:t})}}),React.createElement(x,{label:p("Enable Ajax Load","porto-functionality"),checked:o.ajax_load,onChange:t=>{e.setAttributes({ajax_load:t})}}),o.ajax_load&&React.createElement(x,{label:p("Ajax Load on Modal","porto-functionality"),checked:o.ajax_modal,onChange:t=>{e.setAttributes({ajax_modal:t})}})));o.el_class=o.className;var u=React.createElement(k,null,React.createElement(A,{block:i,attributes:o}));return m(n.Fragment,{},c,u)};d("porto/porto-portfolios",{title:p("Porto Portfolios","porto-functionality"),icon:"porto",category:"porto",attributes:{title:{type:"string"},portfolio_layout:{type:"string",default:"timeline"},grid_layout:{type:"int",default:1},grid_height:{type:"string",default:"600px"},spacing:{type:"int"},masonry_layout:{type:"int",default:1},content_animation:{type:"string"},columns:{type:"int",default:3},view:{type:"string",default:"classic"},info_view:{type:"string",default:""},info_color_2:{type:"string"},custom_portfolios:{type:"string"},info_color2:{type:"string"},info_view_type_style:{type:"string",default:""},image_size:{type:"string"},thumb_bg:{type:"string",default:""},thumb_image:{type:"string",default:""},image_counter:{type:"string",default:""},show_lightbox_icon:{type:"string",default:""},cats:{type:"string"},post_in:{type:"string"},orderby:{type:"string"},order:{type:"string"},slider:{type:"string"},number:{type:"int",default:8},excerpt_length:{type:"int"},load_more_posts:{type:"string",default:""},view_more:{type:"boolean"},view_more_class:{type:"string"},filter:{type:"boolean"},filter_style:{type:"string",default:""},ajax_load:{type:"boolean"},ajax_modal:{type:"boolean"}},edit:e,save:function(){return null}});const o=t=>{const e=t.attributes,o=t.name,i=[];for(var l=1;l<=14;l++)i.push({alt:l,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+l+".jpg"});const r=[];"grid"!==e.portfolio_layout&&"masonry"!==e.portfolio_layout&&"timeline"!==e.portfolio_layout&&"creative"!==e.portfolio_layout&&"masonry-creative"!==e.portfolio_layout||"left-info-no-bg"!==e.info_view||(r.push({label:p("Info Color","porto-functionality"),value:e.info_color,onChange:function(e){return t.setAttributes({info_color:e})}}),e.custom_portfolios&&r.push({label:p("Info Color for custom portfolios","porto-functionality"),value:e.info_color2,onChange:function(e){return t.setAttributes({info_color2:e})}}));const s=React.createElement(_,null,React.createElement(f,{title:p("Portfolio Layout","porto-functionality"),initialOpen:!0},React.createElement(h,{label:p("Title","porto-functionality"),value:e.title,onChange:e=>{t.setAttributes({title:e})}}),React.createElement(w,{label:p("View Type","porto-functionality"),value:e.view,options:[{label:p("Standard","porto-functionality"),value:"classic"},{label:p("Default","porto-functionality"),value:"default"},{label:p("No Margin","porto-functionality"),value:"full"},{label:p("Out of Image","porto-functionality"),value:"outimage"}],onChange:e=>{t.setAttributes({view:e})}}),React.createElement(w,{label:p("Info View Type","porto-functionality"),value:e.info_view,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Left Info","porto-functionality"),value:"left-info"},{label:p("Left Info & No bg","porto-functionality"),value:"left-info-no-bg"},{label:p("Centered Info","porto-functionality"),value:"centered-info"},{label:p("Bottom Info","porto-functionality"),value:"bottom-info"},{label:p("Bottom Info Dark","porto-functionality"),value:"bottom-info-dark"},{label:p("Hide Info Hover","porto-functionality"),value:"hide-info-hover"},{label:p("Plus Icon","porto-functionality"),value:"plus-icon"}],onChange:e=>{t.setAttributes({info_view:e})}}),React.createElement(w,{label:p("Image Size","porto-functionality"),value:e.image_size,options:porto_block_vars.image_sizes,onChange:e=>{t.setAttributes({image_size:e})}}),React.createElement(w,{label:p("Image Overlay Background","porto-functionality"),value:e.thumb_bg,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Darken","porto-functionality"),darken:"alternate-info"},{label:p("Lighten","porto-functionality"),value:"lighten"},{label:p("Transparent","porto-functionality"),value:"hide-wrapper-bg"}],onChange:e=>{t.setAttributes({thumb_bg:e})}}),React.createElement(w,{label:p("Hover Image Effect","porto-functionality"),value:e.thumb_image,options:[{label:p("Standard","porto-functionality"),value:""},{label:p("Zoom","porto-functionality"),darken:"zoom"},{label:p("Slow Zoom","porto-functionality"),value:"slow-zoom"},{label:p("No Zoom","porto-functionality"),value:"no-zoom"}],onChange:e=>{t.setAttributes({thumb_image:e})}}),React.createElement(x,{label:p("Enable Ajax Load","porto-functionality"),checked:e.ajax_load,onChange:e=>{t.setAttributes({ajax_load:e})}}),e.ajax_load&&React.createElement(x,{label:p("Ajax Load on Modal","porto-functionality"),checked:e.ajax_modal,onChange:e=>{t.setAttributes({ajax_modal:e})}}),React.createElement(C,{label:p("Portfolio Count","porto-functionality"),value:e.number,min:"0",max:"32",onChange:e=>{t.setAttributes({number:e})}}),React.createElement(a.default,{label:p("Categories","porto-functionality"),value:e.cats,option:"portfolio_cat",multiple:"1",onChange:e=>{t.setAttributes({cats:e})}}),React.createElement(a.default,{label:p("Portfolios","porto-functionality"),value:e.post_in,option:"portfolio",multiple:"1",onChange:e=>{t.setAttributes({post_in:e})}}),React.createElement(C,{label:p("Items to show on Large Desktop","porto-functionality"),value:e.items,min:"1",max:"8",onChange:e=>{t.setAttributes({items:e})}}),React.createElement(C,{label:p("Items to show on Desktop","porto-functionality"),value:e.items_desktop,min:"1",max:"8",onChange:e=>{t.setAttributes({items_desktop:e})}}),React.createElement(C,{label:p("Items to show on Tablets","porto-functionality"),value:e.items_tablets,min:"1",max:"6",onChange:e=>{t.setAttributes({items_tablets:e})}}),React.createElement(C,{label:p("Items to show on Mobile","porto-functionality"),value:e.items_mobile,min:"1",max:"4",onChange:e=>{t.setAttributes({items_mobile:e})}}),React.createElement(C,{label:p("Items Row","porto-functionality"),value:e.items_row,min:"1",max:"4",onChange:e=>{t.setAttributes({items_row:e})}})),React.createElement(f,{title:p("Slider Options","porto-functionality"),initialOpen:!1},React.createElement(x,{label:p("Change Slider Options","porto-functionality"),checked:e.slider_config,onChange:e=>{t.setAttributes({slider_config:e})}}),e.slider_config&&React.createElement(x,{label:p("Show Slider Navigation","porto-functionality"),checked:e.show_nav,onChange:e=>{t.setAttributes({show_nav:e})}}),e.slider_config&&e.show_nav&&React.createElement(w,{label:p("Nav Position","porto-functionality"),value:e.nav_pos,options:[{label:p("Middle","porto-functionality"),value:""},{label:p("Middle of Images","porto-functionality"),value:"nav-center-images-only"},{label:p("Top","porto-functionality"),value:"show-nav-title"},{label:p("Bottom","porto-functionality"),value:"nav-bottom"}],onChange:e=>{t.setAttributes({nav_pos:e})}}),e.slider_config&&e.show_nav&&(""===e.nav_pos||"nav-center-images-only"===e.nav_pos)&&React.createElement(w,{label:p("Nav Inside/Outside?","porto-functionality"),value:e.nav_pos2,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Inside","porto-functionality"),value:"nav-pos-inside"},{label:p("Outside","porto-functionality"),value:"nav-pos-outside"}],onChange:e=>{t.setAttributes({nav_pos2:e})}}),e.slider_config&&e.show_nav&&(""===e.nav_pos||"nav-bottom"===e.nav_pos||"nav-center-images-only"===e.nav_pos)&&React.createElement(w,{label:p("Nav Type","porto-functionality"),value:e.nav_type,options:porto_block_vars.carousel_nav_types,onChange:e=>{t.setAttributes({nav_type:e})}}),e.slider_config&&e.show_nav&&React.createElement(x,{label:p("Show Nav on Hover","porto-functionality"),checked:e.show_nav_hover,onChange:e=>{t.setAttributes({show_nav_hover:e})}}),e.slider_config&&React.createElement(x,{label:p("Show Slider Pagination","porto-functionality"),checked:e.show_dots,onChange:e=>{t.setAttributes({show_dots:e})}}),e.slider_config&&e.show_dots&&React.createElement(w,{label:p("Dots Position","porto-functionality"),value:e.dots_pos,options:[{label:p("Bottom","porto-functionality"),value:""},{label:p("Top right","porto-functionality"),value:"show-dots-title-right"}],onChange:e=>{t.setAttributes({dots_pos:e})}}),e.slider_config&&e.show_dots&&React.createElement(w,{label:p("Dots Style","porto-functionality"),value:e.dots_style,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Circle inner dot","porto-functionality"),value:"dots-style-1"}],onChange:e=>{t.setAttributes({dots_style:e})}}),e.slider_config&&React.createElement(w,{label:p("Auto Play","porto-functionality"),value:e.autoplay,options:[{label:p("Theme Options","porto-functionality"),value:""},{label:p("Yes","porto-functionality"),value:"yes"},{label:p("No","porto-functionality"),value:"no"}],onChange:e=>{t.setAttributes({autoplay:e})}}),e.slider_config&&React.createElement(C,{label:p("Auto Play Timeout (ms)","porto-functionality"),value:e.autoplay_timeout,min:"1000",max:"20000",step:"500",onChange:e=>{t.setAttributes({autoplay_timeout:e})}})));e.el_class=e.className;var c=React.createElement(k,null,React.createElement(A,{block:o,attributes:e}));return m(n.Fragment,{},s,c)};d("porto/porto-recent-portfolios",{title:p("Porto Recent Portfolios","porto-functionality"),icon:"porto",category:"porto",keywords:["slider"],attributes:{title:{type:"string"},view:{type:"string",default:"classic"},info_view:{type:"string",default:""},image_size:{type:"string"},thumb_bg:{type:"string",default:""},thumb_image:{type:"string",default:""},ajax_load:{type:"boolean"},ajax_modal:{type:"boolean"},number:{type:"int",default:8},cats:{type:"string"},post_in:{type:"string"},items:{type:"int"},items_desktop:{type:"int",default:4},items_tablets:{type:"int",default:3},items_mobile:{type:"int",default:2},items_row:{type:"int",default:1},slider_config:{type:"boolean",default:!1},show_nav:{type:"boolean",default:!1},show_nav_hover:{type:"boolean",default:!1},nav_pos:{type:"string",default:""},nav_pos2:{type:"string"},nav_type:{type:"string"},show_dots:{type:"boolean",default:!1},dots_pos:{type:"string"},dots_style:{type:"string"},autoplay:{type:"boolean",default:!1},autoplay_timeout:{type:"int",default:5e3}},edit:o,save:function(){return null}});const i=t=>{const e=t.attributes,o=t.name,i=[];for(var l=1;l<=14;l++)i.push({alt:l,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+l+".jpg"});const r=[];"grid"!==e.portfolio_layout&&"masonry"!==e.portfolio_layout&&"timeline"!==e.portfolio_layout&&"creative"!==e.portfolio_layout&&"masonry-creative"!==e.portfolio_layout||"left-info-no-bg"!==e.info_view||(r.push({label:p("Info Color","porto-functionality"),value:e.info_color,onChange:function(e){return t.setAttributes({info_color:e})}}),e.custom_portfolios&&r.push({label:p("Info Color for custom portfolios","porto-functionality"),value:e.info_color2,onChange:function(e){return t.setAttributes({info_color2:e})}}));const s=React.createElement(_,null,React.createElement(f,{title:p("Member Layout","porto-functionality"),initialOpen:!0},React.createElement(h,{label:p("Title","porto-functionality"),value:e.title,onChange:e=>{t.setAttributes({title:e})}}),React.createElement(w,{label:p("Style","porto-functionality"),value:e.style,options:[{label:p("Baisc","porto-functionality"),value:""},{label:p("Advanced","porto-functionality"),value:"advanced"}],onChange:e=>{t.setAttributes({style:e})}}),""===e.style&&React.createElement(C,{label:p("Columns","porto-functionality"),value:e.columns,min:"1",max:"6",onChange:e=>{t.setAttributes({columns:e})}}),""===e.style&&React.createElement(w,{label:p("View Type","porto-functionality"),value:e.view,options:porto_block_vars.member_layouts,onChange:e=>{t.setAttributes({view:e})}}),React.createElement(w,{label:p("Hover Image Effect","porto-functionality"),value:e.hover_image_effect,options:[{label:p("Zoom","porto-functionality"),value:"zoom"},{label:p("No_Zoom","porto-functionality"),value:"no_zoom"}],onChange:e=>{t.setAttributes({hover_image_effect:e})}}),""===e.style&&React.createElement(x,{label:p("Show Overview","porto-functionality"),checked:e.overview,onChange:e=>{t.setAttributes({overview:e})}}),React.createElement(x,{label:p("Show Social Links","porto-functionality"),checked:e.socials,onChange:e=>{t.setAttributes({socials:e})}}),"outimage_cat"===e.view&&React.createElement(x,{label:p("Show Role","porto-functionality"),checked:e.role,onChange:e=>{t.setAttributes({role:e})}})),React.createElement(f,{title:p("Members Selector","porto-functionality"),initialOpen:!1},React.createElement(a.default,{label:p("Categories","porto-functionality"),value:e.cats,option:"member_cat",multiple:"1",onChange:e=>{t.setAttributes({cats:e})}}),React.createElement(a.default,{label:p("Members","porto-functionality"),value:e.post_in,option:"member",multiple:"1",onChange:e=>{t.setAttributes({post_in:e})}}),React.createElement(C,{label:p("Member Count","porto-functionality"),value:e.number,min:"0",max:"32",onChange:e=>{t.setAttributes({number:e})}}),React.createElement(x,{label:p("Show Archive Link","porto-functionality"),checked:e.view_more,onChange:e=>{t.setAttributes({view_more:e})}}),e.view_more&&React.createElement(h,{label:p("Extra class name for Archive Link","porto-functionality"),value:e.view_more_class,onChange:e=>{t.setAttributes({view_more_class:e})}}),React.createElement(x,{label:p("Show Pagination","porto-functionality"),checked:e.pagination,onChange:e=>{t.setAttributes({pagination:e})}}),React.createElement(x,{label:p("Show Filter","porto-functionality"),checked:e.filter,onChange:e=>{t.setAttributes({filter:e})}}),React.createElement(x,{label:p("Enable Ajax Load","porto-functionality"),checked:e.ajax_load,onChange:e=>{t.setAttributes({ajax_load:e})}}),e.ajax_load&&React.createElement(x,{label:p("Ajax Load on Modal","porto-functionality"),checked:e.ajax_modal,onChange:e=>{t.setAttributes({ajax_modal:e})}})));e.el_class=e.className;var c=React.createElement(k,null,React.createElement(A,{block:o,attributes:e}));return m(n.Fragment,{},s,c)};d("porto/porto-members",{title:p("Porto Members","porto-functionality"),icon:"porto",category:"porto",keywords:["team","person"],attributes:{title:{type:"string"},style:{type:"string",default:""},columns:{type:"int",default:4},view:{type:"string",default:"classic"},hover_image_effect:{type:"string",default:"zoom"},overview:{type:"boolean",default:!0},socials:{type:"boolean",default:!0},role:{type:"boolean"},cats:{type:"string"},post_in:{type:"string"},number:{type:"int",default:8},view_more:{type:"boolean"},view_more_class:{type:"string"},pagination:{type:"boolean"},filter:{type:"boolean"},ajax_load:{type:"boolean"},ajax_modal:{type:"boolean"}},edit:i,save:function(){return null}});const l=t=>{const e=t.attributes,o=t.name,i=[];for(var l=1;l<=14;l++)i.push({alt:l,src:porto_block_vars.shortcodes_url+"assets/images/cg/"+l+".jpg"});const r=[];"grid"!==e.portfolio_layout&&"masonry"!==e.portfolio_layout&&"timeline"!==e.portfolio_layout&&"creative"!==e.portfolio_layout&&"masonry-creative"!==e.portfolio_layout||"left-info-no-bg"!==e.info_view||(r.push({label:p("Info Color","porto-functionality"),value:e.info_color,onChange:function(e){return t.setAttributes({info_color:e})}}),e.custom_portfolios&&r.push({label:p("Info Color for custom portfolios","porto-functionality"),value:e.info_color2,onChange:function(e){return t.setAttributes({info_color2:e})}}));const s=React.createElement(_,null,React.createElement(f,{title:p("Member Layout","porto-functionality"),initialOpen:!0},React.createElement(h,{label:p("Title","porto-functionality"),value:e.title,onChange:e=>{t.setAttributes({title:e})}}),React.createElement(w,{label:p("View Type","porto-functionality"),value:e.view,options:porto_block_vars.member_layouts,onChange:e=>{t.setAttributes({view:e})}}),React.createElement(w,{label:p("Hover Image Effect","porto-functionality"),value:e.hover_image_effect,options:[{label:p("Zoom","porto-functionality"),value:"zoom"},{label:p("No_Zoom","porto-functionality"),value:"no_zoom"}],onChange:e=>{t.setAttributes({hover_image_effect:e})}}),React.createElement(x,{label:p("Show Overview","porto-functionality"),checked:e.overview,onChange:e=>{t.setAttributes({overview:e})}}),React.createElement(x,{label:p("Show Social Links","porto-functionality"),checked:e.socials,onChange:e=>{t.setAttributes({socials:e})}}),e.socials&&React.createElement(x,{label:p("Use Social Links Advance Style","porto-functionality"),checked:e.socials_style,onChange:e=>{t.setAttributes({socials_style:e})}}),React.createElement(C,{label:p("Column Spacing (px)","porto-functionality"),value:e.spacing,min:"0",max:"100",onChange:e=>{t.setAttributes({spacing:e})}}),React.createElement(C,{label:p("Items to show on Large Desktop","porto-functionality"),value:e.items,min:"1",max:"8",onChange:e=>{t.setAttributes({items:e})}}),React.createElement(C,{label:p("Items to show on Desktop","porto-functionality"),value:e.items_desktop,min:"1",max:"8",onChange:e=>{t.setAttributes({items_desktop:e})}}),React.createElement(C,{label:p("Items to show on Tablets","porto-functionality"),value:e.items_tablets,min:"1",max:"6",onChange:e=>{t.setAttributes({items_tablets:e})}}),React.createElement(C,{label:p("Items to show on Mobile","porto-functionality"),value:e.items_mobile,min:"1",max:"4",onChange:e=>{t.setAttributes({items_mobile:e})}}),React.createElement(C,{label:p("Items Row","porto-functionality"),value:e.items_row,min:"1",max:"4",onChange:e=>{t.setAttributes({items_row:e})}}),React.createElement(a.default,{label:p("Categories","porto-functionality"),value:e.cats,option:"member_cat",multiple:"1",onChange:e=>{t.setAttributes({cats:e})}}),React.createElement(C,{label:p("Members Count","porto-functionality"),value:e.number,min:"0",max:"32",onChange:e=>{t.setAttributes({number:e})}}),React.createElement(x,{label:p("Enable Ajax Load","porto-functionality"),checked:e.ajax_load,onChange:e=>{t.setAttributes({ajax_load:e})}}),e.ajax_load&&React.createElement(x,{label:p("Ajax Load on Modal","porto-functionality"),checked:e.ajax_modal,onChange:e=>{t.setAttributes({ajax_modal:e})}})),React.createElement(f,{title:p("Slider Options","porto-functionality"),initialOpen:!1},React.createElement(C,{label:p("Stage Padding (px)","porto-functionality"),value:e.stage_padding,min:"0",max:"100",onChange:e=>{t.setAttributes({stage_padding:e})}}),React.createElement(x,{label:p("Change Slider Options","porto-functionality"),checked:e.slider_config,onChange:e=>{t.setAttributes({slider_config:e})}}),e.slider_config&&React.createElement(x,{label:p("Show Slider Navigation","porto-functionality"),checked:e.show_nav,onChange:e=>{t.setAttributes({show_nav:e})}}),e.slider_config&&e.show_nav&&React.createElement(w,{label:p("Nav Position","porto-functionality"),value:e.nav_pos,options:[{label:p("Middle","porto-functionality"),value:""},{label:p("Middle of Images","porto-functionality"),value:"nav-center-images-only"},{label:p("Top","porto-functionality"),value:"show-nav-title"},{label:p("Bottom","porto-functionality"),value:"nav-bottom"}],onChange:e=>{t.setAttributes({nav_pos:e})}}),e.slider_config&&e.show_nav&&(""===e.nav_pos||"nav-center-images-only"===e.nav_pos)&&React.createElement(w,{label:p("Nav Inside/Outside?","porto-functionality"),value:e.nav_pos2,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Inside","porto-functionality"),value:"nav-pos-inside"},{label:p("Outside","porto-functionality"),value:"nav-pos-outside"}],onChange:e=>{t.setAttributes({nav_pos2:e})}}),e.slider_config&&e.show_nav&&(""===e.nav_pos||"nav-bottom"===e.nav_pos||"nav-center-images-only"===e.nav_pos)&&React.createElement(w,{label:p("Nav Type","porto-functionality"),value:e.nav_type,options:porto_block_vars.carousel_nav_types,onChange:e=>{t.setAttributes({nav_type:e})}}),e.slider_config&&e.show_nav&&React.createElement(x,{label:p("Show Nav on Hover","porto-functionality"),checked:e.show_nav_hover,onChange:e=>{t.setAttributes({show_nav_hover:e})}}),e.slider_config&&React.createElement(x,{label:p("Show Slider Pagination","porto-functionality"),checked:e.show_dots,onChange:e=>{t.setAttributes({show_dots:e})}}),e.slider_config&&e.show_dots&&React.createElement(w,{label:p("Dots Position","porto-functionality"),value:e.dots_pos,options:[{label:p("Bottom","porto-functionality"),value:""},{label:p("Top right","porto-functionality"),value:"show-dots-title-right"}],onChange:e=>{t.setAttributes({dots_pos:e})}}),e.slider_config&&e.show_dots&&React.createElement(w,{label:p("Dots Style","porto-functionality"),value:e.dots_style,options:[{label:p("Default","porto-functionality"),value:""},{label:p("Circle inner dot","porto-functionality"),value:"dots-style-1"}],onChange:e=>{t.setAttributes({dots_style:e})}}),e.slider_config&&React.createElement(w,{label:p("Auto Play","porto-functionality"),value:e.autoplay,options:[{label:p("Theme Options","porto-functionality"),value:""},{label:p("Yes","porto-functionality"),value:"yes"},{label:p("No","porto-functionality"),value:"no"}],onChange:e=>{t.setAttributes({autoplay:e})}}),e.slider_config&&React.createElement(C,{label:p("Auto Play Timeout (ms)","porto-functionality"),value:e.autoplay_timeout,min:"1000",max:"20000",step:"500",onChange:e=>{t.setAttributes({autoplay_timeout:e})}})));e.el_class=e.className;var c=React.createElement(k,null,React.createElement(A,{block:o,attributes:e}));return m(n.Fragment,{},s,c)};d("porto/porto-recent-members",{title:p("Porto Members Carousel","porto-functionality"),icon:"porto",category:"porto",keywords:["slider","team","person"],attributes:{title:{type:"string"},view:{type:"string",default:"classic"},hover_image_effect:{type:"string",default:"zoom"},overview:{type:"boolean",default:!0},socials:{type:"boolean",default:!0},socials_style:{type:"boolean",default:!0},spacing:{type:"int"},items:{type:"int"},items_desktop:{type:"int",default:4},items_tablets:{type:"int",default:3},items_mobile:{type:"int",default:2},items_row:{type:"int",default:1},cats:{type:"string"},number:{type:"int",default:8},ajax_load:{type:"boolean"},ajax_modal:{type:"boolean"},slider_config:{type:"boolean",default:!1},show_nav:{type:"boolean",default:!1},show_nav_hover:{type:"boolean",default:!1},nav_pos:{type:"string",default:""},nav_pos2:{type:"string"},nav_type:{type:"string"},show_dots:{type:"boolean",default:!1},dots_pos:{type:"string"},dots_style:{type:"string"},autoplay:{type:"boolean",default:!1},autoplay_timeout:{type:"int",default:5e3}},edit:l,save:function(){return null}})}d("porto/porto-sidebar-menu",{title:p("Porto Sidebar Menu","porto-functionality"),icon:"porto",category:"porto",attributes:{title:{type:"string"},nav_menu:{type:"string",default:""}},edit:function(t){const e=t.attributes,o=t.name,[a,i]=b([{label:p("Select a menu","porto-functionality"),value:""}]);g((()=>{wp.apiFetch({path:"/ajaxselect2/v1/nav_menu/"}).then((function(t){if(t&&t.results){let e=[{label:p("Select a menu","porto-functionality"),value:""}];t.results.map((function(t,o){e.push({label:t.text,value:t.id})})),i(e)}}))}),[]);var l=m(_,{},m(h,{label:p("Title","porto-functionality"),value:e.title,onChange:e=>{t.setAttributes({title:e})}}),m(w,{label:p("Nav menu","porto-functionality"),value:e.nav_menu,options:a,onChange:e=>{t.setAttributes({nav_menu:e})}}));e.el_class=e.className;var r=m(k,{},m(A,{block:o,attributes:e}));return m(n.Fragment,{},l,r)},save:function(){return null}});d("porto/porto-hotspot",{title:p("Porto Hot Spot","porto-functionality"),icon:"porto",category:"porto",attributes:{type:{type:"string",default:"html"},content:{type:"string",default:""},id:{type:"int"},addlinks_pos:{type:"string",default:""},block:{type:"int"},icon:{type:"string",default:""},pos:{type:"string",default:"right"},x:{type:"int"},y:{type:"int"},size:{type:"string"},icon_size:{type:"string"},color:{type:"string"},bg_color:{type:"string"}},edit:t=>{const e=t.attributes,o=t.name,i=React.createElement(_,null,React.createElement(f,{title:p("Layout","porto-functionality"),initialOpen:!0},React.createElement(w,{label:p("Content Type","porto-functionality"),value:e.type,options:[{label:p("HTML","porto-functionality"),value:"html"},{label:p("Product","porto-functionality"),value:"product"},{label:p("Block","porto-functionality"),value:"block"}],onChange:e=>{t.setAttributes({type:e})}}),"html"===e.type&&React.createElement(v,{label:p("HTML Content","porto-functionality"),value:e.content,onChange:e=>{t.setAttributes({content:e})}}),"product"===e.type&&React.createElement(a.default,{label:p("Product","porto-functionality"),value:e.id,option:"product",onChange:e=>{t.setAttributes({id:Number(e)})}}),"product"===e.type&&React.createElement(w,{label:p("Add Links Position","porto-functionality"),value:e.addlinks_pos,options:porto_block_vars.product_layouts,onChange:t=>{setAttributes({addlinks_pos:t})}}),"block"===e.type&&React.createElement(a.default,{label:p("Block","porto-functionality"),value:e.block,option:"porto_builder",onChange:e=>{t.setAttributes({block:Number(e)})}}),React.createElement(h,{label:p("Icon Class","porto-functionality"),value:e.icon,onChange:e=>{t.setAttributes({icon:e})},help:p("Please check this url to see icons which Porto supports. ","porto-functionality")}),React.createElement("p",{style:{marginTop:-14}},React.createElement("a",{href:"https://www.portotheme.com/wordpress/porto/shortcodes/icons/",target:"_blank"},"https://www.portotheme.com/wordpress/porto/shortcodes/icons/")),React.createElement(w,{label:p("Popup position","porto-functionality"),value:e.pos,options:[{label:p("Top","porto-functionality"),value:"top"},{label:p("Right","porto-functionality"),value:"right"},{label:p("Bottom","porto-functionality"),value:"bottom"},{label:p("Left","porto-functionality"),value:"left"}],onChange:e=>{t.setAttributes({pos:e})}})),React.createElement(f,{title:p("Style","porto-functionality"),initialOpen:!1},React.createElement(C,{label:p("Horizontal Position (%)","porto-functionality"),value:e.x,min:"0",max:"100",onChange:e=>{t.setAttributes({x:e})}}),React.createElement(C,{label:p("Vertical Position (%)","porto-functionality"),value:e.y,min:"0",max:"100",onChange:e=>{t.setAttributes({y:e})}}),React.createElement(h,{label:p("Spot Size","porto-functionality"),value:e.size,help:p("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({size:e})}}),React.createElement(h,{label:p("Icon Size","porto-functionality"),value:e.icon_size,help:p("Enter value including any valid CSS unit, ex: 30px.","porto-functionality"),onChange:e=>{t.setAttributes({icon_size:e})}}),React.createElement(y,{title:p("Color Settings","porto-functionality"),initialOpen:!1,colorSettings:[{label:p("Icon Color","porto-functionality"),value:e.color,onChange:function(e){return t.setAttributes({color:e})}},{label:p("Background Color","porto-functionality"),value:e.bg_color,onChange:function(e){return t.setAttributes({bg_color:e})}}]})));e.el_class=e.className;var l=React.createElement(k,null,React.createElement(A,{block:o,attributes:e}));return m(n.Fragment,{},i,l)},save:function(){return null}});d("porto/porto-svg-floating",{title:p("Porto Svg Floating","porto-functionality"),icon:"porto",category:"porto",attributes:{float_svg:{type:"string"},float_path:{type:"string"},float_duration:{type:"int",default:1e4},float_easing:{type:"string",default:"easingQuadraticInOut"},float_repeat:{type:"int",default:20},float_repeat_delay:{type:"int",default:1e3},float_yoyo:{type:"boolean",default:!0},page_builder:{type:"string",default:"gutenberg"}},edit:t=>{const e=t.attributes,o=React.createElement(_,null,React.createElement(f,{title:p("General","porto-functionality"),initialOpen:!0},React.createElement(v,{label:p("Please writer your svg code.","porto-functionality"),value:e.float_svg,onChange:e=>{t.setAttributes({float_svg:e})}}),React.createElement(h,{label:p("Please write floating path id using comma. like #path1, #path2.","porto-functionality"),value:e.float_path,onChange:e=>{t.setAttributes({float_path:e})}}),React.createElement(C,{label:p("Floating Duration","porto-functionality"),value:e.float_duration,min:"0",max:"99999",onChange:e=>{t.setAttributes({float_duration:e})}}),React.createElement(w,{label:p("Easing Method","porto-functionality"),value:e.float_easing,options:porto_block_vars.easing_methods,onChange:e=>{t.setAttributes({float_easing:e})}}),React.createElement(C,{label:p("Floating Repeat","porto-functionality"),value:e.float_repeat,min:"0",max:"10000",onChange:e=>{t.setAttributes({float_repeat:e})}}),React.createElement(C,{label:p("Repeat Delay","porto-functionality"),value:e.float_repeat_delay,min:"0",max:"100000",onChange:e=>{t.setAttributes({float_repeat_delay:e})}}),React.createElement(x,{label:p("yoyo","porto-functionality"),checked:e.float_yoyo,onChange:e=>{t.setAttributes({float_yoyo:e})}})));e.el_class=e.className;var a=e.float_path,i="jQuery(document).ready(function($) {if (typeof KUTE != 'undefined') {";a&&"string"==typeof a&&(a=a.split(",")).map((function(t){""!=t&&(i+=`if( $('${t}').get(0) ) {`,i+=`var shape1 = KUTE.fromTo(${t},{`,i+=`'path': ${t},`,i+="}, {",i+=`'path': ${t}.replace('start',end)`,i+="}, {",i+=`'duration': ${e.float_duration},`,i+=`'easing': ${e.float_easing},`,i+=`'repeat': ${e.float_repeat},`,i+=`'repeatDelay': ${e.float_repeat_delay},`,i+=`'yoyo': ${e.float_yoyo},`,i+="}).start();",i+="}")})),i+="}});";var l=React.createElement(React.Fragment,null,React.createElement("div",{className:e.el_class,dangerouslySetInnerHTML:{__html:e.float_svg}}),a&&a.length>0&&React.createElement("script",{dangerouslySetInnerHTML:{__html:i}}));return m(n.Fragment,{},o,l)},save:function(){return null}});d("porto/porto-page-content",{title:p("Porto Page Content","porto-functionality"),description:p("This will displays the content of a post and page.","porto-functionality"),icon:"porto",category:"porto",apiVersion:2,edit:function(t){return React.createElement("div",{class:"porto-page-content"},React.createElement("span",null,p("This is Porto Page Content Block. It will displays the content of a post and page. This block is available only for Gutenberg Full Site Editing Mode. That might be different from the frontend.","porto-functionality")))},save:function(){return null}});var S=s.DateTimePicker,R=!0;d("porto/porto-countdown",{title:p("Porto Count Down","porto-functionality"),description:p("This displays count down timer.","porto-functionality"),icon:"porto",category:"porto",attributes:{count_style:{type:"string"},enable_dynamic_date:{type:"boolean"},dynamic_content:{type:"object"},datetime:{type:"string"},porto_tz:{type:"string"},countdown_opts:{type:"array"},countdown_label:{type:"string"},string_years:{type:"string",default:p("Year","porto-functionality")},string_months:{type:"string",default:p("Month","porto-functionality")},string_weeks:{type:"string",default:p("Week","porto-functionality")},string_days:{type:"string",default:p("Day","porto-functionality")},string_hours:{type:"string",default:p("Hour","porto-functionality")},string_minutes:{type:"string",default:p("Minute","porto-functionality")},string_seconds:{type:"string",default:p("Second","porto-functionality")},string_years2:{type:"string",default:p("Years","porto-functionality")},string_months2:{type:"string",default:p("Months","porto-functionality")},string_weeks2:{type:"string",default:p("Weeks","porto-functionality")},string_days2:{type:"string",default:p("Days","porto-functionality")},string_hours2:{type:"string",default:p("Hours","porto-functionality")},string_minutes2:{type:"string",default:p("Minutes","porto-functionality")},string_seconds2:{type:"string",default:p("Seconds","porto-functionality")}},edit:function(t){var e=t.attributes,o=t.clientId,a=Object.assign({},e.dynamic_content);if(R){R=!1;var l=["countdown.js","countdown-loader.js"];for(let t=0;t<l.length;t++){var r,s;if(!window.portoBlockDocument().getElementById(l[t]))r=window.portoBlockDocument().createElement("script"),s=window.portoBlockDocument().scripts[0],r.id=l[t],r.src=porto_block_vars.shortcodes_url+"assets/js/"+l[t],s.parentNode.insertBefore(r,s)}}g((()=>{let o="";e.dynamic_content&&e.dynamic_content.source&&(o="post"==e.dynamic_content.source?e.dynamic_content.post_info:e.dynamic_content[e.dynamic_content.source],jQuery.ajax({url:porto_block_vars.ajax_url,data:{action:"porto_dynamic_tags_get_value",nonce:porto_block_vars.nonce,content_type:"undefined"!=typeof porto_content_type&&porto_content_type?porto_content_type:"post",content_type_value:"undefined"!=typeof porto_content_type_value?porto_content_type_value:porto_block_vars.edit_post_id,source:e.dynamic_content.source,field_name:o},type:"post",dataType:"json",success:function(o){let n="";n=o&&o.success?""+o.data:e.dynamic_content.fallback,e.dynamic_content.before&&(n=e.dynamic_content.before+n),e.dynamic_content.after&&(n+=e.dynamic_content.after),n?t.setAttributes({datetime:n}):t.setAttributes({datetime:""})}}))}),[e.enable_dynamic_date,e.dynamic_content&&e.dynamic_content.source,e.dynamic_content&&e.dynamic_content.post_info,e.dynamic_content&&e.dynamic_content.metabox,e.dynamic_content&&e.dynamic_content.acf,e.dynamic_content&&e.dynamic_content.toolset,e.dynamic_content&&e.dynamic_content.meta,e.dynamic_content&&e.dynamic_content.tax,e.dynamic_content&&e.dynamic_content.woo]),g((()=>{var t=jQuery("#block-"+o),e=t.find(".porto_countdown-div");if(e.length){void 0!==e.data("porto_countdown_initialized")&&e.data("porto_countdown_initialized")&&(e.removeData("porto_countdown_initialized"),jQuery.porto_countdown&&e.porto_countdown("destroy"));let o=(new Date).getTime()+3600*parseFloat(porto_block_vars.gmt_offset)*1e3;o=new Date(o).toISOString().replace(/(.*)(20[0-9]{2}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2})(.*)/,"$2 $3"),e.attr("data-time-now",o.replace(/-/g,"/")),jQuery(document.body).trigger("porto_init_countdown",[t])}})),e.countdown_opts||(e.countdown_opts=["sday","shr","smin","ssec"]);var c=React.createElement(_,null,React.createElement(f,{title:p("Countdown Timer","porto-functionality"),initialOpen:!0},React.createElement(w,{label:p("Timer Style","porto-functionality"),value:e.count_style,options:[{label:p("Inline","porto-functionality"),value:"porto-cd-s1"},{label:p("Block","porto-functionality"),value:"porto-cd-s2"}],onChange:e=>{t.setAttributes({count_style:e})}}),React.createElement(x,{label:p("Enable Dynamic Date Time.","porto-functionality"),checked:!!e.enable_dynamic_date&&e.enable_dynamic_date,onChange:e=>{t.setAttributes({enable_dynamic_date:e})}}),e.enable_dynamic_date&&React.createElement(i.default,{label:p("Dynamic Content","porto-functionality"),value:a,options:{field_type:"field",content_type:"undefined"!=typeof porto_content_type&&porto_content_type,content_type_value:"undefined"==typeof porto_content_type_value?"":porto_content_type_value},onChange:e=>{t.setAttributes({dynamic_content:e})}}),!e.enable_dynamic_date&&React.createElement(React.Fragment,null,React.createElement("label",{className:"d-block mb-2"},p("Target Time For Countdown","porto-functionality")),React.createElement(S,{currentDate:e.datetime,onChange:e=>{t.setAttributes({datetime:e})}})),React.createElement(w,{label:p("Countdown Timer Depends on","porto-functionality"),value:e.porto_tz,options:[{label:p("WordPress Defined Timezone","porto-functionality"),value:"porto-wptz"},{label:p("User's System Timezone","porto-functionality"),value:"porto-usrtz"}],onChange:e=>{t.setAttributes({porto_tz:e})}}),React.createElement(w,{label:p("Time Units","porto-functionality"),value:e.countdown_opts,options:[{label:p("Years","porto-functionality"),value:"syear"},{label:p("Months","porto-functionality"),value:"smonth"},{label:p("Weeks","porto-functionality"),value:"sweek"},{label:p("Days","porto-functionality"),value:"sday"},{label:p("Hours","porto-functionality"),value:"shr"},{label:p("Minutes","porto-functionality"),value:"smin"},{label:p("Seconds","porto-functionality"),value:"ssec"}],multiple:!0,onChange:e=>{t.setAttributes({countdown_opts:e})}}),"porto-cd-s2"!=e.count_style&&React.createElement(h,{label:p("CountDown Label:","porto-functionality"),value:e.countdown_label,onChange:e=>{t.setAttributes({countdown_label:e})}})),React.createElement(f,{title:p("Texts","porto-functionality"),initialOpen:!1},e.countdown_opts&&-1!==e.countdown_opts.indexOf("syear")&&React.createElement(h,{label:p("Year","porto-functionality"),value:e.string_years,onChange:e=>{t.setAttributes({string_years:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("smonth")&&React.createElement(h,{label:p("Month","porto-functionality"),value:e.string_months,onChange:e=>{t.setAttributes({string_months:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("sweek")&&React.createElement(h,{label:p("Week","porto-functionality"),value:e.string_weeks,onChange:e=>{t.setAttributes({string_weeks:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("sday")&&React.createElement(h,{label:p("Day","porto-functionality"),value:e.string_days,onChange:e=>{t.setAttributes({string_days:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("shr")&&React.createElement(h,{label:p("Hour","porto-functionality"),value:e.string_hours,onChange:e=>{t.setAttributes({string_hours:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("smin")&&React.createElement(h,{label:p("Minute","porto-functionality"),value:e.string_minutes,onChange:e=>{t.setAttributes({string_minutes:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("ssec")&&React.createElement(h,{label:p("Second","porto-functionality"),value:e.string_seconds,onChange:e=>{t.setAttributes({string_seconds:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("syear")&&React.createElement(h,{label:p("Years (Plural)","porto-functionality"),value:e.string_years2,onChange:e=>{t.setAttributes({string_years2:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("smonth")&&React.createElement(h,{label:p("Months (Plural)","porto-functionality"),value:e.string_months2,onChange:e=>{t.setAttributes({string_months2:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("sweek")&&React.createElement(h,{label:p("Weeks (Plural)","porto-functionality"),value:e.string_weeks2,onChange:e=>{t.setAttributes({string_weeks2:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("sday")&&React.createElement(h,{label:p("Days (Plural)","porto-functionality"),value:e.string_days2,onChange:e=>{t.setAttributes({string_days2:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("shr")&&React.createElement(h,{label:p("Hours (Plural)","porto-functionality"),value:e.string_hours2,onChange:e=>{t.setAttributes({string_hours2:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("smin")&&React.createElement(h,{label:p("Minutes (Plural)","porto-functionality"),value:e.string_minutes2,onChange:e=>{t.setAttributes({string_minutes2:e})}}),e.countdown_opts&&-1!==e.countdown_opts.indexOf("ssec")&&React.createElement(h,{label:p("Seconds (Plural)","porto-functionality"),value:e.string_seconds2,onChange:e=>{t.setAttributes({string_seconds2:e})}})));e.el_class="porto_countdown",e.className&&(e.el_class+=" "+e.className),e.count_style&&(e.el_class+=" "+e.count_style),e.datetime&&(e.datetime=e.datetime.replaceAll("-","/").replace("T"," "));var u="",d=e.string_years+","+e.string_months+","+e.string_weeks+","+e.string_days+","+e.string_hours+","+e.string_minutes+","+e.string_seconds,y=e.string_years2+","+e.string_months2+","+e.string_weeks2+","+e.string_days2+","+e.string_hours2+","+e.string_minutes2+","+e.string_seconds2,b="",v="",C="",k="",A="",E="",N="";e.countdown_opts&&e.countdown_opts.forEach((t=>{"syear"==t&&(u+="Y"),"smonth"==t&&(u+="O"),"sweek"==t&&(u+="W"),"sday"==t&&(u+="D"),"shr"==t&&(u+="H"),"smin"==t&&(u+="M"),"ssec"==t&&(u+="S")})),""==u&&(u="DHMS");var T=new Date(e.datetime),I=new Date;if(e.datetime||(T=I,e.datetime=T.toJSON().replace("T"," ")),e.datetime&&e.countdown_opts&&u){var z=Date.parse(e.datetime),B=Date.now(),P=parseInt((z-B)/1e3,10);P>0&&(e.countdown_opts.includes("syear")&&(b=T.getYear()-I.getYear(),T=new Date(I.getFullYear(),T.getMonth(),T.getDay(),T.getHours(),T.getMinutes(),T.getMilliseconds())),e.countdown_opts.includes("smonth")&&(v=T.getMonth()-I.getMonth())<0&&(v+=12),e.countdown_opts.includes("sweek")&&(C=parseInt(P/604800,10)%52,P%=604800),e.countdown_opts.includes("sday")&&(k=parseInt(P/24/3600,10),P%=86400),e.countdown_opts.includes("shr")&&((A=e.countdown_opts.includes("smin")||e.countdown_opts.includes("ssec")?Math.floor(P/3600):Math.round(P/3600))<10&&(A="0"+A),P%=3600),e.countdown_opts.includes("smin")&&((E=e.countdown_opts.includes("ssec")?Math.floor(P/60):Math.round(P/60))<10&&(E="0"+E),P%=60),e.countdown_opts.includes("smin")&&(N=P)<10&&(N="0"+N))}var D={year:b,month:v,week:C,day:k,hour:A,second:N},L="porto_countdown-div porto_countdown-dateAndTime";e.porto_tz&&(L+=" "+e.porto_tz);var M=e.datetime&&React.createElement("div",{className:e.el_class},e.countdown_label&&"porto-cd-s2"!=e.count_style&&React.createElement("span",{className:"countdown-label"},e.countdown_label),React.createElement("div",{className:L,"data-labels":y,"data-labels2":d,"data-terminal-date":e.datetime,"data-countformat":u,"data-time-zone":porto_block_vars.gmt_offset},e.countdown_opts?React.createElement("span",{className:"porto_countdown-row porto_countdown-show4"},Object.keys(D).map(((t,e)=>{let o,n;return o=D[t]?D[t]:"00",n=1==o?t:t+"s",React.createElement("span",{className:"porto_coundown-section",key:e},React.createElement("span",{className:"porto_time-mid"},React.createElement("span",{className:"porto_countdown-amount"},o),React.createElement("span",{className:"porto_countdown-period"},n)))}))):e.datetime));return m(n.Fragment,{},c,M)},save:function(){return null}})}(wp.i18n,wp.blocks,wp.element,wp.editor,wp.blockEditor,wp.components,wp.data,lodash),window.jQuery(document).ready((function(t){t(document).on("click",".edit-site-list-table-row a",(function(){window.location.reload()}))}))}()}();
Save
Cancel