vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig line 1

  1. <div id="sfwdt{{ token }}" class="sf-toolbar sf-display-none" role="region" aria-label="Symfony Web Debug Toolbar">
  2. {{ include('@WebProfiler/Profiler/toolbar.html.twig', {
  3. templates: {
  4. 'request': '@WebProfiler/Profiler/cancel.html.twig'
  5. },
  6. profile: null,
  7. profiler_url: url('_profiler', {token: token}),
  8. profiler_markup_version: 3,
  9. }) }}
  10. </div>
  11. <style{% if csp_style_nonce %} nonce="{{ csp_style_nonce }}"{% endif %}>
  12. {{ include('@WebProfiler/Profiler/toolbar.css.twig') }}
  13. </style>
  14. {# CAUTION: the contents of this file are processed by Twig before loading
  15. them as JavaScript source code. Always use '/*' comments instead
  16. of '//' comments to avoid impossible-to-debug side-effects #}
  17. <script{% if csp_script_nonce is defined and csp_script_nonce %} nonce="{{ csp_script_nonce }}"{% endif %}>/*<![CDATA[*/
  18. if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
  19. Sfjs = (function() {
  20. "use strict";
  21. if ('classList' in document.documentElement) {
  22. var hasClass = function (el, cssClass) { return el.classList.contains(cssClass); };
  23. var removeClass = function(el, cssClass) { el.classList.remove(cssClass); };
  24. var addClass = function(el, cssClass) { el.classList.add(cssClass); };
  25. var toggleClass = function(el, cssClass) { el.classList.toggle(cssClass); };
  26. } else {
  27. var hasClass = function (el, cssClass) { return el.className.match(new RegExp('\\b' + cssClass + '\\b')); };
  28. var removeClass = function(el, cssClass) { el.className = el.className.replace(new RegExp('\\b' + cssClass + '\\b'), ' '); };
  29. var addClass = function(el, cssClass) { if (!hasClass(el, cssClass)) { el.className += " " + cssClass; } };
  30. var toggleClass = function(el, cssClass) { hasClass(el, cssClass) ? removeClass(el, cssClass) : addClass(el, cssClass); };
  31. }
  32. var noop = function() {};
  33. var profilerStorageKey = 'symfony/profiler/';
  34. var addEventListener;
  35. var el = document.createElement('div');
  36. if (!('addEventListener' in el)) {
  37. addEventListener = function (element, eventName, callback) {
  38. element.attachEvent('on' + eventName, callback);
  39. };
  40. } else {
  41. addEventListener = function (element, eventName, callback) {
  42. element.addEventListener(eventName, callback, false);
  43. };
  44. }
  45. var request = function(url, onSuccess, onError, payload, options, tries) {
  46. url = new URL(url);
  47. url.searchParams.set('XDEBUG_IGNORE', '1');
  48. url = url.toString();
  49. var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
  50. options = options || {};
  51. options.retry = options.retry || false;
  52. tries = tries || 1;
  53. /* this delays for 125, 375, 625, 875, and 1000, ... */
  54. var delay = tries < 5 ? (tries - 0.5) * 250 : 1000;
  55. xhr.open(options.method || 'GET', url, true);
  56. xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  57. xhr.onreadystatechange = function(state) {
  58. if (4 !== xhr.readyState) {
  59. return null;
  60. }
  61. if (xhr.status == 404 && options.retry && !options.stop) {
  62. setTimeout(function() {
  63. if (options.stop) {
  64. return;
  65. }
  66. request(url, onSuccess, onError, payload, options, tries + 1);
  67. }, delay);
  68. return null;
  69. }
  70. if (200 === xhr.status) {
  71. (onSuccess || noop)(xhr);
  72. } else {
  73. (onError || noop)(xhr);
  74. }
  75. };
  76. if (options.onSend) {
  77. options.onSend(tries);
  78. }
  79. xhr.send(payload || '');
  80. };
  81. var getPreference = function(name) {
  82. if (!window.localStorage) {
  83. return null;
  84. }
  85. return localStorage.getItem(profilerStorageKey + name);
  86. };
  87. var setPreference = function(name, value) {
  88. if (!window.localStorage) {
  89. return null;
  90. }
  91. localStorage.setItem(profilerStorageKey + name, value);
  92. };
  93. var requestStack = [];
  94. var extractHeaders = function(xhr, stackElement) {
  95. /* Here we avoid to call xhr.getResponseHeader in order to */
  96. /* prevent polluting the console with CORS security errors */
  97. var allHeaders = xhr.getAllResponseHeaders();
  98. var ret;
  99. if (ret = allHeaders.match(/^x-debug-token:\s+(.*)$/im)) {
  100. stackElement.profile = ret[1];
  101. }
  102. if (ret = allHeaders.match(/^x-debug-token-link:\s+(.*)$/im)) {
  103. stackElement.profilerUrl = ret[1];
  104. }
  105. if (ret = allHeaders.match(/^Symfony-Debug-Toolbar-Replace:\s+(.*)$/im)) {
  106. stackElement.toolbarReplaceFinished = false;
  107. stackElement.toolbarReplace = '1' === ret[1];
  108. }
  109. };
  110. var successStreak = 4;
  111. var pendingRequests = 0;
  112. var renderAjaxRequests = function() {
  113. var requestCounter = document.querySelector('.sf-toolbar-ajax-request-counter');
  114. if (!requestCounter) {
  115. return;
  116. }
  117. requestCounter.textContent = requestStack.length;
  118. var infoSpan = document.querySelector(".sf-toolbar-ajax-info");
  119. if (infoSpan) {
  120. infoSpan.textContent = requestStack.length + ' AJAX request' + (requestStack.length !== 1 ? 's' : '');
  121. }
  122. var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax');
  123. if (requestStack.length) {
  124. ajaxToolbarPanel.style.display = 'block';
  125. } else {
  126. ajaxToolbarPanel.style.display = 'none';
  127. }
  128. if (pendingRequests > 0) {
  129. addClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
  130. } else if (successStreak < 4) {
  131. addClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
  132. removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
  133. } else {
  134. removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
  135. removeClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
  136. }
  137. };
  138. var startAjaxRequest = function(index) {
  139. var tbody = document.querySelector('.sf-toolbar-ajax-request-list');
  140. if (!tbody) {
  141. return;
  142. }
  143. var nbOfAjaxRequest = tbody.rows.length;
  144. if (nbOfAjaxRequest >= 100) {
  145. tbody.deleteRow(0);
  146. }
  147. var request = requestStack[index];
  148. pendingRequests++;
  149. var row = document.createElement('tr');
  150. request.DOMNode = row;
  151. var requestNumberCell = document.createElement('td');
  152. requestNumberCell.textContent = index + 1;
  153. row.appendChild(requestNumberCell);
  154. var profilerCell = document.createElement('td');
  155. profilerCell.textContent = 'n/a';
  156. row.appendChild(profilerCell);
  157. var methodCell = document.createElement('td');
  158. methodCell.textContent = request.method;
  159. row.appendChild(methodCell);
  160. var typeCell = document.createElement('td');
  161. typeCell.textContent = request.type;
  162. row.appendChild(typeCell);
  163. var statusCodeCell = document.createElement('td');
  164. var statusCode = document.createElement('span');
  165. statusCode.textContent = 'n/a';
  166. statusCodeCell.appendChild(statusCode);
  167. row.appendChild(statusCodeCell);
  168. var pathCell = document.createElement('td');
  169. pathCell.className = 'sf-ajax-request-url';
  170. if ('GET' === request.method) {
  171. var pathLink = document.createElement('a');
  172. pathLink.setAttribute('href', request.url);
  173. pathLink.textContent = request.url;
  174. pathCell.appendChild(pathLink);
  175. } else {
  176. pathCell.textContent = request.url;
  177. }
  178. pathCell.setAttribute('title', request.url);
  179. row.appendChild(pathCell);
  180. var durationCell = document.createElement('td');
  181. durationCell.className = 'sf-ajax-request-duration';
  182. durationCell.textContent = 'n/a';
  183. row.appendChild(durationCell);
  184. request.liveDurationHandle = setInterval(function() {
  185. durationCell.textContent = (new Date() - request.start) + ' ms';
  186. }, 100);
  187. row.className = 'sf-ajax-request sf-ajax-request-loading';
  188. tbody.insertBefore(row, null);
  189. var toolbarInfo = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info');
  190. toolbarInfo.scrollTop = toolbarInfo.scrollHeight;
  191. renderAjaxRequests();
  192. };
  193. var finishAjaxRequest = function(index) {
  194. var request = requestStack[index];
  195. clearInterval(request.liveDurationHandle);
  196. if (!request.DOMNode) {
  197. return;
  198. }
  199. if (request.toolbarReplace && !request.toolbarReplaceFinished && request.profile) {
  200. /* Flag as complete because finishAjaxRequest can be called multiple times. */
  201. request.toolbarReplaceFinished = true;
  202. /* Search up through the DOM to find the toolbar's container ID. */
  203. for (var elem = request.DOMNode; elem && elem !== document; elem = elem.parentNode) {
  204. if (elem.id.match(/^sfwdt/)) {
  205. Sfjs.loadToolbar(elem.id.replace(/^sfwdt/, ''), request.profile);
  206. break;
  207. }
  208. }
  209. }
  210. pendingRequests--;
  211. var row = request.DOMNode;
  212. /* Unpack the children from the row */
  213. var profilerCell = row.children[1];
  214. var methodCell = row.children[2];
  215. var statusCodeCell = row.children[4];
  216. var statusCodeElem = statusCodeCell.children[0];
  217. var durationCell = row.children[6];
  218. if (request.error) {
  219. row.className = 'sf-ajax-request sf-ajax-request-error';
  220. methodCell.className = 'sf-ajax-request-error';
  221. successStreak = 0;
  222. } else {
  223. row.className = 'sf-ajax-request sf-ajax-request-ok';
  224. successStreak++;
  225. }
  226. if (request.statusCode) {
  227. if (request.statusCode < 300) {
  228. statusCodeElem.setAttribute('class', 'sf-toolbar-status');
  229. } else if (request.statusCode < 400) {
  230. statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-yellow');
  231. } else {
  232. statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red');
  233. }
  234. statusCodeElem.textContent = request.statusCode;
  235. } else {
  236. statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red');
  237. }
  238. if (request.duration) {
  239. durationCell.textContent = request.duration + ' ms';
  240. }
  241. if (request.profilerUrl) {
  242. profilerCell.textContent = '';
  243. var profilerLink = document.createElement('a');
  244. profilerLink.setAttribute('href', request.profilerUrl);
  245. profilerLink.textContent = request.profile;
  246. profilerCell.appendChild(profilerLink);
  247. }
  248. renderAjaxRequests();
  249. };
  250. {% if excluded_ajax_paths is defined %}
  251. if (window.fetch && window.fetch.polyfill === undefined) {
  252. var oldFetch = window.fetch;
  253. window.fetch = function () {
  254. var promise = oldFetch.apply(this, arguments);
  255. var url = arguments[0];
  256. var params = arguments[1];
  257. var paramType = Object.prototype.toString.call(arguments[0]);
  258. if (paramType === '[object Request]') {
  259. url = arguments[0].url;
  260. params = {
  261. method: arguments[0].method,
  262. credentials: arguments[0].credentials,
  263. headers: arguments[0].headers,
  264. mode: arguments[0].mode,
  265. redirect: arguments[0].redirect
  266. };
  267. } else {
  268. url = String(url);
  269. }
  270. if (!url.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) {
  271. var method = 'GET';
  272. if (params && params.method !== undefined) {
  273. method = params.method;
  274. }
  275. var stackElement = {
  276. error: false,
  277. url: url,
  278. method: method,
  279. type: 'fetch',
  280. start: new Date()
  281. };
  282. var idx = requestStack.push(stackElement) - 1;
  283. promise.then(function (r) {
  284. stackElement.duration = new Date() - stackElement.start;
  285. stackElement.error = r.status < 200 || r.status >= 400;
  286. stackElement.statusCode = r.status;
  287. stackElement.profile = r.headers.get('x-debug-token');
  288. stackElement.profilerUrl = r.headers.get('x-debug-token-link');
  289. stackElement.toolbarReplaceFinished = false;
  290. stackElement.toolbarReplace = '1' === r.headers.get('Symfony-Debug-Toolbar-Replace');
  291. finishAjaxRequest(idx);
  292. }, function (e){
  293. stackElement.error = true;
  294. finishAjaxRequest(idx);
  295. });
  296. startAjaxRequest(idx);
  297. }
  298. return promise;
  299. };
  300. }
  301. if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) {
  302. var proxied = XMLHttpRequest.prototype.open;
  303. XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
  304. var self = this;
  305. /* prevent logging AJAX calls to static and inline files, like templates */
  306. var path = url;
  307. if (url.slice(0, 1) === '/') {
  308. if (0 === url.indexOf('{{ request.basePath|e('js') }}')) {
  309. path = url.slice({{ request.basePath|length }});
  310. }
  311. }
  312. else if (0 === url.indexOf('{{ (request.schemeAndHttpHost ~ request.basePath)|e('js') }}')) {
  313. path = url.slice({{ (request.schemeAndHttpHost ~ request.basePath)|length }});
  314. }
  315. if (!path.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) {
  316. var stackElement = {
  317. error: false,
  318. url: url,
  319. method: method,
  320. type: 'xhr',
  321. start: new Date()
  322. };
  323. var idx = requestStack.push(stackElement) - 1;
  324. this.addEventListener('readystatechange', function() {
  325. if (self.readyState == 4) {
  326. stackElement.duration = new Date() - stackElement.start;
  327. stackElement.error = self.status < 200 || self.status >= 400;
  328. stackElement.statusCode = self.status;
  329. extractHeaders(self, stackElement);
  330. finishAjaxRequest(idx);
  331. }
  332. }, false);
  333. startAjaxRequest(idx);
  334. }
  335. proxied.apply(this, Array.prototype.slice.call(arguments));
  336. };
  337. }
  338. {% endif %}
  339. return {
  340. hasClass: hasClass,
  341. removeClass: removeClass,
  342. addClass: addClass,
  343. toggleClass: toggleClass,
  344. getPreference: getPreference,
  345. setPreference: setPreference,
  346. addEventListener: addEventListener,
  347. request: request,
  348. renderAjaxRequests: renderAjaxRequests,
  349. getSfwdt: function(token) {
  350. if (!this.sfwdt) {
  351. this.sfwdt = document.getElementById('sfwdt' + token);
  352. }
  353. return this.sfwdt;
  354. },
  355. load: function(selector, url, onSuccess, onError, options) {
  356. var el = document.getElementById(selector);
  357. if (el && el.getAttribute('data-sfurl') !== url) {
  358. request(
  359. url,
  360. function(xhr) {
  361. el.innerHTML = xhr.responseText;
  362. el.setAttribute('data-sfurl', url);
  363. removeClass(el, 'loading');
  364. var pending = pendingRequests;
  365. for (var i = 0; i < requestStack.length; i++) {
  366. startAjaxRequest(i);
  367. if (requestStack[i].duration) {
  368. finishAjaxRequest(i);
  369. }
  370. }
  371. /* Revert the pending state in case there was a start called without a finish above. */
  372. pendingRequests = pending;
  373. (onSuccess || noop)(xhr, el);
  374. },
  375. function(xhr) { (onError || noop)(xhr, el); },
  376. '',
  377. options
  378. );
  379. }
  380. return this;
  381. },
  382. showToolbar: function(token) {
  383. var sfwdt = this.getSfwdt(token);
  384. removeClass(sfwdt, 'sf-display-none');
  385. if (getPreference('toolbar/displayState') == 'none') {
  386. document.getElementById('sfToolbarMainContent-' + token).style.display = 'none';
  387. document.getElementById('sfToolbarClearer-' + token).style.display = 'none';
  388. document.getElementById('sfMiniToolbar-' + token).style.display = 'block';
  389. } else {
  390. document.getElementById('sfToolbarMainContent-' + token).style.display = 'block';
  391. document.getElementById('sfToolbarClearer-' + token).style.display = 'block';
  392. document.getElementById('sfMiniToolbar-' + token).style.display = 'none';
  393. }
  394. },
  395. hideToolbar: function(token) {
  396. var sfwdt = this.getSfwdt(token);
  397. addClass(sfwdt, 'sf-display-none');
  398. },
  399. initToolbar: function(token) {
  400. this.showToolbar(token);
  401. var hideButton = document.getElementById('sfToolbarHideButton-' + token);
  402. var hideButtonSvg = hideButton.querySelector('svg');
  403. hideButtonSvg.setAttribute('aria-hidden', 'true');
  404. hideButtonSvg.setAttribute('focusable', 'false');
  405. addEventListener(hideButton, 'click', function (event) {
  406. event.preventDefault();
  407. var p = this.parentNode;
  408. p.style.display = 'none';
  409. (p.previousElementSibling || p.previousSibling).style.display = 'none';
  410. document.getElementById('sfMiniToolbar-' + token).style.display = 'block';
  411. setPreference('toolbar/displayState', 'none');
  412. });
  413. var showButton = document.getElementById('sfToolbarMiniToggler-' + token);
  414. var showButtonSvg = showButton.querySelector('svg');
  415. showButtonSvg.setAttribute('aria-hidden', 'true');
  416. showButtonSvg.setAttribute('focusable', 'false');
  417. addEventListener(showButton, 'click', function (event) {
  418. event.preventDefault();
  419. var elem = this.parentNode;
  420. if (elem.style.display == 'none') {
  421. document.getElementById('sfToolbarMainContent-' + token).style.display = 'none';
  422. document.getElementById('sfToolbarClearer-' + token).style.display = 'none';
  423. elem.style.display = 'block';
  424. } else {
  425. document.getElementById('sfToolbarMainContent-' + token).style.display = 'block';
  426. document.getElementById('sfToolbarClearer-' + token).style.display = 'block';
  427. elem.style.display = 'none'
  428. }
  429. setPreference('toolbar/displayState', 'block');
  430. });
  431. },
  432. loadToolbar: function(token, newToken) {
  433. var that = this;
  434. var triesCounter = document.getElementById('sfLoadCounter-' + token);
  435. var options = {
  436. retry: true,
  437. onSend: function (count) {
  438. if (count === 3) {
  439. that.initToolbar(token);
  440. }
  441. if (triesCounter) {
  442. triesCounter.textContent = count;
  443. }
  444. },
  445. };
  446. var cancelButton = document.getElementById('sfLoadCancel-' + token);
  447. if (cancelButton) {
  448. addEventListener(cancelButton, 'click', function (event) {
  449. event.preventDefault();
  450. options.stop = true;
  451. that.hideToolbar(token);
  452. });
  453. }
  454. newToken = (newToken || token);
  455. this.load(
  456. 'sfwdt' + token,
  457. '{{ url("_wdt", { "token": "xxxxxx" })|escape('js') }}'.replace(/xxxxxx/, newToken),
  458. function(xhr, el) {
  459. /* Do nothing in the edge case where the toolbar has already been replaced with a new one */
  460. if (!document.getElementById('sfToolbarMainContent-' + newToken)) {
  461. return;
  462. }
  463. /* Evaluate in global scope scripts embedded inside the toolbar */
  464. var i, scripts = [].slice.call(el.querySelectorAll('script'));
  465. for (i = 0; i < scripts.length; ++i) {
  466. if (scripts[i].firstChild) {
  467. eval.call({}, scripts[i].firstChild.nodeValue);
  468. }
  469. }
  470. el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
  471. if (el.style.display == 'none') {
  472. return;
  473. }
  474. that.initToolbar(newToken);
  475. /* Handle toolbar-info position */
  476. var toolbarBlocks = [].slice.call(el.querySelectorAll('.sf-toolbar-block'));
  477. for (i = 0; i < toolbarBlocks.length; ++i) {
  478. toolbarBlocks[i].onmouseover = function () {
  479. var toolbarInfo = this.querySelectorAll('.sf-toolbar-info')[0];
  480. var pageWidth = document.body.clientWidth;
  481. var elementWidth = toolbarInfo.offsetWidth;
  482. var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
  483. var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth;
  484. /* Reset right and left value, useful on window resize */
  485. toolbarInfo.style.right = '';
  486. toolbarInfo.style.left = '';
  487. if (elementWidth > pageWidth) {
  488. toolbarInfo.style.left = 0;
  489. }
  490. else if (leftValue > 0 && rightValue > 0) {
  491. toolbarInfo.style.right = (rightValue * -1) + 'px';
  492. } else if (leftValue < 0) {
  493. toolbarInfo.style.left = 0;
  494. } else {
  495. toolbarInfo.style.right = '0px';
  496. }
  497. };
  498. }
  499. renderAjaxRequests();
  500. addEventListener(document.querySelector('.sf-toolbar-ajax-clear'), 'click', function() {
  501. requestStack = [];
  502. renderAjaxRequests();
  503. successStreak = 4;
  504. document.querySelector('.sf-toolbar-ajax-request-list').innerHTML = '';
  505. });
  506. addEventListener(document.querySelector('.sf-toolbar-block-ajax'), 'mouseenter', function (event) {
  507. var elem = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info');
  508. elem.scrollTop = elem.scrollHeight;
  509. });
  510. addEventListener(document.querySelector('.sf-toolbar-block-ajax > .sf-toolbar-icon'), 'click', function (event) {
  511. event.preventDefault();
  512. toggleClass(this.parentNode, 'hover');
  513. });
  514. var dumpInfo = document.querySelector('.sf-toolbar-block-dump .sf-toolbar-info');
  515. if (null !== dumpInfo) {
  516. addEventListener(dumpInfo, 'sfbeforedumpcollapse', function () {
  517. dumpInfo.style.minHeight = dumpInfo.getBoundingClientRect().height+'px';
  518. });
  519. addEventListener(dumpInfo, 'mouseleave', function () {
  520. dumpInfo.style.minHeight = '';
  521. });
  522. }
  523. },
  524. function(xhr) {
  525. if (xhr.status !== 0 && !options.stop) {
  526. var sfwdt = that.getSfwdt(token);
  527. sfwdt.innerHTML = '\
  528. <div class="sf-toolbarreset notranslate">\
  529. <div class="sf-toolbar-icon"><svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><path fill="#FFFFFF" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M20 7.5 c-0.6 0-1-0.3-1-0.9c0-0.2 0-0.4 0.2-0.6c0.1-0.3 0.2-0.3 0.2-0.4c0-0.3-0.5-0.4-0.7-0.4c-2 0.1-2.5 2.7-2.9 4.8l-0.2 1.1 c1.1 0.2 1.9 0 2.4-0.3c0.6-0.4-0.2-0.8-0.1-1.3C18 9.2 18.4 9 18.7 8.9c0.5 0 0.8 0.5 0.8 1c0 0.8-1.1 2-3.3 1.9 c-0.3 0-0.5 0-0.7-0.1L15 14.1c-0.4 1.7-0.9 4.1-2.6 6.2c-1.5 1.8-3.1 2.1-3.8 2.1c-1.3 0-2.1-0.6-2.2-1.6c0-0.9 0.8-1.4 1.3-1.4 c0.7 0 1.2 0.5 1.2 1.1c0 0.5-0.2 0.6-0.4 0.7c-0.1 0.1-0.3 0.2-0.3 0.4c0 0.1 0.1 0.3 0.4 0.3c0.5 0 0.9-0.3 1.2-0.5 c1.3-1 1.7-2.9 2.4-6.2l0.1-0.8c0.2-1.1 0.5-2.3 0.8-3.5c-0.9-0.7-1.4-1.5-2.6-1.8c-0.8-0.2-1.3 0-1.7 0.4C8.4 10 8.6 10.7 9 11.1 l0.7 0.7c0.8 0.9 1.3 1.7 1.1 2.7c-0.3 1.6-2.1 2.8-4.3 2.1c-1.9-0.6-2.2-1.9-2-2.7c0.2-0.6 0.7-0.8 1.2-0.6 c0.5 0.2 0.7 0.8 0.6 1.3c0 0.1 0 0.1-0.1 0.3C6 15 5.9 15.2 5.9 15.3c-0.1 0.4 0.4 0.7 0.8 0.8c0.8 0.3 1.7-0.2 1.9-0.9 c0.2-0.6-0.2-1.1-0.4-1.2l-0.8-0.9c-0.4-0.4-1.2-1.5-0.8-2.8c0.2-0.5 0.5-1 0.9-1.4c1-0.7 2-0.8 3-0.6c1.3 0.4 1.9 1.2 2.8 1.9 c0.5-1.3 1.1-2.6 2-3.8c0.9-1 2-1.7 3.3-1.8C20 4.8 21 5.4 21 6.3C21 6.7 20.8 7.5 20 7.5z"/></svg></div>\
  530. An error occurred while loading the web debug toolbar. <a href="{{ url("_profiler_home")|escape('js') }}' + newToken + '">Open the web profiler.</a>\
  531. </div>\
  532. ';
  533. sfwdt.setAttribute('class', 'sf-toolbar sf-error-toolbar');
  534. }
  535. },
  536. options
  537. );
  538. return this;
  539. },
  540. toggle: function(selector, elOn, elOff) {
  541. var tmp = elOn.style.display,
  542. el = document.getElementById(selector);
  543. elOn.style.display = elOff.style.display;
  544. elOff.style.display = tmp;
  545. if (el) {
  546. el.style.display = 'none' === tmp ? 'none' : 'block';
  547. }
  548. return this;
  549. },
  550. };
  551. })();
  552. }
  553. Sfjs.loadToolbar('{{ token }}');
  554. /*]]>*/</script>