: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
wr.appendChild(self.hint(data.tooltip));
return self.mediaFile.render(data.ext, data, self);
return self.mediaFile.render('image', data, self);
return self.mediaFile.render('video', data, self);
return self.mediaFile.render('audio', data, self);
_getOptions(markers, min, max, ev, isMulti) {
const lottieLb = i18n.lottie,
for (let k of markers.keys()) {
const events = isMulti ? {
wrap_class: 'tb_click_hover_input' + (ev !== 'hover' && ev !== 'click' ? ' _tb_hide_binding' : ''),
control: {event: 'change'}
empty : { hide : 'count' },
not_empty : { show : 'count' }
wrap_class: 'tb_click_msg' + (ev !== 'click' ? ' _tb_hide_binding' : ''),
wrap_class: 'tb_hover_msg' + (ev !== 'hover' ? ' _tb_hide_binding' : ''),
wrap_class: 'tb_hold_msg' + (ev !== 'hold' ? ' _tb_hide_binding' : ''),
wrap_class: 'tb_seek_msg' + (ev !== 'seek' ? ' _tb_hide_binding' : ''),
wrap_class: 'tb_pausehold_msg' + (ev !== 'pausehold' ? ' _tb_hide_binding' : ''),
wrap_class: 'tb_scroll_wr' + (ev !== 'scroll' ? ' _tb_hide_binding' : ''),
wrap_class: 'tb_lottie_frame_id',
wrap_class: 'tb_lottie_range_id',
const hasScroll = !!events.scroll;
for (let i = options.length - 1; i > -1; --i) {
if (id === 'del' || id === 'sel' || id === 'st' || opt.comment === lottieLb.clsel || (hasScroll === false && opt.wrap_class?.includes('tb_scroll_wr'))) {
if (hasScroll === false) {
delete opt.binding.scroll;
empty: {hide: 'tb_lottie_wrap'},
not_empty: {show: 'tb_lottie_wrap'}
loader = createElement('','tf_loader tf_abs_c');
binds = api.Helper.cloneObject(binds);
if (!Array.isArray(binds.empty.hide)) {
binds.empty.hide = [binds.empty.hide];
binds.empty.hide.push(defaultBind.empty.hide);
binds.empty.hide = defaultBind.empty.hide;
if (binds.not_empty?.show) {
if (!Array.isArray(binds.not_empty.show)) {
binds.not_empty.show = [binds.not_empty.show];
binds.not_empty.show.push(defaultBind.not_empty.show);
binds.not_empty.show = defaultBind.not_empty.show;
const f = createDocumentFragment(),
browse = createElement('button',{class: 'builder_button tb_text_button tb_btn_arrow',type:'button'}),
wr = createElement('','tb_lottie_wrap tf_rel tf_w'),
input = fileWrap.querySelector('input'),
isRepeat = !!self.is_repeat,
_callback = async (el, isChange, fid) => {
wr = el.closest('.tb_field').parentNode.closest('.tb_field').tfClass('tb_lottie_wrap')[0];
loader = createElement('','tf_loader tf_abs_c');
await Themify.loadJs('lottie', !!window.TF_Lottie);
json = await TF_Lottie.getJson(el.value);
const tmpMarkers = json.markers || [],
if (tmpMarkers.length > 1) {
for (let i = 0; i < tmpMarkers.length; ++i) {
let mark = tmpMarkers[i],
let tmp = JSON.parse(cm);
markers.set(cm, {min: mark.tm, max: mark.tm + mark.dr});
let frame = fid && markers.has(fid) ? markers.get(fid) : {},
max = frame.max?? (json.op ? Math.floor(json.op - json.ip) : '');
if (wr.childElementCount <= 1) {
const origVals = self.values,
origRepeat = !!self.is_repeat;
self.is_repeat = isRepeat;
wr.appendChild(self.create(this._getOptions(markers, min, max, vals.st, isMulti)));
self.is_repeat = origRepeat;
const framesWrap = wr.tfClass('tb_lottie_frame_id')[0],
frameSelect = framesWrap.tfTag('select')[0],
sliderWrap = wr.tfClass('tb_lottie_range_id')[0].tfClass('tb_slider_wrapper')[0];
if (markers.size === 0) {
framesWrap.style.display = 'none';
const range = sliderWrap.tfClass('tb_lb_option_child')[0] || sliderWrap.tfClass('tb_lb_option')[0],
fr = createDocumentFragment(),
items = sliderWrap.querySelectorAll('[type="range"]');
for (let children = frameSelect.children, i = children.length - 1; i > 0; --i) {
for (let k of markers.keys()) {
fr.appendChild(createElement('option',{value:k},k));
framesWrap.style.display = '';
frameSelect.appendChild(fr);
sliderWrap.tfClass('tb_slider_output_high')[0].dataset.slider_before = min;
sliderWrap.tfClass('tb_slider_output_low')[0].dataset.slider_after = max;
sliderWrap.style.setProperty('--tb_slider_min', min);
sliderWrap.style.setProperty('--tb_slider_before', min);
sliderWrap.style.setProperty('--tb_slider_after', max);
sliderWrap.style.setProperty('--tb_slider_max', max);
for (let i = items.length - 1; i > -1; --i) {
item.value = i === 0 ? min : max;
Themify.triggerEvent(items[0], 'input');
frameSelect.tfOn('change', e => {
_callback(el, true, e.currentTarget.value);