File size: 3,888 Bytes
ad55e8a
1826bb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9cb6a65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

      <!DOCTYPE html>
      <html lang="en">
      <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Скачанная HTML-страница</title>
        <style>* { box-sizing: border-box; } body {margin: 0;}</style>
      </head>
      <body>
        <body id="i4xf"><div id="ivdm"></div><div id="ivfa">
        <div class="container">
          <form id="contactForm">
            <div class="form-group">
              <label for="name">Имя</label>
              <input type="text" id="name" required>
            </div>
            <div class="form-group">
              <label for="email">Почта</label>
              <input type="email" id="email" required>
            </div>
            <div class="form-group">
              <label for="phone">Телефон</label>
              <input type="tel" id="phone" required>
            </div>
            <div class="form-group">
              <label for="options">Выберите тариф</label>
              <select id="options" required>
                <option value="" disabled selected>Тариф</option>
                <option>БИЗНЕС - 69 970р.</option>
                <option>PREMIUM - 89 970р.</option>
                <option>VIP - 149 990р.</option>
              </select>
            </div>
            <div class="form-check">
              <input type="checkbox" id="newsletter" required>
              <label for="newsletter">Согласие на email рассылку</label>
            </div>
            <div class="form-group">
              <a href="#" id="privacyPolicyLink">Политика конфиденциальности</a>
            </div>
            <button type="submit" class="btn-primary">ПЕРЕЙТИ К ОПЛАТЕ</button>
          </form>
        </div>
      </div></body><script>var props = {"ivfa":{}};
          var ids = Object.keys(props).map(function(id) { return '#'+id }).join(',');
          var els = document.querySelectorAll(ids);
          for (var i = 0, len = els.length; i < len; i++) {
            var el = els[i];
            (function(props) {
        const initForm = () => {
          const form = this.querySelector('#contactForm');
          const avpInput = form.querySelector('input[name="avp_v"]');
          const grupInput = form.querySelector('input[name="grup_v"]');
          const red_urlInput = form.querySelector('input[name="red_url_v"]');
          
          if (avpInput) {
            avpInput.value = props.avp;
          }
          if (grupInput) {
            grupInput.value = props.grup;
          }
          if (red_urlInput) {
            red_urlInput.value = props.red_url;
          }
          
          console.log('Form initialized with props:', props);
        };

        const loadScript = (src, callback) => {
          const script = document.createElement('script');
          script.src = src;
          script.onload = callback;
          document.body.appendChild(script);
        };

        // Загружаем необходимые скрипты динамически
        if (typeof vkBridge === 'undefined') {
          loadScript('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js', () => {
            console.log('VK Bridge loaded!');
            initForm();
          });
        } else {
          initForm();
        }
        
        if (typeof VK === 'undefined') {
          loadScript('https://vk.com/js/api/openapi.js?169', () => {
            console.log('VK Open API loaded!');
          });
        }
        
        loadScript('https://huggingface.co/spaces/vkatis/api/resolve/main/bundle.3ea86973b4b6c8f6c2bf.js', () => {
          console.log('Custom script loaded!');
        });
      }.bind(el))(props[el.id]);
          }</script>
      </body>
      </html>