diff --git a/js/flex2html.js b/js/flex2html.js index 19e5636..ae184b9 100644 --- a/js/flex2html.js +++ b/js/flex2html.js @@ -2,12 +2,12 @@ function flex2html(element, json) { let carousel = carousel_struc() let result = '' - if(json['type'] === 'flex') { + if (json['type'] === 'flex') { json = json['contents'] - if(json['type'] === 'bubble') { + if (json['type'] === 'bubble') { result = bubble_object(json) carousel = carousel.replace('', result) - } else if(json['type'] === 'carousel') { + } else if (json['type'] === 'carousel') { json['contents'].forEach((obj, index) => { let result = bubble_object(obj) result = result.replace('', '') @@ -16,13 +16,13 @@ function flex2html(element, json) { }) } } - + document.getElementById(element).innerHTML += carousel return carousel } function bubble_object(json) { - let { hero, header, body, footer } = json + let {hero, header, body, footer} = json let hero_object = hero_struc(json) let header_object = header_struc(json) let body_object = body_struc(json) @@ -30,14 +30,14 @@ function bubble_object(json) { let bubble = bubble_struc(json) let box = '' - if(hero?.type === 'video') { + if (hero?.type === 'video') { box = hero_box_video(hero) - } else if(hero?.type === 'image') { + } else if (hero?.type === 'image') { box = convert_object('', hero) } else { - for(let key in hero){ - if(hero.hasOwnProperty(key)) { - if(key === 'type' && hero[key] === 'box') { + for (let key in hero) { + if (hero.hasOwnProperty(key)) { + if (key === 'type' && hero[key] === 'box') { box = box_object(hero) layout = hero['layout'] let box_inner = box_recursive(box, layout, hero['contents']) @@ -49,11 +49,11 @@ function bubble_object(json) { } } hero_object = hero_object.replace('', box) - + box = '' - for(let key in header){ - if(header.hasOwnProperty(key)) { - if(key === 'type' && header[key] === 'box') { + for (let key in header) { + if (header.hasOwnProperty(key)) { + if (key === 'type' && header[key] === 'box') { box = box_object(header) layout = header['layout'] let box_inner = box_recursive(box, layout, header['contents']) @@ -64,9 +64,9 @@ function bubble_object(json) { header_object = header_object.replace('', box) box = '' - for(let key in body){ - if(body.hasOwnProperty(key)) { - if(key === 'type' && body[key] === 'box') { + for (let key in body) { + if (body.hasOwnProperty(key)) { + if (key === 'type' && body[key] === 'box') { box = box_object(body) layout = body['layout'] let box_inner = box_recursive(box, layout, body['contents']) @@ -77,9 +77,9 @@ function bubble_object(json) { body_object = body_object.replace('', box) box = '' - for(let key in footer){ - if(footer.hasOwnProperty(key)) { - if(key === 'type' && footer[key] === 'box') { + for (let key in footer) { + if (footer.hasOwnProperty(key)) { + if (key === 'type' && footer[key] === 'box') { box = box_object(footer) layout = footer['layout'] let box_inner = box_recursive(box, layout, footer['contents']) @@ -88,31 +88,33 @@ function bubble_object(json) { } } footer_object = footer_object.replace('', box) - + bubble = bubble.replace('', hero_object) bubble = bubble.replace('', header_object) bubble = bubble.replace('', body_object) bubble = bubble.replace('', footer_object) - + return bubble } -function hero_box_video(hero) { + +function hero_box_video(hero) { return `
` } + function box_recursive(parent_box, layout, json) { let result = [] json.forEach((obj, index) => { let temp - if(obj['type'] === 'box') { + if (obj['type'] === 'box') { let temp2 = box_object(obj) layout2 = obj['layout'] temp = box_recursive(temp2, layout2, obj['contents']) - } else if(obj['type'] === 'text' && obj['contents'] && obj['contents'].length > 0 ) { + } else if (obj['type'] === 'text' && obj['contents'] && obj['contents'].length > 0) { let temp2 = convert_object(layout, obj) layout2 = obj['layout'] temp = box_recursive(temp2, layout2, obj['contents']) @@ -130,7 +132,7 @@ function box_recursive(parent_box, layout, json) { } function convert_object(layout, json) { - switch(json['type']) { + switch (json['type']) { case 'image': object = image_object(json) break; @@ -163,55 +165,56 @@ function convert_object(layout, json) { function box_object(json) { let style = '' - let {layout, position, flex, spacing, margin, width, height, backgroundColor, borderColor, borderWidth, cornerRadius, justifyContent, alignItems, offsetTop, offsetBottom, offsetStart, offsetEnd, paddingAll, paddingTop, paddingBottom, paddingStart, paddingEnd, background, maxWidth, maxHeight} = json - if(layout === 'baseline') { + let {layout, position, flex, spacing, margin, width, height, backgroundColor, borderColor, borderWidth, cornerRadius, justifyContent, alignItems, offsetTop, offsetBottom, offsetStart, offsetEnd, paddingAll, paddingTop, paddingBottom, paddingStart, paddingEnd, background, maxWidth, maxHeight, action} = json + if (layout === 'baseline') { layout1 = 'hr' layout2 = 'bl' - } else if(layout === 'horizontal') { + } else if (layout === 'horizontal') { layout1 = 'hr' layout2 = '' - } else if(layout === 'vertical') { + } else if (layout === 'vertical') { layout1 = 'vr' layout2 = '' } fl = '' - if(flex > 3) { + if (flex > 3) { style += `-webkit-box-flex:${flex};flex-grow:${flex};` } else { fl = (flex >= 0) ? `fl${flex}` : '' } exabs = (position === 'absolute') ? 'ExAbs' : '' - - if(spacing && spacing.indexOf("px") >= 0) { + + if (spacing && spacing.indexOf("px") >= 0) { + style += `gap:${spacing};` spc = '' } else { spc = (spacing) ? 'spc' + upperalldigit(spacing) : '' } - if(margin && margin.indexOf("px") >= 0) { + if (margin && margin.indexOf("px") >= 0) { style += `margin-top:${margin};` exmgn = '' } else { exmgn = (margin) ? 'ExMgnT' + upperalldigit(margin) : '' } - if(width && width !== '') { + if (width && width !== '') { style += `width:${width}; max-width:${width};` } - if(height && height !== '') { + if (height && height !== '') { style += `height:${height};` } - if(backgroundColor) { + if (backgroundColor) { style += `background-color:${backgroundColor} !important;` } - if(borderColor) { + if (borderColor) { style += `border-color:${borderColor} !important;` } - if(borderWidth && borderWidth.indexOf("px") >= 0) { + if (borderWidth && borderWidth.indexOf("px") >= 0) { style += `border-width:${borderWidth};` ExBdr = '' } else { - switch(borderWidth) { + switch (borderWidth) { case 'none': ExBdr = 'ExBdrWdtNone' break; @@ -232,19 +235,19 @@ function box_object(json) { break; default: ExBdr = '' - // code block - } + // code block + } } - if(cornerRadius && cornerRadius.indexOf("px") >= 0) { + if (cornerRadius && cornerRadius.indexOf("px") >= 0) { style += `border-radius:${cornerRadius};` ExBdrRad = '' } else { ExBdrRad = (cornerRadius) ? 'ExBdrRad' + upperalldigit(cornerRadius) : '' } - + jfc = '' - if(justifyContent && justifyContent !== '') { - switch(justifyContent) { + if (justifyContent && justifyContent !== '') { + switch (justifyContent) { case 'center': jfc = 'itms-jfcC' break; @@ -265,12 +268,12 @@ function box_object(json) { break; default: jfc = '' - // code block - } + // code block + } } alg = '' - if(alignItems && alignItems !== '') { - switch(alignItems) { + if (alignItems && alignItems !== '') { + switch (alignItems) { case 'center': alg = 'itms-algC' break; @@ -282,88 +285,97 @@ function box_object(json) { break; default: alg = '' - // code block - } + // code block + } } - if(offsetTop && offsetTop.indexOf("px") >= 0) { + if (offsetTop && /px|%/.test(offsetTop)) { style += `top:${offsetTop};` ext = '' } else { ext = (offsetTop) ? 'ExT' + upperalldigit(offsetTop) : '' } - if(offsetBottom && offsetBottom.indexOf("px") >= 0) { + if (offsetBottom && /px|%/.test(offsetBottom)) { style += `bottom:${offsetBottom};` exb = '' } else { exb = (offsetBottom) ? 'ExB' + upperalldigit(offsetBottom) : '' } - if(offsetStart && offsetStart.indexOf("px") >= 0) { + if (offsetStart && /px|%/.test(offsetStart)) { style += `left:${offsetStart};` exl = '' } else { exl = (offsetStart) ? 'ExL' + upperalldigit(offsetStart) : '' } - if(offsetEnd && offsetEnd.indexOf("px") >= 0) { + if (offsetEnd && /px|%/.test(offsetEnd)) { style += `right:${offsetEnd};` exr = '' } else { exr = (offsetEnd) ? 'ExR' + upperalldigit(offsetEnd) : '' } - if(paddingAll && paddingAll.indexOf("px") >= 0) { + if (paddingAll && /px|%/.test(paddingAll)) { style += `padding:${paddingAll};` ExPadA = '' } else { ExPadA = (paddingAll) ? 'ExPadA' + upperalldigit(paddingAll) : '' } - if(paddingTop && paddingTop.indexOf("px") >= 0) { + if (paddingTop && /px|%/.test(paddingTop)) { style += `padding-top:${paddingTop};` ExPadT = '' } else { ExPadT = (paddingTop) ? 'ExPadT' + upperalldigit(paddingTop) : '' } - if(paddingBottom && paddingBottom.indexOf("px") >= 0) { + if (paddingBottom && /px|%/.test(paddingBottom)) { style += `padding-bottom:${paddingBottom};` ExPadB = '' } else { ExPadB = (paddingBottom) ? 'ExPadB' + upperalldigit(paddingBottom) : '' } - if(paddingStart && paddingStart.indexOf("px") >= 0) { + if (paddingStart && /px|%/.test(paddingStart)) { style += `padding-left:${paddingStart};` ExPadL = '' } else { ExPadL = (paddingStart) ? 'ExPadL' + upperalldigit(paddingStart) : '' } - if(paddingEnd && paddingEnd.indexOf("px") >= 0) { + if (paddingEnd && /px|%/.test(paddingEnd)) { style += `padding-right:${paddingEnd};` ExPadR = '' } else { ExPadR = (paddingEnd) ? 'ExPadR' + upperalldigit(paddingEnd) : '' } - if(background && background.type === 'linearGradient') { + if (background && background.type === 'linearGradient') { centerPosition = (background.centerPosition) ? background.centerPosition : '50%' - if(background.centerColor) { + if (background.centerColor) { style += `background: linear-gradient(${background.angle}, ${background.startColor} 0%, ${background.centerColor} ${centerPosition}, ${background.endColor} 100%);` } else { style += `background: linear-gradient(${background.angle}, ${background.startColor} 0%, ${background.endColor} 100%);` } } - if(maxWidth && maxWidth.indexOf("px") >= 0) { + if (maxWidth && maxWidth.indexOf("px") >= 0) { style += `max-width:${maxWidth};` } - if(maxHeight && maxHeight.indexOf("px") >= 0) { + if (maxHeight && maxHeight.indexOf("px") >= 0) { style += `max-height:${maxHeight};` } - - return `
` + + action = (!action) ? {type: 'none'} : action + if(action.type === 'uri'){ + return `
` + }else if(action.type === 'message') { + return `
` + }else if(action.type === 'postback'){ + return `
` + }else { + return `
` + } } function button_object(json) { @@ -372,14 +384,14 @@ function button_object(json) { let {flex, margin, position, height, style, color, gravity, adjustMode, offsetTop, offsetBottom, offsetStart, offsetEnd, action} = json fl = '' - if(flex > 3) { + if (flex > 3) { style2 += `-webkit-box-flex:${flex};flex-grow:${flex};` } else { fl = (flex >= 0) ? `fl${flex}` : '' } exabs = (position === 'absolute') ? 'ExAbs' : '' - - if(margin && margin.indexOf("px") >= 0) { + + if (margin && margin.indexOf("px") >= 0) { style2 += `margin-top:${margin};` exmgn = '' } else { @@ -388,10 +400,10 @@ function button_object(json) { height = (!height || height === '' || height === 'md') ? '' : 'Ex' + upperalldigit(height) grv = (gravity === 'bottom' || gravity === 'center') ? 'grv' + upper1digit(gravity) : ''; - + ExBtn = 'ExBtnL' - if(style && style !== '') { - switch(style) { + if (style && style !== '') { + switch (style) { case 'link': ExBtn = 'ExBtnL' break; @@ -403,197 +415,198 @@ function button_object(json) { break; default: ExBtn = 'ExBtnL' - // code block - } + // code block + } } - if(color) { + if (color) { style3 += (style === 'link') ? `color:${color} !important;` : `background-color:${color} !important;` } - if(offsetTop && offsetTop.indexOf("px") >= 0) { + if (offsetTop && /px|%/.test(offsetTop)) { style2 += `top:${offsetTop};` ext = '' } else { ext = (offsetTop) ? 'ExT' + upperalldigit(offsetTop) : '' } - if(offsetBottom && offsetBottom.indexOf("px") >= 0) { + if (offsetBottom && /px|%/.test(offsetBottom)) { style2 += `bottom:${offsetBottom};` exb = '' } else { exb = (offsetBottom) ? 'ExB' + upperalldigit(offsetBottom) : '' } - if(offsetStart && offsetStart.indexOf("px") >= 0) { + if (offsetStart && /px|%/.test(offsetStart)) { style2 += `left:${offsetStart};` exl = '' } else { exl = (offsetStart) ? 'ExL' + upperalldigit(offsetStart) : '' } - if(offsetEnd && offsetEnd.indexOf("px") >= 0) { + if (offsetEnd && /px|%/.test(offsetEnd)) { style2 += `right:${offsetEnd};` exr = '' } else { exr = (offsetEnd) ? 'ExR' + upperalldigit(offsetEnd) : '' } - action = (!action) ? {'type':'none'} : action - if(action.type === 'uri') { + action = (!action) ? {'type': 'none'} : action + if (action.type === 'uri') { return `
${action.label}
` - } else if(action.type === 'message') { + } else if (action.type === 'message') { return `
${action.label}
` - } else if(action.type === 'postback') { + } else if (action.type === 'postback') { return `
${action.label}
` } else { return `
${action.label}
` } } + function filler_object(json) { let style = '' let {flex} = json fl = '' - if(flex > 3) { + if (flex > 3) { style += `-webkit-box-flex:${flex};flex-grow:${flex};` } else { fl = (flex >= 0) ? `fl${flex}` : '' } return `
` } + function icon_object(json) { let style2 = '' let {size, aspectRatio, url, position, margin, offsetTop, offsetBottom, offsetStart, offsetEnd} = json let styleimg = `background-image:url('${url}');` - + size = (!size || size === '') ? 'md' : size - if(size.indexOf("px") >= 0) { + if (size.indexOf("px") >= 0) { style2 += `font-size:${size};` size = '' } else { size = 'Ex' + upperalldigit(size) } - - if(!aspectRatio || aspectRatio === '') { + + if (!aspectRatio || aspectRatio === '') { styleimg += `width:1em;` } else { - ratio = ratio[0]/ratio[1] + ratio = ratio[0] / ratio[1] styleimg += `width:${ratio}em;` } exabs = (position === 'absolute') ? 'ExAbs' : '' - - if(margin && margin.indexOf("px") >= 0) { + + if (margin && margin.indexOf("px") >= 0) { style2 += `margin-top:${margin};` exmgn = '' } else { exmgn = (margin) ? 'ExMgnT' + upperalldigit(margin) : '' } - - if(offsetTop && offsetTop.indexOf("px") >= 0) { + + if (offsetTop && /px|%/.test(offsetTop)) { style2 += `top:${offsetTop};` ext = '' } else { ext = (offsetTop) ? 'ExT' + upperalldigit(offsetTop) : '' } - if(offsetBottom && offsetBottom.indexOf("px") >= 0) { + if (offsetBottom && /px|%/.test(offsetBottom)) { style2 += `bottom:${offsetBottom};` exb = '' } else { exb = (offsetBottom) ? 'ExB' + upperalldigit(offsetBottom) : '' } - if(offsetStart && offsetStart.indexOf("px") >= 0) { + if (offsetStart && /px|%/.test(offsetStart)) { style2 += `left:${offsetStart};` exl = '' } else { exl = (offsetStart) ? 'ExL' + upperalldigit(offsetStart) : '' } - if(offsetEnd && offsetEnd.indexOf("px") >= 0) { + if (offsetEnd && /px|%/.test(offsetEnd)) { style2 += `right:${offsetEnd};` exr = '' } else { exr = (offsetEnd) ? 'ExR' + upperalldigit(offsetEnd) : '' } - + return `
` } + function image_object(json) { let style = '' let style2 = '' let {aspectMode, size, aspectRatio, url, position, flex, margin, align, gravity, backgroundColor, offsetTop, offsetBottom, offsetStart, offsetEnd, action} = json let styleimg = `background-image:url('${url}');` - if(backgroundColor) { + if (backgroundColor) { styleimg += `background-color:${backgroundColor} !important;` } aspectMode = (!aspectMode || aspectMode === '') ? 'fit' : aspectMode size = (!size || size === '') ? 'md' : size aspectMode = upperalldigit(aspectMode) - if(size.indexOf("px") >= 0) { - style2 += `width:${size};` - size = '' - } else if(size.indexOf("%") >= 0) { + + if (/px|%/.test(size)) { style2 += `width:${size};` size = '' } else { size = 'Ex' + upperalldigit(size) } - - if(!aspectRatio || aspectRatio === '') { + + if (!aspectRatio || aspectRatio === '') { ratio = '100' } else { ratio = aspectRatio.split(':') - ratio = ratio[1]*100/ratio[0] + ratio = ratio[1] * 100 / ratio[0] } fl = '' - if(flex > 3) { + if (flex > 3) { style += `-webkit-box-flex:${flex};flex-grow:${flex};` } else { fl = (flex >= 0) ? `fl${flex}` : '' } exabs = (position === 'absolute') ? 'ExAbs' : '' - - if(margin && margin.indexOf("px") >= 0) { + + if (margin && margin.indexOf("px") >= 0) { style += `margin-top:${margin};` exmgn = '' } else { exmgn = (margin) ? 'ExMgnT' + upperalldigit(margin) : '' } - + alg = (align === 'start' || align === 'end') ? 'alg' + upper1digit(align) : ''; grv = (gravity === 'bottom' || gravity === 'center') ? 'grv' + upper1digit(gravity) : ''; - if(offsetTop && offsetTop.indexOf("px") >= 0) { + if (offsetTop && /px|%/.test(offsetTop)) { style += `top:${offsetTop};` ext = '' } else { ext = (offsetTop) ? 'ExT' + upperalldigit(offsetTop) : '' } - if(offsetBottom && offsetBottom.indexOf("px") >= 0) { + if (offsetBottom && /px|%/.test(offsetBottom)) { style += `bottom:${offsetBottom};` exb = '' } else { exb = (offsetBottom) ? 'ExB' + upperalldigit(offsetBottom) : '' } - if(offsetStart && offsetStart.indexOf("px") >= 0) { + if (offsetStart && /px|%/.test(offsetStart)) { style += `left:${offsetStart};` exl = '' } else { exl = (offsetStart) ? 'ExL' + upperalldigit(offsetStart) : '' } - if(offsetEnd && offsetEnd.indexOf("px") >= 0) { + if (offsetEnd && /px|%/.test(offsetEnd)) { style += `right:${offsetEnd};` exr = '' } else { exr = (offsetEnd) ? 'ExR' + upperalldigit(offsetEnd) : '' } - action = (!action) ? {'type':'none'} : action - if(action.type === 'uri') { + action = (!action) ? {'type': 'none'} : action + if (action.type === 'uri') { return `
@@ -601,7 +614,7 @@ function image_object(json) {
` - } else if(action.type === 'message') { + } else if (action.type === 'message') { return `
@@ -609,7 +622,7 @@ function image_object(json) {
` - } else if(action.type === 'postback') { + } else if (action.type === 'postback') { return `
@@ -626,42 +639,43 @@ function image_object(json) {
` } - - } + function separator_object(layout, json) { let style = '' let {margin, color} = json - if(margin && margin.indexOf("px") >= 0) { + if (margin && margin.indexOf("px") >= 0) { style += (layout === 'vertical') ? `margin-top:${margin};` : `margin-left:${margin};` exmgn = '' } else { exmgn = (margin) ? 'ExMgnT' + upperalldigit(margin) : '' } - if(color) { + if (color) { style += `border-color:${color} !important;` } return `
` } + function spacer_object(json) { let {size} = json size = (!size || size === '') ? 'md' : size - if(size.indexOf("px") >= 0) { + if (size.indexOf("px") >= 0) { size = '' } else { size = 'spc' + upperalldigit(size) } return `
` } + function span_object(json) { let style2 = '' let {text, size, color, weight, style, decoration} = json - - if(size && size !== '') { - if(size.indexOf("px") >= 0) { + + if (size && size !== '') { + if (size.indexOf("px") >= 0) { style2 += `font-size:${size};` size = '' } else { @@ -670,16 +684,17 @@ function span_object(json) { } else { size = '' } - - if(color && color!=='') { + + if (color && color !== '') { style2 += `color:${color};` } ExWB = (weight === 'bold') ? 'ExWB' : '' ExFntSty = (style === 'normal') ? 'ExFntStyNml' : (style === 'italic') ? 'ExFntStyIt' : '' ExTxtDec = (decoration === 'line-through') ? 'ExTxtDecLt' : (decoration === 'underline') ? 'ExTxtDecUl' : (decoration === 'none') ? 'ExTxtDecNone' : '' - + return `${text}` } + function carousel_struc() { return `

` } @@ -692,115 +707,138 @@ function bubble_struc(json) { return `
` } + function hero_struc(json) { let {styles} = json let backgroundColor = '' - if(styles) { - let { hero } = styles + if (styles) { + let {hero} = styles backgroundColor = (hero && hero.backgroundColor) ? `background-color:${hero.backgroundColor}` : '' } return `
` } + function header_struc(json) { let {styles} = json let backgroundColor = '' - if(styles) { - let { header } = styles + if (styles) { + let {header} = styles backgroundColor = (header && header.backgroundColor) ? `background-color:${header.backgroundColor}` : '' } return `
` } + function body_struc(json) { let {footer, styles} = json let backgroundColor = '' - if(styles) { - let { body } = styles + if (styles) { + let {body} = styles backgroundColor = (body && body.backgroundColor) ? `background-color:${body.backgroundColor}` : '' } let ExHasFooter = (footer) ? 'ExHasFooter' : '' return `
` } + function footer_struc(json) { let {styles} = json let backgroundColor = '' - if(styles) { - let { footer } = styles + if (styles) { + let {footer} = styles backgroundColor = (footer && footer.backgroundColor) ? `background-color:${footer.backgroundColor}` : '' } return `
` } + function text_object(json) { - + let style2 = '' - let {flex, margin, size, position, align, gravity, text, color, weight, style, decoration, wrap, maxLines, adjustMode, offsetTop, offsetBottom, offsetStart, offsetEnd, lineSpacing} = json - + let {flex, margin, size, position, align, gravity, text, color, weight, style, decoration, wrap, maxLines, adjustMode, offsetTop, offsetBottom, offsetStart, offsetEnd, lineSpacing, action} = json + fl = '' - if(flex > 3) { + if (flex > 3) { style2 += `-webkit-box-flex:${flex};flex-grow:${flex};` } else { fl = (flex >= 0) ? `fl${flex}` : '' } exabs = (position === 'absolute') ? 'ExAbs' : '' - - if(margin && margin.indexOf("px") >= 0) { + + if (margin && margin.indexOf("px") >= 0) { style2 += `margin-top:${margin};` exmgn = '' } else { exmgn = (margin) ? 'ExMgnL' + upperalldigit(margin) : '' } - + alg = (align === 'start' || align === 'end' || align === 'center') ? 'ExAlg' + upper1digit(align) : ''; grv = (gravity === 'bottom' || gravity === 'center') ? 'grv' + upper1digit(gravity) : ''; size = (!size || size === '') ? 'md' : size - if(size.indexOf("px") >= 0) { + if (size.indexOf("px") >= 0) { style2 += `font-size:${size};` size = '' } else { size = 'Ex' + upperalldigit(size) } - if(color && color!=='') { + if (color && color !== '') { style2 += `color:${color};` } ExWB = (weight === 'bold') ? 'ExWB' : '' ExFntSty = (style === 'normal') ? 'ExFntStyNml' : (style === 'italic') ? 'ExFntStyIt' : '' ExTxtDec = (decoration === 'line-through') ? 'ExTxtDecLt' : (decoration === 'underline') ? 'ExTxtDecUl' : (decoration === 'none') ? 'ExTxtDecNone' : '' ExWrap = (wrap === true) ? 'ExWrap' : '' - if(offsetTop && offsetTop.indexOf("px") >= 0) { + if (offsetTop && offsetTop.indexOf("px") >= 0) { style2 += `top:${offsetTop};` ext = '' } else { ext = (offsetTop) ? 'ExT' + upperalldigit(offsetTop) : '' } - if(offsetBottom && offsetBottom.indexOf("px") >= 0) { + if (offsetBottom && /px|%/.test(offsetBottom)) { style2 += `bottom:${offsetBottom};` exb = '' } else { exb = (offsetBottom) ? 'ExB' + upperalldigit(offsetBottom) : '' } - if(offsetStart && offsetStart.indexOf("px") >= 0) { + if (offsetStart && /px|%/.test(offsetStart)) { style2 += `left:${offsetStart};` exl = '' } else { exl = (offsetStart) ? 'ExL' + upperalldigit(offsetStart) : '' } - if(offsetEnd && offsetEnd.indexOf("px") >= 0) { + if (offsetEnd && /px|%/.test(offsetEnd)) { style2 += `right:${offsetEnd};` exr = '' } else { exr = (offsetEnd) ? 'ExR' + upperalldigit(offsetEnd) : '' } - if(lineSpacing && lineSpacing.indexOf("px") >= 0) { - let lineHeight = (parseInt(lineSpacing.replace('px','')) + 15) + 'px' + let cstyle = '' + if(maxLines && /\d{0,2}/.test(maxLines)){ + // style2 += `display : -webkit-box; -webkit-line-clamp : ${maxLines}; text-overflow: ellipsis; overflow:hidden; -webkit-box-orient: vertical; ` + cstyle = `display: -webkit-box; -webkit-line-clamp: ${maxLines}; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;` + } + + if (lineSpacing && lineSpacing.indexOf("px") >= 0) { + let lineHeight = (parseInt(lineSpacing.replace('px', '')) + 15) + 'px' style2 += `line-height:${lineHeight};` } - text = (!text) ? '' : text - return `

${text}

` + text = (!text) ? '' : text.replace(/\n/g, '
') + // return `

${text}

` + // `

${text}

` + action = (!action) ? {type : 'none'} : action + if (action.type === 'uri') { + return `
${text}
` + }else if(action.type === 'message'){ + return `

${text}

` + }else if(action.type === 'postback'){ + return `

${text}

` + }else { + return `

${text}

` + } } + function upper1digit(str) { return str.charAt(0).toUpperCase() } @@ -808,5 +846,9 @@ function upper2digit(str) { return str.charAt(0).toUpperCase() + str.substring(1, 2) } function upperalldigit(str) { - return str.charAt(0).toUpperCase() + str.slice(1) + if (str.toLowerCase() === 'xxl') { + return 'XXl' + } else { + return str.charAt(0).toUpperCase() + str.slice(1) + } } diff --git a/js/flex2html.min.js b/js/flex2html.min.js index abed5ad..15c65f3 100644 --- a/js/flex2html.min.js +++ b/js/flex2html.min.js @@ -1 +1 @@ -function flex2html(e,t){let r=carousel_struc(),i="";return"flex"===t.type&&("bubble"===(t=t.contents).type?(i=bubble_object(t),r=r.replace("\x3c!-- inner --\x3e",i)):"carousel"===t.type&&t.contents.forEach(((e,t)=>{let i=bubble_object(e);i=i.replace("\x3c!-- content --\x3e",""),i=i.replace("\x3c!-- inner --\x3e",""),r=r.replace("\x3c!-- inner --\x3e",i+"\x3c!-- inner --\x3e")}))),document.getElementById(e).innerHTML+=r,r}function bubble_object(e){let{hero:t,header:r,body:i,footer:l}=e,o=hero_struc(e),a=header_struc(e),x=body_struc(e),n=footer_struc(e),d=bubble_struc(e),c="";if("video"===t?.type)c=hero_box_video(t);else if("image"===t?.type)c=convert_object("",t);else for(let e in t)if(t.hasOwnProperty(e)&&"type"===e&&"box"===t[e]){c=box_object(t),layout=t.layout,c=box_recursive(c,layout,t.contents)}o=o.replace("\x3c!-- inner --\x3e",c),c="";for(let e in r)if(r.hasOwnProperty(e)&&"type"===e&&"box"===r[e]){c=box_object(r),layout=r.layout,c=box_recursive(c,layout,r.contents)}a=a.replace("\x3c!-- inner --\x3e",c),c="";for(let e in i)if(i.hasOwnProperty(e)&&"type"===e&&"box"===i[e]){c=box_object(i),layout=i.layout,c=box_recursive(c,layout,i.contents)}x=x.replace("\x3c!-- inner --\x3e",c),c="";for(let e in l)if(l.hasOwnProperty(e)&&"type"===e&&"box"===l[e]){c=box_object(l),layout=l.layout,c=box_recursive(c,layout,l.contents)}return n=n.replace("\x3c!-- inner --\x3e",c),d=d.replace("\x3c!-- hero --\x3e",o),d=d.replace("\x3c!-- header --\x3e",a),d=d.replace("\x3c!-- body --\x3e",x),d=d.replace("\x3c!-- footer --\x3e",n),d}function hero_box_video(e){return`
`}function box_recursive(e,t,r){let i=[];return r.forEach(((e,r)=>{let l;if("box"===e.type){let t=box_object(e);layout2=e.layout,l=box_recursive(t,layout2,e.contents)}else if("text"===e.type&&e.contents&&e.contents.length>0){let r=convert_object(t,e);layout2=e.layout,l=box_recursive(r,layout2,e.contents)}else l=convert_object(t,e);i[r]=l})),r.forEach(((t,r)=>{i[r]=i[r].replace("\x3c!-- content --\x3e",""),e=e.replace("\x3c!-- content --\x3e",i[r]+"\x3c!-- content --\x3e")})),e}function convert_object(e,t){switch(t.type){case"image":object=image_object(t);break;case"icon":object=icon_object(t);break;case"text":object=text_object(t);break;case"span":object=span_object(t);break;case"button":object=button_object(t);break;case"filler":object=filler_object(t);break;case"spacer":object=spacer_object(t);break;case"separator":object=separator_object(e,t);break;default:object=null}return object}function box_object(e){let t="",{layout:r,position:i,flex:l,spacing:o,margin:a,width:x,height:n,backgroundColor:d,borderColor:c,borderWidth:s,cornerRadius:p,justifyContent:$,alignItems:f,offsetTop:b,offsetBottom:g,offsetStart:u,offsetEnd:y,paddingAll:E,paddingTop:m,paddingBottom:v,paddingStart:h,paddingEnd:k,background:B,maxWidth:j,maxHeight:_}=e;if("baseline"===r?(layout1="hr",layout2="bl"):"horizontal"===r?(layout1="hr",layout2=""):"vertical"===r&&(layout1="vr",layout2=""),fl="",l>3?t+=`-webkit-box-flex:${l};flex-grow:${l};`:fl=l>=0?`fl${l}`:"",exabs="absolute"===i?"ExAbs":"",o&&o.indexOf("px")>=0?spc="":spc=o?"spc"+upperalldigit(o):"",a&&a.indexOf("px")>=0?(t+=`margin-top:${a};`,exmgn=""):exmgn=a?"ExMgnT"+upperalldigit(a):"",x&&""!==x&&(t+=`width:${x}; max-width:${x};`),n&&""!==n&&(t+=`height:${n};`),d&&(t+=`background-color:${d} !important;`),c&&(t+=`border-color:${c} !important;`),s&&s.indexOf("px")>=0)t+=`border-width:${s};`,ExBdr="";else switch(s){case"none":ExBdr="ExBdrWdtNone";break;case"light":ExBdr="ExBdrWdtLgh";break;case"normal":ExBdr="ExBdrWdtNml";break;case"medium":ExBdr="ExBdrWdtMdm";break;case"semi-bold":ExBdr="ExBdrWdtSbd";break;case"bold":ExBdr="ExBdrWdtBld";break;default:ExBdr=""}if(p&&p.indexOf("px")>=0?(t+=`border-radius:${p};`,ExBdrRad=""):ExBdrRad=p?"ExBdrRad"+upperalldigit(p):"",jfc="",$&&""!==$)switch($){case"center":jfc="itms-jfcC";break;case"flex-start":jfc="itms-jfcS";break;case"flex-end":jfc="itms-jfcE";break;case"space-between":jfc="itms-jfcSB";break;case"space-around":jfc="itms-jfcSA";break;case"space-evenly":jfc="itms-jfcSE";break;default:jfc=""}if(alg="",f&&""!==f)switch(f){case"center":alg="itms-algC";break;case"flex-start":alg="itms-algS";break;case"flex-end":alg="itms-algE";break;default:alg=""}return b&&b.indexOf("px")>=0?(t+=`top:${b};`,ext=""):ext=b?"ExT"+upperalldigit(b):"",g&&g.indexOf("px")>=0?(t+=`bottom:${g};`,exb=""):exb=g?"ExB"+upperalldigit(g):"",u&&u.indexOf("px")>=0?(t+=`left:${u};`,exl=""):exl=u?"ExL"+upperalldigit(u):"",y&&y.indexOf("px")>=0?(t+=`right:${y};`,exr=""):exr=y?"ExR"+upperalldigit(y):"",E&&E.indexOf("px")>=0?(t+=`padding:${E};`,ExPadA=""):ExPadA=E?"ExPadA"+upperalldigit(E):"",m&&m.indexOf("px")>=0?(t+=`padding-top:${m};`,ExPadT=""):ExPadT=m?"ExPadT"+upperalldigit(m):"",v&&v.indexOf("px")>=0?(t+=`padding-bottom:${v};`,ExPadB=""):ExPadB=v?"ExPadB"+upperalldigit(v):"",h&&h.indexOf("px")>=0?(t+=`padding-left:${h};`,ExPadL=""):ExPadL=h?"ExPadL"+upperalldigit(h):"",k&&k.indexOf("px")>=0?(t+=`padding-right:${k};`,ExPadR=""):ExPadR=k?"ExPadR"+upperalldigit(k):"",B&&"linearGradient"===B.type&&(centerPosition=B.centerPosition?B.centerPosition:"50%",B.centerColor?t+=`background: linear-gradient(${B.angle}, ${B.startColor} 0%, ${B.centerColor} ${centerPosition}, ${B.endColor} 100%);`:t+=`background: linear-gradient(${B.angle}, ${B.startColor} 0%, ${B.endColor} 100%);`),j&&j.indexOf("px")>=0&&(t+=`max-width:${j};`),_&&_.indexOf("px")>=0&&(t+=`max-height:${_};`),`
\x3c!-- content --\x3e
`}function button_object(e){style2="",style3="";let{flex:t,margin:r,position:i,height:l,style:o,color:a,gravity:x,adjustMode:n,offsetTop:d,offsetBottom:c,offsetStart:s,offsetEnd:p,action:$}=e;if(fl="",t>3?style2+=`-webkit-box-flex:${t};flex-grow:${t};`:fl=t>=0?`fl${t}`:"",exabs="absolute"===i?"ExAbs":"",r&&r.indexOf("px")>=0?(style2+=`margin-top:${r};`,exmgn=""):exmgn=r?"ExMgnT"+upperalldigit(r):"",l=l&&""!==l&&"md"!==l?"Ex"+upperalldigit(l):"",grv="bottom"===x||"center"===x?"grv"+upper1digit(x):"",ExBtn="ExBtnL",o&&""!==o)switch(o){case"link":default:ExBtn="ExBtnL";break;case"primary":ExBtn="ExBtn1";break;case"secondary":ExBtn="ExBtn2"}return a&&(style3+="link"===o?`color:${a} !important;`:`background-color:${a} !important;`),d&&d.indexOf("px")>=0?(style2+=`top:${d};`,ext=""):ext=d?"ExT"+upperalldigit(d):"",c&&c.indexOf("px")>=0?(style2+=`bottom:${c};`,exb=""):exb=c?"ExB"+upperalldigit(c):"",s&&s.indexOf("px")>=0?(style2+=`left:${s};`,exl=""):exl=s?"ExL"+upperalldigit(s):"",p&&p.indexOf("px")>=0?(style2+=`right:${p};`,exr=""):exr=p?"ExR"+upperalldigit(p):"",$=$||{type:"none"},"uri"===$.type?`
${$.label}
`:"message"===$.type?`
${$.label}
`:"postback"===$.type?`
${$.label}
`:`
${$.label}
`}function filler_object(e){let t="",{flex:r}=e;return fl="",r>3?t+=`-webkit-box-flex:${r};flex-grow:${r};`:fl=r>=0?`fl${r}`:"",`
`}function icon_object(e){let t="",{size:r,aspectRatio:i,url:l,position:o,margin:a,offsetTop:x,offsetBottom:n,offsetStart:d,offsetEnd:c}=e,s=`background-image:url('${l}');`;return r=r&&""!==r?r:"md",r.indexOf("px")>=0?(t+=`font-size:${r};`,r=""):r="Ex"+upperalldigit(r),i&&""!==i?(ratio=ratio[0]/ratio[1],s+=`width:${ratio}em;`):s+="width:1em;",exabs="absolute"===o?"ExAbs":"",a&&a.indexOf("px")>=0?(t+=`margin-top:${a};`,exmgn=""):exmgn=a?"ExMgnT"+upperalldigit(a):"",x&&x.indexOf("px")>=0?(t+=`top:${x};`,ext=""):ext=x?"ExT"+upperalldigit(x):"",n&&n.indexOf("px")>=0?(t+=`bottom:${n};`,exb=""):exb=n?"ExB"+upperalldigit(n):"",d&&d.indexOf("px")>=0?(t+=`left:${d};`,exl=""):exl=d?"ExL"+upperalldigit(d):"",c&&c.indexOf("px")>=0?(t+=`right:${c};`,exr=""):exr=c?"ExR"+upperalldigit(c):"",`
`}function image_object(e){let t="",r="",{aspectMode:i,size:l,aspectRatio:o,url:a,position:x,flex:n,margin:d,align:c,gravity:s,backgroundColor:p,offsetTop:$,offsetBottom:f,offsetStart:b,offsetEnd:g,action:u}=e,y=`background-image:url('${a}');`;return p&&(y+=`background-color:${p} !important;`),i=i&&""!==i?i:"fit",l=l&&""!==l?l:"md",i=upperalldigit(i),l.indexOf("px")>=0||l.indexOf("%")>=0?(r+=`width:${l};`,l=""):l="Ex"+upperalldigit(l),o&&""!==o?(ratio=o.split(":"),ratio=100*ratio[1]/ratio[0]):ratio="100",fl="",n>3?t+=`-webkit-box-flex:${n};flex-grow:${n};`:fl=n>=0?`fl${n}`:"",exabs="absolute"===x?"ExAbs":"",d&&d.indexOf("px")>=0?(t+=`margin-top:${d};`,exmgn=""):exmgn=d?"ExMgnT"+upperalldigit(d):"",alg="start"===c||"end"===c?"alg"+upper1digit(c):"",grv="bottom"===s||"center"===s?"grv"+upper1digit(s):"",$&&$.indexOf("px")>=0?(t+=`top:${$};`,ext=""):ext=$?"ExT"+upperalldigit($):"",f&&f.indexOf("px")>=0?(t+=`bottom:${f};`,exb=""):exb=f?"ExB"+upperalldigit(f):"",b&&b.indexOf("px")>=0?(t+=`left:${b};`,exl=""):exl=b?"ExL"+upperalldigit(b):"",g&&g.indexOf("px")>=0?(t+=`right:${g};`,exr=""):exr=g?"ExR"+upperalldigit(g):"",u=u||{type:"none"},"uri"===u.type?`
\n
\n \n \n \n
\n
`:"message"===u.type?`
\n
\n \n \n \n
\n
`:"postback"===u.type?`
\n
\n \n \n \n
\n
`:`
\n
\n \n \n \n
\n
`}function separator_object(e,t){let r="",{margin:i,color:l}=t;return i&&i.indexOf("px")>=0?(r+="vertical"===e?`margin-top:${i};`:`margin-left:${i};`,exmgn=""):exmgn=i?"ExMgnT"+upperalldigit(i):"",l&&(r+=`border-color:${l} !important;`),`
`}function spacer_object(e){let{size:t}=e;return t=t&&""!==t?t:"md",t=t.indexOf("px")>=0?"":"spc"+upperalldigit(t),`
`}function span_object(e){let t="",{text:r,size:i,color:l,weight:o,style:a,decoration:x}=e;return i&&""!==i?i.indexOf("px")>=0?(t+=`font-size:${i};`,i=""):i="Ex"+upperalldigit(i):i="",l&&""!==l&&(t+=`color:${l};`),ExWB="bold"===o?"ExWB":"",ExFntSty="normal"===a?"ExFntStyNml":"italic"===a?"ExFntStyIt":"",ExTxtDec="line-through"===x?"ExTxtDecLt":"underline"===x?"ExTxtDecUl":"none"===x?"ExTxtDecNone":"",`${r}`}function carousel_struc(){return'
\x3c!-- inner --\x3e

'}function bubble_struc(e){let{size:t,direction:r,action:i}=e;return t=t&&""!==t?t:"medium",r=r&&""!=r?r:"ltr",t=upper2digit(t),`
\x3c!-- hero --\x3e\x3c!-- header --\x3e\x3c!-- body --\x3e\x3c!-- footer --\x3e
`}function hero_struc(e){let{styles:t}=e,r="";if(t){let{hero:e}=t;r=e&&e.backgroundColor?`background-color:${e.backgroundColor}`:""}return`
\x3c!-- inner --\x3e
`}function header_struc(e){let{styles:t}=e,r="";if(t){let{header:e}=t;r=e&&e.backgroundColor?`background-color:${e.backgroundColor}`:""}return`
\x3c!-- inner --\x3e
`}function body_struc(e){let{footer:t,styles:r}=e,i="";if(r){let{body:e}=r;i=e&&e.backgroundColor?`background-color:${e.backgroundColor}`:""}return`
\x3c!-- inner --\x3e
`}function footer_struc(e){let{styles:t}=e,r="";if(t){let{footer:e}=t;r=e&&e.backgroundColor?`background-color:${e.backgroundColor}`:""}return`
\x3c!-- inner --\x3e
`}function text_object(e){let t="",{flex:r,margin:i,size:l,position:o,align:a,gravity:x,text:n,color:d,weight:c,style:s,decoration:p,wrap:$,maxLines:f,adjustMode:b,offsetTop:g,offsetBottom:u,offsetStart:y,offsetEnd:E,lineSpacing:m}=e;if(fl="",r>3?t+=`-webkit-box-flex:${r};flex-grow:${r};`:fl=r>=0?`fl${r}`:"",exabs="absolute"===o?"ExAbs":"",i&&i.indexOf("px")>=0?(t+=`margin-top:${i};`,exmgn=""):exmgn=i?"ExMgnL"+upperalldigit(i):"",alg="start"===a||"end"===a||"center"===a?"ExAlg"+upper1digit(a):"",grv="bottom"===x||"center"===x?"grv"+upper1digit(x):"",l=l&&""!==l?l:"md",l.indexOf("px")>=0?(t+=`font-size:${l};`,l=""):l="Ex"+upperalldigit(l),d&&""!==d&&(t+=`color:${d};`),ExWB="bold"===c?"ExWB":"",ExFntSty="normal"===s?"ExFntStyNml":"italic"===s?"ExFntStyIt":"",ExTxtDec="line-through"===p?"ExTxtDecLt":"underline"===p?"ExTxtDecUl":"none"===p?"ExTxtDecNone":"",ExWrap=!0===$?"ExWrap":"",g&&g.indexOf("px")>=0?(t+=`top:${g};`,ext=""):ext=g?"ExT"+upperalldigit(g):"",u&&u.indexOf("px")>=0?(t+=`bottom:${u};`,exb=""):exb=u?"ExB"+upperalldigit(u):"",y&&y.indexOf("px")>=0?(t+=`left:${y};`,exl=""):exl=y?"ExL"+upperalldigit(y):"",E&&E.indexOf("px")>=0?(t+=`right:${E};`,exr=""):exr=E?"ExR"+upperalldigit(E):"",m&&m.indexOf("px")>=0){t+=`line-height:${parseInt(m.replace("px",""))+15+"px"};`}return n=n||"",`

${n}\x3c!-- content --\x3e

`}function upper1digit(e){return e.charAt(0).toUpperCase()}function upper2digit(e){return e.charAt(0).toUpperCase()+e.substring(1,2)}function upperalldigit(e){return e.charAt(0).toUpperCase()+e.slice(1)} \ No newline at end of file +(function(g,h){const I=f,i=g();while(!![]){try{const j=-parseInt(I(0x22d))/0x1*(-parseInt(I(0x1f0))/0x2)+-parseInt(I(0x20b))/0x3+parseInt(I(0x16e))/0x4+parseInt(I(0x197))/0x5+-parseInt(I(0x1f6))/0x6+parseInt(I(0x192))/0x7*(-parseInt(I(0x188))/0x8)+parseInt(I(0x1ba))/0x9;if(j===h)break;else i['push'](i['shift']());}catch(k){i['push'](i['shift']());}}}(e,0x3deed));const d=(function(){let g=!![];return function(h,i){const j=g?function(){const J=f;if(i){const k=i[J(0x1e3)](h,arguments);return i=null,k;}}:function(){};return g=![],j;};}()),c=d(this,function(){const K=f;return c[K(0x160)]()[K(0x1c4)](K(0x19c))['toString']()[K(0x1e7)](c)[K(0x1c4)](K(0x19c));});c();const b=(function(){let g=!![];return function(h,i){const j=g?function(){const L=f;if(i){const k=i[L(0x1e3)](h,arguments);return i=null,k;}}:function(){};return g=![],j;};}()),a=b(this,function(){const N=f,g=function(){const M=f;let k;try{k=Function(M(0x177)+M(0x1c9)+');')();}catch(l){k=window;}return k;},h=g(),i=h['console']=h['console']||{},j=[N(0x1bb),N(0x1b2),N(0x19b),'error',N(0x1bf),N(0x179),'trace'];for(let k=0x0;k{const P=O;let m=bubble_object(k);m=m['replace'](P(0x196),''),m=m[P(0x1c3)]('',''),i=i[P(0x1c3)](P(0x1df),m+P(0x1df));});}return document[O(0x1e0)](g)[O(0x1f3)]+=i,i;}function bubble_object(g){const Q=f;let {hero:h,header:i,body:j,footer:k}=g,l=hero_struc(g),m=header_struc(g),n=body_struc(g),o=footer_struc(g),p=bubble_struc(g),q='';if(h?.[Q(0x1ad)]===Q(0x1ca))q=hero_box_video(h);else{if(h?.[Q(0x1ad)]===Q(0x234))q=convert_object('',h);else for(let r in h){if(h[Q(0x1aa)](r)){if(r===Q(0x1ad)&&h[r]===Q(0x1f9)){q=box_object(h),layout=h[Q(0x190)];let s=box_recursive(q,layout,h[Q(0x200)]);q=s;}else{}}}}l=l[Q(0x1c3)](Q(0x1df),q),q='';for(let t in i){if(i[Q(0x1aa)](t)){if(t===Q(0x1ad)&&i[t]===Q(0x1f9)){q=box_object(i),layout=i[Q(0x190)];let u=box_recursive(q,layout,i[Q(0x200)]);q=u;}}}m=m[Q(0x1c3)](Q(0x1df),q),q='';for(let v in j){if(j['hasOwnProperty'](v)){if(v===Q(0x1ad)&&j[v]===Q(0x1f9)){q=box_object(j),layout=j[Q(0x190)];let w=box_recursive(q,layout,j['contents']);q=w;}}}n=n[Q(0x1c3)]('',q),q='';for(let x in k){if(k[Q(0x1aa)](x)){if(x===Q(0x1ad)&&k[x]===Q(0x1f9)){q=box_object(k),layout=k[Q(0x190)];let y=box_recursive(q,layout,k[Q(0x200)]);q=y;}}}return o=o[Q(0x1c3)](Q(0x1df),q),p=p[Q(0x1c3)](Q(0x185),l),p=p[Q(0x1c3)]('',m),p=p[Q(0x1c3)](Q(0x202),n),p=p[Q(0x1c3)](Q(0x1b7),o),p;}function hero_box_video(g){const R=f;return'
\x0a\x20\x20\x20{const S=f;let m;if(k['type']==='box'){let n=box_object(k);layout2=k[S(0x190)],m=box_recursive(n,layout2,k[S(0x200)]);}else{if(k['type']===S(0x161)&&k[S(0x200)]&&k[S(0x200)][S(0x17a)]>0x0){let o=convert_object(h,k);layout2=k[S(0x190)],m=box_recursive(o,layout2,k[S(0x200)]);}else m=convert_object(h,k);}j[l]=m;}),i[T(0x17f)]((k,l)=>{const U=T;j[l]=j[l][U(0x1c3)]('',''),g=g['replace'](U(0x196),j[l]+U(0x196));}),g;}function convert_object(g,h){const V=f;switch(h[V(0x1ad)]){case'image':object=image_object(h);break;case V(0x228):object=icon_object(h);break;case V(0x161):object=text_object(h);break;case V(0x1c2):object=span_object(h);break;case'button':object=button_object(h);break;case V(0x1c7):object=filler_object(h);break;case V(0x174):object=spacer_object(h);break;case V(0x1da):object=separator_object(g,h);break;default:object=null;}return object;}function box_object(g){const W=f;let h='',{layout:i,position:j,flex:k,spacing:l,margin:m,width:n,height:o,backgroundColor:p,borderColor:q,borderWidth:r,cornerRadius:s,justifyContent:t,alignItems:u,offsetTop:v,offsetBottom:w,offsetStart:x,offsetEnd:y,paddingAll:z,paddingTop:A,paddingBottom:B,paddingStart:C,paddingEnd:D,background:E,maxWidth:F,maxHeight:G,action:H}=g;if(i===W(0x19e))layout1='hr',layout2='bl';else{if(i===W(0x1bd))layout1='hr',layout2='';else i===W(0x1d2)&&(layout1='vr',layout2='');}fl='';k>0x3?h+=W(0x1cf)+k+W(0x1a7)+k+';':fl=k>=0x0?'fl'+k:'';exabs=j==='absolute'?W(0x1ec):'';l&&l[W(0x1ff)]('px')>=0x0?(h+='gap:'+l+';',spc=''):spc=l?W(0x1f2)+upperalldigit(l):'';m&&m[W(0x1ff)]('px')>=0x0?(h+=W(0x22c)+m+';',exmgn=''):exmgn=m?W(0x1f7)+upperalldigit(m):'';n&&n!==''&&(h+=W(0x184)+n+W(0x1d0)+n+';');o&&o!==''&&(h+=W(0x178)+o+';');p&&(h+=W(0x186)+p+'\x20!important;');q&&(h+=W(0x199)+q+W(0x1af));if(r&&r['indexOf']('px')>=0x0)h+=W(0x206)+r+';',ExBdr='';else switch(r){case W(0x1b1):ExBdr=W(0x1dc);break;case W(0x1f4):ExBdr=W(0x219);break;case'normal':ExBdr='ExBdrWdtNml';break;case'medium':ExBdr=W(0x21e);break;case'semi-bold':ExBdr=W(0x20c);break;case W(0x18d):ExBdr='ExBdrWdtBld';break;default:ExBdr='';}s&&s[W(0x1ff)]('px')>=0x0?(h+=W(0x1ac)+s+';',ExBdrRad=''):ExBdrRad=s?'ExBdrRad'+upperalldigit(s):'';jfc='';if(t&&t!=='')switch(t){case'center':jfc='itms-jfcC';break;case'flex-start':jfc=W(0x164);break;case W(0x1e5):jfc='itms-jfcE';break;case W(0x207):jfc=W(0x1e1);break;case W(0x18c):jfc=W(0x21b);break;case W(0x1f8):jfc=W(0x1a8);break;default:jfc='';}alg='';if(u&&u!=='')switch(u){case W(0x204):alg=W(0x17b);break;case W(0x173):alg=W(0x208);break;case W(0x1e5):alg=W(0x19f);break;default:alg='';}v&&/px|%/[W(0x224)](v)?(h+=W(0x20f)+v+';',ext=''):ext=v?W(0x1f1)+upperalldigit(v):'';w&&/px|%/[W(0x224)](w)?(h+=W(0x170)+w+';',exb=''):exb=w?W(0x233)+upperalldigit(w):'';x&&/px|%/[W(0x224)](x)?(h+=W(0x1fc)+x+';',exl=''):exl=x?W(0x1a4)+upperalldigit(x):'';y&&/px|%/['test'](y)?(h+='right:'+y+';',exr=''):exr=y?W(0x18e)+upperalldigit(y):'';z&&/px|%/[W(0x224)](z)?(h+='padding:'+z+';',ExPadA=''):ExPadA=z?W(0x20e)+upperalldigit(z):'';A&&/px|%/[W(0x224)](A)?(h+=W(0x1b5)+A+';',ExPadT=''):ExPadT=A?W(0x194)+upperalldigit(A):'';B&&/px|%/['test'](B)?(h+='padding-bottom:'+B+';',ExPadB=''):ExPadB=B?'ExPadB'+upperalldigit(B):'';C&&/px|%/[W(0x224)](C)?(h+=W(0x1b8)+C+';',ExPadL=''):ExPadL=C?'ExPadL'+upperalldigit(C):'';D&&/px|%/[W(0x224)](D)?(h+='padding-right:'+D+';',ExPadR=''):ExPadR=D?W(0x216)+upperalldigit(D):'';E&&E[W(0x1ad)]===W(0x1d7)&&(centerPosition=E[W(0x210)]?E[W(0x210)]:W(0x220),E[W(0x16c)]?h+=W(0x187)+E['angle']+',\x20'+E[W(0x1be)]+W(0x1a0)+E['centerColor']+'\x20'+centerPosition+',\x20'+E[W(0x218)]+W(0x181):h+=W(0x187)+E['angle']+',\x20'+E['startColor']+'\x200%,\x20'+E[W(0x218)]+'\x20100%);');F&&F[W(0x1ff)]('px')>=0x0&&(h+=W(0x1bc)+F+';');G&&G[W(0x1ff)]('px')>=0x0&&(h+=W(0x21d)+G+';');H=!H?{'type':'none'}:H;if(H[W(0x1ad)]===W(0x22b))return W(0x183)+layout1+'\x20'+layout2+'\x20'+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+spc+'\x20'+ExBdr+'\x20'+ExBdrRad+'\x20'+jfc+'\x20'+alg+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+'\x20'+ExPadA+'\x20'+ExPadT+'\x20'+ExPadB+'\x20'+ExPadL+'\x20'+ExPadR+'\x22\x20style=\x22'+h+';\x20cursor:\x20pointer;\x22\x20onclick=\x22window.open(\x27'+H[W(0x22b)]+W(0x231);else{if(H['type']===W(0x205))return W(0x183)+layout1+'\x20'+layout2+'\x20'+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+spc+'\x20'+ExBdr+'\x20'+ExBdrRad+'\x20'+jfc+'\x20'+alg+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+'\x20'+ExPadA+'\x20'+ExPadT+'\x20'+ExPadB+'\x20'+ExPadL+'\x20'+ExPadR+W(0x16a)+h+'\x22\x20onclick=\x22window.alert(\x27message\x20:\x20'+H[W(0x161)]+W(0x1a3);else return H[W(0x1ad)]===W(0x162)?W(0x183)+layout1+'\x20'+layout2+'\x20'+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+spc+'\x20'+ExBdr+'\x20'+ExBdrRad+'\x20'+jfc+'\x20'+alg+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+'\x20'+ExPadA+'\x20'+ExPadT+'\x20'+ExPadB+'\x20'+ExPadL+'\x20'+ExPadR+W(0x16a)+h+W(0x169)+H[W(0x1cd)]+W(0x1a3):'
';}}function button_object(g){const X=f;style2='',style3='';let {flex:h,margin:i,position:j,height:k,style:l,color:m,gravity:n,adjustMode:o,offsetTop:p,offsetBottom:q,offsetStart:r,offsetEnd:s,action:t}=g;fl='';h>0x3?style2+='-webkit-box-flex:'+h+';flex-grow:'+h+';':fl=h>=0x0?'fl'+h:'';exabs=j==='absolute'?X(0x1ec):'';i&&i[X(0x1ff)]('px')>=0x0?(style2+=X(0x22c)+i+';',exmgn=''):exmgn=i?X(0x1f7)+upperalldigit(i):'';k=!k||k===''||k==='md'?'':'Ex'+upperalldigit(k),grv=n===X(0x1b0)||n===X(0x204)?'grv'+upper1digit(n):'',ExBtn=X(0x1ce);if(l&&l!=='')switch(l){case X(0x223):ExBtn=X(0x1ce);break;case X(0x18f):ExBtn='ExBtn1';break;case'secondary':ExBtn=X(0x1c5);break;default:ExBtn=X(0x1ce);}m&&(style3+=l===X(0x223)?X(0x1c6)+m+'\x20!important;':X(0x186)+m+X(0x1af));p&&/px|%/['test'](p)?(style2+=X(0x20f)+p+';',ext=''):ext=p?X(0x1f1)+upperalldigit(p):'';q&&/px|%/[X(0x224)](q)?(style2+=X(0x170)+q+';',exb=''):exb=q?X(0x233)+upperalldigit(q):'';r&&/px|%/[X(0x224)](r)?(style2+=X(0x1fc)+r+';',exl=''):exl=r?'ExL'+upperalldigit(r):'';s&&/px|%/[X(0x224)](s)?(style2+=X(0x1fa)+s+';',exr=''):exr=s?'ExR'+upperalldigit(s):'';t=!t?{'type':X(0x1b1)}:t;if(t['type']===X(0x22b))return'
'+t['label']+'
';else{if(t[X(0x1ad)]===X(0x205))return X(0x211)+ExBtn+'\x20'+k+'\x20'+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+grv+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+X(0x16a)+style2+X(0x1eb)+t['text']+X(0x1cc)+style3+X(0x1f5)+t['label']+X(0x1db);else return t[X(0x1ad)]===X(0x162)?'';}}function filler_object(g){const Y=f;let h='',{flex:i}=g;return fl='',i>0x3?h+='-webkit-box-flex:'+i+';flex-grow:'+i+';':fl=i>=0x0?'fl'+i:'',Y(0x198)+fl+Y(0x16a)+h+'\x22\x20>';}function e(){const ad=['ExB','image','toString','text','postback','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x22\x20onclick=\x22window.alert(\x27postback\x20:\x20','\x22\x20style=\x22','\x22>','centerColor','ExWB','1342144oBMDTw','line-through','bottom:','','background-color:','background:\x20linear-gradient(','32jZcOmT','xxl','\x22\x20target=\x22_blank\x22\x20style=\x22padding-bottom:','\x22\x20controls>\x0a\x20\x20\x20','330722JWMQNJ','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','','568215ACMUOr','','ExL','normal','ExAlg',';flex-grow:','itms-jfcSE','absolute','hasOwnProperty','label','border-radius:','type','medium','\x20!important;','bottom','none','warn','substring','\x22>','padding-left:','\x22\x20id=\x228d1efea2-4017-4c89-8931-98a5f4f141f2\x22>','charAt','\x22>','ExBdrWdtNone','ExTxtDecLt','ExMgnL','','getElementById','itms-jfcSB','\x22\x20>','apply','XXl','flex-end','\x22\x20type=\x22video/webm\x22>\x0a','constructor','

','flex','\x22\x20id=\x228d1efea2-4017-4c89-8931-98a5f4f141f2\x22>
','2RapHxd','ExT','spc','innerHTML','light','\x22>
','1825944wAyjTI','ExMgnT','space-evenly','box','right:','margin-left:','left:','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','background-image:url(\x27','center','message','border-width:','space-between','itms-algS','fit','\x22\x20target=\x22_blank\x22\x20style=\x22','234171dbUMeu','ExBdrWdtSbd','\x22\x20type=\x22video/ogg\x22>\x0a\x20\x20\x20','endColor','ExBdrWdtLgh','start','itms-jfcSA','bind','max-height:','ExBdrWdtMdm','ExHasFooter','50%','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','ExWrap','link','test','italic','\x22>','font-size:','icon','','toLowerCase'];e=function(){return ad;};return e();}function icon_object(g){const Z=f;let h='',{size:i,aspectRatio:j,url:k,position:l,margin:m,offsetTop:n,offsetBottom:o,offsetStart:p,offsetEnd:q}=g,r=Z(0x203)+k+Z(0x1c0);return i=!i||i===''?'md':i,i['indexOf']('px')>=0x0?(h+=Z(0x227)+i+';',i=''):i='Ex'+upperalldigit(i),!j||j===''?r+=Z(0x212):(ratio=ratio[0x0]/ratio[0x1],r+=Z(0x184)+ratio+Z(0x1a2)),exabs=l===Z(0x1a9)?Z(0x1ec):'',m&&m['indexOf']('px')>=0x0?(h+=Z(0x22c)+m+';',exmgn=''):exmgn=m?Z(0x1f7)+upperalldigit(m):'',n&&/px|%/[Z(0x224)](n)?(h+=Z(0x20f)+n+';',ext=''):ext=n?Z(0x1f1)+upperalldigit(n):'',o&&/px|%/[Z(0x224)](o)?(h+=Z(0x170)+o+';',exb=''):exb=o?Z(0x233)+upperalldigit(o):'',p&&/px|%/['test'](p)?(h+=Z(0x1fc)+p+';',exl=''):exl=p?'ExL'+upperalldigit(p):'',q&&/px|%/['test'](q)?(h+=Z(0x1fa)+q+';',exr=''):exr=q?'ExR'+upperalldigit(q):'','';}function image_object(g){const a0=f;let h='',i='',{aspectMode:j,size:k,aspectRatio:l,url:m,position:n,flex:o,margin:p,align:q,gravity:r,backgroundColor:s,offsetTop:t,offsetBottom:u,offsetStart:v,offsetEnd:w,action:x}=g,y=a0(0x203)+m+'\x27);';s&&(y+=a0(0x186)+s+a0(0x1af));j=!j||j===''?a0(0x209):j,k=!k||k===''?'md':k,j=upperalldigit(j);/px|%/['test'](k)?(i+='width:'+k+';',k=''):k='Ex'+upperalldigit(k);!l||l===''?ratio='100':(ratio=l[a0(0x19d)](':'),ratio=ratio[0x1]*0x64/ratio[0x0]);fl='';o>0x3?h+=a0(0x1cf)+o+';flex-grow:'+o+';':fl=o>=0x0?'fl'+o:'';exabs=n===a0(0x1a9)?a0(0x1ec):'';p&&p[a0(0x1ff)]('px')>=0x0?(h+=a0(0x22c)+p+';',exmgn=''):exmgn=p?a0(0x1f7)+upperalldigit(p):'';alg=q===a0(0x21a)||q===a0(0x182)?'alg'+upper1digit(q):'',grv=r===a0(0x1b0)||r===a0(0x204)?a0(0x165)+upper1digit(r):'';t&&/px|%/[a0(0x224)](t)?(h+=a0(0x20f)+t+';',ext=''):ext=t?a0(0x1f1)+upperalldigit(t):'';u&&/px|%/['test'](u)?(h+='bottom:'+u+';',exb=''):exb=u?a0(0x233)+upperalldigit(u):'';v&&/px|%/[a0(0x224)](v)?(h+=a0(0x1fc)+v+';',exl=''):exl=v?a0(0x1a4)+upperalldigit(v):'';w&&/px|%/[a0(0x224)](w)?(h+=a0(0x1fa)+w+';',exr=''):exr=w?a0(0x18e)+upperalldigit(w):'';x=!x?{'type':a0(0x1b1)}:x;if(x[a0(0x1ad)]==='uri')return a0(0x175)+j+'\x20'+fl+'\x20'+k+'\x20'+exabs+'\x20'+exmgn+'\x20'+alg+'\x20'+grv+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+a0(0x201)+h+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20';else{if(x[a0(0x1ad)]===a0(0x205))return a0(0x175)+j+'\x20'+fl+'\x20'+k+'\x20'+exabs+'\x20'+exmgn+'\x20'+alg+'\x20'+grv+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+'\x22\x20\x20style=\x22'+h+a0(0x193)+i+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20';}}function separator_object(g,h){const a1=f;let i='',{margin:j,color:k}=h;return j&&j[a1(0x1ff)]('px')>=0x0?(i+=g===a1(0x1d2)?'margin-top:'+j+';':a1(0x1fb)+j+';',exmgn=''):exmgn=j?'ExMgnT'+upperalldigit(j):'',k&&(i+=a1(0x199)+k+a1(0x1af)),a1(0x1c1)+exmgn+a1(0x16a)+i+a1(0x1e2);}function spacer_object(g){const a2=f;let {size:h}=g;return h=!h||h===''?'md':h,h[a2(0x1ff)]('px')>=0x0?h='':h='spc'+upperalldigit(h),'=0x0?(h+=a3(0x227)+j+';',j=''):j='Ex'+upperalldigit(j):j='',k&&k!==''&&(h+=a3(0x1c6)+k+';'),ExWB=l===a3(0x18d)?a3(0x16d):'',ExFntSty=m==='normal'?a3(0x1cb):m===a3(0x225)?a3(0x1b6):'',ExTxtDec=n===a3(0x16f)?a3(0x1dd):n===a3(0x180)?a3(0x215):n===a3(0x1b1)?a3(0x1a1):'',a3(0x1d8)+ExWB+'\x20'+j+'\x20'+ExFntSty+'\x20'+ExTxtDec+a3(0x16a)+h+'\x22\x20>'+i+a3(0x191);}function carousel_struc(){return'
';}function bubble_struc(g){const a4=f;let {size:h,direction:i,action:j}=g;return h=!h||h===''?a4(0x1ae):h,i=!i||i==''?a4(0x172):i,h=upper2digit(h),a4(0x171)+h+a4(0x1b4)+i[a4(0x17c)]()+a4(0x1fe)+i+a4(0x16b);}function hero_struc(g){const a5=f;let {styles:h}=g,i='';if(h){let {hero:j}=h;i=j&&j['backgroundColor']?a5(0x186)+j[a5(0x1d6)]:'';}return a5(0x213)+i+'\x22>';}function header_struc(g){const a6=f;let {styles:h}=g,i='';if(h){let {header:j}=h;i=j&&j[a6(0x1d6)]?a6(0x186)+j[a6(0x1d6)]:'';}return a6(0x19a)+i+a6(0x226);}function body_struc(g){const a7=f;let {footer:h,styles:i}=g,j='';if(i){let {body:l}=i;j=l&&l[a7(0x1d6)]?'background-color:'+l[a7(0x1d6)]:'';}let k=h?a7(0x21f):'';return a7(0x230)+k+'\x22\x20style=\x22'+j+a7(0x226);}function footer_struc(g){const a8=f;let {styles:h}=g,i='';if(h){let {footer:j}=h;i=j&&j[a8(0x1d6)]?a8(0x186)+j['backgroundColor']:'';}return a8(0x229)+i+a8(0x226);}function text_object(g){const a9=f;let h='',{flex:i,margin:j,size:k,position:l,align:m,gravity:n,text:o,color:p,weight:q,style:r,decoration:s,wrap:t,maxLines:u,adjustMode:v,offsetTop:w,offsetBottom:x,offsetStart:y,offsetEnd:z,lineSpacing:A,action:B}=g;fl='';i>0x3?h+=a9(0x1cf)+i+';flex-grow:'+i+';':fl=i>=0x0?'fl'+i:'';exabs=l===a9(0x1a9)?a9(0x1ec):'';j&&j[a9(0x1ff)]('px')>=0x0?(h+=a9(0x22c)+j+';',exmgn=''):exmgn=j?a9(0x1de)+upperalldigit(j):'';alg=m==='start'||m==='end'||m===a9(0x204)?a9(0x1a6)+upper1digit(m):'',grv=n==='bottom'||n===a9(0x204)?a9(0x165)+upper1digit(n):'',k=!k||k===''?'md':k;k['indexOf']('px')>=0x0?(h+='font-size:'+k+';',k=''):k='Ex'+upperalldigit(k);p&&p!==''&&(h+=a9(0x1c6)+p+';');ExWB=q==='bold'?'ExWB':'',ExFntSty=r===a9(0x1a5)?a9(0x1cb):r===a9(0x225)?a9(0x1b6):'',ExTxtDec=s===a9(0x16f)?a9(0x1dd):s===a9(0x180)?a9(0x215):s==='none'?a9(0x1a1):'',ExWrap=t===!![]?a9(0x222):'';w&&w[a9(0x1ff)]('px')>=0x0?(h+='top:'+w+';',ext=''):ext=w?a9(0x1f1)+upperalldigit(w):'';x&&/px|%/[a9(0x224)](x)?(h+=a9(0x170)+x+';',exb=''):exb=x?a9(0x233)+upperalldigit(x):'';y&&/px|%/[a9(0x224)](y)?(h+=a9(0x1fc)+y+';',exl=''):exl=y?a9(0x1a4)+upperalldigit(y):'';z&&/px|%/[a9(0x224)](z)?(h+='right:'+z+';',exr=''):exr=z?'ExR'+upperalldigit(z):'';if(A&&A[a9(0x1ff)]('px')>=0x0){let C=parseInt(A[a9(0x1c3)]('px',''))+0xf+'px';h+=a9(0x167)+C+';';}o=!o?'':o['replace'](/\n/g,a9(0x195)),B=!B?{'type':'none'}:B;if(B[a9(0x1ad)]===a9(0x22b))return a9(0x1e8)+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+alg+'\x20'+grv+'\x20'+k+'\x20'+ExWB+'\x20'+ExFntSty+'\x20'+ExTxtDec+'\x20'+ExWrap+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+a9(0x16a)+h+a9(0x17d)+B['uri']+a9(0x217)+o+a9(0x1d3);else{if(B[a9(0x1ad)]===a9(0x205))return a9(0x1e8)+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+alg+'\x20'+grv+'\x20'+k+'\x20'+ExWB+'\x20'+ExFntSty+'\x20'+ExTxtDec+'\x20'+ExWrap+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+'\x22\x20style=\x22'+h+a9(0x1d5)+B[a9(0x161)]+'\x27)\x22>'+o+a9(0x1e9);else return B[a9(0x1ad)]===a9(0x162)?a9(0x1e8)+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+alg+'\x20'+grv+'\x20'+k+'\x20'+ExWB+'\x20'+ExFntSty+'\x20'+ExTxtDec+'\x20'+ExWrap+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+a9(0x16a)+h+a9(0x22a)+B[a9(0x1cd)]+a9(0x168)+o+a9(0x1e9):a9(0x1e8)+fl+'\x20'+exabs+'\x20'+exmgn+'\x20'+alg+'\x20'+grv+'\x20'+k+'\x20'+ExWB+'\x20'+ExFntSty+'\x20'+ExTxtDec+'\x20'+ExWrap+'\x20'+ext+'\x20'+exb+'\x20'+exl+'\x20'+exr+a9(0x16a)+h+'\x22>

'+o+a9(0x1e9);}}function f(a,b){const c=e();return f=function(d,g){d=d-0x160;let h=c[d];return h;},f(a,b);}function upper1digit(g){const aa=f;return g[aa(0x1d4)](0x0)['toUpperCase']();}function upper2digit(g){const ab=f;return g[ab(0x1d4)](0x0)[ab(0x17c)]()+g[ab(0x1b3)](0x1,0x2);}function upperalldigit(g){const ac=f;return g[ac(0x232)]()===ac(0x189)?ac(0x1e4):g['charAt'](0x0)[ac(0x17c)]()+g[ac(0x1c8)](0x1);}