<?xml version='1.0' encoding='UTF-8'?><uidget><metadata><name>Image</name><description>Add a picture</description><help><![CDATA[Select the image either by uploading it from your computer or by searching on Flickr.]]></help><api_version>1.0</api_version><size height='150' width='150' /><blog en='18' /></metadata><view><content>&lt;div&gt;&lt;a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;</content><properties><image_selector context_menu='Choose an image' default='{id:-1,name:&apos;default.png&apos;,width:128,height:128,url:&apos;/images/default.png&apos;,thumbnails:{normal:&apos;/images/default.png&apos;,small:&apos;/images/default.png&apos;}}' default_action='true' help='Select the image to insert' icon='folder' name='imageFile' value='Choose an image' /><image_selector context_menu='Mouseover image' default='null' facultative='true' feature='image_mouseover' help='Optional: a different image with the same size to be shown at mouseover' icon='ui_carousel' name='mouseoverImage' value='Mouseover image' /><radio class='uic_prop_display_type' default='&apos;ratio&apos;' display='Keep ratio|Full width|Crop|Free Size' help='Allows to choose between different displays modes for the image. &lt;br&gt;Keep ratio: on resize, the image aspect ratio will be preserved. &lt;br&gt;Full width: the image width will be adjusted to fit the visitor&apos;s browser. &lt;br&gt;Crop: on resize, the image will be cropped to cover the block size. &lt;br&gt;Free size: on resize, the image aspect ratio of the image will be changed to fit the block size. ' name='ratio_type' title='Display mode' values='ratio|fullwidth|cover|free' /><checkbox class='uii_parallax_control' default='false' help='Enable a parallax effect: when the page is scrolled, the image displayed scrolls slightly slower to create a nice 3D effect.' name='parallax' value='Parallax' /><checkbox default='false' help='By clicking on the image, your visitors can see it fullscreen.' name='bigger' value='Fullscreen on click' /><images_selector default='[]' facultative='true' help='With this option, you can specify the image(s) displayed on fullscreen. If did not select any and ticked the &apos;Fullscreen on click&apos; option, the image showed in the Image block will be displayed on fullscreen.' icon='screen' name='tb_imgs' value='Images on fullscreen' /><link_selector default='null' help='Add a link to an external site, a document or a page, or remove the current link.' icon='t_link' name='link' /><textarea facultative='true' feature='image_menu_mouseover' height='20' help='Enter here the name of a drop down menu that will be displayed on image mouseover.&lt;br&gt;The drop down menu name should also be specified in the properties of the menu you want to be displayed.' icon='menu' name='mouseoverMenu' text='Mouseover menu' /><textarea facultative='true' height='160' help='This will set the ALT attribute used by search engine to index images, instead of using the file description or file name. We suggest you to insert here a short description of your image.' icon='google' name='alt' text='SEO description' /><checkbox default='false' feature='image_protection' help='By activating this feature, &lt;b&gt;your visitors will not be able to download these images&lt;/b&gt; by right clicking on an image or by drag-dropping it or by browsing the source of the page.' name='protect' value='Anti-download' /></properties><design_properties><radio class='filterRadio' default='&apos;none&apos;' display='None|Grayscale|Blur|Invert|Contrast|Color or Gradient' help='Select the filter for the image.&lt;br&gt; &lt;b&gt;None&lt;/b&gt; no filter&lt;br&gt; &lt;b&gt;Grayscale&lt;/b&gt; remove all the colors&lt;br&gt; &lt;b&gt;Blur&lt;/b&gt; blur the image&lt;br&gt; &lt;b&gt;Invert&lt;/b&gt; invert all the colors&lt;br&gt; &lt;b&gt;Contrast&lt;/b&gt; more lightness differences&lt;br&gt; &lt;b&gt;Color or gradient&lt;/b&gt; add a color transparent overlay' name='filter' title='Filter' values='none|grayscale|blur|invert|contrast|color' /><gradient default='[&apos;vertical&apos;,&apos;50%!rgba(0,0,0,0.5)&apos;]' name='gradient_colors' /><trigger help='Set the block to the real size of the image.' icon='arrow_tb' text='Real Size' trigger='realsize' /><checkbox class='uii_active_mask' default='false' help='By checking this option, you will be able to crop the image to a shape (circle, triangle...).' name='activate_mask' value='Crop to a shape' /><icon_selector class='uii_chose_mask' default='{"id":594,"name":"brightness_1","service":"Google-material-icons","removable":false}' default_action='true' icon='folder' name='mask' search_options='{"search_by":"shapes"}' value='Choose the shape' /></design_properties></view><script>UI_List.UI_Image={initialize:function(a){this.component=a;
a.setOptions([&quot;locked&quot;,&quot;container&quot;,&quot;fixed&quot;,&quot;footer&quot;,&quot;sticky&quot;]);
this.protect_available=(v.mode==&quot;editor&quot;||v.features.image_protection);
this.mouseover_available=(v.mode==&quot;editor&quot;||v.features.image_mouseover)
},updateImage:function(){this.component.node.unbind();
var b=this;
var d={h:this.component.H(),w:this.component.W()};
var a=1;
var c=function(g,f){var e=$(&quot;&lt;span&gt;&quot;).css({position:&quot;absolute&quot;,top:&quot;-1000px&quot;}).appendTo(&quot;body&quot;);
e.setIcon(b.component.data.mask,false,function(){setTimeout(function(){var i=cdn_url(bestImgSrc(f,b.component.W(),b.component.H()));
var h=function(){e.children().css({&quot;font-size&quot;:&quot;100px&quot;});
var m={w:e.width(),h:e.height()};
a=m.h/m.w;
var l=document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;text&quot;);
g.empty().addClass(&quot;uii_mask_node&quot;);
var j=Math.min(d.h/m.h*100,d.w/m.w*100);
l.setAttributeNS(null,&quot;x&quot;,(d.w-j*m.w/100)/2);
var k=j*m.h/100;
l.setAttributeNS(null,&quot;y&quot;,((d.h-k)/2)+(k/(b.component.data.mask.service!=&quot;Symbola&quot;?1:1.3)));
l=$.fn.setIcon(b.component.data.mask,$(l))[0];
var n=&apos;&lt;pattern class=&quot;uii_pattern&quot; id=&quot;&apos;+(g==b.img2?&quot;hover_&quot;:&quot;&quot;)+&quot;pattern_mask_&quot;+b.component.uniqId()+&apos;&quot; patternUnits=&quot;userSpaceOnUse&quot; width=&quot;&apos;+d.w+&apos;&quot; height=&quot;&apos;+d.h+&apos;&quot; viewbox=&quot;0 0 &apos;+d.w+&quot; &quot;+d.h+&apos;&quot;&gt;&lt;image xlink:href=&quot;&apos;+i+&apos;&quot; width=&quot;&apos;+d.w+&apos;&quot; height=&quot;&apos;+d.h+&apos;&quot; preserveAspectRatio=&quot;xMidYMid &apos;+(b.component.data.ratio_type==&quot;cover&quot;?&quot;slice&quot;:&quot;meet&quot;)+&apos;&quot; /&gt;&lt;/pattern&gt;&apos;;
$(&quot;.pattern_mask&quot;,b.component.node).remove();
g.html(&quot;&lt;svg class=&apos;svg_defs&apos;&gt;&lt;defs&gt;&quot;+n+&quot;&lt;/defs&gt;&lt;/svg&gt;&quot;).append($(&apos;&lt;svg class=&quot;content_svg&quot; width=&quot;&apos;+d.w+&apos;&quot; height=&quot;&apos;+d.h+&apos;&quot;&gt;&lt;/svg&gt;&apos;));
$(&quot;.content_svg&quot;,g)[0].appendChild(l);
$(l).css({fill:&quot;url(#&quot;+(g==b.img2?&quot;hover_&quot;:&quot;&quot;)+&quot;pattern_mask_&quot;+b.component.uniqId()+&quot;)&quot;,&quot;font-size&quot;:j+&quot;px&quot;});
setTimeout(function(){e.remove()
},2000)
};
$.fn.loadImage(i).done(function(){h()
}).fail(function(){if(/ra0\.cdnsw\.com\/cc0/.test(i)){i=i.replace(&quot;ra0.cdnsw.com/cc0&quot;,&quot;www.sitew.com/file/pixabay&quot;);
h()
}})
},100)
})
};
if(this.component.data.activate_mask&amp;&amp;this.component.data.mask){$(&quot;.uii_pattern&quot;,this.component.node).remove();
c(this.img1,b.component.data.imageFile)
}else{this.img1.removeClass();
if(!this.component.preloaded||this._protected()||this.component.data.ratio_type==&quot;fullwidth&quot;){this.img1.empty().append(b._setImageDefault(this.component.data.imageFile,this.component));
if(this._protected()){this._antiDownload(this.img1)
}}if(this.mouseover_available&amp;&amp;this.component.data.mouseoverMenu&amp;&amp;this.component.data.mouseoverMenu!=&quot;&quot;){this.component.node.mouseover(function(){if(window.UI_Menu){UI_Menu.showDropDownMenu(b.component.data.mouseoverMenu)
}})
}this._setFullWidth();
this._setParallax()
}if(this.mouseover_available&amp;&amp;this.component.data.mouseoverImage){if(this.component.data.activate_mask&amp;&amp;this.component.data.mask){c(this.img2,this.component.data.mouseoverImage)
}else{this.img2.empty().append(b._setImageDefault(this.component.data.mouseoverImage,this.component))
}this.component.node.hover(function(){b.img2.show();
b.img1.hide()
},function(){b.img1.show();
b.img2.hide()
})
}this._setFilter()
},getDescriptions:function(){var b=this;
var a=function(e){var c={};
c[b.component.data.imageFile.id]=e;
b.captions.resolve(c)
};
if(this.component.description){a(this.component.description)
}},updateLink:function(){var a=this;
this.link.attr({target:&quot;&quot;,onClick:&quot;&quot;,title:&quot;&quot;}).removeAttr(&quot;href&quot;).unbind();
if(this.component.data.link&amp;&amp;this.component.data.link.onClick&amp;&amp;this.component.data.link.onClick.match(/^tb_show\(/)){try{this.component.data.tb_imgs=JSON_.parse(this.component.data.link.onClick.match(/tb_show\(\{list:\[\]\},0,(.*\])/)[1]);
this.component.data.bigger=true;
this.component.data.link=null
}catch(b){dbg.error(&quot;Image.tb_imgs&quot;,b,this.component.data)
}}if(this.component.data.link){this.link.attr(this.component.data.link);
if(!v.features.do_follow_links){this.link.attr(&quot;rel&quot;,&quot;nofollow&quot;)
}if(v.mode==&quot;editor&quot;&amp;&amp;this.link.attr(&quot;onClick&quot;)==&quot;&quot;){this.link.attr(&quot;target&quot;,&quot;test_link&quot;)
}}else{if(this.component.data.bigger){this.link.attr(&quot;href&quot;,&quot;#&quot;).click(function(){if(a.component.data.tb_imgs&amp;&amp;a.component.data.tb_imgs.length&gt;0){tb_show_viewer(FileDescription.get(a.component.data.tb_imgs),0,a.component.data.tb_imgs,a._protected())
}else{tb_show_viewer((v.mode==&quot;editor&quot;)?FileDescription.get([a.component.data.imageFile]):a.captions,0,[a.component.data.imageFile],a._protected());
sigCtl.emit(&quot;UI_Image.fullscreen&quot;,a.component.data.imageFile)
}this.blur();
return false
}).on(&quot;dblclick&quot;,function(){return false
})
}}if(this.component.data.imageFile.removable){this.getDescriptions()
}},onDisplay:function(b){var a=this;
this.component.migrateOldGradientProperty();
if(!this.component.data.ratio_type){this.component.data.ratio_type=this.component.data.aspectRatio?&quot;ratio&quot;:&quot;free&quot;;
this.component.data.aspectRatio=null
}this.link=b.find(&quot;a&quot;);
this.img1=b.find(&quot;span:first&quot;);
this.img2=b.find(&quot;span:last&quot;).hide();
this.captions=$.Deferred();
if(this.mouseover_available&amp;&amp;this.component.data.mouseoverMenu&amp;&amp;this.component.data.mouseoverMenu!=&quot;&quot;){Misc.poll(function(){return window.UI_Menu
},function(){UI_Menu.setAsDropDownMenu(a.component.data.mouseoverMenu)
})
}this.updateImage();
this.updateLink();
if(v.mode!=&quot;editor&quot;&amp;&amp;this.component.data.mouseoverImage&amp;&amp;this.mouseover_available){this.preload=$(document).setImage(this.component.data.mouseoverImage,this.component.W(),this.component.H(),{protect:this._protected(),keep_ratio:false})
}this.aspectRatio_v=this.component.data.imageFile.height/this.component.data.imageFile.width;
if(this.component.data.ratio_type==&quot;ratio&quot;){this.component.setAspectRatio(this.aspectRatio_v)
}this._setFullWidth();
this._setParallax();
this._setFilter()
},_loadProperties:function(){var a=$(this.component.propertyNode).add(this.component.propertyDesignNode);
if(this.component.data.filter==&quot;color&quot;){$(&quot;.gradientProperty&quot;,a).css(&quot;display&quot;,&quot;table&quot;);
$(&quot;.selectGradientO.k-widget&quot;,a).show();
$(&quot;.roundSliderPropertyDiv&quot;,a).css(&quot;display&quot;,&quot;table&quot;);
if(this.component.data.gradient_colors[0]==&quot;diagonal&quot;){$(&quot;.roundSliderPropertyDiv&quot;,a).show()
}else{$(&quot;.roundSliderPropertyDiv&quot;,a).hide()
}}else{$(&quot;.gradientProperty&quot;,a).css(&quot;display&quot;,&quot;none&quot;);
$(&quot;.selectGradientO.k-widget&quot;,a).hide();
$(&quot;.roundSliderPropertyDiv&quot;,a).css(&quot;display&quot;,&quot;none&quot;)
}if(this.component.data.activate_mask){$(&quot;.uii_chose_mask&quot;,a).show();
$(&quot;input[value=color]&quot;,a).parent().hide();
$(&quot;.uii_parallax_control&quot;,a).hide()
}else{$(&quot;.uii_chose_mask&quot;,a).hide();
$(&quot;input[value=color]&quot;,a).parent().show();
$(&quot;.uii_parallax_control&quot;,a).show()
}},onSelect:function(){this._loadProperties()
},onPropertyChanged:function(a){this._loadProperties();
if(a.include(&quot;imageFile&quot;)){this.updateImage();
if(this.component.data.ratio_type!=&quot;fullwidth&quot;&amp;&amp;this.component.data.ratio_type!=&quot;cover&quot;){var f=this.component;
var b=this.component.data.imageFile.width;
var c=this.component.data.imageFile.height;
this.refreshAspectRatio();
for(var g in v.device_modes){if(g==v.device_modes[g]){var e=f.prop(g).w;
if(b&gt;e){b=e;
c=b*this.aspectRatio_v
}f.setXYZWH({w:b,h:c},{device:g,send_events:false});
sigCtl.emit(&quot;Component.moved&quot;)
}}}}if(a.include(&quot;mouseoverImage&quot;)||a.include(&quot;activate_mask&quot;)||a.include(&quot;mask&quot;)){this.updateImage()
}if(a.include(&quot;ratio_type&quot;)){if(this.component.data.ratio_type==&quot;ratio&quot;){this.component.setAspectRatio(this.aspectRatio_v);
if(window.blockSelector&amp;&amp;blockSelector.selected_cpts.length&gt;0){blockSelector.drawSelector()
}}else{this.component.setAspectRatio(null)
}}if(a.include(&quot;link&quot;)){this.component.data.tb_imgs=null;
this.updateLink()
}if(a.include(&quot;bigger&quot;)){if(this.component.data.bigger){this.component.data.link=null;
this.component.data.tb_imgs=null
}this.updateLink()
}if(a.include(&quot;tb_imgs&quot;)){if(this.component.data.tb_imgs&amp;&amp;this.component.data.tb_imgs.length&gt;0){this.component.data.link=null;
this.component.data.bigger=true
}this.updateLink()
}if(a.include(&quot;realsize&quot;)){this.component.setXYZWH({w:this.component.data.imageFile.width,h:this.component.data.imageFile.height})
}if(window.UI_Menu&amp;&amp;a.include(&quot;mouseoverMenu&quot;)&amp;&amp;this.component.data.mouseoverMenu&amp;&amp;this.component.data.mouseoverMenu!=&quot;&quot;){UI_Menu.setAsDropDownMenu(this.component.data.mouseoverMenu);
this.updateImage();
versionController.disabledOnViewer(&quot;image_menu_mouseover&quot;)
}if(a.include(&quot;ratio_type&quot;)){this._setFullWidth();
this.updateImage()
}if(a.include(&quot;parallax&quot;)){this._setParallax()
}if(a.include(&quot;filter&quot;)){this._setFilter()
}else{if(a.includeOne([&quot;gradient_colors&quot;])){this._setColorFilter()
}}},onResize:function(){this.img1.find(&quot;img&quot;).width(this.component.W()).height(this.component.H())
},onResizeStop:function(){this.onResize();
this.updateImage();
this._setFullWidth();
this._setParallax();
this._setFilter();
this.refreshAspectRatio()
},onMoveStop:function(){this._setFullWidth();
this._setParallax();
this._setFilter()
},onMoved:function(){this.refreshAspectRatio()
},refreshAspectRatio:function(){if(this.component.data.ratio_type==&quot;ratio&quot;){var a=this.component.data.imageFile.width;
var b=this.component.data.imageFile.height;
this.aspectRatio_v=b/a;
this.component.setAspectRatio(this.aspectRatio_v)
}sigCtl.emit(&quot;Component.moved&quot;)
},_setImageDefault:function(a,b){var c=bestImgSrc(a,this.component.data.ratio_type==&quot;fullwidth&quot;?screen.width:b.W(),b.H(),{keep_ratio:this.component.data.ratio_type!=&quot;free&quot;});
return $(&quot;&lt;div&gt;&quot;).addClass(&quot;uii_img &quot;+b.data.ratio_type).cdnSrc(c,b.W(),b.H())
},_protected:function(){return(this.component.data.protect||v.page_bg.security.content_protection)&amp;&amp;v.mode!=&quot;editor&quot;&amp;&amp;this.protect_available
},_antiDownload:function(c){c=c.parents(&quot;.componentBody:first&quot;);
c.on(&quot;contextmenu&quot;,function(d){if(d.target.nodeName==&quot;DIV&quot;){return false
}});
if(this.component.data.link||this.component.data.bigger){return
}var a=&quot;/images/spacer.gif&quot;;
var b=new Image();
b.src=a;
c.on(&quot;mouseenter touchstart&quot;,function(g){var d=$(this);
if($(&quot;.protectOverlay&quot;,d).length&gt;0){return
}var f=$(&apos;&lt;img class=&quot;protectOverlay&quot; src=&quot;&apos;+a+&apos;&quot; width=&quot;&apos;+d.width()+&apos;&quot; height=&quot;&apos;+d.height()+&apos;&quot; /&gt;&apos;).css({position:&quot;absolute&quot;,zIndex:9999999}).prependTo(c).on(&quot;mouseleave&quot;,function(){setTimeout(function(){f.remove()
},0)
});
$(document).one(&quot;touchend&quot;,function(){setTimeout(function(){f.remove()
},0)
})
})
},_setFullWidth:function(){this.component.setFullWidth(this.component.data.ratio_type==&quot;fullwidth&quot;)
},_setParallax:function(){var h=v.mode==&quot;editor&quot;?$(&quot;#site&quot;):$(window);
var c=this.component.componentBody.find(&quot;.uii_img:first&quot;);
if(this.component.data.parallax){var b=this;
var a=b.component.node.position().top-h.height();
var e=b.component.node.position().top+b.component.node.height();
var d=window.navigator.userAgent.match(/MSIE|Trident|Edge/);
if(d&amp;&amp;v.mode==&quot;viewer&quot;){jQuery.fn.overrideWindowScroll(true)
}if(this.component.data.ratio_type==&quot;free&quot;||this.component.data.ratio_type==&quot;ratio&quot;){c.css(&quot;background-size&quot;,&quot;150% 150%&quot;)
}var g=function(){var j=e-a;
if(h.scrollTop()&gt;a&amp;&amp;h.scrollTop()&lt;e){var i=(((h.scrollTop()-a)*100)/j);
var k=&quot;50% &quot;+(100-i)+&quot;%&quot;;
c.css({backgroundPosition:k})
}};
g();
h.off(&quot;scroll.parallaxImg&quot;+this.uniqId()).on(&quot;scroll.parallaxImg&quot;+this.uniqId(),g);
h.off(&quot;resize.parallaxImg&quot;+this.uniqId()).on(&quot;resize.parallaxImg&quot;+this.uniqId(),function(){clearTimeout(b._to_window_resize);
b._to_window_resize=setTimeout(function(){b._setParallax()
},150)
})
}else{h.off(&quot;scroll.parallaxImg&quot;+this.uniqId());
h.off(&quot;resize.parallaxImg&quot;+this.uniqId());
if(this.component.data.ratio_type==&quot;free&quot;){c.css(&quot;background-size&quot;,&quot;100% 100%&quot;)
}if(this.component.data.ratio_type==&quot;ratio&quot;){c.css(&quot;background-size&quot;,&quot;contain&quot;)
}var f=&quot;50% 50%&quot;;
c.css({backgroundPosition:f})
}},_setFilter:function(){var a=this.component.node.find(&quot;.uii_img&quot;);
if(this.component.data.activate_mask){a=this.component.node.find(&quot;.content_svg &gt; text&quot;)
}else{if(a.length==0){a=this.component.node.find(&quot;img&quot;)
}}a.css(&quot;transform&quot;,&quot;translate3d(0,0,0)&quot;);
this.component.data.gradient_colors[2]=this.component.data.gradient_colors[2]||45;
jQuery.fn.setImgFilter(a,&quot;image&quot;,this.component.data.filter,&quot;filterColorImg&quot;+this.uniqId(),{color:this.component.data.gradient_colors[1],or:this.component.data.gradient_colors[0],angle:this.component.data.gradient_colors[2]},$(this.component.propertyNode).add(this.component.propertyDesignNode))
},_setColorFilter:function(){if(this.component.data.filter==&quot;color&quot;){$(&quot;#filterColorImg&quot;+this.uniqId()).setBackgroundGradient(this.component.data.gradient_colors[1],this.component.data.gradient_colors[1],this.component.data.gradient_colors[2])
}},uniqId:function(){this._uid_=this._uid_||this.component.uniqId();
return this._uid_
},_isEmpty:function(){var a=false;
if(this.component.data.imageFile.name==&quot;default.png&quot;&amp;&amp;this.component.data.imageFile.id==-1){return true
}return a
},onDeviceChanged:function(b){var a=this,f=this.component;
if(b.to==&quot;mobile_tree&quot;){if(this.ori_ratio_type){return
}if(f.data.activate_mask){var d=0;
var e=setInterval(function(){if(f.node.find(&quot;.content_svg&quot;).height()&lt;30&amp;&amp;d&lt;200){d++;
a.updateImage()
}else{clearInterval(e);
e=null
}},500)
}if(f.node.data(&quot;isContainer&quot;)){if(f.data.ratio_type!=&quot;cover&quot;){f.preloaded=false;
this.ori_ratio_type=f.data.ratio_type;
f.data.ratio_type=&quot;cover&quot;
}}else{if(f.data.ratio_type==&quot;ratio&quot;){f.node.css(&quot;min-height&quot;,f.node.width()*f.ui.aspectRatio_v)
}}}else{if(this.ori_ratio_type){f.data.ratio_type=this.ori_ratio_type;
delete this.ori_ratio_type
}}this.onPropertyChanged([&quot;ratio_type&quot;])
}};</script><style>.uii_img{position:relative;height:100%;position:absolute;width:100%;background-position:center center;background-repeat:no-repeat}
.uii_img.cover,.uii_img.fullwidth{background-size:cover}
.uii_img.ratio{background-size:contain}
.uii_img.free{background-size:100% 100%}
.svg_defs{height:0;position:absolute;width:0}
.uii_mask_node{user-select:none;-moz-user-select:none;-webkit-user-select:none}</style></uidget>